Skip to content

[files domain] support for multiple files with same name #875

@brandtkeller

Description

@brandtkeller

Is your feature request related to a problem? Please describe.

There is a defined use-case for needing to support multiple files with the same base name but located in different directories.

The current files domain documentation states:

The File domain specification accepts a descriptive name for the file as well as its path. The filenames and descriptive names must be unique.

I interpret this to mean that there is a constraint where two files with the same name with different paths is an un-supported workflow at this time.

Example:

domain:
  file-spec:
    filepaths:
    - name: fileone
      path: path/to/fileone/file.yaml
    - name: filetwo
      path: path/to/filetwo/file.yaml
  type: file

This would be encountered during specific examples of where naming-conventions for a given structure are dictated by discovery that relies upon filename.

Describe the solution you'd like

  • Given multiple files with the same name on different paths
  • When resources for the files are collected
  • Then all required data is present

Describe alternatives you've considered

I would consider two solutions. An intermediate solution that resolves collision and makes collection available (this issue) - and a longer-term solution that provides support for a true cache or packaging mechanism when needing to collect the files for transfer with other resources.

Additional context

N/A

Expected Deliverable

Update to the files domain GetResources() logic to support matching filenames across different paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting triage from the team

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions