Skip to content

Warn instead of failing when a shared docs/src file conflicts with a run archive #97

Description

@arav-agarwal2

Follow-up from review on #94 (#94 (comment)).

_merge_tree in src/endpoints_submission_cli/submissions/builder.py stops the build with SubmissionBuildError when a file from --shared-docs / --shared-src has different content from the same path in a run archive. That is too strict for a common case: a README uploaded with the run gets updated before the submission is built.

Proposed change:

  • When the content differs, log a warning naming both sources and let the directory passed with --shared-docs / --shared-src win. Don't add an --overwrite flag, because it could easily be mistaken for something else later.
  • Add coloured log output so warnings like this stand out in the CLI output instead of getting lost among info lines.
  • Update the _merge_tree docstring and the builder tests to match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions