Skip to content

add --keep-result-dir flag#132

Open
manveru wants to merge 1 commit into
nix-community:mainfrom
manveru:keep-result-dir
Open

add --keep-result-dir flag#132
manveru wants to merge 1 commit into
nix-community:mainfrom
manveru:keep-result-dir

Conversation

@manveru

@manveru manveru commented Jan 20, 2023

Copy link
Copy Markdown

Should resolve #79 and #118

Comment thread src/nix/deployment/mod.rs
job.state(JobState::Running)?;
let path = dir.join(".gcroots").join(format!("node-{}", &*target.name));
let path = dir
.join(self.options.create_gc_roots_dir.to_owned())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When people specify --keep-result-dir, they might expect the path to be relative to the PWD instead of the configuration base. I'm not sure what's the desirable behavior here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

isn't the behavior still the same as before? Not sure I understand what the configuration base is. The default is still to put things into .gcroots in whatever directory you are in currently, but now you may also specify other absolute or relative paths.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The thing is that Colmena doesn't put it in .gcroots under whatever directory you are in, but under the directory where flake.nix or hive.nix exists. If no -f is specified, Colmena automatically searched upwards for a flake.nix or hive.nix and use it as the context_dir. With the current implementation, the behavior of colmena apply --keep-result --keep-result-dir ./.myroots would be confusing if it's run in a sub-directory.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ah, I see... I'm not sure what people would expect since I never change into subdirectories, but one could always give --keep-result-dir "$PWD/.myroots" in this case?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

so maybe instead of linking it, just print it?

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.

.gcroots -> make it configurable

3 participants