-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore(commands): fix user name display in commands #2284
chore(commands): fix user name display in commands #2284
Conversation
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.
I think we should have a slightly more generic approach so that all tasks fill the _current_user
context var, see comments.
Later, this will ensure that all tasks have the current user available, not only TS generation tasks. This will also simplify the implementation of execute_or_add_commands
ba13afe
to
c37e3c0
Compare
e0fa0f6
to
63e4baa
Compare
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.
The new implementation looks good!
Still some last comments, in particular I think we should add a TODO to clarify more the place where the parsing of the token should be done (middleware or fastapi "dependency").
…ent user identity, update execute_or_add_commands function, update tests
…riesGeneratorTask, add context manager, update test
63e4baa
to
bfcd7aa
Compare
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.
Thanks for the additional unit test!
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.
Hello Mauranne, great work ! 👍
A context variable is introduced to hold the use of the current request, and of the current task. Can be re-used in the future to avoid passing this context information as an argument to all methods (for logging, etc).
fix ANT-2543