-
Notifications
You must be signed in to change notification settings - Fork 3
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
LITE-28161 Add user id and name to Configuration events #42
Conversation
@@ -61,7 +62,7 @@ class ConnectExtensionXvsWebApplication(WebApplicationBase): | |||
|
|||
@router.get( | |||
'/deployments/requests', | |||
summary='List all request accross deployments', | |||
summary='List all requests across deployments', |
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.
just typos
@@ -238,7 +240,7 @@ def add_configuration( | |||
mime_type=file_data.mime_type, | |||
) | |||
db.add(file_instance) | |||
db.commit() | |||
db.flush() |
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.
Needed for transaction because db.commit() ends transaction
5bfb3f4
to
47d0cfc
Compare
47d0cfc
to
acf77f7
Compare
@@ -108,6 +108,12 @@ def test_post_configuration( | |||
'mime_type': media_response['mime_type'], | |||
}, | |||
}, | |||
headers={ | |||
"connect-auth": ( |
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.
For tests it is better to generate the test signature based on human-readable input. Otherwise hard to understand what is inside and what should be expected in the tests
updated_at = db.Column(db.DateTime(), default=datetime.utcnow) | ||
updated_by = db.Column(db.String(20)) | ||
updated_by = db.Column(db.JSON) |
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.
Honestly speaking, I don't like the idea of storing it as JSON here, cause of:
- What id the name of the user changed?
- Filtering, rql or other filters doesn't support JSON fields filters for now
Let's have it as is for now, but I'll put it as the gap
@@ -72,7 +72,7 @@ class ConfigurationSchema(NonNullSchema): | |||
id: str | |||
file: FileSchema | |||
state: ConfigurationStateChoices | |||
events: Dict[str, Dict[str, Union[datetime, str]]] | |||
events: Dict[str, Dict[str, Union[datetime, Dict[str, str]]]] |
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.
For the future --> TypeAliases will help you
No description provided.