carvel-dev / carvel-dev/ytt

Maintain order of Documents within the global Document Set throughout processing

Open
#257 1 comment 0 reactions 0 assignees View on GitHub
bug carvel accepted
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
tests in the tkg-cli-provider repo CI

**What happened:**
The list of line numbers is non-deterministic, failure from the CI shows:
```
-Error: : unable to get template: Overlaying (in following order: overlay.yaml, aws-overlay.yaml, 01_plans/prod.yaml,
03_customizations/autoscaler/autoscaler_overlay.yaml, 03_customizations/http_proxy.yaml): Document on line
03_customizations/http_proxy.yaml:62: Expected number of matched nodes to be 1, but was 3 (lines: base-
template.yaml:125, aws-overlay.yaml:150, aws-overlay.yaml:163)
+Error: : unable to get template: Overlaying (in following order: overlay.yaml, aws-overlay.yaml, 01_plans/prod.yaml,
03_customizations/autoscaler/autoscaler_overlay.yaml, 03_customizations/http_proxy.yaml): Document on line
03_customizations/http_proxy.yaml:62: Expected number of matched nodes to be 1, but was 3 (lines: aws-overlay.yaml:150,
aws-overlay.yaml:163, base-template.yaml:125)
```

**What did you expect:**
Expected `(lines: base-template.yaml:125, aws-overlay.yaml:150, aws-overlay.yaml:163)` to be in the same order for every run.

**Anything else you would like to add:**
Accepted #256 as a temporary fix until the Carvel team can determine and fix the upstream source of non-determinism.
[Slack link with further context.](https://vmware.slack.com/archives/CUK1X0Z8Q/p1608063589380600)

**Environment:**

- ytt version (use `ytt --version`):
- OS (e.g. from `/etc/os-release`):

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the CI failure described in the tkg-cli-provider tests and inspect the global Document Set processing that produces the matched-node line list. Review the temporary fix in issue #256 and the linked upstream context; done means the Documents retain a deterministic order and the relevant test passes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, yaml
Domain
cli, tooling
Issue type
Bug
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.