-
Notifications
You must be signed in to change notification settings - Fork 401
feat(task): --default_environment flag for specifying the default environment for a task
#5164
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
5ecc57e
Adding a default_environment for the task
prady0t 6f2bed9
clippy suggestions
prady0t effcf54
removed debugging code
prady0t d76cd3c
removed debugging code
prady0t 97360ec
clippy suggestions
prady0t 82cee10
clippy suggestions
prady0t 13e7412
Adding default-environment via cli
prady0t cf5730a
restoring kebab-case
prady0t cd64ba9
pytest and lint failures
prady0t 7ea8e3f
remove json_schema_extra
prady0t 32f29df
fixing wrong dtype
prady0t 8bd1fb9
Merge branch 'main' into add-default-channel
ruben-arts f5d9c7d
disambiguate task when default-environment is present
prady0t 71fa188
Merge branch 'add-default-channel' of https://github.com/prady0t/pixi…
prady0t 4fbd1c4
using --environment to override default-environmnet plus some tests
prady0t 6b6c224
clippy suggestions
prady0t 6e9868b
using doc comment instead of regular comment
prady0t 3de3920
auto generated doc
prady0t 8a97180
overriding the default eith default-environment
prady0t ee91cf2
clippy suggestions
prady0t 45d6e5f
clippy suggestions
prady0t 829f24f
test all platforms
prady0t ef731f8
Update crates/pixi_task/src/task_environment.rs
nichmor d19fbb2
Merge branch 'main' into add-default-channel
nichmor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -439,10 +439,13 @@ class TaskInlineTable(StrictBaseModel): | |
| description="A map of environment variables to values, used in the task, these will be overwritten by the shell.", | ||
| examples=[{"key": "value"}, {"ARGUMENT": "value"}], | ||
| ) | ||
| default_environment: EnvironmentName | None = Field( | ||
| None, | ||
| description="A default environment to run the task", | ||
| ) | ||
| description: NonEmptyStr | None = Field( | ||
| None, | ||
| description="A short description of the task", | ||
| examples=["Build the project"], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, remove the example field, as it may be misleading/not required. |
||
| ) | ||
| clean_env: bool | None = Field( | ||
| None, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for the currently discussed bug, but now you cannot override this using
-eflag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the priority should be
--environmentin thepixi runcli (like it's now)default-environmentfield in thetaskdefinition. (new)defaultenvironment when possible (like it's now)