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

feat(all): introduce new namespace endpoints #390

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

donch1989
Copy link
Member

@donch1989 donch1989 commented Jul 23, 2024

Because

  • We'd like to simplify the API endpoints by merging users and organization endpoints into namespace endpoints.

This commit

  • Introduces new namespace endpoints.
  • Fixes several bugs for OpenAPI generation.
  • Makes the path parameters explicit.
  • Uses rdme cli tool for CI and validation.

@donch1989 donch1989 marked this pull request as draft July 23, 2024 04:18
@donch1989 donch1989 changed the title feat: introduce new namespace endpoints feat(all): introduce new namespace endpoints Jul 23, 2024
@donch1989 donch1989 force-pushed the huitang/ins-5404 branch 3 times, most recently from ee503bc to 1520311 Compare July 23, 2024 15:53
@@ -14,8 +15,62 @@ on:
- 'openapiv2/vdp/**'

jobs:
sync-openapi-private:
sync-openapi-private-dev:
name: Keep private (dev) docs in sync with latest pull request
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see value in this (I think it'll ease the frontend review and it opens the door for our docs maintainers to be part of the review process), but my concern is that the depoloyed version won't be clear (we won't have one deployed version per PR). Is there a way we can add a reference to the PR or the commit?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me check if we can add the commit hash or pr name in the doc title.

Copy link
Member Author

Choose a reason for hiding this comment

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

CleanShot 2024-07-24 at 16 37 22@2x
We can show the PR ID in the title.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice 🤩 I think one version per PR will force us to upgrade our tier and that might not be worth but this will help us to avoid confusion when reviewing the docs.

it opens the door for our docs maintainers to be part of the review process

Maybe this can be done only on the staging version once a PR is merged. Maybe even only once per sprint to reduce the review load.

Copy link
Member Author

Choose a reason for hiding this comment

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

it opens the door for our docs maintainers to be part of the review process
Maybe this can be done only on the staging version once a PR is merged. Maybe even only once per sprint to reduce the review load.

I think the dev document can help the engineering team with the initial review. The staging document will serve as a second round of review for all team members.

default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: ownerId
- name: namespaceId
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will require extra maintenance (I think this can be achieved by adding field_configuration: {path_param_name: ...} in the proto contract) but namespaceID (and similar initialisms) look so much better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree that initialisms namespaceID looks better. The issue with initialisms isn't just in the path parameters, it also appears in query parameters and even in the body. If we want to change this, we should do it all at once for consistency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah I hadn't thought of that. Perhaps keeping the configuration in all the fields is a bit verbose and a maintenance burden. Drawbacks of using camelCase in a protocol opinionated about snake_case 🙃

Copy link
Collaborator

Choose a reason for hiding this comment

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

😍

@donch1989 donch1989 marked this pull request as ready for review July 24, 2024 10:04
@donch1989 donch1989 merged commit 5f4c572 into main Jul 24, 2024
6 checks passed
@donch1989 donch1989 deleted the huitang/ins-5404 branch July 24, 2024 10:15
jvallesm added a commit that referenced this pull request Jul 24, 2024
… endpoints (#392)

Because

- #390 removed the owner
type prefix in favour of a namespace ID in most endpoints.
- This removes the need for the clients to know the type of an owner in
order to make a request.
- New dashboard enpdoints weren't included in this refactor as they were
added in parallel.


This commit

- Uses the namespace ID in dashboard endpoints.
- Changes are applied directly as these endpoints aren't in production
yet.

---------

Co-authored-by: droplet-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 👋 Done
Development

Successfully merging this pull request may close these issues.

2 participants