-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Provide configuration properties for Flyway's Vault and Conjur support #25456
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
Conversation
...ure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
Show resolved
Hide resolved
...ure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
Show resolved
Hide resolved
...ure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
Show resolved
Hide resolved
...ure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
Show resolved
Hide resolved
...ure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR Chris. I've added a few notes, can you please have look?
@@ -328,6 +329,33 @@ | |||
*/ | |||
private Boolean skipExecutingMigrations; | |||
|
|||
/** | |||
* The REST API URL of the Conjur server. Requires Flyway teams. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration properties documentation don't start with "The" or "A". Please look at other description in this file (and others) for inspiration and this section of the reference guide.
* path must start with the name of the engine and end with the name of the secret | ||
* such 'kv/test/1/config'. Requires Flyway teams. | ||
*/ | ||
private String vaultSecrets; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's a comma separated list, it can't be a String
. We should offer a way for users to also use yaml list if they want to.
"vaultSecrets"); | ||
} | ||
|
||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be flagged with @Test
.
} | ||
|
||
@Test | ||
private void assertThatPropertyResultsInFlywayTeamsUpgradeRequiredException(String propertyKeyAndValue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer that the setup remains in each test and that the thing that's shared is the real assertion in the form of a ContextConsumer
.
A good example of what I am trying to convey is in EnvironmentEndpointAutoConfigurationTests
.
@snicoll all comments addressed. |
|
||
@Test | ||
void vaultSecretsIsCorrectlyMapped() { | ||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snicoll thx for the suggestion. Keeping the setup in each test makes it easy to see what the test is doing from first glance. Sharing only the common validation reduces the duplicated lines (and that was the main goal of the first attempt). 👍🏻
@@ -108,9 +109,7 @@ void expectedPropertiesAreManaged() { | |||
// Handled by the conversion service | |||
ignoreProperties(configuration, "baselineVersionAsString", "encodingAsString", "locationsAsStrings", | |||
"targetAsString"); | |||
// Teams-only properties that we cannot detect as no exception is thrown and | |||
// getters return null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be deleted as well please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good catch @wilkinsona .
Thanks for the follow-up and for yet another great contribution Chris. |
Fixes gh-24969