-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add data store as resource on CLI #2422
Add data store as resource on CLI #2422
Conversation
ea05beb
to
57eb095
Compare
…esource-on-backend
…ore-as-resource-on-cli
cli/cmd/datastore_legacy_cmd.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved all legacy commands here to make it easier to track them and eliminate them in future versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @danielbdias looks good. Added a couple of comments
cli/actions/datastore.go
Outdated
func (d *dataStoreActions) List(ctx context.Context, args ListArgs) error { | ||
return ErrNotSupportedResourceAction | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we decided on having a list [resource]
and a get [resource] --id [id]
for every resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the idea of not supporting a list for data stores is because there is only one current at a time. Similar to polling profile or config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already had this discussion about Config and DataStore here #2304 (comment) The final decision was to support list
and get
cli/actions/datastore.go
Outdated
func (d *dataStoreActions) Delete(ctx context.Context, id string) error { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to support this. Delete the DataStore and return to No Tracing
mode
… CLI commands (#2414) * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Add Data store as resource on Backend (#2385) * feat(frontend): add data store as resource (#2423) * Add data store as resource on CLI (#2422) * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Adding datastoreresource package * Update internal references to use datastoreresource package * Isolate database resources on each test * Adding behavior for no datastore scenario * Fixing rebase problems * Fixing another rebase problem * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Fixing merge * Adding documentation for delete operation * Improving cleanup code * Updating datastore API * Adding CLI generated code * wip * wip * Fixing CLI * deprecated old commands * Adding wrongly deleted file * simplifying the resource actions creation steps --------- Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com> * fix ingester dsRepo * chore(docs): update data store docs and examples (#2429) * removing test deletion * fixing provisioning file * fixing provisioning file --------- Co-authored-by: Jorge Padilla <jorge.esteban.padilla@gmail.com> Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com>
… CLI commands (#2414) * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Add Data store as resource on Backend (#2385) * feat(frontend): add data store as resource (#2423) * Add data store as resource on CLI (#2422) * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Adding datastoreresource package * Update internal references to use datastoreresource package * Isolate database resources on each test * Adding behavior for no datastore scenario * Fixing rebase problems * Fixing another rebase problem * Updating DataStore API definition to consider ResourcesAPI structure (#2368) Fixing sorting fields on OpenAPI Updating OpenAPI to consider DataStore endpoint managing only one record Add endpoint in plural * Fixing merge * Adding documentation for delete operation * Improving cleanup code * Updating datastore API * Adding CLI generated code * wip * wip * Fixing CLI * deprecated old commands * Adding wrongly deleted file * simplifying the resource actions creation steps --------- Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com> * fix ingester dsRepo * chore(docs): update data store docs and examples (#2429) * removing test deletion * fixing provisioning file * fixing provisioning file --------- Co-authored-by: Jorge Padilla <jorge.esteban.padilla@gmail.com> Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com>
This PR adds CLI commands to DataStore using the new resource format.
Note: just be reviewed only after merging #2385
Changes
Fixes
Checklist