Ryan Despain
04/03/2025, 8:46 PM~/.aws/config file that has several profiles, including a default . these all use an sso-session . everything works with the CLI and other languages/SDKs. Also works in Java if I use the non-shaded SDK stuff. However, if I try to run a job with flink run or I try to use the shaded references in an example, CredsTest.java then I get the same errors.
I've put together this github repo that hopefully helps with reproduction. I created the java project with the flink archetype, if that matters.
I imagine I could "fix" this by reshading the dependencies to match the flink-shaded stuff, but that seems like a nightmare. Hoping some smarter folks can help me with this pain.
I also really hope I'm just doing something dumb.Ryan Despain
04/03/2025, 8:57 PMTo use Sso related properties in the 'default' profile, the 'sso' service module must be on the class path. error is happening. Because the "'sso' service module"(factory) can't be found?Ryan Despain
04/07/2025, 8:39 PMssooidc, profiles) to this list of dependencies in the parent pom would be a way to fix this?
or, we tell maven shade to not replace the SSO_PROFILE_CREDENTIALS_PROVIDER_FACTORY value with the shaded value?Ryan Despain
04/07/2025, 8:52 PMRyan Despain
04/07/2025, 11:18 PMKeith Lee
04/08/2025, 4:44 PMI only see the non-shaded classes and not the shaded ones. So I think that's why theYes, classloading that uses constant string as package/classname usually breaks when shading is done. Why are you shading?error is happening. Because the "'sso' service module"(factory) can't be found?To use Sso related properties in the 'default' profile, the 'sso' service module must be on the class path.
However, if I try to run a job withAre you running the job with a different user?flink run
Ryan Despain
04/08/2025, 4:50 PMflink run locally is using the same user, profile, and sso settings, correct.
as far as "why are you shading?"... i'm not entirely certain how to answer that. to my knowledge the flink-aws-connector jars are all shaded. i'm just trying to leverage those shaded jars.
as to why i'm shading in my application... this is because both the python example from the AWS folks and the archtype-generated pom both use shading.
the "classloading that uses constant strings" is from the aws sdk for java in the ProfileCredntialsUtils.class.
when i add sso and ssooidc to the flink-connector-aws-base/pom.xml dependencies then everything works.Ryan Despain
04/15/2025, 7:51 PMKeith Lee
04/16/2025, 6:49 AMKeith Lee
04/16/2025, 7:05 AMRyan Despain
04/16/2025, 10:19 PM