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

List aliases API (rest & gRPC) #1363

Merged
merged 2 commits into from
Jan 19, 2023
Merged

List aliases API (rest & gRPC) #1363

merged 2 commits into from
Jan 19, 2023

Conversation

agourlay
Copy link
Member

@agourlay agourlay commented Jan 17, 2023

This PR adds a new API for listing existing collections aliases.

  • openapi docs generated
  • openapi test
  • gRPC docs

This change requires to update the clients to expose the new feature.

@@ -151,6 +158,7 @@ async fn update_collection_cluster(
// Configure services
pub fn config_collections_api(cfg: &mut web::ServiceConfig) {
cfg.service(get_collections)
.service(get_aliases) // higher priority than /collections/{name}
Copy link
Member Author

@agourlay agourlay Jan 17, 2023

Choose a reason for hiding this comment

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

There is a subtle issue here, the get_aliases needs must have a higher priority than get_collection.

GET collections/aliases vs GET collections/{name} are conflicting with each other.

Maybe we should forbid the creation of collections name aliases?

Copy link
Member

Choose a reason for hiding this comment

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

WDYT about GET /aliases for all aliases and GET /collections/<name>/aliases for aliases associated with specified colelction?

Similar to /snapshots

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion 👍
Done in 4b6ef78

@agourlay agourlay linked an issue Jan 17, 2023 that may be closed by this pull request
@agourlay agourlay merged commit 6f284da into dev Jan 19, 2023
@agourlay agourlay deleted the list-aliases branch January 19, 2023 06:59
generall pushed a commit that referenced this pull request Feb 6, 2023
* List aliases API (rest & gRPC)

* rework api to avoid conflicts
@generall generall mentioned this pull request Apr 19, 2023
8 tasks
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.

List collection aliases
2 participants