Skip to content

Fix zenodraft#443

Merged
egpbos merged 27 commits into
mainfrom
fix_zenodraft
Jul 28, 2025
Merged

Fix zenodraft#443
egpbos merged 27 commits into
mainfrom
fix_zenodraft

Conversation

@egpbos

@egpbos egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator

Changes in this PR

Following up on #427, trying to fix the zenodraft upload process with some (potential) tweaks and try-outs:

  • No more hardcoded date
  • Title reverted to the one of the original Zenodo entry
  • Remove .zenodo.json (Zenodo should work with CITATION.cff only)
  • Fix the tag weirdly being added by zenodraft (or so it seems, maybe it's actually Zenodo making the tag? see Zenodo entries #427 (comment))
  • Check if the Sandbox upload works after the tweaks
  • Check if the release action works to the real Zenodo (just modify the action inside this PR to make it trigger; it should be harmless to try, because it only creates a draft deposition, not a final one)
    • Make sure the version is correct (uses tag created in GitHub release or does a sane autogenerated version otherwise)

@netlify

netlify Bot commented Jun 24, 2025

Copy link
Copy Markdown

Deploy Preview for nlesc-guide-testing ready!

Name Link
🔨 Latest commit e7261a4
🔍 Latest deploy log https://app.netlify.com/projects/nlesc-guide-testing/deploys/68878bfec72ae500087ee7d0
😎 Deploy Preview https://deploy-preview-443--nlesc-guide-testing.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Triggered PDF action: https://github.com/NLeSC/guide/actions/runs/15853408727

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

That worked, but there's still an issue: the version now gets autogenerated to be "v1". Maybe this is only a sandbox issue, because we should generate a proper tag when doing a release. However, I'm not completely sure, we should check (added todo to top post). Also, some mysterious entity also again tagged the latest commit in this branch. In this case, the tag is just a shorthand of the commit hash: 04c7fff. I guess it's sane behavior to have a tag for a release, but preferably not for a draft sandbox one.

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Ah, it's indeed the Zenodraft Action that creates the tags on manual workflow_dispatch triggers, so fine.
Scherm­afbeelding 2025-06-24 om 16 52 27

It's superceded by CITATION.cff.
@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Triggered again, now without .zenodo.json: https://github.com/NLeSC/guide/actions/runs/15853945322

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Oops, I forgot to remove the metadata specification from the workflow. Again! https://github.com/NLeSC/guide/actions/runs/15854009546

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Ok, changed a bit too much in one go and of course it fails on that: I fixed the deposition ID, hoping that that would make zenodraft update the existing record: https://sandbox.zenodo.org/records/277498 However, it fails... with a bizarre error, because it seems to be using the wrong URL? It adds one to the ID...
Scherm­afbeelding 2025-06-24 om 17 02 16

@egpbos

egpbos commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator Author

Seems to be a Zenodraft issue, so I reported it there: zenodraft/action#30 For now, we can work around it by simply subtracting 1 from our intended IDs 😄

egpbos and others added 2 commits June 25, 2025 09:58
When zenodraft/action#30 is fixed, we can increase the concept IDs again by +1.
@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Hm, it ran without errors on GH Actions, but the result on Zenodo was a bit weird. Redoing it with verbose logging activated now... https://github.com/NLeSC/guide/actions/runs/15870872596

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

So, this isn't working as I'd expect. Zenodraft apparently removes all metadata from the entry, at least that's what it says in the action log:
Scherm­afbeelding 2025-06-25 om 10 33 47

... and indeed it seems like Zenodo confirms, since this is what the draft deposition looks like:
Scherm­afbeelding 2025-06-25 om 10 32 22

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Digging through the zenodraft source, it seems like you need a .zenodo.json file after all. At least, there seems to be no CFF support in zenodraft itself. This is why it's not adding any metadata anymore now.

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Again with a fix (actually saving the json file...)... https://github.com/NLeSC/guide/actions/runs/15871998697

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

The cffconvert action is picky, should work now... https://github.com/NLeSC/guide/actions/runs/15872132299

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Hm, again a metadata-less draft on Zenodo. This is extra surprising since the action itself errored after creating the .zenodo.json file:
Scherm­afbeelding 2025-06-25 om 11 08 06

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Grasping at straws, I put the +1 back in the ID... https://github.com/NLeSC/guide/actions/runs/15872239267

@egpbos

egpbos commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

Trying with a -1 again, but now the concept ID - 1: https://github.com/NLeSC/guide/actions/runs/15881558006

@egpbos

egpbos commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator Author

Ok, I did some debugging with and hacking of Zenodraft to print the extra error information that is sent along with a response 400 (basically what I suggested here zenodraft/zenodraft#92)... and figured out that at least one issue is that there is an existing draft version deposition that may be blocking new version additions!

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Hurray, it works! New version drafted! The only thing I still have to manually change is the version, which I assume did not get filled out because I ran the workflow manually. We'll have to see whether it does work when we release in the normal way.

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Oh funky, zenodraft doesn't kid around, it also created a bunch of GitHub releases, apparently 😄

Scherm­afbeelding 2025-07-28 om 13 48 42

I find this a bit messy, so I'll just remove those entries, also remove the draft version deposition and just do a new release to test this workflow in production immediately.

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Just as a try-out, I modified the zenodraft action to also produce output and then generate a nice job summary with a link people should follow to actually publish. Triggered... https://github.com/NLeSC/guide/actions/runs/16569483262

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Eh, that run didn't work for mysterious reasons (there was a draft deposition in the Sandbox already, maybe that was clogging up the pipes?), trying again after removing the existing draft... https://github.com/NLeSC/guide/actions/runs/16569578803

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Another mysterious failure. Maybe the wait time was too short between deleting the draft and creating a new one? Also, I "fixed" the entries in the Sandbox by giving them actual versions, because there were two v2's, which I imagine might confuse the system. Maybe I need to create a new deposition altogether... But let's try one more time with this one: https://github.com/NLeSC/guide/actions/runs/16569708398

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Nope, still same error, something with version already existing, weird.

Let's try with a new concept_id: https://github.com/NLeSC/guide/actions/runs/16570062845

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Of course that doesn't work either, that concept doesn't exist and this workflow tries to make a new version of an existing concept. Reverted. Let's just publish whatever comes out of the broken workflow and see if that helps for subsequent versions, because there's definitely something screwed up in the order of the two "v2's" that are in the sandbox now.

This has the built/minified/something version of the version_id output as well.
@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

And, of course, weirdly, the workflow runs fine now... No more existing record stuff. Weird. Still, there is no version_id output! Or am I just referencing it wrong?

Ah, no I think I should have also "compiled" the zenodraft action code before use, did that, switched to the "production" version... Running... https://github.com/NLeSC/guide/actions/runs/16570636932

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Bam, that works!

Scherm­afbeelding 2025-07-28 om 15 41 08

Nice clickable link 🙂 And the clickable link is, indeed, clickable and correct!

Will have to wait for zenodraft/action#31 before we can use this though, don't want to depend on my crappy version.

@egpbos

egpbos commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator Author

Against my own standards, I'd like to merge now without doing a rebase to clean up the history. Ideally, I'd also have liked to reuse the pdf.yml file so that all git history is preserved in one file, instead of now having the additional upload-pdf.yml file with its own history (although most of it is copy-pasted from pdf.yml), but this would require too much rebasing on old stuff, so let's just keep this all as is.

The upload-pdf.yml workflow was actually copy-pasted initially from the
pdf.yml one, so they share history. So long and thanks for all the fish!
@egpbos egpbos requested review from bouweandela and c-martinez July 28, 2025 14:38
@egpbos egpbos merged commit 266bc8f into main Jul 28, 2025
7 checks passed
@egpbos egpbos deleted the fix_zenodraft branch July 28, 2025 14:42
@egpbos egpbos mentioned this pull request Jul 28, 2025
2 tasks
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 this pull request may close these issues.

2 participants