Skip to content

Bug 2099197 - Move Bugzilla::WebService::Constants and Bugzilla::WebService::Wants to Bugzilla::API::V1 - #2850

Merged
dklawren merged 2 commits into
mozilla:masterfrom
Xzzz:bug-2099197
Nov 30, 2026
Merged

dklawren merged 2 commits into
mozilla:masterfrom
Xzzz:bug-2099197

Conversation

@Xzzz

@Xzzz Xzzz commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moves Bugzilla::WebService::Constants and Bugzilla::WebService::Wants, the last two files in Bugzilla/WebService/, to Bugzilla::API::V1, so the directory is gone.

Follow-up of 2081819, part of 2057358.

Changes

  • Bugzilla/WebService/Constants.pm and Wants.pm become Bugzilla/API/V1/Constants.pm and Wants.pm, and their callers, tests and POD use the new names.
  • Constants that nothing uses anymore are removed: STATUS_OK, STATUS_CREATED, STATUS_ACCEPTED, STATUS_NO_CONTENT, STATUS_MULTIPLE_CHOICES, STATUS_GONE and ERROR_GENERAL.
  • STATUS_NOT_AUTHORIZED and STATUS_REQUEST_TOO_LARGE are now exported too, as the webservice_status_code_map hook documentation already said.
  • The webservice_error_codes and webservice_status_code_map hooks keep their names, so extensions need no change.

Test plan

  • t/wants.t and t/012throwables.t pass
  • An API error keeps its code and HTTP status, e.g. GET /rest/bug/999999 returns 404 with code 101

References

…ervice::Wants to Bugzilla::API::V1

- Rename the packages and update their callers, tests and POD
- Drop the import of the constants in Bugzilla::Auth::Login::CGI, which uses none of them
- Remove the constants nothing uses anymore: STATUS_OK, STATUS_CREATED, STATUS_ACCEPTED, STATUS_NO_CONTENT,
  STATUS_MULTIPLE_CHOICES, STATUS_GONE and ERROR_GENERAL
@Xzzz
Xzzz requested a review from dklawren November 30, 2026 16:30
…e comments

- Export STATUS_NOT_AUTHORIZED and STATUS_REQUEST_TOO_LARGE: the webservice_status_code_map
  hook documentation tells extensions to use the STATUS_* constants
- Stop mentioning the WebService interface and XML-RPC fault codes, and refer to WS_ERROR_CODE
  by its name

@dklawren dklawren left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM r=dkl

@dklawren
dklawren merged commit 9faec47 into mozilla:master Nov 30, 2026
13 of 14 checks passed
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