-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Strict unmarshal for plugin files #3046
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
derailed
approved these changes
Jan 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjw-s Thank you for this update!
ventsislav-georgiev
pushed a commit
to ventsislav-georgiev/k9s
that referenced
this pull request
Feb 9, 2025
Add test; refactor code & fix one-by-off errors Remove nested conditionals Decrease complexity of Render method Fix linting errors Fix unit tests fix(argo-rollouts plugin): resolve improper piping in watch command (derailed#3009) The `-w` or `--watch` flag is designed for continuous monitoring and should not pipe to `less` to avoid unnecessary screen rolling. chore(deps): bump github.com/anchore/grype from 0.84.0 to 0.85.0 (derailed#3008) Bumps [github.com/anchore/grype](https://github.com/anchore/grype) from 0.84.0 to 0.85.0. - [Release notes](https://github.com/anchore/grype/releases) - [Changelog](https://github.com/anchore/grype/blob/main/.goreleaser.yaml) - [Commits](anchore/grype@v0.84.0...v0.85.0) --- updated-dependencies: - dependency-name: github.com/anchore/grype dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump k8s.io/kubectl from 0.31.1 to 0.31.3 (derailed#3007) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.31.1 to 0.31.3. - [Commits](kubernetes/kubectl@v0.31.1...v0.31.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump helm.sh/helm/v3 from 3.16.2 to 3.16.3 (derailed#3006) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.16.2 to 3.16.3. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.16.2...v3.16.3) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Fix typos (derailed#3026) Strict unmarshal for plugin files (derailed#3046) feat: add helm diff plugin (derailed#3017) * feat: add helm diff plugin * feat: Add helm-diff to plugin readme and sort items alphabetically * chore: Adjust plugin README format Fix K9S_EDITOR (derailed#3043) chore(deps): bump actions/setup-go from 5.1.0 to 5.2.0 (derailed#3034) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix check e != nil but return a nil value error err (derailed#3038) the err has been checked in line 199 chore(deps): bump github.com/go-git/go-git/v5 from 5.12.0 to 5.13.0 (derailed#3056) Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.12.0 to 5.13.0. - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](go-git/go-git@v5.12.0...v5.13.0) --- updated-dependencies: - dependency-name: github.com/go-git/go-git/v5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump golang.org/x/net from 0.31.0 to 0.33.0 (derailed#3055) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.31.0 to 0.33.0. - [Commits](golang/net@v0.31.0...v0.33.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Fix Flux trace plugin command (derailed#3041) chore(deps): bump golang.org/x/crypto from 0.29.0 to 0.31.0 (derailed#3029) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.31.0. - [Commits](golang/crypto@v0.29.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump alpine from 3.20.3 to 3.21.0 (derailed#3020) Bumps alpine from 3.20.3 to 3.21.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (derailed#3024) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Add proxy configuration at the context level (derailed#2675) Dialog boxes use dialog style (derailed#2150) Fix lint build (derailed#3066) * clean up * fix bug computing resource limits * update rs rendering to match kubectl * display ctx view if all hell fails * clean ups and refactors * fix linter issues Fixed trimming of favorite namespaces in Config (derailed#3065) Co-authored-by: Fernand Galiana <fernand.galiana@gmail.com> feat: use kubectl events for plugin `watch-events` (derailed#3062) chore(deps): bump k8s.io/client-go from 0.31.3 to 0.32.0 (derailed#3058) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.31.3 to 0.32.0. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.31.3...v0.32.0) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix: coloring of rose-pine for values of log options (derailed#3018) chore(deps): bump k8s.io/cli-runtime from 0.31.3 to 0.32.1 (derailed#3067) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.31.3 to 0.32.1. - [Commits](kubernetes/cli-runtime@v0.31.3...v0.32.1) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump golangci/golangci-lint-action from 6.1.1 to 6.2.0 (derailed#3072) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.2.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6.1.1...v6.2.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump helm.sh/helm/v3 from 3.16.3 to 3.17.0 (derailed#3071) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.16.3 to 3.17.0. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.16.3...v3.17.0) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump github.com/mattn/go-colorable from 0.1.13 to 0.1.14 (derailed#3070) Bumps [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable) from 0.1.13 to 0.1.14. - [Commits](mattn/go-colorable@v0.1.13...v0.1.14) --- updated-dependencies: - dependency-name: github.com/mattn/go-colorable dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump golang from 1.23.3-alpine3.20 to 1.23.5-alpine3.20 (derailed#3068) Bumps golang from 1.23.3-alpine3.20 to 1.23.5-alpine3.20. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump alpine from 3.21.0 to 3.21.2 (derailed#3069) Bumps alpine from 3.21.0 to 3.21.2. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to improve the behaviour introduced in #2770.
The regular
Unmarshal
function does not result in anerr
when trying to unmarshal a yaml file that contains aplugins
key into aPlugin
var. TheUnmarshalStrict
function will, since it finds the undefinedplugins
key, causing the next loop to actually trigger.I have also taken the liberty to make it look for plugins in the
XDG_DATA_HOME
andXDG_CONFIG_HOME
folders. This is especially useful sinceXDG_DATA_HOME
is not included in theXDG_DATA_DIRS
by default (as per https://specifications.freedesktop.org/basedir-spec/latest/#variables). This allows users to define per-user plugins in addition to the ones in/usr/local/share/:/usr/share/
.