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 result should/could report ID of added record #316

Closed
mih opened this issue Jun 7, 2023 · 2 comments
Closed

add result should/could report ID of added record #316

mih opened this issue Jun 7, 2023 · 2 comments

Comments

@mih
Copy link
Member

mih commented Jun 7, 2023

I created a new catalog, I added a record, I get:

{"action": "catalog_add", "message": "Metadata items successfully added to catalog", "path": "cat-dir", "status": "ok"}

There is no information on what record was added. However, my next task is set-super, which requires me to specify a dataset ID and a VERSION. IN order to provide this information, I either need to inspect the input file(s), or I need to compare the state of the metadata output directory pre vs post.

I think it would be sensible to include this information in the result.

@jsheunis
Copy link
Member

jsheunis commented Jun 8, 2023

In addition, the current result record is only yielded once at the end of the command execution, and not once per catalog record addition which would be more in line with results handling in datalad core and extensions.

I'm currently working on a major refactor of datalad-catalog commands and entrypoints, and current changes in that PR includes a fix to render results once per catalog addition: 3166229#diff-25a27b620d6430e66149657933908bf1722b107d7dfc5e34fe2b004644cd95ba

Feels like that would also be a good place to update the result record to include information about the added catalog record.

However, if this change is required sooner, an interim change in current main will be easy enough.

@jsheunis
Copy link
Member

Closed by #309

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

No branches or pull requests

2 participants