Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fields generated out of order #3161

Closed
Awadabang opened this issue May 20, 2024 · 1 comment
Closed

fields generated out of order #3161

Awadabang opened this issue May 20, 2024 · 1 comment
Labels
NeedsInfo More information or clarification needed from the user

Comments

@Awadabang
Copy link

Cue File :

_environments: [
    "0",
    "1"
]

stages: [
	"lint",
	"diff",
	"apply"
]

".k8s-workloads-image": {
 	image: name: "registry.gitlab.com/gitlab-com/gl-infra/ci-images/k8s-workloads:1.2.0"
}

for k, _ in _environments {
	"\(k):dryrun": {
	  extends: ".k8s-workloads-image"
	  resource_group: "\(k)"
	  script: """
	make gen
	"""
	  stage: "dryrun"
	}
}

cue export test.cue --out yaml, Yaml File:

stages:
  - lint
  - diff
  - apply
0:dryrun:
  extends: .k8s-workloads-image
  resource_group: "0"
  script: make gen
  stage: dryrun
.k8s-workloads-image:
  image:
    name: registry.gitlab.com/gitlab-com/gl-infra/ci-images/k8s-workloads:1.2.0
1:dryrun:
  extends: .k8s-workloads-image
  resource_group: "1"
  script: make gen
  stage: dryrun

why generated out of order? I want output like this:

stages:
  - lint
  - diff
  - apply
.k8s-workloads-image:
  image:
    name: registry.gitlab.com/gitlab-com/gl-infra/ci-images/k8s-workloads:1.2.0
0:dryrun:
  extends: .k8s-workloads-image
  resource_group: "0"
  script: make gen
  stage: dryrun
1:dryrun:
  extends: .k8s-workloads-image
  resource_group: "1"
  script: make gen
  stage: dryrun

Thank for your help!

@Awadabang Awadabang added the Triage Requires triage/attention label May 20, 2024
@Awadabang Awadabang changed the title "for range in", but generated out of order fields generated out of order May 20, 2024
@myitcv
Copy link
Member

myitcv commented May 23, 2024

@Awadabang - please can you complete the information the bug issue template and update the issue description accordingly?

https://github.com/cue-lang/cue/issues/new?assignees=&labels=NeedsInvestigation%2C+Triage&projects=&template=bug_report.md&title=

@myitcv myitcv added NeedsInfo More information or clarification needed from the user and removed Triage Requires triage/attention labels May 23, 2024
@myitcv myitcv closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInfo More information or clarification needed from the user
Projects
None yet
Development

No branches or pull requests

2 participants