Skip to content

Allow workspace_path to be set via config:user:workspace_dir #36

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

Conversation

dodecatheon
Copy link
Contributor

This is the simplest possible change -- just change the workspace_path definition to config:user:workspace_dir, if found, otherwise use the old default.

@dodecatheon dodecatheon marked this pull request as draft February 8, 2023 20:19
@dodecatheon dodecatheon marked this pull request as ready for review February 8, 2023 20:40
@dodecatheon dodecatheon marked this pull request as draft February 8, 2023 20:40
@dodecatheon dodecatheon marked this pull request as ready for review February 8, 2023 20:42
@rfbgo rfbgo requested a review from douglasjacobsen February 8, 2023 22:06
@douglasjacobsen
Copy link
Collaborator

@dodecatheon Thanks for the contribution!

I think we should define a default config value here: https://github.com/GoogleCloudPlatform/ramble/blob/develop/etc/ramble/defaults/config.yaml

And then remove the one from ramble.paths. You'd also need to add the definition of the config into the schema (which should be in the PR regardless).

I'd also prefer that the name is something that could easily be changed into a list in the future. Maybe something like:
config:workspace_dirs. Where the current value is a string (or maybe even a list already?).

Copy link
Collaborator

@douglasjacobsen douglasjacobsen left a comment

Choose a reason for hiding this comment

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

That's closer to what I was thinking. You still need to update the schema for config to define this option though.

And I think we probably need at least one test, to make sure changing the workspace dir works in the future.

Also, something in this PR made the dryrun_setup test timeout. So, you might need to look at that.

To run it locally, you can ramble unit-test -k test_dryrun_setup

@douglasjacobsen
Copy link
Collaborator

/gcbrun

…ults in lib/ramble/ramble/config.py and etc/ramble/defaults/config.yaml
workspace_path has been removed, replaced with get_workspace_path and
set_workspace_path functions.

This had a cascading effect through the unit tests, which overall
have been cleaned up to avoid leaving test workspaces around.

 Changes to be committed:
	modified:   .gitignore
	modified:   lib/ramble/ramble/cmd/workspace.py
	modified:   lib/ramble/ramble/test/cmd/on.py
	modified:   lib/ramble/ramble/test/cmd/workspace.py
	modified:   lib/ramble/ramble/test/conftest.py
	modified:   lib/ramble/ramble/test/end_to_end.py
	modified:   lib/ramble/ramble/test/expander.py
	modified:   lib/ramble/ramble/test/mirror_tests.py
	modified:   lib/ramble/ramble/workspace/__init__.py
	modified:   lib/ramble/ramble/workspace/workspace.py
@dodecatheon dodecatheon force-pushed the configurable-workspace-dir branch from 9ae72f1 to 22a8762 Compare February 15, 2023 22:10
@douglasjacobsen
Copy link
Collaborator

/gcbrun

@douglasjacobsen douglasjacobsen merged commit e1f86c8 into GoogleCloudPlatform:develop Feb 15, 2023
@douglasjacobsen douglasjacobsen self-assigned this Feb 15, 2023
@douglasjacobsen douglasjacobsen added the enhancement New feature or request label Feb 15, 2023
@dodecatheon dodecatheon deleted the configurable-workspace-dir branch February 15, 2023 23:39
@douglasjacobsen douglasjacobsen mentioned this pull request Feb 16, 2023
dodecatheon added a commit to dodecatheon/ramble that referenced this pull request Feb 23, 2023
douglasjacobsen added a commit that referenced this pull request Feb 27, 2023
douglasjacobsen added a commit that referenced this pull request Feb 27, 2023
linsword13 added a commit that referenced this pull request Oct 22, 2024
[pull] develop from GoogleCloudPlatform:develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants