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

CLI: Add support for metadata import #2500

Closed
ptitzler opened this issue Feb 23, 2022 · 4 comments · Fixed by #2581
Closed

CLI: Add support for metadata import #2500

ptitzler opened this issue Feb 23, 2022 · 4 comments · Fixed by #2581
Assignees
Labels
component:cli-tools Command line tools kind:enhancement New feature or request

Comments

@ptitzler
Copy link
Member

Is your feature request related to a problem? Please describe.
With the [planned] delivery of #2448 in Elyra 3.7, users can export metadata for individual schemaspaces using the CLI:

elyra-metadata export <schemaspace>  ...

Elyra should also support import of exported metadata

elyra-metadata import <schemaspace> ...

Describe the solution you'd like

Constraints (based on initial discussion in #2448):

  • a user should be required to provide only the minimum number of input parameters, e.g. there should be no need to specify a schema_name
  • only valid schemaspace instances can be imported (export supports export of invalid instances)
  • only non-deprecated schemaspace instances can be imported (export supports export of deprecated instances)
  • a user should be able to specify what should happen if a conflict is detected, e.g. if an instance with the same name is already present (default behavior: tbd)
@ptitzler ptitzler added kind:enhancement New feature or request help wanted Extra attention is needed component:cli-tools Command line tools labels Feb 23, 2022
@kevin-bates
Copy link
Member

Thanks for opening this issue @ptitzler. I have a couple of comments and questions regarding the constraints.

only valid schemaspace instances can be imported (export supports export of invalid instances)

Should the behavior be that attempts to import invalid instances result in a message, that instance is skipped, and processing continues? I would prefer that the invalid instance "creation" be attempted, otherwise, it implies that validation of the invalid instance would need to occur before the import attempt.

a user should be able to specify what should happen if a conflict is detected, e.g. if an instance with the same name is already present (default behavior: tbd)

I think the default behavior must be that the importing-instance be skipped if an instance of that name exists. Seems like --overwrite might be a reasonable flag to force an update (actually, perhaps --force is better).

@ptitzler
Copy link
Member Author

Thanks for opening this issue @ptitzler. I have a couple of comments and questions regarding the constraints.

only valid schemaspace instances can be imported (export supports export of invalid instances)

Should the behavior be that attempts to import invalid instances result in a message, that instance is skipped, and processing continues? I would prefer that the invalid instance "creation" be attempted, otherwise, it implies that validation of the invalid instance would need to occur before the import attempt.

+1

  • if possible, validation should be performed by the server (the CLI only submits the requests to add the instances)
  • processing should continue after an instance was rejected (otherwise a user would have to remove the invalid instance from the local file system to make progress)

a user should be able to specify what should happen if a conflict is detected, e.g. if an instance with the same name is already present (default behavior: tbd)

I think the default behavior must be that the importing-instance be skipped if an instance of that name exists. Seems like --overwrite might be a reasonable flag to force an update (actually, perhaps --force is better).

I agree about the default behavior. --force appears to be most commonly used flag for this kind of scenario, thus +1 from me.

@ptitzler
Copy link
Member Author

I think the default behavior must be that the importing-instance be skipped if an instance of that name exists. Seems like --overwrite might be a reasonable flag to force an update (actually, perhaps --force is better).

Sorry about flip-flopping here, but --replace would perhaps be a better option name:

  • it'd consistent with the existing flag for updating existing instances (elyra-metadata install <namespace> ... --replace)
  • is less ambiguous, because force can also be interpreted as 'import invalid metadata instances'

@kevin-bates
Copy link
Member

Those are great points - I agree on both counts - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli-tools Command line tools kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants