Skip to content

[workr] Workflow filename collisions silently overwrite #46

@zdz2101

Description

@zdz2101

Current Behavior

pull_workflows flattens every package's inst/workflow*/ contents directly into workflows/ with no per-package namespace. If two packages ship a file at the same relative path (e.g. 0_other/foo.yaml), the second package's file silently overwrites the first. No warning is emitted.

Expected Behavior

The action should detect duplicate destination paths and warn (or fail, configurable) with a message naming both source repos.

Possible Solution

Maintain an in-memory set of destination paths during the pull_workflows loop; on every write, check membership and warning() (or stop(), controllable via an argument) when a collision is detected. Include both source repo names in the message.

Steps to Reproduce

  1. Construct a test fork with two stub packages that both ship inst/workflow/0_other/foo.yaml with distinct contents.
  2. Run pkgManifest() against both.
  3. Observe that workflows/0_other/foo.yaml contains whichever package was resolved last, with no warning.

Context

Risk grows as the ecosystem adds packages. Existing packages happen to use disjoint subfolders, so it's latent today.

QC Approach

  • New Unit Tests (covers collision detection and the warn-vs-fail toggle)

Related

Part of the gismo.library snapshot pipeline requirement: Gilead-BioStats/gsm.roadmap#20 (Theme B)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Development

Relationships

None yet

Development

No branches or pull requests

Issue actions