Skip to content

[feature] added post deploy command#85

Merged
nlewo merged 12 commits into
nlewo:mainfrom
tcurdt:post-deploy-command
May 22, 2025
Merged

[feature] added post deploy command#85
nlewo merged 12 commits into
nlewo:mainfrom
tcurdt:post-deploy-command

Conversation

@tcurdt

@tcurdt tcurdt commented May 14, 2025

Copy link
Copy Markdown
Contributor

Tests are passing but I am sure there is room for improvement.

@nlewo nlewo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you!
This is a really nice first version and i don't think important changes are required to be merged.

Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread cmd/run.go Outdated
Comment thread internal/deployer/deployer.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
tcurdt added 3 commits May 14, 2025 22:27
return output, prefixed env vars, removed println, method renames, check for env vars in test
@tcurdt

tcurdt commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

I hope I managed to incorporate all requested changes now.

@tcurdt tcurdt requested a review from nlewo May 15, 2025 10:37
@tcurdt

tcurdt commented May 18, 2025

Copy link
Copy Markdown
Contributor Author

Anything else I can help with to get this merged?

Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
Comment thread internal/deployer/post_deployment_command.go Outdated
@nlewo

nlewo commented May 22, 2025

Copy link
Copy Markdown
Owner

wow, i don't understand why the Nix check is failing while it works on my machine 😢

@tcurdt

tcurdt commented May 22, 2025

Copy link
Copy Markdown
Contributor Author

It seems like now it passed. Which does not make it any less weird.

@nlewo

nlewo commented May 22, 2025

Copy link
Copy Markdown
Owner

I clicked on rerun, and it worked. As you say, it's weird.

Anyway, thank you for this contribution!

@nlewo nlewo merged commit 648d71f into nlewo:main May 22, 2025
3 of 4 checks passed
@nlewo

nlewo commented Jun 5, 2025

Copy link
Copy Markdown
Owner

hm, i realize that we forgot to add an option in the comin module to allow the user to set a post deployment command :/

@tcurdt I'm wondering how do you use this feature, or why you don't use the provided comin NixOS module?

@tcurdt

tcurdt commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

hm, i realize that we forgot to add an option in the comin module to allow the user to set a post deployment command :/

Darn! You are right.

@tcurdt I'm wondering how do you use this feature, or why you don't use the provided comin NixOS module?

I can only use it once it's in stable. So for now I am just waiting for it and not using it yet.
That explains why I didn't noticed this yet. Glad you did.
We should fix that.

@tcurdt

tcurdt commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

Do we want it like this? Not sure about the null case.

      postDeploymentCommand = mkOption {
        type = types.nullOr types.str;
        default = null;
        description = ''
          Path to the command to execute after a deploy.
          It provides some details on the deploy via env variables.
        '';
      };

@nlewo

nlewo commented Jun 5, 2025

Copy link
Copy Markdown
Owner

I can only use it once it's in stable.

What do you mean by "stable"? In a NixOS release? Because comin is currently not part of nixpkgs 😅

Do we want it like this? Not sure about the null case.

Yes, and this could be refined in a PR. (i think there is a types.path type and we could also provide all environment variables names)

@tcurdt

tcurdt commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

What do you mean by "stable"? In a NixOS release? Because comin is currently not part of nixpkgs 😅

Ups. That could have been a bit of a wait then 😅
Yup, it's an input to my flake.

Yes, and this could be refined in a PR. (i think there is a types.path type and we could also provide all environment variables names)

OK, let's do that.

@nlewo

nlewo commented Jun 7, 2025

Copy link
Copy Markdown
Owner

@tcurdt I submitted #87

@nlewo nlewo mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants