carvel-dev / carvel-dev/ytt

Accept File Marks for any valid path (via --file-marks-yaml)

Open
#553 1 comment 0 reactions 0 assignees View on GitHub
enhancement priority/unprioritized-backlog
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem/challenge you have**
Tool integrators would like the ability to integrate with `ytt`, accepting paths to files without limitation.
That integration includes the ability to configure processing of sets of files via [File Marks](https://carvel.dev/ytt/docs/latest/file-marks/#docs).

Today, file marks are supplied via a command-line flag whose argument is of a specific format that uses the `:` and `=` characters as delimiters.
These are valid characters for paths on most operating systems.
This means there are valid path names (however uncommon) for which there is no way to configure a file mark.

**Describe the solution you'd like**
Introduce a new command-line flag: `--file-marks-yaml` which contains a sequence of file mark-shaped mappings. In this way, any string can be supplied for `path`.

For example:
```bash
$ ytt -f . --file-marks-yaml '[{"path": "conf:ig.yml", "type": "yaml-plain"}]'
```

This flag should be able to process all known file marks: https://carvel.dev/ytt/docs/latest/file-marks/#docs

**Anything else you would like to add:**
This request originated with #468.

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating the existing file-marks command-line flag parsing and the code that converts marks into processing behavior. Trace how each known file-mark type is handled, then verify that the YAML flag accepts arbitrary paths and supports all known marks with focused tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.