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

nixos/teleport: init + tests #153825

Merged
merged 5 commits into from
Jan 11, 2022

Conversation

ymatsiuk
Copy link
Contributor

@ymatsiuk ymatsiuk commented Jan 7, 2022

Motivation for this change

Add teleport module and tests

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.05 Release Notes (or backporting 21.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 7, 2022
@ymatsiuk ymatsiuk requested a review from aanderse January 7, 2022 10:32
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 7, 2022
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
@ymatsiuk ymatsiuk force-pushed the ymatsiuk/teleport-module-test-init branch from 79c8023 to cffd645 Compare January 7, 2022 13:32
@ymatsiuk ymatsiuk requested review from aanderse and pennae January 7, 2022 13:50
Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

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

Please following contributing guidelines:

  • (Module addition) Added a release notes entry if adding a new NixOS module

Aside from that LGTM 👍

@github-actions github-actions bot added 8.has: changelog 8.has: documentation This PR adds or changes documentation labels Jan 7, 2022
@ymatsiuk ymatsiuk requested a review from aanderse January 7, 2022 14:28
Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Will defer to @pennae for final approval and merge. Thanks!

Copy link
Contributor

@pennae pennae left a comment

Choose a reason for hiding this comment

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

the test should be listed in nixos/tests/all-tests.nix and maybe added to the teleport package as a passthru (see eg dhcpcd for inspiration on how that works), otherwise LGTM

nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
@pennae
Copy link
Contributor

pennae commented Jan 7, 2022

@aanderse we can't merge anything, will have to defer right back to you 😅

Copy link
Member

@Synthetica9 Synthetica9 left a comment

Choose a reason for hiding this comment

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

I know nothing about teleport, but I know a bit about writing NixOS tests.

As @pennae said, you should also add this to all-tests.nix

nixos/tests/teleport.nix Outdated Show resolved Hide resolved
nixos/tests/teleport.nix Outdated Show resolved Hide resolved
nixos/tests/teleport.nix Outdated Show resolved Hide resolved
@ymatsiuk ymatsiuk force-pushed the ymatsiuk/teleport-module-test-init branch from decf485 to 32842cc Compare January 7, 2022 19:27
@ymatsiuk
Copy link
Contributor Author

ymatsiuk commented Jan 7, 2022

Thanks everyone for your help! 🙏🏻 Appreciate your reviews. Squashed all commits and tried to process all your comments 🙂

@ymatsiuk ymatsiuk requested review from Synthetica9 and pennae January 7, 2022 19:29
Copy link
Member

@Synthetica9 Synthetica9 left a comment

Choose a reason for hiding this comment

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

LGTM regarding the test.

Copy link
Contributor

@pennae pennae left a comment

Choose a reason for hiding this comment

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

looking great :)

@ymatsiuk ymatsiuk force-pushed the ymatsiuk/teleport-module-test-init branch from 32842cc to d1938fc Compare January 8, 2022 08:32
@ymatsiuk
Copy link
Contributor Author

ymatsiuk commented Jan 8, 2022

Separated test into 2 independent to make it resource efficient and parallel as it was suggested by @Synthetica9 and added passthru.tests into teleport as per @pennae 🙂 Thanks again! Now it's ready to merge 💯

@ymatsiuk ymatsiuk requested a review from pennae January 10, 2022 07:23
@ymatsiuk ymatsiuk requested a review from Synthetica9 January 10, 2022 07:23
Copy link
Contributor

@pennae pennae left a comment

Choose a reason for hiding this comment

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

looking good! just one more thing that could actually be important.

nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/teleport.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 10, 2022
@ymatsiuk ymatsiuk force-pushed the ymatsiuk/teleport-module-test-init branch from 6d506a7 to 0d91301 Compare January 10, 2022 12:50
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 10, 2022
@ymatsiuk ymatsiuk requested a review from pennae January 10, 2022 13:15
@ymatsiuk ymatsiuk force-pushed the ymatsiuk/teleport-module-test-init branch from 5c437eb to 47dc5bf Compare January 11, 2022 09:11
@ymatsiuk
Copy link
Contributor Author

@pennae I did some deeper digging and got rid of extraOpts completely. I see that almost every option is available via the config file, except --insecure (useful for debug purpose, although discouraged) and --diag-addr - both implemented in the module. This should be more foolproof.

@pennae
Copy link
Contributor

pennae commented Jan 11, 2022

@ymatsiuk awesome! 👍 preferring the config file over command line options is a very good move.

Copy link
Contributor

@pennae pennae left a comment

Choose a reason for hiding this comment

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

just a little syntax error in an example, otherwise looks done :)

@aanderse
Copy link
Member

Thanks everyone!

@aanderse aanderse merged commit ee7e31e into NixOS:master Jan 11, 2022
@ymatsiuk ymatsiuk deleted the ymatsiuk/teleport-module-test-init branch January 11, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants