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

pageserver/http: remove status code boilerplate from swagger spec #7385

Merged
merged 26 commits into from
Apr 16, 2024

Conversation

VladLazar
Copy link
Contributor

@VladLazar VladLazar commented Apr 15, 2024

Problem

We specify a bunch of possible error codes in the pageserver api swagger spec. This is error prone and annoying to work with. https://github.com/neondatabase/cloud/pull/11907 introduced generic error handling on the control plane side, so we can now clean up the spec.

Summary of changes

  • Remove generic error codes from swagger spec
  • Update a couple route handlers which would previously return an error without a msg field in the response body.

Tested via https://github.com/neondatabase/cloud/pull/12340

Related https://github.com/neondatabase/cloud/issues/7238

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

tenant/<id>/timeline/<id>/get_timestamp_for_lsn
tenant/<id>/timeline/<id>/get_lsn_by_timestamp
@VladLazar VladLazar marked this pull request as ready for review April 15, 2024 14:50
@VladLazar VladLazar requested a review from a team as a code owner April 15, 2024 14:50
@VladLazar VladLazar requested a review from jcsp April 15, 2024 14:50
Copy link

github-actions bot commented Apr 15, 2024

2760 tests run: 2642 passed, 0 failed, 118 skipped (full report)


Flaky tests (1)

Postgres 14

  • test_timeline_size_quota_on_startup: release

Code coverage* (full report)

  • functions: 28.0% (6436 of 23016 functions)
  • lines: 46.5% (45060 of 96831 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ce6703e at 2024-04-16T10:01:11.774Z :recycle:

@jcsp
Copy link
Contributor

jcsp commented Apr 15, 2024

Tested via https://github.com/neondatabase/cloud/pull/12340

Thanks for doing that.

@mtyazici if the control plane compiles and e2e tests pass, does that give us a good certainty that the removed error codes won't cause issues? I'm thinking especially of the 409/412 cases that might be explicitly used in some logic somewhere.

@VladLazar
Copy link
Contributor Author

Tested via neondatabase/cloud#12340

Thanks for doing that.

@mtyazici if the control plane compiles and e2e tests pass, does that give us a good certainty that the removed error codes won't cause issues? I'm thinking especially of the 409/412 cases that might be explicitly used in some logic somewhere.

There's some failures on https://github.com/neondatabase/cloud/pull/12340. Trying to disentangle test flakiness from the change.

@mtyazici
Copy link
Contributor

@mtyazici if the control plane compiles and e2e tests pass, does that give us a good certainty that the removed error codes won't cause issues? I'm thinking especially of the 409/412 cases that might be explicitly used in some logic somewhere.

I now see we retry on any error when checking for 404 on resource deletion instead of 409/412. Could be better to fix that logic as well if it's better.

There's some failures on https://github.com/neondatabase/cloud/pull/12340. Trying to disentangle test flakiness from the change.

Failures seem to be related to how PR is titled, the tests are passing which shows there is no actual problem.

@VladLazar
Copy link
Contributor Author

Failures seem to be related to how PR is titled, the tests are passing which shows there is no actual problem.

I retriggered the tests and they passed. Likely just flakes.

@VladLazar
Copy link
Contributor Author

Tests are passing on https://github.com/neondatabase/cloud/pull/12340. I think we should be ok to merge.

@VladLazar VladLazar requested a review from jcsp April 16, 2024 14:27
@VladLazar VladLazar merged commit 1c01295 into main Apr 16, 2024
53 of 54 checks passed
@VladLazar VladLazar deleted the vlad/swagger-clean-up branch April 16, 2024 15:24
This pull request was closed.
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.

3 participants