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

save changes to dandiset.yaml last #143

Open
yarikoptic opened this issue Mar 31, 2022 · 3 comments
Open

save changes to dandiset.yaml last #143

yarikoptic opened this issue Mar 31, 2022 · 3 comments

Comments

@yarikoptic
Copy link
Member

ATM, in case of crashes, like whenever some sha256 is not known for an asset, we seems to end up in a dirty dataset state

dandi@drogon:/mnt/backup/dandi/dandisets$ git status
On branch draft
Your branch is up to date with 'github/draft'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   000026 (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
dandi@drogon:/mnt/backup/dandi/dandisets$ cd 000026/
dandi@drogon:/mnt/backup/dandi/dandisets/000026$ git status
On branch draft
Your branch is up to date with 'github/draft'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   dandiset.yaml

since it seems changes to dandiset.yaml are saved first. Would it be easy to save them last, right before calling datalad's save on the dandiset? Then there would be a better chance to remain in a clean state for subsequent cron job to possibly succeed.

@jwodder
Copy link
Member

jwodder commented Apr 1, 2022

@yarikoptic Doing this might cause problems when a Dandiset with multiple versions is being backed up, as then the intermediate commits would lack a dandiset.yaml. I can't run the tests to be sure, due to dandi/dandi-archive#961.

@yarikoptic
Copy link
Member Author

@yarikoptic Doing this might cause problems when a Dandiset with multiple versions is being backed up, as then the intermediate commits would lack a dandiset.yaml.

indeed a concern -- would need somehow to ensure providing that updated dandiset.yaml at that point. Ok, let's postpone until we resolve that issue.

@jwodder jwodder added the blocked label May 3, 2022
@yarikoptic
Copy link
Member Author

I believe that original dandi/dandi-archive#961 is addressed, please check - may be testing is ready and this issue is unblocked??

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 a pull request may close this issue.

2 participants