-
Notifications
You must be signed in to change notification settings - Fork 71
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
Allow specifying executable in artifact section and skip bash from WSL #1169
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1169 +/- ##
==========================================
- Coverage 51.49% 51.45% -0.05%
==========================================
Files 292 292
Lines 16333 16352 +19
==========================================
+ Hits 8411 8414 +3
- Misses 7315 7329 +14
- Partials 607 609 +2 ☔ View full report in Codecov by Sentry. |
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.
What was the underlying issue in #1159?
@pietern it's essentially as described in the ticket, when running deploy from let's say CMD, if CLI finds bash installed as WSL it tries to use it to build wheels. To execute scripts we create temporary files, in the case described in the issue they will be created from CMD scope in Windows tmp path. But when path to this script passed to found bash it can't be accessed because WSL bash does not have access to Windows FS paths. |
With this change, it's possible to explicitly tell CLI to use CMD to avoid the issue described in the ticket |
Understood. Then this fix allows Windows users to override and use |
I haven't found reliable way yet, but I don't think we should because the logic would become a bit too complex as we will need to fall through only if WSL bash is detected but CLI is running NOT in WSL bash |
I don't think it should be hard;
This also means the default templates work if WSL is installed. I suspect they don't right now because of this. |
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.
Please hint in the summary that we're now skipping WSL bash when running on Windows.
@@ -33,5 +34,14 @@ func newBashShell() (shell, error) { | |||
return nil, nil | |||
} | |||
|
|||
// Skipping WSL bash if found one | |||
if strings.Contains(out, `\Windows\System32\bash.exe`) || strings.Contains(out, `\Microsoft\WindowsApps\bash.exe`) { |
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.
Nit: these can be suffix checks.
Bundles: * Allow specifying executable in artifact section and skip bash from WSL ([#1169](#1169)). * Added warning when trying to deploy bundle with `--fail-if-running` and running resources ([#1163](#1163)). * Group bundle run flags by job and pipeline types ([#1174](#1174)). * Make sure grouped flags are added to the command flag set ([#1180](#1180)). * Add short_name helper function to bundle init templates ([#1167](#1167)). Internal: * Fix dynamic representation of zero values in maps and slices ([#1154](#1154)). * Refactor library to artifact matching to not use pointers ([#1172](#1172)). * Harden `dyn.Value` equality check ([#1173](#1173)). * Ensure every variable reference is passed to lookup function ([#1176](#1176)). * Empty struct should yield empty map in `convert.FromTyped` ([#1177](#1177)). * Zero destination struct in `convert.ToTyped` ([#1178](#1178)). * Fix integration test with invalid configuration ([#1182](#1182)). * Use `acc.WorkspaceTest` helper from bundle integration tests ([#1181](#1181)).
Bundles: * Allow specifying executable in artifact section and skip bash from WSL ([#1169](#1169)). * Added warning when trying to deploy bundle with `--fail-if-running` and running resources ([#1163](#1163)). * Group bundle run flags by job and pipeline types ([#1174](#1174)). * Make sure grouped flags are added to the command flag set ([#1180](#1180)). * Add short_name helper function to bundle init templates ([#1167](#1167)). Internal: * Fix dynamic representation of zero values in maps and slices ([#1154](#1154)). * Refactor library to artifact matching to not use pointers ([#1172](#1172)). * Harden `dyn.Value` equality check ([#1173](#1173)). * Ensure every variable reference is passed to lookup function ([#1176](#1176)). * Empty struct should yield empty map in `convert.FromTyped` ([#1177](#1177)). * Zero destination struct in `convert.ToTyped` ([#1178](#1178)). * Fix integration test with invalid configuration ([#1182](#1182)). * Use `acc.WorkspaceTest` helper from bundle integration tests ([#1181](#1181)).
Changes
Allow specifying executable in artifact section
We also skip bash found on Windows if it's from WSL because it won't be correctly executed, see the issue above
Fixes #1159