-
Notifications
You must be signed in to change notification settings - Fork 51
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
base: main
Are you sure you want to change the base?
Conversation
Allow users to provide custom UUIDs when creating event streams for consistent, static URLs. Users can also change UUIDs during updates for maximum flexibility.
|
Codecov Report❌ Patch coverage is
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
@@ -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): |
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.
@hsong-rh If we have unique=True and default=uuid4.uuid() set in the model do we still need this code?
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.
@mkanoor Use this validation function; we can handle exceptions better. Otherwise, we need to change in views to catch errors if they happen.
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