Skip to content
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

OCI deploy with default: true component fails to find image blob #2320

Closed
mjnagel opened this issue Feb 21, 2024 · 0 comments · Fixed by #2321
Closed

OCI deploy with default: true component fails to find image blob #2320

mjnagel opened this issue Feb 21, 2024 · 0 comments · Fixed by #2321
Assignees
Labels
bug 🐞 Something isn't working

Comments

@mjnagel
Copy link
Contributor

mjnagel commented Feb 21, 2024

Environment

Device and OS: MBP
App version: 0.32.3
Kubernetes distro being used: k3d
Other:

Steps to reproduce

We've seen this consistently on our uds-core package so the steps below reproduce by using that:

zarf p deploy oci://defenseunicorns/uds-k3d:0.4.0 --confirm
zarf init --confirm
zarf p deploy oci://ghcr.io/defenseunicorns/packages/uds/core:0.13.0-registry1 --confirm

Expected result

k3d is deployed with uds-core on top.

Actual Result

Deployment errors out on deploying metrics-server which is a default: true component:

      WARNING  Retrying (1/3): open
 /tmp/zarf-2787421378/images/blobs/sha256/3ef3b57e144bb6cd169eb47bb1e985c863a49d6f15827c8a7467b3b7292e7f07:
 no such file or directory

Severity/Priority

Medium - my understanding is that required/default is being refactored so this might not be an issue for long but it is causing issues with current deployments.

Additional Context

We noticed that explicitly selecting the metrics-server component during deploy seems to resolve the issue, as well as pulling then deploying. This seems to exclusively be an issue with a direct OCI deploy.

mjnagel added a commit to defenseunicorns/uds-core that referenced this issue Feb 21, 2024
Reverts #193

Reverting this due to
zarf-dev/zarf#2320

Resolves #195

Also added a temporary task addition to make sure that tasks can run and
succeed.
@Racer159 Racer159 added bug 🐞 Something isn't working and removed possible-bug 🐛 labels Feb 26, 2024
Noxsios added a commit that referenced this issue Mar 21, 2024
## Description

Consolidate component filtering logic into a `filters` package. Each
filter is an implementation of

```go
// ComponentFilterStrategy is a strategy interface for filtering components.
type ComponentFilterStrategy interface {
	Apply(types.ZarfPackage) ([]types.ZarfComponent, error)
}
```

Public construction functions return instances of this interface _not_
instances of their underlying structs. Consumers should be fully
cognizant of which filter they are using, and should not be making a
common wrapper function (eg. `NewFilter(args...)` to dynamically return
a filter.

ex:

```go
func Empty() ComponentFilterStrategy {
	return &emptyFilter{}
}

// emptyFilter is a filter that does nothing.
type emptyFilter struct{}

// Apply returns the components unchanged.
func (f *emptyFilter) Apply(pkg types.ZarfPackage) ([]types.ZarfComponent, error) {
	return pkg.Components, nil
}
```

BREAKING CHANGES: This changes the interface signatures on
`sources.PackageSource` to reflect the new behavior whereupon the
`zarf.yaml` is loaded into memory within the sources load operations.
This allows for `filter`ing to take place during load and for the
`zarf.yaml` in memory to reflect these filter operations.

## Related Issue

Fixes #2320 

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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

---------

Signed-off-by: razzle <harry@razzle.cloud>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Lucas Rodriguez <lucas.rodriguez@defenseunicorns.com>
Co-authored-by: Lucas Rodriguez <lucas.rodriguez9616@gmail.com>
robmcelvenny pushed a commit to owen-grady/uds-core-slim-dev that referenced this issue Jun 3, 2024
Reverts defenseunicorns/uds-core#193

Reverting this due to
zarf-dev/zarf#2320

Resolves defenseunicorns/uds-core#195

Also added a temporary task addition to make sure that tasks can run and
succeed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants