Skip to content

Conversation

@ttuffin
Copy link
Contributor

@ttuffin ttuffin commented Feb 9, 2026

This change allows for the definition of a dedicated database user account specifically for event streams. If EVENT_STREAM_DB_USER and EVENT_STREAM_DB_PASSWORD are defined, those credentials will be used by both the event stream (producer) and the activation (consumer). If either of these settings are undefined the default database credentials will be used.

  • Fix postrgres credential type but adding the 'type' field
  • Allow for setting a specific event stream database user

https://issues.redhat.com/browse/AAP-64874

@ttuffin ttuffin requested a review from mkanoor February 9, 2026 16:55
@ttuffin ttuffin requested a review from a team as a code owner February 9, 2026 16:55
credential_type = models.CredentialType.objects.get(
name=enums.DefaultCredentialType.POSTGRES
)
for field in credential_type.inputs.get("fields", []):
Copy link
Contributor

Choose a reason for hiding this comment

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

@ttuffin should we save/update this only if we are missing the type so its just done once and use the new schema which has the type and maybe other changes down the road.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkanoor I've updated the logic to check if there is any mismatch with the schema, and if so, reapply the entire schema.

Copy link
Contributor

@mkanoor mkanoor left a comment

Choose a reason for hiding this comment

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

comment added

@ttuffin ttuffin force-pushed the AAP-64874_pgnotify_creds branch from f614283 to e770be4 Compare February 10, 2026 12:51
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.46%. Comparing base (937cf5e) to head (ccbf22d).

@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   91.45%   91.46%   +0.01%     
==========================================
  Files         234      234              
  Lines       10089    10102      +13     
==========================================
+ Hits         9227     9240      +13     
  Misses        862      862              
Flag Coverage Δ
unit-int-tests-3.11 91.46% <100.00%> (+0.01%) ⬆️
unit-int-tests-3.12 91.46% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...da/core/management/commands/create_initial_data.py 98.04% <100.00%> (+0.11%) ⬆️
src/aap_eda/settings/defaults.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ttuffin ttuffin force-pushed the AAP-64874_pgnotify_creds branch 2 times, most recently from 8deb9f5 to 836abfe Compare February 10, 2026 14:56
@ttuffin
Copy link
Contributor Author

ttuffin commented Feb 10, 2026

Added unit tests.

@ttuffin ttuffin force-pushed the AAP-64874_pgnotify_creds branch from 836abfe to e68d997 Compare February 10, 2026 15:00
- Fix postrgres credential type but adding the 'type' field
- Allow for setting a specific event stream database user
@ttuffin ttuffin force-pushed the AAP-64874_pgnotify_creds branch from e68d997 to ccbf22d Compare February 10, 2026 15:16
@sonarqubecloud
Copy link

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.

3 participants