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

Pull config via @ConfigProperty in notification-publisher #1229

Merged
merged 7 commits into from
May 7, 2024

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Apr 23, 2024

Description

Note

This PR is based on #1223. Please review that first, I'll update this PR once it is merged. Should drastically reduce the change size. :)

This replaces manual usage of ConfigPropertyRepository with more Quarkus-idiomatic @ConfigProperty injection. It leverages the new quarkus-config-dependencytrack extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Addressed Issue

Relates to #929
Fixes #1232

Additional Details

N/A

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@nscuro nscuro added the enhancement New feature or request label Apr 23, 2024
@nscuro nscuro force-pushed the use-config-extension branch 2 times, most recently from 4f1cfab to 5cf837e Compare April 24, 2024 12:32
@nscuro nscuro changed the title Pull config via ConfigProperty in notification-publisher Pull config via @ConfigProperty in notification-publisher Apr 24, 2024
@nscuro nscuro force-pushed the use-config-extension branch 2 times, most recently from 75dcf81 to 60599ec Compare April 24, 2024 14:23
@nscuro nscuro marked this pull request as ready for review April 25, 2024 10:48
nscuro added 7 commits April 30, 2024 11:53
This replaces manual usage of `ConfigPropertyRepository` with more Quarkus-idiomatic `@ConfigProperty` injection. It leverages the new `quarkus-config-dependencytrack` extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Relates to #929

Signed-off-by: nscuro <nscuro@protonmail.com>
Requires different properties, which can only be set on class level with test profiles.

Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
Turns out `@Test` annotations have no effect when set on methods in an `abstract` class. junit-team/junit5#960

Signed-off-by: nscuro <nscuro@protonmail.com>
They are no longer needed, as the `CONFIGPROPERTY` table is now consumed via `@ConfigProperty` annotations.

Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
Note that the `quarkus-mailer` dependency is still required in order to be able to use Vert.x's `MailClient`.

Fixes #1232

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro force-pushed the use-config-extension branch from 1178cb1 to e8ed09f Compare April 30, 2024 09:53
Copy link

@nscuro nscuro added this to the 0.5.0 milestone May 7, 2024
@nscuro nscuro merged commit cbe36fa into main May 7, 2024
11 checks passed
@nscuro nscuro deleted the use-config-extension branch May 7, 2024 16:51
nscuro added a commit that referenced this pull request May 20, 2024
Email configuration is pulled from the database as of #1229. The e2e test still assumed configuration via properties.

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request May 20, 2024
Email configuration is pulled from the database as of #1229. The e2e test still assumed configuration via properties.

Signed-off-by: nscuro <nscuro@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email configuration cannot be changed at runtime
2 participants