kafbat / ui-serde-glue

AWS Glue Serde for kafka-ui
Apache License 2.0
1 stars 2 forks source link

Add assume role support #45

Open shbodya opened 4 days ago

shbodya commented 4 days ago

Assume role from roleArn. Fix Tests.

germanosin commented 4 days ago

@shbodya thanks for your contribution!

Haarolean commented 4 days ago

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

shbodya commented 3 days ago

@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 commented 3 days ago

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