-
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
Package create time relative path issues using imports #1756
Comments
You are correct @WeaponX314 . Before 0.27 you would have to use path hacking and variables (like your example) in order to use certain from imported components. In 0.27 this is no longer the case as kind: ZarfPackageConfig
metadata:
name: test-wrapper
description: "test outer wrapper"
components:
- name: test-component
required: true
import:
path: import
name: my-import-test and kind: ZarfPackageConfig
metadata:
name: test-pkg
description: "test creating something before copy"
components:
- name: my-import-test
actions:
onCreate:
before:
- cmd: tar czvf file.tar.gz file.txt
description: Process that ends up with a tar.gz
after:
- cmd: rm -rf file.tar.gz
description: Cleans up
files:
- source: file.tar.gz
target: /tmp/remote_file.tar.gz However, you have properly identified that There are 2 paths forward I will bring up to the team:
|
I personally would advocate for # 1 in this case. It would be a faster fix and would have less of a chance to break other behavior. I also updated the release notes to be more explicit about the change in behavior here. |
## Related Issue Fixes #1756 ## 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 - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Signed-off-by: razzle <harry@razzle.cloud> Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com> Co-authored-by: Wayne Starr <me@racer159.com>
Environment
Device and OS: Linux
App version: 0.27.0
Kubernetes distro being used: k3s, but really N/A here
Other: test works with 0.26.1
Steps to reproduce
Expected result
Actual Result
Failed to create package: unable to compose component test-component: unable to get child component: unable to fix composed filepaths (see visual proof for more details)
Visual Proof (screenshots, videos, text, etc)
0.26.1
0.27.0
Severity/Priority
Additional Context
I know that this would work if I collapsed it into the wrapper. However, in the actual usage of this, we like to have a separate package created as well that doesn't include the other parts that get added to the outer wrapper that mainly imports. So this is a behavioral change and I am not certain if it is a bug or not but it also might be a teaching moment since maybe I am going about it wrong, please let me know if there is a better way. Bottom line, would like to have an imported zarf package create something that didn't previously exist and still have it be copied properly honoring any "before" actions that should take place before the files are looked at.
I have attached the setup for easy recreation.
zarf_test.tar.gz
The text was updated successfully, but these errors were encountered: