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

[Release 1.2] Fix CSV merge issues #831

Merged
merged 2 commits into from
Sep 24, 2020

Conversation

nunnatsa
Copy link
Collaborator

@nunnatsa nunnatsa commented Sep 24, 2020

cherry pick #828 and #829

#fixes https://bugzilla.redhat.com/1882052

Release note:

Optionally ignore relatedImages from component operators

tiraboschi and others added 2 commits September 24, 2020 09:38
Adda a flag to the csv-merger tool to optionally ignore
relatedImages from component operators generated CSV.

Signed-off-by: Simone Tiraboschi <[email protected]>
* add error handling to hack/build-manifest.sh

`set -e` does not stop the process if the error is happened within a command substitution. This is why the [`hack/build-manifest.sh`] script didn't fail in some cases, e.g. when an image was missing in the remote registry.

This PR added error handling to the script:
* Added `trap` command and the `catch` method
* command substitution inside string building didn't catch by the trap. This lines were split to make sure the trap catches any error. For example:
```bash
A_VARIABLE="Text text${VAR1}/$(failed command)"
```
was split to something like:
```bash
A_TEMP_VAR="$(failed command)"
A_VARIABLE="Text text${VAR1}/${A_TEMP_VAR}"
```
* Single line local variables with command substitution were not caught by the trap, and was also split. For example:
```bash
function foo() {
  ...
  local a_variable="$(failed command)"
  ...
```
was split to something like:
```bash
function foo() {
  ...
  local a_variable
  a_variable="$(failed command)"
  ...
```
* Add simple versifcation to the operator CSV files, by greping for their `image:` line. This check both that the file is not empty and the image makes some sense

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>

* csv-merger will now panic if one of the CSVs is empty

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
@kubevirt-bot kubevirt-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 24, 2020
@ovirt-infra
Copy link

Hello contributor, thanks for submitting a PR for this project!

I am the bot who triggers "standard-CI" builds for this project.
As a security measure, I will not run automated tests on PRs that are not from white-listed contributors.

In order to allow automated tests to run, please ask one of the project maintainers to review the code and then do one of the following:

  1. Type ci test please on this PR to trigger automated tests for it.
  2. Type ci add to whitelist on this PR to trigger automated tests for it and also add you to the contributor white-list so that your future PRs will be tested automatically. ( keep in mind this list might be overwritten if the job XML is refreshed, for permanent whitelisting, please follow Manage kubevirt CR from sdk generated code #3 option )
  3. If you are planning to contribute to more than one project, maybe it's better to ask them to add you to the project organization, so you'll be able to run tests for all the organization's projects.

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Sep 24, 2020
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 24, 2020
@tiraboschi
Copy link
Member

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2020
@nunnatsa
Copy link
Collaborator Author

/override ci/prow/hco-e2e-azure

@kubevirt-bot
Copy link
Contributor

@nunnatsa: Overrode contexts on behalf of nunnatsa: ci/prow/hco-e2e-azure

In response to this:

/override ci/prow/hco-e2e-azure

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubevirt-bot kubevirt-bot merged commit 188cecf into kubevirt:release-1.2 Sep 24, 2020
@nunnatsa nunnatsa deleted the release-1.2 branch September 24, 2020 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants