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

Bug 1880389: fix skipped tasks in conditional pipelines #7833

Merged

Conversation

andrewballantyne
Copy link
Contributor

Big thanks to @karthikjeeyar for helping me with the legwork on this one. I'm hosting it as he is on PTO until the end of the week.

Fixes: https://issues.redhat.com/browse/ODC-4885

Needs to be back ported to 4.6 after this merges as it's a request from an external source.

Screenshots!

List view
Screen Shot 2021-01-13 at 2 07 51 PM

Visualization (with and without the task skipped)
Screen Shot 2021-01-13 at 2 07 30 PM
Screen Shot 2021-01-13 at 2 09 14 PM

/cc @jerolimov @christianvogt
cc @bgliwa01 This probably overlaps some with 4.8 planned work.

@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 13, 2021
@andrewballantyne andrewballantyne changed the title fix skipped tasks in conditional pipelines Bug 1880389: fix skipped tasks in conditional pipelines Jan 13, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jan 13, 2021
@openshift-ci-robot
Copy link
Contributor

@andrewballantyne: This pull request references Bugzilla bug 1880389, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1880389: fix skipped tasks in conditional pipelines

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.

@jerolimov
Copy link
Member

/retest

Comment on lines 16 to 18
const isTaskSkipped = pipelineRun?.status?.skippedTasks
? !!pipelineRun?.status?.skippedTasks.find((t) => t.name === task.name)
: false;
Copy link
Member

@jerolimov jerolimov Jan 14, 2021

Choose a reason for hiding this comment

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

Nit :)

Suggested change
const isTaskSkipped = pipelineRun?.status?.skippedTasks
? !!pipelineRun?.status?.skippedTasks.find((t) => t.name === task.name)
: false;
const isTaskSkipped = pipelineRun?.status?.skippedTasks?.some((t) => t.name === task.name);

Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

@andrewballantyne Tested it locally and it works fine, but needs a rebase after some new i18n values. I expect you need one new also for "Skipped" status.

Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

Works fine 👍

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, jerolimov

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-merge-robot openshift-merge-robot merged commit 1182952 into openshift:master Jan 14, 2021
@openshift-ci-robot
Copy link
Contributor

@andrewballantyne: All pull requests linked via external trackers have merged:

Bugzilla bug 1880389 has been moved to the MODIFIED state.

In response to this:

Bug 1880389: fix skipped tasks in conditional pipelines

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.

@andrewballantyne
Copy link
Contributor Author

/cherry-pick release-4.6

@openshift-cherrypick-robot

@andrewballantyne: #7833 failed to apply on top of branch "release-4.6":

Applying: fix skipped tasks in conditional pipelines
Using index info to reconstruct a base tree...
A	frontend/packages/pipelines-plugin/src/components/pipelines/detail-page-tabs/pipeline-details/PipelineVisualizationTask.tsx
A	frontend/packages/pipelines-plugin/src/components/pipelines/pipeline-topology/TaskNode.tsx
A	frontend/packages/pipelines-plugin/src/test-data/pipeline-data.ts
A	frontend/packages/pipelines-plugin/src/utils/__tests__/pipeline-augment.spec.ts
A	frontend/packages/pipelines-plugin/src/utils/__tests__/pipeline-filter-reducer.spec.ts
A	frontend/packages/pipelines-plugin/src/utils/pipeline-augment.ts
A	frontend/packages/pipelines-plugin/src/utils/pipeline-filter-reducer.ts
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): frontend/packages/pipelines-plugin/src/utils/pipeline-filter-reducer.ts deleted in HEAD and modified in fix skipped tasks in conditional pipelines. Version fix skipped tasks in conditional pipelines of frontend/packages/pipelines-plugin/src/utils/pipeline-filter-reducer.ts left in tree.
Auto-merging frontend/packages/dev-console/src/utils/pipeline-augment.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/utils/pipeline-augment.ts
Auto-merging frontend/packages/dev-console/src/utils/__tests__/pipeline-filter-reducer.spec.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/utils/__tests__/pipeline-filter-reducer.spec.ts
Auto-merging frontend/packages/dev-console/src/utils/__tests__/pipeline-augment.spec.ts
Auto-merging frontend/packages/dev-console/src/test/pipeline-data.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/test/pipeline-data.ts
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix skipped tasks in conditional pipelines
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. 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

6 participants