-
Notifications
You must be signed in to change notification settings - Fork 24
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 bug with FBC YAML Operators #655
Conversation
@release-engineering/exd-guild-hello-operator PTAL. I took the liberty to convert all files in the |
@JAVGan I have to think about this solution - tomorrow. My idea was to detect what format is on the input as a source_image. Then use |
@lipoja I was thinking about this, but what would happen if we receive multiple operators (to add, for example) being one of them, say, JSON and the rest YAML? Or vice-versa? That's why I thought on streamlining everything, but sure, we can discuss this tomorrow. |
Yeah, I think agree with Jonathan's reasoning here since we are supporting adding multiple operators in a single fragment. |
Yeah I know what you mean. I thought we could go with opm generating the output. The reason behind that is that opm is "consuming" those files so it would not generate anything that is faulty. |
Rebased |
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.
I agree to changes, however I IMO do not have enough expertise to approve this.
7c0b518
to
9cdf548
Compare
When an operator has catalog in yaml insted of json, some requests (like add) fails on "duplicate package" as `merge_catalogs_dirs` function generates FBC from hidden index.db created as json files and then copy over its content to final location where are all yaml files. To prevent this issue this simple fix will walk through the config directory and convert any YAML files into JSON to ensure that everything uses the same format in the index image. Refers to CLOUDDST-21432
This commit validates the JSON files from config dir after ensuring all files are being present in this format. Refers to CLOUDDST-21432
This commit changes the `merge_catalog_dirs` to call the `enforce_json_config_dir` and `opm_validate` only once after merging all files into the destination dir. Refers to CLOUDDST-21432
46d7020
@lipoja @chandwanitulsi @yashvardhannanavati I've rebased and fixed the conflicts, please give a final review so I can merge it |
When an operator has catalog in yaml insted of json, some requests (like add) fails on "duplicate package" as
merge_catalogs_dirs
function generates FBC from hidden index.db created as json files and then copy over its content to final location where are all yaml files.To prevent this issue this simple fix will walk through the config directory and convert any YAML files into JSON to ensure that everything uses the same format in the index image.
Refers to CLOUDDST-21432