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

Version Number in Klaw from buildProperties instead of external configuration #2188

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

aindriu-aiven
Copy link
Contributor

@aindriu-aiven aindriu-aiven commented Jan 11, 2024

Update to use the build info properties to determine the build version of Klaw. This will prevent accidental incorrect configuration in the application.properties files

Linked issue

Resolves: #xxxxx

What kind of change does this PR introduce?

  • Bug fix
  • New feature
  • Refactor
  • Docs update
  • CI update

What is the current behavior?

Currently if an external application.properties file is not updated with the correct build info then the migration Utility does not execute appropriately. As the klaw-version and the properties version are incorrect.

What is the new behavior?

Now the klaw version will be taken from the build properties (from the pom when building) and used internally to ensure the correct version is being used.

Other information

This also prevents any issue where the klaw.version in the application.properties file is left with the placeholder that is normally replaced as part of the build.

Requirements (all must be checked before review)

  • The pull request title follows our guidelines
  • Tests for the changes have been added (if relevant)
  • The latest changes from the main branch have been pulled
  • pnpm lint has been run successfully

aindriu-aiven and others added 2 commits January 11, 2024 10:52
…n of Klaw. This will prevent accidental incorrect configuration in the application.properties files

Signed-off-by: Aindriu Lavelle <[email protected]>
@@ -123,9 +124,6 @@ public class ManageDatabase implements ApplicationContextAware, InitializingBean
@Value("${klaw.superadmin.default.password}")
private String superAdminDefaultPwd;

@Value("${klaw.version}")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we also remove this from application.properties ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah its a good question I left it "in case" it was used elsewhere but honestly yeah I should just remove it will take a look at that

Copy link
Contributor

@muralibasani muralibasani left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@aindriu-aiven aindriu-aiven merged commit 43e91e7 into main Jan 12, 2024
15 checks passed
@aindriu-aiven aindriu-aiven deleted the build-add-build-info branch January 12, 2024 10:08
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.

2 participants