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

airbyte server: ignore aws secret manager value for default secret persistence #21468

Merged
merged 2 commits into from
Jan 17, 2023
Merged

airbyte server: ignore aws secret manager value for default secret persistence #21468

merged 2 commits into from
Jan 17, 2023

Conversation

mohitreddy1996
Copy link
Contributor

What

Fix Airbyte server crashing due to multiple instances of Persistent Secret instance provider when secret.persistence is set as AWS_SECRET_MANAGER

How

First instance is from awsSecretPersistence and the second instance being provided is from defaultSecretPersistence.

Recommended reading order

  1. SecretPersistenceBeanFactory.java

🚨 User Impact 🚨

Fixes bug when secret manager is set as AWS_SECRET_MANAGER

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Fixes bug on Airbyte server. Fails with -

2023-01-17 02:25:44 ERROR i.m.r.Micronaut(handleStartupException):338 - Error starting Micronaut server: Bean definition [io.airbyte.server.apis.SourceDefinitionApiController] could not be loaded: Failed to inject value for parameter [secretPersistence] of method [secretsHydrator] of class: io.airbyte.config.persistence.split_secrets.SecretsHydrator

Message: Multiple possible bean candidates found: [io.airbyte.config.persistence.split_secrets.SecretPersistence, io.airbyte.config.persistence.split_secrets.SecretPersistence]
Path Taken: new SourceDefinitionApiController(SourceDefinitionsHandler sourceDefinitionsHandler) --> new SourceDefinitionApiController([SourceDefinitionsHandler sourceDefinitionsHandler]) --> new SourceDefinitionsHandler(ConfigRepository configRepository,Supplier uuidSupplier,SynchronousSchedulerClient schedulerSynchronousClient,AirbyteGithubStore githubStore,[SourceHandler sourceHandler],AirbyteProtocolVersionRange protocolVersionRange) --> new SourceHandler(ConfigRepository configRepository,[SecretsRepositoryReader secretsRepositoryReader],SecretsRepositoryWriter secretsRepositoryWriter,JsonSchemaValidator integrationSchemaValidation,ConnectionsHandler connectionsHandler,Supplier uuidGenerator,JsonSecretsProcessor secretsProcessor,ConfigurationUpdate configurationUpdate,OAuthConfigSupplier oAuthConfigSupplier) --> SecretsRepositoryReader.secretsRepositoryReader(ConfigRepository configRepository,[SecretsHydrator secretsHydrator]) --> SecretsHydrator.secretsHydrator([SecretPersistence secretPersistence])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.airbyte.server.apis.SourceDefinitionApiController] could not be loaded: Failed to inject value for parameter [secretPersistence] of method [secretsHydrator] of class: io.airbyte.config.persistence.split_secrets.SecretsHydrator

Message: Multiple possible bean candidates found: [io.airbyte.config.persistence.split_secrets.SecretPersistence, io.airbyte.config.persistence.split_secrets.SecretPersistence]
Path Taken: new SourceDefinitionApiController(SourceDefinitionsHandler sourceDefinitionsHandler) --> new SourceDefinitionApiController([SourceDefinitionsHandler sourceDefinitionsHandler]) --> new SourceDefinitionsHandler(ConfigRepository configRepository,Supplier uuidSupplier,SynchronousSchedulerClient schedulerSynchronousClient,AirbyteGithubStore githubStore,[SourceHandler sourceHandler],AirbyteProtocolVersionRange protocolVersionRange) --> new SourceHandler(ConfigRepository configRepository,[SecretsRepositoryReader secretsRepositoryReader],SecretsRepositoryWriter secretsRepositoryWriter,JsonSchemaValidator integrationSchemaValidation,ConnectionsHandler connectionsHandler,Supplier uuidGenerator,JsonSecretsProcessor secretsProcessor,ConfigurationUpdate configurationUpdate,OAuthConfigSupplier oAuthConfigSupplier) --> SecretsRepositoryReader.secretsRepositoryReader(ConfigRepository configRepository,[SecretsHydrator secretsHydrator]) --> SecretsHydrator.secretsHydrator([SecretPersistence secretPersistence])
	at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1921) ~[micronaut-inject-3.8.0.jar:3.8.0]

Tests

Unit

N/A

Integration

N/A

Acceptance

N/A

@mohitreddy1996 mohitreddy1996 marked this pull request as ready for review January 17, 2023 02:42
@mohitreddy1996
Copy link
Contributor Author

@jdpgrailsdev @benmoriceau @pmossman Could you please take a look at this change?

I believe this was missed out in - #21073

Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mohitreddy1996
Copy link
Contributor Author

@jdpgrailsdev thanks a lot for the review. Sorry the branch was out of date, so I updated it. Looks like I might need your approvals again to kick off the merge workflow?

Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jdpgrailsdev
Copy link
Contributor

@mohitreddy1996 Thanks for the fix!

@jdpgrailsdev jdpgrailsdev merged commit 2abfdd6 into airbytehq:master Jan 17, 2023
@mohitreddy1996 mohitreddy1996 deleted the mohit/fix-server-secrets-persistence branch January 21, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/server community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants