-
-
Notifications
You must be signed in to change notification settings - Fork 465
[MIG] auth_jwt_demo: Migration to 18.0 #780
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: 18.0
Are you sure you want to change the base?
Conversation
kobros-tech
commented
Apr 1, 2025
- [18.0][MIG] auth_jwt: Migration to 18.0 #752
This method is useful for public endpoints that need to work for anonymous user, but can be enhanced when an authenticated user is know. A typical use case is a "add to cart" enpoint that can work for anonymous users, but can be enhanced by binding the cart to a known customer when the authenticated user is known.
The unit tests were broken for non-functional reasons (interaction with the mock) and is easier to implement as integration test.
e1e86ff
to
951a405
Compare
demo is there now, I had to ignore eslint for js test files, also warn message had to be ignored for CI test. |
|
||
# Add filter to the specific logger | ||
logger = logging.getLogger("odoo.addons.auth_jwt.models.ir_http") | ||
logger.addFilter(IgnoreSpecificWarningFilter()) |
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.
We should not filter warnings like this.
If this warning is expect it we should capture it and test that it has been emitted with self.assertLogs
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.
can you give me an example?
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.
anyway, I am ignoring the warining log here as it causes test error in the run boat although it is intentional log from the base module.
I don't want to assert the log but I want to ingonre it from test wathcing errors.
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.
see previous comment
Also, let's not change |
/ocabot migration auth_jwt_demo |
how can I exclude a file? |
Probably somewhere in this file server-auth/.pre-commit-config.yaml Line 115 in 0771ec7
|
951a405
to
5b4e615
Compare
@kobros-tech is this ready for review? |
to me yes, but I am waiting for @sbidoul to tell his opinion. |
5b4e615
to
a43fc56
Compare