Closed spiffxp closed 3 years ago
@spiffxp: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
/sig testing
I'll chime in, I just noticed the annotations:
in the test config file that I care about (https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes/sig-cloud-provider/gcp/sig-gcp-windows.yaml) and I spent ten confused minutes before I realized that these annotations don't apply to the job they're on top of but to the job above them, by which they confusingly are separated by a newline :/
e.g. this annotation does not apply to ci-kubernetes-e2e-windows-gce
, but the job above it:
...
resources:
requests:
memory: "8Gi"
annotations:
testgrid-dashboards: google-windows
testgrid-tab-name: windows-prototype
- name: ci-kubernetes-e2e-windows-gce
decorate: true
...
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
@spiffxp do you still need some help on this issue?
@matthyx yes AFAIK formatting is still inconsistent and confusing
/remove-lifecycle rotten /assign
@spiffxp the issue is kinda hairy, so as I see it we have this chain of calls: mkpj.main -> "sigs.k8s.io/yaml".Marshal "sigs.k8s.io/yaml".Marshal -> "gopkg.in/yaml.v2".JSONToYAML
However "gopkg.in/yaml.v2".JSONToYAML calls Unmarshal and then Marshal with a struct{}
which from my test is alone sufficient to lose the "order" in map items.
I will check if it's possible to use directly "gopkg.in/yaml.v2".Marshal to keep the order.
Wait... now I realize I might have not understood the issue...
@spiffxp apparently you only want to correct the 184 files and move annotations
just after the name
they belong to?
Like here: https://github.com/kubernetes/test-infra/compare/master...matthyx:annotations?expand=1
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
@spiffxp do we still want to go further? I need to come back to it and integrate some checks on the yamls.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close
@fejta-bot: Closing this issue.
What should be cleaned up or changed: Prowjobs that had annotations added to them have them positioned in a place that makes little sense to a human: https://github.com/kubernetes/test-infra/pull/13205#issuecomment-509814928
Provide any links for context: Ideally I would want annotations right after the job name, this is what I listed in examples: https://github.com/kubernetes/test-infra/tree/master/config/jobs#job-examples
Compare to what the job actually is right now:
I would honestly be fine with a one-shot that fixes this. The rabbit hole of opinions on field ordering with yaml can be deep. But that also an option if we feel that strongly. I have found that go-yaml likes to serialize fields in struct order. sigs.k8s.io/yaml only understands alpha order. ruamel.yaml will preserve order when parsing, but I'm not entirely sure what re-ordering looks like there.
FYI @chases2 @Katharine
/area jobs /help