Skip to content
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

Harmonize http status code usage #2451

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

jianglai
Copy link
Collaborator

@jianglai jianglai commented May 23, 2024

Given that we run servlets, it makes sense to always use the status
code contants from the servlet class.


This change is Reviewable

Copy link
Collaborator Author

@jianglai jianglai left a comment

Choose a reason for hiding this comment

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

Reviewed 28 of 28 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jianglai)

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 27 of 28 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jianglai)


core/src/main/java/google/registry/ui/server/console/ConsoleApiAction.java line 17 at r2 (raw file):

package google.registry.ui.server.console;

import static com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.HttpStatus.SC_INTERNAL_SERVER_ERROR;

hisssssss

should we have a presubmit banning import .*[.]shaded[.].*; ?

Given that we run servlets, it makes sense to always use the status
code contants from the servlet class.
Copy link
Collaborator Author

@jianglai jianglai left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)


core/src/main/java/google/registry/ui/server/console/ConsoleApiAction.java line 17 at r2 (raw file):

Previously, gbrodman wrote…

hisssssss

should we have a presubmit banning import .*[.]shaded[.].*; ?

Good catch, I actually added several presubmit regarding various shaded dependencies:

https://cs.opensource.google/nomulus/nomulus/+/master:config/presubmits.py;l=176?q=presubmit&ss=nomulus%2Fnomulus

I guess if import .*[.]shaded[.].* is not too aggressive, we can use it.

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jianglai)

@jianglai jianglai added this pull request to the merge queue May 24, 2024
Merged via the queue into google:master with commit e88ff77 May 24, 2024
9 checks passed
@jianglai jianglai deleted the http-status-code branch May 24, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants