-
Notifications
You must be signed in to change notification settings - Fork 173
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
Zarf 0.31.1: "localOS: ..." Tag in zarf.yaml does not work anymore (on Windows and Linux) #2158
Comments
@Ghost-Of-Tsushima are you seeing this on v0.31.3 as well? Testing with this simple example on v0.31.3 and v0.31.1 and I didn't see the same behavior: kind: ZarfPackageConfig
metadata:
name: test
components:
- name: basic-name
required: true
only:
localOS: windows
actions:
onDeploy:
after:
- cmd: echo Windows!
- name: basic-name2
required: true
only:
localOS: linux
actions:
onDeploy:
after:
- cmd: echo Linux! |
(also it looks like the component names are different between the zarf.yaml and the run screenshots - is there a potential you are using composable components with this and maybe the issue is there?) |
(investigated deeper in code and that is what is happening. will add checks for that) |
## Description This fixes an issue where compose could drop the `only.localOS` filter through compose. ## Related Issue Fixes #2158 ## Type of change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Lucas Rodriguez <[email protected]>
Environment
Device and OS: Linux (and Windows Server 2019)
App version: Zarf v0.31.1
Kubernetes distro being used: k3s with zarf included (running only on Linux)
Other:
Steps to reproduce
Expected result
When the first yaml-block (localOS: windows) is run on a Linux System, it should not be interpreted at all by bourneshell and just skipped. When its run on a Windows System, it should be interpreted and run correctly.
When the seconf yaml-block (localOS: Linux) is run on a Windows System, it should not be interpreted at all by Powershell and just skipped. When its run on a Linux System, it should be interpreted and run correctly.
Actual Result
When
zarf deploy <packagename>
is executed on a linux system, there is an error:sh: 1: Syntax error: <powershell-command, that cant get interpreted by bourneshell>
When
zarf deploy <packagename>
is executed on a windows system, there is an error:Powershell error: <Bash-command that cant get interpreted by powershell>
Visual Proof (screenshots, videos, text, etc)
zarf.yaml:
Powershell-Error:
Linux-Error:
Severity/Priority
Additional Context
I upgraded from Zarf Version v0.29.2 to v0.31.1. In Version v0.29.2 it worked perfectly fine. I didn't alter the code in any shape or form.
The text was updated successfully, but these errors were encountered: