🐛 fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files#5508
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
badd115 to
9b7c25e
Compare
pkg/cli/cli.go
Outdated
|
|
||
| if modified != original { | ||
| err := afero.WriteFile(fs, path, []byte(modified), 0o755) | ||
| err := afero.WriteFile(fs, path, []byte(modified), 0o644) |
There was a problem hiding this comment.
Below in pkg/machinery/scaffold.go, there are constants. Defining them in one place will create consistency and provide a single source of truth. No drifts in future.
There was a problem hiding this comment.
Good catcher 👍 Done
pkg/config/store/yaml/store.go
Outdated
|
|
||
| // Write the marshalled configuration | ||
| err = afero.WriteFile(s.fs, path, content, 0o600) | ||
| err = afero.WriteFile(s.fs, path, content, 0o644) |
There was a problem hiding this comment.
Below in pkg/machinery/scaffold.go, there are constants. Defining them in one place will create consistency and provide a single source of truth. No drifts in future.
There was a problem hiding this comment.
Good catcher 👍 Done
9b7c25e to
cfe9d4b
Compare
Makefile
Outdated
| check-sample-permissions: ## Fail if any file/dir under testdata or docs samples has wrong permissions (expect 0644/0755). bin/ and *.sh excluded. | ||
| @for d in $(SAMPLE_ROOTS); do \ | ||
| test -d "$$d" || continue; \ | ||
| bad=$$(find "$$d" -path '*/bin' -prune -o \( \( -type f ! -perm 0644 ! -name '*.sh' \) -o \( -type d ! -perm 0755 \) \) -print 2>/dev/null); \ |
There was a problem hiding this comment.
What if a *.sh file has the wrong permissions, how would we catch it?
There was a problem hiding this comment.
I think we can remove that we have no longer sh files in the testdata.
|
/lgtm |
|
/override coverage |
|
@camilamacedo86: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
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-sigs/prow repository. |
cfe9d4b to
beb1c5f
Compare
|
/lgtm |
bb95ce2
into
kubernetes-sigs:master
* (infra/demos): Remove asciicinema demos The asciicinema demos add tooling debt, maintenance burden, poor UX, and provides little value to users, making it not worth the effort. * fix(go/v4): CI lint by using make lint instead of golangci-lint-action so the custom binary (with logcheck plugin) is built and used. * fix(helm/v2-alpha): use manager.replicas from values in chart template Generated-by: Cursor/Claude * ✨ (helm/v2-alpha): Add manager.envOverrides for CLI env overrides * fix(helm/v2-alpha): use sigs.k8s.io/yaml for 2-space YAML indentation in generated value files * 🌱 Bump goreleaser/goreleaser-action from 6 to 7 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 6 to 7. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](goreleaser/goreleaser-action@v6...v7) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * 🐛 fix: resolve panic when multiple plugins define the same flag (e.g. edit with go/v4 + helm) (#5506) fix: resolve panic when multiple plugins define the same flag (e.g. edit with go/v4 + helm) - Merge duplicate flags instead of binding twice; sync parsed value to all plugins in PreRunE. - Aggregate flag help as "For plugin (key): desc AND for plugin (key): desc". - Return a clear error when the same flag name is used with different types (e.g. bool vs string). Generated-by: Cursor/Claude * ✨ chore(go/v4): Upgrade cert-manager from 1.19.3 to 1.19.4 (#5509) chore(go/v4): Upgrade cert-manager from 1.19.3 to 1.19.4 * 🌱 cleanup(docs): remove script no longer used to build samples under books (#5511) cleanup(docs): remove script no longer used to build samples under books * 🌱 chore: add yamllint config for 2-space indentation and Kubernetes YAML best practices (#5507) chore: add yamllint config for 2-space indentation and Kubernetes YAML best practices * 🌱 infra: Remove pkg/internal/validation (#5512) infra: remove validation package Package validation was copied from k8s.io/apimachinery/utils/validation to avoid adding a dependency. Considering that kubebuilder already depends on apimachinery, using the original package requires less maintainance. * 🌱 Bump actions/upload-artifact from 6.0.0 to 7.0.0 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * 🐛 fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files (#5508) fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Vitor Floriano <107767584+vitorfloriano@users.noreply.github.com> Co-authored-by: Kubernetes Prow Robot <20407524+k8s-ci-robot@users.noreply.github.com> Co-authored-by: v47 <victor.verg@hotmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…etes-sigs#5508) fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files
Closes: #5502