ecmwf-sites-upload: handle single-file upload result and add recursive option#110
Draft
Copilot wants to merge 2 commits into
Draft
ecmwf-sites-upload: handle single-file upload result and add recursive option#110Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/ecmwf/reusable-workflows/sessions/dd2ea8c4-3086-4864-9102-d8be9149dcbc Co-authored-by: EddyCMWF <53045993+EddyCMWF@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix script to handle single file input without error
ecmwf-sites-upload: handle single-file upload result and add recursive option
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
upload()returns astrfor single-file uploads but the success check only handledlist, causing false failures. Additionally,recursive=Truewas hardcoded with no way to override it.Changes
Single-file result handling (
upload.py): Extend success condition to acceptstrin addition to non-emptylist:--recursiveargument (upload.py): Added optional CLI flag defaulting toTrue; accepts string input ("false"→False, anything else →True):Used in the upload call:
recursive=args.recursiveValidation loop fix (
upload.py): Changedif not v→if v is Noneto prevent--recursive falsefrom incorrectly triggering a "not provided" error.action.yml: Exposedrecursiveas an optional input (default"true") and passes it through to the script.