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

Add data store as resource on CLI #2422

Merged

Conversation

danielbdias
Copy link
Contributor

@danielbdias danielbdias commented Apr 21, 2023

This PR adds CLI commands to DataStore using the new resource format.

Note: just be reviewed only after merging #2385

Changes

  • Added DataStore commands
  • Deprecate old datastore commands

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@danielbdias danielbdias changed the title Add/data store as resource on cli Add data store as resource on CLI Apr 21, 2023
@danielbdias danielbdias changed the base branch from main to feature/datastore-as-resource April 21, 2023 19:50
@danielbdias danielbdias force-pushed the feature/datastore-as-resource branch from ea05beb to 57eb095 Compare April 21, 2023 19:53
Copy link
Contributor Author

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.

Copy link
Contributor

@jorgeepc jorgeepc left a 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

Comment on lines 59 to 61
func (d *dataStoreActions) List(ctx context.Context, args ListArgs) error {
return ErrNotSupportedResourceAction
}
Copy link
Contributor

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.

Copy link
Collaborator

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

Copy link
Contributor

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

Comment on lines 88 to 90
func (d *dataStoreActions) Delete(ctx context.Context, id string) error {
return nil
}
Copy link
Contributor

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

@xoscar xoscar merged commit 98e630e into feature/datastore-as-resource Apr 25, 2023
28 checks passed
@xoscar xoscar deleted the add/data-store-as-resource-on-cli branch April 25, 2023 18:15
xoscar added a commit that referenced this pull request Apr 26, 2023
… 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>
schoren pushed a commit that referenced this pull request Jun 5, 2023
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants