-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix validators interface. Add refAddonStage testutils. Fix 001_default_channel. #34
Merged
yashvardhan-kukreja
merged 1 commit into
mt-sre:master
from
sugarraysam:sblaisdo-fix-default-channel
Dec 17, 2021
Merged
Fix validators interface. Add refAddonStage testutils. Fix 001_default_channel. #34
yashvardhan-kukreja
merged 1 commit into
mt-sre:master
from
sugarraysam:sblaisdo-fix-default-channel
Dec 17, 2021
+518
−200
Conversation
This file contains 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
Fab work @sugarraysam ! |
@sugarraysam Interesting, let me go through the code today and find out why its exporting bundles in the package manifests format. |
2db8fda
to
13195e9
Compare
sugarraysam
commented
Dec 14, 2021
13195e9
to
5421e6c
Compare
sugarraysam
commented
Dec 14, 2021
5421e6c
to
b33de61
Compare
This was referenced Dec 16, 2021
Merged
yashvardhan-kukreja
approved these changes
Dec 17, 2021
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.
lgtm! Great work @sugarraysam , thanks 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a few changes and can be a bit confusing because many files are touched, but they all work together.
Changes
testutils.GetReferenceAddonStage
to help writing validators, especially getting a quick and easySucceedingCandidate
, that includes a fullMetaBundle
object001_default_channel
validatorfailureMsg
that will give users instructions on how to fix the failuremeta_loader_test.go
to use thetestutils.GetReferenceAddonStage
helperIssue found with
®istry.Annotations{}
It seems our extraction code extracts bundles using the deprecated
packageManifest
format:# Inspect the local cache $ tree /tmp/mtcli-07b10894-0673-4d95-b6ef-0cbd9701c9c3 /tmp/mtcli-07b10894-0673-4d95-b6ef-0cbd9701c9c3 └── quay.io └── osd-addons └── reference-addon-index@sha256:0c8b02008f2c2faeb681ae8cd454821266a794435aea4b3f7ae28c74bc2e280d └── reference-addon ├── 0.1.0 │ └── reference-addon.csv.yaml ├── 0.1.1 │ └── reference-addon.csv.yaml ├── 0.1.2 │ └── reference-addon.csv.yaml ├── 0.1.3 │ └── reference-addon.csv.yaml ├── 0.1.4 │ └── reference-addon.csv.yaml ├── 0.1.5 │ └── reference-addon.csv.yaml └── package.yaml
The issue with this format is that we do not get access to the
annotations.yaml
file. Now I might be wrong, but I believe we need to validate some of these annotations as OLM depends on them to run the workloads properly. For example, look at the commented outpkg/validators/validator_001_default_channel.go::matchesDefaultChannelAnnotations::#line 61
which validates default channel annotations.cc @yashvardhan-kukreja @ashishmax31
Bundles format expected output (from
mtbundles
)