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

Conversation

@smarterclayton
Copy link
Contributor

Periodic jobs that want to run a PR from a known RELEASE_IMAGE_LATEST
need access to the cli and installer images out of the payload. This
fixes problems we have testing older installers and cli binaries against
newer payloads and fixes the current break in the release controllers. This
is also required for properly testing the installer.

Use standard oc commands (that are API forward compatible) to extract the
cli image and the installer image from the payload and set them on
stable if RELEASE_IMAGE_LATEST is provided as an input (as they are for the
release blocking jobs) or on stable-initial if RELEASE_IMAGE_INITIAL is
provided.

Hide nested container output because it is confusing when leveraging a pod
from within an existing step.

Builds on #284

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 5, 2019
}

if size > 0 {
if size > 1*1000*1000 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? Document tpls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reduce pointless output. Will comment. The only reason to print it is when we upload lots of content and the job just sits there.

func (s *podStep) Run(ctx context.Context, dry bool) error {
log.Printf("Executing %s %s", s.name, s.config.As)

if !s.config.SkipLogs {
Copy link
Contributor

Choose a reason for hiding this comment

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

This smells bad, why isn't this going to make for inscrutable logs that admins hate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are pod steps called within jobs (where you want artifacts). The log output when you call these nested logs is more confusing - the step for "build release image" doesn't need to show executing pod release-latest because it already said what it is doing. We still print pod logs when they fail which is 95% of all debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The import from initial needs to run two pods, but the pods should never fail and the output of the nested pod within the import step is very confusing when reading it. Only the top most step matters in terms of you needing to understand what is happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a long godoc on PodStepConfiguration to explain this, let me know if that helps clarify.

// importFromReleaseImage uses the provided release image and updates the stable / release streams as
// appropriate with the contents of the payload so that downstream components are using the correct images.
// The most common case is to use the correct installer image, tests, and cli commands.
func (s *assembleReleaseStep) importFromReleaseImage(ctx context.Context, dry bool, providedImage string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think I fully understand why this is necessary, is this lacking in current version of ci-op or is it just when you want to run a job and specify a specific release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want to run a ci-operator job where the input to the job is a release image (release qualification tests) or we want to run an upgrade job where we take a previously released image (upgrade tests) where we won't have an image stream to represent them. The upgrade job:

Test the upgrade from 4.0.3 to a PR in 4.1 master against the cluster-version-operator component

wants to use the installer image from 4.0.3, so we need to populate stable-initial with the contents of 4.0.3 while stable continues to be populated from 4.1 master.

Copy link
Contributor Author

@smarterclayton smarterclayton Mar 6, 2019

Choose a reason for hiding this comment

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

The other use case is:

Test installing 4.1.4 and run e2e tests against it

We don't want to use the image stream for 4.1.4, we want to grab the payload for 4.1.4 and then use the installer image out of the 4.1.4 payload to install the cluster and the tests image out of the 4.1.4 payload (in this case) to run the e2e tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a super long godoc to the type, hope that clarifies.

Periodic jobs that want to run a PR from a known `RELEASE_IMAGE_LATEST`
need access to the `cli` and `installer` images out of the payload. This
fixes problems we have testing older installers and cli binaries against
newer payloads and fixes the current break in the release controllers.
This is also required for properly testing the installer.

Use standard oc commands (that are API forward compatible) to extract
the `cli` image and the `installer` image from the payload and set them
on stable if RELEASE_IMAGE_LATEST is provided as an input (as they are
for the release blocking jobs) or on stable-initial if
RELEASE_IMAGE_INITIAL is provided.

Hide nested container output because it is confusing when leveraging a
pod from within an existing step.
@smarterclayton
Copy link
Contributor Author

Added requested comments, tried to clarify intent better.

The release jobs set IMAGE_FORMAT to bypass creating images, and
when a job requests RELEASE_IMAGE_INITIAL but doesn't set it to
to something we should skip creating the initial image.
@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 21108a8 into openshift:master Mar 6, 2019
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