kustomize icon indicating copy to clipboard operation
kustomize copied to clipboard

configmap item with order

Open charles-chenzz opened this issue 2 years ago • 11 comments

this PR tend to solve #4292 since #5210 remain stagnant, so I took it up. Also, I borrow some of the code in #5210

charles-chenzz avatar Sep 02 '23 03:09 charles-chenzz

This PR has multiple commits, and the default merge method is: merge. You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 02 '23 03:09 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: charles-chenzz Once this PR has been reviewed and has the lgtm label, please assign knverey for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 02 '23 03:09 k8s-ci-robot

the lint checks failed, but wasn't about the mismatch of args. have no clues why it would failed. would defer till I fix the Test Linux and Test MacOS CI jobs.

Error: api/resmap/factory.go:105:2: Consider pre-allocating `resources` (prealloc)
	var (
	^
Error: api/internal/generators/configmap.go:41:20: error returned from external package is unwrapped: sig: func (*sigs.k8s.io/kustomize/kyaml/yaml.RNode).LoadMapIntoConfigMapData(m map[string]string) error (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/internal/generators/secret.go:47:20: error returned from external package is unwrapped: sig: func (*sigs.k8s.io/kustomize/kyaml/yaml.RNode).Pipe(functions ...sigs.k8s.io/kustomize/kyaml/yaml.Filter) (*sigs.k8s.io/kustomize/kyaml/yaml.RNode, error) (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/internal/generators/secret.go:54:20: error returned from external package is unwrapped: sig: func (*sigs.k8s.io/kustomize/kyaml/yaml.RNode).LoadMapIntoSecretData(m map[string]string) error (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/internal/generators/utils.go:50:21: error returned from interface method should be wrapped: sig: func (sigs.k8s.io/kustomize/api/ifc.Validator).ErrIfInvalidKey(string) error (wrapcheck)
			return nil, nil, err
			                 ^
Error: api/resource/factory.go:281:20: error returned from external package is unwrapped: sig: func sigs.k8s.io/kustomize/api/internal/generators.MakeConfigMap(ldr sigs.k8s.io/kustomize/api/ifc.KvLoader, args *sigs.k8s.io/kustomize/api/types.ConfigMapArgs) (rn *sigs.k8s.io/kustomize/kyaml/yaml.RNode, orderKeys []string, err error) (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/resource/factory.go:290:20: error returned from external package is unwrapped: sig: func sigs.k8s.io/kustomize/api/internal/generators.MakeSecret(ldr sigs.k8s.io/kustomize/api/ifc.KvLoader, args *sigs.k8s.io/kustomize/api/types.SecretArgs) (rn *sigs.k8s.io/kustomize/kyaml/yaml.RNode, orderKeys []string, err error) (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/resmap/factory.go:96:20: error returned from external package is unwrapped: sig: func (*sigs.k8s.io/kustomize/api/resource.Factory).MakeConfigMap(kvLdr sigs.k8s.io/kustomize/api/ifc.KvLoader, args *sigs.k8s.io/kustomize/api/types.ConfigMapArgs) (*sigs.k8s.io/kustomize/api/resource.Resource, []string, error) (wrapcheck)
		return nil, nil, err
		                 ^
Error: api/resmap/factory.go:127:20: error returned from external package is unwrapped: sig: func (*sigs.k8s.io/kustomize/api/resource.Factory).MakeSecret(kvLdr sigs.k8s.io/kustomize/api/ifc.KvLoader, args *sigs.k8s.io/kustomize/api/types.SecretArgs) (*sigs.k8s.io/kustomize/api/resource.Resource, []string, error) (wrapcheck)
		return nil, nil, err
		                 ^
make[1]: *** [../Makefile-modules.mk:18: lint] Error 1
make[1]: Leaving directory '/home/runner/work/kustomize/kustomize/api'
make: *** [Makefile:127: lint] Error 2
Error: Process completed with exit code 2.

charles-chenzz avatar Sep 05 '23 14:09 charles-chenzz

error returned from external package is unwrapped means you need to wrap the error, like

return nil, nil, fmt.Errorf("failed to xxxx: %w", err)

natasha41575 avatar Sep 05 '23 14:09 natasha41575

I think I might need some here. the CI jobs failed messages showing that it's about assignment values mismatch 3 but g.generate() return 2 values, while I execute the same test function in my local, I got diff error. will it be embed issue? or am I missing something here

in my local: image

in CI jobs: image

charles-chenzz avatar Sep 08 '23 15:09 charles-chenzz

I convert to ready for review for gathering some helps and reviews

charles-chenzz avatar Sep 08 '23 15:09 charles-chenzz

/cc @stormqueen1990

charles-chenzz avatar Sep 08 '23 15:09 charles-chenzz

@charles-chenzz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kustomize-presubmit-master 5675ab905f8fb3e2fa147bd732f9f1fd71bd25fe link true /test kustomize-presubmit-master

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

k8s-ci-robot avatar Sep 09 '23 05:09 k8s-ci-robot

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 02 '23 12:11 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 31 '24 13:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Mar 01 '24 13:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Mar 31 '24 14:03 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 31 '24 14:03 k8s-ci-robot