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

no-jira: azure: Skip image upload if env var is set #8283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rna-afk
Copy link
Contributor

@rna-afk rna-afk commented Apr 17, 2024

Adding option to skip the image upload from the installer if an environment variable is set since it takes a lot of time and the marketplace images can be used to skip this step.

@rna-afk rna-afk changed the title azure: Skip image upload if env var is set no-jira: azure: Skip image upload if env var is set Apr 17, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 17, 2024
@openshift-ci-robot
Copy link
Contributor

@rna-afk: This pull request explicitly references no jira issue.

In response to this:

Adding option to skip the image upload from the installer if an environment variable is set since it takes a lot of time and the marketplace images can be used to skip this step.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from jhixson74 and rwsu April 17, 2024 22:48
})
if err != nil {
return err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

need to extend this so you also skip the gallery image and gallery image version

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can move the image/gallery related calls to a function and either:

if _, ok := os.LookupEnv("OPENSHIFT_INSTALL_SKIP_IMAGE_UPLOAD"); !ok {
    if err := createVMImage(ctx, createImageInput{...}); err != nil {
        return err
    }
}

Or always call it but check the env var inside createVMImage and return immediately if it's set.

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 feel like doing this is more easier than passing a bunch of inputs to another function just for an extra if condition.

@jhixson74
Copy link
Member

Should a validation be added when you skip image uploading that a marketplace image has been specified?

@patrickdillon
Copy link
Contributor

/approve

@patrickdillon
Copy link
Contributor

Just so we're all on the same page, this is only for development work. As with all env vars, this should not be used by customers.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2024
@patrickdillon
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a6d9a1a and 2 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0360da3 and 1 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 419b435 and 0 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 9bccf7b was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2024
@rna-afk
Copy link
Contributor Author

rna-afk commented May 9, 2024

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 9, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD bbca50f and 2 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d08c982 and 1 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 3420c22 and 0 for PR HEAD 9bccf7b in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 9bccf7b was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 10, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
@rna-afk
Copy link
Contributor Author

rna-afk commented May 15, 2024

/retest

@rna-afk
Copy link
Contributor Author

rna-afk commented May 16, 2024

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 16, 2024
@rna-afk rna-afk force-pushed the capz_skip_blob_upload branch 2 times, most recently from 2214683 to dbef392 Compare May 16, 2024 22:23
@jhixson74
Copy link
Member

/lgtm
/approve

Tested and confirmed to work.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 16, 2024
@jhixson74
Copy link
Member

/lgtm cancel

Worker nodes are failing.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 17, 2024
@@ -628,12 +629,22 @@ func ValidateForProvisioning(client API, ic *types.InstallConfig) error {
allErrs = append(allErrs, validateResourceGroup(client, field.NewPath("platform").Child("azure"), ic.Azure)...)
allErrs = append(allErrs, ValidateDiskEncryptionSet(client, ic)...)
allErrs = append(allErrs, ValidateSecurityProfileDiskEncryptionSet(client, ic)...)
allErrs = append(allErrs, validateSkipImageUpload(field.NewPath("image"), ic.ControlPlane.Platform)...)
Copy link
Member

Choose a reason for hiding this comment

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

There should be a validation for compute nodes as well as the default machine platform.

Copy link
Contributor

openshift-ci bot commented May 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

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

@jhixson74
Copy link
Member

I've tested now with setting compute nodes to use the image gallery and things work. I think this PR is good to go once the requested validations are added.

Adding option to skip the image upload from the installer if
an environment variable is set since it takes a lot of time and
the marketplace images can be used to skip this step.
@jhixson74
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2024
@jhixson74
Copy link
Member

/retest-required

@jhixson74
Copy link
Member

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label May 20, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 90915ce and 2 for PR HEAD f998912 in total

Copy link
Contributor

openshift-ci bot commented May 20, 2024

@rna-afk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azurestack f998912 link false /test e2e-azurestack
ci/prow/okd-e2e-aws-ovn-upgrade f998912 link false /test okd-e2e-aws-ovn-upgrade
ci/prow/okd-images f998912 link true /test okd-images
ci/prow/e2e-azure-ovn f998912 link unknown /test e2e-azure-ovn

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@jhixson74
Copy link
Member

/retest-required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants