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

kubernetes-helm-mapkubeapis: init at 0.4.1 #301933

Merged
merged 2 commits into from
May 2, 2024

Conversation

aos
Copy link
Contributor

@aos aos commented Apr 5, 2024

Description of changes

Was looking for this plugin, but couldn't find it. I found this open PR:
#217530 but it seems to have gone
stale (no activity in over a year). I posted in it but figured everyone
is too busy so I just decided to resubmit, addressing comments :-)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@lolbinarycat lolbinarycat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks pretty good, but there's a few issues:

  1. interpolating pname (expecially into repo) is discouraged
  2. with lib is a bit controversial, and can sometimes cause issues (in one case the version of a package was accidentally replaced with the version of nixpkgs itself).

@aos
Copy link
Contributor Author

aos commented Apr 6, 2024

Good to know - thank you. I've addressed your comments. I looked around at other recently init packages, and they seem to go with with lib.{licenses,maintainers}, so I chose to do that as well.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3759

Comment on lines 22 to 25
install -dm755 $out/${pname}
mv $out/bin $out/${pname}/
install -m644 -Dt $out/${pname}/config/ config/Map.yaml
install -m644 -Dt $out/${pname} plugin.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
install -dm755 $out/${pname}
mv $out/bin $out/${pname}/
install -m644 -Dt $out/${pname}/config/ config/Map.yaml
install -m644 -Dt $out/${pname} plugin.yaml
install -dm755 $out/helm-mapkubeapis
mv $out/bin $out/helm-mapkubeapis/
install -m644 -Dt $out/helm-mapkubeapis/config/ config/Map.yaml
install -m644 -Dt $out/helm-mapkubeapis plugin.yaml

Interpolating pname is discouraged.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1604

@@ -14,4 +13,5 @@

helm-unittest = callPackage ./helm-unittest.nix { };

helm-mapkubeapis = callPackage ./helm-mapkubeapis.nix { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the file alphabetically sorted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not already sorted though hence why I added it to the bottom. Let me sort the file itself.

Comment on lines 29 to 30
description =
"A Helm plugin which maps deprecated or removed Kubernetes APIs in a release to supported APIs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description =
"A Helm plugin which maps deprecated or removed Kubernetes APIs in a release to supported APIs";
description = "Helm plugin which maps deprecated or removed Kubernetes APIs in a release to supported APIs";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran it through nixpkgs-fmt and this is what it spit out, but I presume that's not standard :-) I'll commit your suggestion. Thank you

Was looking for this plugin, but couldn't find it. I found this open PR:
NixOS#217530 but it seems to have gone
stale (no activity in over a year). I posted in it but figured everyone
is too busy so I just decided to resubmit, addressing comments :-)
@SuperSandro2000
Copy link
Member

@ofborg build kubernetes-helmPlugins.helm-mapkubeapis

@SuperSandro2000 SuperSandro2000 merged commit 3348953 into NixOS:master May 2, 2024
22 of 25 checks passed
@aos aos deleted the aos/helm-mapkubeapis branch May 2, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants