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

Fix openapi specification #8273

Merged
merged 7 commits into from
Jul 19, 2024

Conversation

shinyaaa
Copy link
Contributor

@shinyaaa shinyaaa commented Jul 5, 2024

Problem

There are some swagger errors in pageserver/src/http/openapi_spec.yml

Error	431	15000	Object includes not allowed fields
Error	569	3100401	should always have a 'required'
Error	569	15000	Object includes not allowed fields
Error	1111	10037	properties members must be schemas

Summary of changes

Fixed above errors.

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

@shinyaaa shinyaaa requested a review from a team as a code owner July 5, 2024 04:17
@shinyaaa shinyaaa requested a review from arpad-m July 5, 2024 04:17
@arpad-m
Copy link
Member

arpad-m commented Jul 5, 2024

Which tool did you run on the swagger file?

@shinyaaa
Copy link
Contributor Author

shinyaaa commented Jul 5, 2024

I used the "OpenAPI (Swagger) Editor," which is a VS Code extension. Also, we can see the same errors on https://editor.swagger.io/.

Since the file name is openapi_spec.yml, I think that the implementation should follow OpenAPI formatting.
Do you think?

@arpad-m
Copy link
Member

arpad-m commented Jul 5, 2024

Thanks. The file is present in the open source repository but it is written for usage by the closed source control plane. We remove stuff from it that the control plane doesn't use, for example, so it is not a full description of the pageserver's HTTP API.

I have asked my colleauges who work on the control plane to have a look on your PR.

Copy link
Member

@ololobus ololobus left a comment

Choose a reason for hiding this comment

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

This fixes some obvious typos, and spec is valid, so I think it's good to go. Thanks!

I was a bit concerned about specifying schema for html response, never used it, but it looks like at least Go client was generated without issues.

I opened an internal client PR https://github.com/neondatabase/cloud/pull/15383

Copy link
Member

@ololobus ololobus left a comment

Choose a reason for hiding this comment

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

I think I also messed something up with CI permissions after clicking 'Update with rebase'. Hopefully if you push another commit on your own it will help

pageserver/src/http/openapi_spec.yml Outdated Show resolved Hide resolved
Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com>
@koivunej koivunej added the approved-for-ci-run Changes are safe to trigger CI for the PR label Jul 16, 2024
@github-actions github-actions bot removed the approved-for-ci-run Changes are safe to trigger CI for the PR label Jul 16, 2024
@vipvap vipvap mentioned this pull request Jul 16, 2024
Copy link

github-actions bot commented Jul 16, 2024

3169 tests run: 3048 passed, 0 failed, 121 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_change_pageserver: debug
  • test_scrubber_physical_gc_ancestors[None]: debug

Postgres 14

  • test_delete_timeline_client_hangup: debug

Code coverage* (full report)

  • functions: 32.7% (6994 of 21410 functions)
  • lines: 50.0% (55220 of 110417 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ebb1598 at 2024-07-19T18:28:51.253Z :recycle:

Copy link
Member

@ololobus ololobus left a comment

Choose a reason for hiding this comment

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

Thanks! I manged to generate the client now, so LGTM

@ololobus ololobus closed this Jul 19, 2024
@ololobus ololobus reopened this Jul 19, 2024
@ololobus ololobus added the approved-for-ci-run Changes are safe to trigger CI for the PR label Jul 19, 2024
@github-actions github-actions bot removed the approved-for-ci-run Changes are safe to trigger CI for the PR label Jul 19, 2024
@vipvap vipvap mentioned this pull request Jul 19, 2024
@ololobus
Copy link
Member

OMG, sorry for accidentally closing it. I just referenced it in the private repo as This is a part of the external contributor fix: https://github.com/neondatabase/neon/pull/8273, and GitHub decided to close this PR because of fix #.... I didn't know that it works for PRs too, only used it for auto-closing issues

@ololobus ololobus enabled auto-merge (squash) July 19, 2024 16:48
@ololobus ololobus merged commit 3fbb84d into neondatabase:main Jul 19, 2024
210 of 216 checks passed
problame pushed a commit that referenced this pull request Jul 22, 2024
## Problem

There are some swagger errors in `pageserver/src/http/openapi_spec.yml`
```
Error	431	15000	Object includes not allowed fields
Error	569	3100401	should always have a 'required'
Error	569	15000	Object includes not allowed fields
Error	1111	10037	properties members must be schemas
```

## Summary of changes

Fixed the above errors.
@shinyaaa shinyaaa deleted the fix-openapi-specification branch August 15, 2024 07:14
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.

None yet

4 participants