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

feat: add basic support for nix flakes #21

Merged
merged 3 commits into from
May 15, 2023

Conversation

isubasinghe
Copy link
Collaborator

This adds a reproducible build environment for Argo Workflows. Argo Workflows can now be run in a few simple steps documented in the README.md.

Why are there some go files changed here?
This was the outcome of running gofmt on the sources, sources can be reformatted by running "nix fmt".
Currently this only supports formatting golang and nix files but can be extended to anything supported via clang-format, prettier and more. See this for more info: https://numtide.github.io/treefmt/formatters/

The files.go stub was added, this is a bit more deterministic than copying at build time. This will also make caching easier.

@JPZ13
Copy link
Collaborator

JPZ13 commented May 2, 2023

I'm running into an error with devenv up

(devenv) JPs-MacBook-Pro:argo-workflows jpzivalich$ devenv up
mkdir: /.devenv: Read-only file system
/nix/store/3hbmx5ka5k6m9hijylj0skri9wfp6rag-devenv-up: line 22: /.devenv/state/devenv.pid: No such file or directory
11:23:55 system                | ui.1 started (pid=2625)
11:23:55 system                | argo-server.1 started (pid=2626)
11:23:55 system                | workflow-controller.1 started (pid=2627)
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55+02:00" level=info msg="index config" indexWorkflowSemaphoreKeys=true
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55+02:00" level=info msg="cron config" cronSyncPeriod=10s
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55+02:00" level=info msg="Memoization caches will be garbage-collected if they have not been hit after" gcAfterNotHitDuration=30s
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55.369Z" level=info msg="not enabling pprof debug endpoints"
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55.441Z" level=info msg="Get configmaps 404"
11:23:55 workflow-controller.1 | time="2023-05-02T11:23:55.442Z" level=fatal msg="Failed to register watch for controller config map: configmaps \"workflow-controller-configmap\" not found"
11:23:55 system                | workflow-controller.1 stopped (rc=1)
11:23:55 system                | sending SIGTERM to argo-server.1 (pid 2626)
11:23:55 system                | sending SIGTERM to ui.1 (pid 2625)
11:23:55 system                | argo-server.1 stopped (rc=-15)
11:23:55 system                | ui.1 stopped (rc=-15)
(devenv) JPs-MacBook-Pro:argo-workflows jpzivalich$

I think it might be having a hard time installing things on my docker-desktop cluster
@isubasinghe - could you point me in the right direction?

README.md Outdated Show resolved Hide resolved
@JPZ13
Copy link
Collaborator

JPZ13 commented May 2, 2023

On our call yesterday @rohankmr414 had a question about adding the dependency files. Rohan, could you ask it here?

README.md Show resolved Hide resolved
@isubasinghe
Copy link
Collaborator Author

I should have probably mentioned this before, but this does assume kubernetes related stuff has been setup.

flake.nix Outdated Show resolved Hide resolved
@JPZ13
Copy link
Collaborator

JPZ13 commented May 2, 2023

@isubasinghe and I hopped on a call today and were able to get my issue sorted. All I had to do was restart the terminal after installing nix rather than just opening up a new tab on iterm 🤷‍♂️

README.md Show resolved Hide resolved
Signed-off-by: Isitha Subasinghe <[email protected]>
@isubasinghe isubasinghe requested review from Joibel and JPZ13 May 4, 2023 02:45
Copy link
Collaborator

@JPZ13 JPZ13 left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

I had to delete my .devenv folder after pulling the new commits, but after deleting and refreshing, it worked great

@JPZ13 JPZ13 merged commit 924a8bc into pipekit:master May 15, 2023
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.

3 participants