Skip to content

feat: Enable static event stream URLs with user-configurable UUIDs #1368

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hsong-rh
Copy link
Contributor

@hsong-rh hsong-rh commented Jul 29, 2025

Allow users to provide custom UUIDs when creating event streams for consistent, static URLs. Users can also change UUIDs during updates for maximum flexibility.

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

@hsong-rh hsong-rh requested a review from a team as a code owner July 29, 2025 13:54
Allow users to provide custom UUIDs when creating event streams for consistent,
static URLs. Users can also change UUIDs during updates for maximum flexibility.
Copy link

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 98.46154% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.16%. Comparing base (f49a343) to head (726098a).

Files with missing lines Patch % Lines
src/aap_eda/api/serializers/event_stream.py 90.90% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1368      +/-   ##
==========================================
+ Coverage   94.15%   94.16%   +0.01%     
==========================================
  Files         335      336       +1     
  Lines       19533    19597      +64     
==========================================
+ Hits        18391    18454      +63     
- Misses       1142     1143       +1     
Flag Coverage Δ
unit-int-tests-3.11 94.11% <98.46%> (+0.01%) ⬆️
unit-int-tests-3.12 94.16% <98.46%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...migrations/0066_add_unique_uuid_to_event_stream.py 100.00% <100.00%> (ø)
src/aap_eda/core/models/event_stream.py 100.00% <100.00%> (ø)
tests/integration/api/test_event_stream.py 100.00% <100.00%> (ø)
tests/integration/dab_rbac/conftest.py 94.20% <100.00%> (+0.17%) ⬆️
src/aap_eda/api/serializers/event_stream.py 95.52% <90.90%> (-0.91%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -41,6 +42,22 @@ class EventStreamInSerializer(serializers.ModelSerializer):
],
error_messages={"null": "EdaCredential is needed"},
)
uuid = serializers.UUIDField(required=False, allow_null=True)

def validate_uuid(self, value):
Copy link
Contributor

@mkanoor mkanoor Jul 30, 2025

Choose a reason for hiding this comment

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

@hsong-rh If we have unique=True and default=uuid4.uuid() set in the model do we still need this code?

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 Use this validation function; we can handle exceptions better. Otherwise, we need to change in views to catch errors if they happen.

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.

3 participants