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

Add support for choosing the release of a package #141

Conversation

gbenhaim
Copy link
Contributor

Description of the change:

This change adds the possibility to specify the requested release after
the package's name (e.g "Kubevirt:10.0.0"). If the version is not specified,
the server will download the latest version from the appregistry.

Motivation for the change:

Up until now, the appregistry-server always pulled the latest
version of the requested packages, which makes sense for production,
but not for testing and release phases of the packages.

During testing, multiple version of the same package can be
tested at the same time, and when releasing, it's not mandatory
that the different releases will be released on the same date.

When combining the appregistry-server logic, with the properties of the
test and release phases, there is a need to create a complex automation
for merging multiple versions (so they can be tested at the time) into
a single bundle, and omitting non-ready releases from bundles,
after testing and before the release.

Depends on #139

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 19, 2019
@openshift-ci-robot
Copy link

Hi @gbenhaim. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 19, 2019
@gbenhaim
Copy link
Contributor Author

/assign @jpeeler

@gbenhaim gbenhaim changed the title Add support for choosing a version Add support for choosing the release of a package Dec 19, 2019
@njhale
Copy link
Member

njhale commented Jan 7, 2020

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 7, 2020
@njhale
Copy link
Member

njhale commented Jan 7, 2020

/retest

@gbenhaim gbenhaim force-pushed the add_support_for_choosing_a_version branch from 7afc8d7 to 5ad3364 Compare January 7, 2020 14:23
@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 7, 2020
@gbenhaim gbenhaim force-pushed the add_support_for_choosing_a_version branch from 5ad3364 to 8621a09 Compare January 7, 2020 15:58
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 7, 2020
@gbenhaim gbenhaim force-pushed the add_support_for_choosing_a_version branch from 8621a09 to b5b168d Compare January 16, 2020 09:37
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 16, 2020
@gbenhaim gbenhaim mentioned this pull request Jan 16, 2020
5 tasks
@gbenhaim
Copy link
Contributor Author

/hold
The list of packages doesn't appear as expected in the log, I'll fix it.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 16, 2020
@gbenhaim gbenhaim force-pushed the add_support_for_choosing_a_version branch 2 times, most recently from 4a41c69 to fe4a7d0 Compare January 16, 2020 17:11
@gbenhaim
Copy link
Contributor Author

/retest

Up until now, the appregistry-server always pulled the latest
version of the requested packages, which makes sense for production,
but not for testing and release phases of the packages.

During testing, multiple version of the same package can be
tested at the same time, and when releasing, it's not mandatory
that the different releases will be released on the same date.

When combining the appregistry-server logic, with the properties of the
test and release phases, there is a need to create a complex automation
for merging multiple versions (so they can be tested at the time) into
a single bundle, and omitting non-ready releases from bundles,
after testing and before the release.

This change adds the possibility to specify the requested release after
the package's name (e.g "Kubevirt:10.0.0"). If the version is not specified,
the server will download the latest version from the appregistry.

Signed-off-by: gbenhaim <galbh2@gmail.com>
@gbenhaim gbenhaim force-pushed the add_support_for_choosing_a_version branch from fe4a7d0 to d1948d7 Compare January 16, 2020 21:59
@gbenhaim
Copy link
Contributor Author

CI Issue

Installing from release registry.svc.ci.openshift.org/ci-op-bkr8ndcn/release@sha256:aa62ded914897f6572377fe20883d83b9c5b4c3dfa4d6e3ba82af84f2e380e05
level=info msg="Credentials loaded from the \"default\" profile in file \"/etc/openshift-installer/.awscred\""
level=warning msg="Found override for release image. Please be warned, this is not advised"
level=info msg="Consuming Install Config from target directory"
level=info msg="Creating infrastructure resources..."
level=error
level=error msg="Error: Error waiting for AMI (ami-0d65912c61e50db4a) to be ready: timeout while waiting for state to become 'available' (last state: 'pending', timeout: 40m0s)"
level=error
level=error msg="  on ../tmp/openshift-install-178706324/main.tf line 104, in resource \"aws_ami_copy\" \"main\":"
level=error msg=" 104: resource \"aws_ami_copy\" \"main\" {"
level=error
level=error
level=fatal msg="failed to fetch Cluster: failed to generate asset \"Cluster\": failed to create cluster: failed to apply using Terraform"

@gbenhaim
Copy link
Contributor Author

/test e2e-aws

@gbenhaim
Copy link
Contributor Author

/retest

1 similar comment
@fabiand
Copy link

fabiand commented Jan 17, 2020 via email

@gbenhaim
Copy link
Contributor Author

Looks like CI failed multiple times while trying to bootstrap a cluster, specifficaly when trying to allocate AWS resources:

https://storage.googleapis.com/origin-ci-test/pr-logs/pull/operator-framework_operator-registry/141/pull-ci-operator-framework-operator-registry-master-e2e-aws/479/artifacts/e2e-aws/container-logs/setup.log

Installing from release registry.svc.ci.openshift.org/ci-op-90wsrkg3/release@sha256:0c10bcf8748b63a47720174467e93b8599c8ec2f7ba1b6d7ec4fb01bd33abb22
level=info msg="Credentials loaded from the \"default\" profile in file \"/etc/openshift-installer/.awscred\""
level=warning msg="Found override for release image. Please be warned, this is not advised"
level=info msg="Consuming Install Config from target directory"
level=info msg="Creating infrastructure resources..."
level=error
level=error msg="Error: Error creating NAT Gateway: NatGatewayLimitExceeded: Performing this operation would exceed the limit of 200 NAT gateways"
level=error msg="\tstatus code: 400, request id: 18330325-ba57-40be-a151-500aa4f11428"
level=error
level=error msg="  on ../tmp/openshift-install-247850634/vpc/vpc-public.tf line 85, in resource \"aws_nat_gateway\" \"nat_gw\":"
level=error msg="  85: resource \"aws_nat_gateway\" \"nat_gw\" {"
level=error
level=error
level=error
level=error msg="Error: Error creating NAT Gateway: NatGatewayLimitExceeded: Performing this operation would exceed the limit of 200 NAT gateways"
level=error msg="\tstatus code: 400, request id: 564fbfc0-6030-4e13-9297-5ce6e5cc482f"
level=error
level=error msg="  on ../tmp/openshift-install-247850634/vpc/vpc-public.tf line 85, in resource \"aws_nat_gateway\" \"nat_gw\":"
level=error msg="  85: resource \"aws_nat_gateway\" \"nat_gw\" {"
level=error
level=error
level=fatal msg="failed to fetch Cluster: failed to generate asset \"Cluster\": failed to create cluster: failed to apply using Terraform"

@gbenhaim
Copy link
Contributor Author

/test e2e-aws

@gbenhaim
Copy link
Contributor Author

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2020
@gbenhaim
Copy link
Contributor Author

This one is ready.
There are 5 tests that fail because of issues that are unrelated to this change.

@gbenhaim
Copy link
Contributor Author

@njhale @jpeeler Hi guys, can you please take a look on this PR?

@jpeeler
Copy link
Contributor

jpeeler commented Jan 22, 2020

/retest

3 similar comments
@jpeeler
Copy link
Contributor

jpeeler commented Jan 22, 2020

/retest

@jpeeler
Copy link
Contributor

jpeeler commented Jan 22, 2020

/retest

@jpeeler
Copy link
Contributor

jpeeler commented Jan 23, 2020

/retest

@jpeeler
Copy link
Contributor

jpeeler commented Jan 23, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 23, 2020
@jpeeler
Copy link
Contributor

jpeeler commented Jan 23, 2020

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gbenhaim, jpeeler

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 7ae179e into operator-framework:master Jan 23, 2020
@gbenhaim
Copy link
Contributor Author

@jpeeler Thanks a lot!

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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants