Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assume role support #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add assume role support #45

wants to merge 1 commit into from

Conversation

shbodya
Copy link

@shbodya shbodya commented Nov 4, 2024

Assume role from roleArn. Fix Tests.

@germanosin germanosin requested review from iliax and Haarolean November 4, 2024 11:35
@germanosin
Copy link
Member

@shbodya thanks for your contribution!

@Haarolean
Copy link
Member

@shbodya Hi there, it seems the tests are failing now, could you take a look please?

@shbodya
Copy link
Author

shbodya commented Nov 5, 2024

@Haarolean Hi there.
As far as I see there AWS Credentials missing in the CI pipeline.
For the local build, I use the command provided in readme with my own AWS secret and access keys.
Can you please check if there are some AWS keys provided to CI in Action secrets, or Action workers have instance profile attached (if you use self managed workers).

mvn clean test -Daws.accessKeyId="AKI........P6" -Daws.secretAccessKey="nE/Q.............Ty"

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< io.kafbat.ui.serde:serde-glue >--------------------
[INFO] Building kafbat-ui-serde-glue 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ serde-glue ---
[INFO] Deleting /Users/bohdan/Documents/homelab/ui-serde-glue/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ serde-glue ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/bohdan/Documents/homelab/ui-serde-glue/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ serde-glue ---
[INFO] Recompiling the module because of changed source code.
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files with javac [debug target 11] to target/classes
[WARNING] location of system modules is not set in conjunction with -source 11
not setting the location of system modules may lead to class files that cannot run on JDK 11
--release 11 is recommended instead of -source 11 -target 11 because it sets the location of system modules automatically
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ serde-glue ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/bohdan/Documents/homelab/ui-serde-glue/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ serde-glue ---
[INFO] Recompiling the module because of changed dependency.
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file with javac [debug target 11] to target/test-classes
[WARNING] location of system modules is not set in conjunction with -source 11
not setting the location of system modules may lead to class files that cannot run on JDK 11
--release 11 is recommended instead of -source 11 -target 11 because it sets the location of system modules automatically
[INFO]
[INFO] --- surefire:3.0.0-M5:test (default-test) @ serde-glue ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.kafbat.ui.serde.glue.GlueSerdeTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.494 s - in io.kafbat.ui.serde.glue.GlueSerdeTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:08 min
[INFO] Finished at: 2024-11-04T21:13:53+02:00
[INFO] ------------------------------------------------------------------------

@Haarolean
Copy link
Member

I doubt we should use any real credentials for unit tests. Perhaps the related parts should be mocked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants