Skip to content

[DPTP-4313] Respecting always_run from config file #4529

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

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

Conversation

hector-vido
Copy link
Contributor

@hector-vido hector-vido commented Mar 18, 2025

The field always_run is auto-generated based in the following condition:

AlwaysRun: opts.runIfChanged == "" && opts.skipIfOnlyChanged == "" && !opts.defaultDisable && opts.pipelineRunIfChanged == "",

But it is only updated if and only if there is no reference to an older configuration, if there is a valid reference, the old value is used and the new one is ignored:

if oldJob, existed := oldJobs[newJobName]; existed {
    mergedJobs = append(mergedJobs, mergePresubmits(&oldJob, &newJob))
} else {
    mergedJobs = append(mergedJobs, newJob)
}

I simply removed the property overriding of AlwaysRun, allowing it to use the logic that already exists and is battle tested.

In addition, some other small changes have been made to improve readability.

This modification can affect a lot of jobs.

@openshift-ci openshift-ci bot requested review from droslean and smg247 March 18, 2025 22:58
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2025
@hector-vido hector-vido force-pushed the respecting-always-run branch from b93df6f to 6cacf19 Compare March 18, 2025 23:00
@hector-vido hector-vido force-pushed the respecting-always-run branch 4 times, most recently from 3a774ad to ad4d383 Compare March 24, 2025 03:24
@hector-vido
Copy link
Contributor Author

/test unit

@jmguzik
Copy link
Contributor

jmguzik commented Mar 24, 2025

/hold

Evaluation is needed if the function that assigns old values makes sense

@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 Mar 24, 2025
@hector-vido hector-vido force-pushed the respecting-always-run branch from ad4d383 to 0148be1 Compare April 14, 2025 15:13
@hector-vido
Copy link
Contributor Author

/unhold

@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 Apr 14, 2025
@hector-vido hector-vido force-pushed the respecting-always-run branch from 0148be1 to 72b96a0 Compare April 14, 2025 16:56
@hector-vido hector-vido force-pushed the respecting-always-run branch 2 times, most recently from b908cfc to fd4cabd Compare April 25, 2025 02:42
@hector-vido
Copy link
Contributor Author

/test e2e

@hector-vido
Copy link
Contributor Author

/test images

@hector-vido
Copy link
Contributor Author

/test e2e

2 similar comments
@hector-vido
Copy link
Contributor Author

/test e2e

@hector-vido
Copy link
Contributor Author

/test e2e

@hector-vido
Copy link
Contributor Author

/test e2e

@hector-vido hector-vido force-pushed the respecting-always-run branch from fd4cabd to 4170932 Compare May 7, 2025 02:47
@hector-vido
Copy link
Contributor Author

/hold

@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 7, 2025
@hector-vido
Copy link
Contributor Author

/unhold

@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 7, 2025
@hector-vido
Copy link
Contributor Author

/hold

@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 7, 2025
@hector-vido
Copy link
Contributor Author

/override ci/prow/breaking-changes

Copy link
Contributor

openshift-ci bot commented May 7, 2025

@hector-vido: Overrode contexts on behalf of hector-vido: ci/prow/breaking-changes

In response to this:

/override ci/prow/breaking-changes

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.

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

/test remaining-required

@hector-vido
Copy link
Contributor Author

/unhold

@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 7, 2025
@jmguzik
Copy link
Contributor

jmguzik commented May 7, 2025

/hold

@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 7, 2025
@hector-vido hector-vido force-pushed the respecting-always-run branch from 4170932 to 32fb120 Compare May 14, 2025 18:14
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 14, 2025
Copy link
Contributor

openshift-ci bot commented May 14, 2025

New changes are detected. LGTM label has been removed.

@hector-vido hector-vido force-pushed the respecting-always-run branch from 32fb120 to 1fc2413 Compare May 15, 2025 14:41
@hector-vido hector-vido force-pushed the respecting-always-run branch from 1fc2413 to 489af82 Compare May 29, 2025 21:18
Copy link
Contributor

openshift-ci bot commented May 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hector-vido, jmguzik

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:
  • OWNERS [hector-vido,jmguzik]

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

@hector-vido hector-vido force-pushed the respecting-always-run branch from 489af82 to cc08a49 Compare May 29, 2025 21:22
@hector-vido hector-vido force-pushed the respecting-always-run branch from cc08a49 to 2dceb5f Compare May 29, 2025 21:43
Copy link
Contributor

openshift-ci bot commented May 30, 2025

@hector-vido: 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/integration 2dceb5f link true /test integration
ci/prow/security 2dceb5f link false /test security
ci/prow/images 2dceb5f link true /test images
ci/prow/breaking-changes 2dceb5f link false /test breaking-changes

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants