Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Conversation

@smarterclayton
Copy link
Contributor

When we tag images in, create a second image stream stable-initial that
will not be modified and then let a secondary task create an image stream
from that alternate source. If RELEASE_IMAGE_INITIAL is already specified,
skip the action and instead tag it to that location.

Makes it easy to test an upgrade from the previous state to the current
state (post change) while also allowing for injecting an initial step.

Built on top of #282 #283

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 4, 2019
@smarterclayton
Copy link
Contributor Author

@stevekuznetsov @bbguimaraes @petr-muller this is a prerequisite for the upgrade test framework. See openshift/release#2997 for an example of what the prow job looks like. We probably need to add support for a new flag, and we need to keep in mind that the PR testing is going to have future variants (i.e. now it's release tag -> tag + PR images, but in future will include "last stable version" and "upgrade then downgrade" testing), so we don't want to assume it'll be a simple variant yet.

Every operator repo will get one of these, but it will be optional / not triggered by default. That means we need to solve how to generate optional prow job status so we can stop manually crafting prow jobs for those.

smarterclayton added a commit to smarterclayton/release that referenced this pull request Mar 4, 2019
Requires openshift/ci-operator#284 before it will function. Will be
used as the template for other jobs.

The job launches the cluster using a release image build from the
current state of the integration stream (release:initial). It then
launches the upgrade tests with

    openshift-tests run-upgrade all --to-image=.../ci-op-.../release:latest

The test job will start the prereq tests, then once they are stable, launch
the upgrade, monitoring invariants while the test continues. Once the upgrade
is complete or fails, the postcondition tests will run and then the cluster
is torn down.

Due to limitations in the upstream infrastructure for upgrade tests we don't
get the nice separation between tests that e2e runs do which is a future
improvement.

After this test is working we'll add it to other repos as a standard job,
including the release verification jobs. We'll also invoke it from the
release controller dynamically to calculate upgrade edges prior to
promoting a job.
@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 4, 2019
@smarterclayton smarterclayton force-pushed the build_initial branch 2 times, most recently from 47a67ed to 6fd86c0 Compare March 4, 2019 23:23
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 4, 2019
@smarterclayton
Copy link
Contributor Author

Rebased on top of the merged PRs. One more follow up coming (that will build on this) to default the contents of stable from RELEASE_IMAGE_LATEST when it is specified.

func (s *assembleReleaseStep) Requires() []api.StepLink {
return []api.StepLink{api.ImagesReadyLink()}
// if our prereq is provided, we don't need any prereqs
if len(os.Getenv(s.envVar())) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use os.LookupEnv for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I'm still in the older habit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the value has to be greater than zero. we ignore RELEASE_IMAGE_INITIAL= because having an empty env is invalid and if someone did bash to init the env var we want that. We don't discriminate between empty and unset here.

}

func (s *assembleReleaseStep) Name() string { return "[release:latest]" }
func (s *assembleReleaseStep) Name() string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func (s *assembleReleaseStep) Name() string {
    return fmt.Sprintf("[release:%s]", s.tag())
}

if s.latest {
return "Create the release image containing all images built by this job"
}
return "Create the release image for the initial state of this job"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial state of current release at the time the job ran? could be more clear

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

When we tag images in, create a second image stream `stable-initial`
that will not be modified and then let a secondary task create an
image stream from that alternate source. If RELEASE_IMAGE_INITIAL
is already specified, skip the action and instead tag it to that
location.

Simplify the structure of the AssembleReleaseStep to handle
both initial and latest.

Makes it easy to test an upgrade from the previous state to the
current state (post change) while also allowing for injecting an
initial step.
@smarterclayton
Copy link
Contributor Author

Updated PTAL

@stevekuznetsov
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, stevekuznetsov

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [smarterclayton,stevekuznetsov]

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

@openshift-merge-robot openshift-merge-robot merged commit b2c8eaf into openshift:master Mar 6, 2019
stevekuznetsov added a commit to stevekuznetsov/ci-operator that referenced this pull request Mar 6, 2019
…itial"

This reverts commit b2c8eaf, reversing
changes made to 1901ee4.

Signed-off-by: Steve Kuznetsov <[email protected]>
openshift-merge-robot added a commit that referenced this pull request Mar 6, 2019
Revert "Merge pull request #284 from smarterclayton/build_initial"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. 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.

4 participants