-
Notifications
You must be signed in to change notification settings - Fork 605
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 1763725: fix(tekton-migration): Fix trigger type and resource issue #3086
Bug 1763725: fix(tekton-migration): Fix trigger type and resource issue #3086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review of the code - I'll have to do a deeper dive into the yaml changes before I can give more feedback on that.
<TableData className={tableColumnClasses[5]}> | ||
{obj.spec && obj.spec.trigger && obj.spec.trigger.type ? obj.spec.trigger.type : '-'} | ||
</TableData> | ||
<TableData className={tableColumnClasses[5]}>-</TableData> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any point in having the trigger column when it's no longer a valid field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would require UX intervention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinandan13jan Don't wait on me to say go talk to UX :) Reach out to UX and discuss this at your earliest convenience. Having a dead column helps no one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fairly obvious that we need to remove this column now. Inform UX in case they want to substitute or there's an alternative. But right now it will never show any data and therefore it has no value with the current change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed the column, cascading the same to UX
const resources = []; | ||
const runResources = _.get(latestRun, ['spec', 'resources'], []); | ||
runResources.forEach((resource) => | ||
resources.push({ name: resource.name, resourceRef: resource.resourceRef }), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const runResources = _.get(latestRun, ['spec', 'resources'], []);
const resources = runResources.map((resource) => (
{ name: resource.name, resourceRef: resource.resourceRef }
));
No sense in reinventing map
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this
resources: | ||
latestRun && latestRun.spec && latestRun.spec.resources | ||
? latestRun.spec.resources | ||
: pipeline && pipeline.spec && pipeline.spec.resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You no longer have the fallback - was this intentional? latestRun
is optional
https://github.com/openshift/console/pull/3086/files#diff-25f91b2db21c7ce21bcebedf9f18bb23R19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's why the above lines, if no 'latestrun' and no resources, this field would be []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, perhaps I am misunderstanding - where are you looking into pipeline.spec.resources
now? There are two fallbacks here... latestRun.spec.resources
falls back into pipeline.spec.resources
falls back into []
. You're not doing this anymore as far as I can see - you just do latestRun
and []
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should not be using 'pipeline.specs' any longer as it would simply not work and fail the validation. For a fallback a []
is used instead now.
/assign |
Looks like you missed the |
We should also look to remove the From slack:
|
5e5a498
to
62898d9
Compare
@andrewballantyne Thanks for pointing that out. I have moved out that block. Also, I have removed the We must be looking for other pieces to improve upon with regards to the migration, for the time being this is the minimum that must go in to unblock other stories around Tekton. It's already a XXL PR 😄 |
@abhinandan13jan: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/test e2e-aws-console-olm |
@@ -47,9 +47,6 @@ const PipelineRunRow: React.FC<PipelineRunRowProps> = ({ obj, index, key, style | |||
</TableData> | |||
<TableData className={tableColumnClasses[4]}>-</TableData> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, there is another column here doing nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the duration field, which should come as a backend response. It is blank from the very beginning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you log a bug for us to address it later. We'll investigate with UX to see if there was any intent here.
@@ -94,3 +94,369 @@ export const testData: PipelineAugmentData[] = [ | |||
}, | |||
}, | |||
]; | |||
|
|||
export enum DataState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflict resolution problem? This should have been moved to dev-console/src/test/pipeline-data.ts
in one of my last PRs that were merged yesterday.
Did you add something to the lines below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nopes, I just accepted incoming changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if you didn't change anything, just remove all the "added" lines here. Not sure how you got them back :) (are you on latest?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified, and all the code is using the ones from pipeline-data
so these lines are just dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, ok. I m removing them from pipeline-augment-test-data
62898d9
to
6065128
Compare
/lgtm We'll need to see what we can do to get a z-stream fix for 4.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, andrewballantyne, christianvogt, vdemeester 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 |
/retitle Bug 1763725: fix(tekton-migration): Fix trigger type and resource issue |
@abhinandan13jan: All pull requests linked via external trackers have merged. Bugzilla bug 1763725 has been moved to the MODIFIED state. In response to this:
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. |
/cherrypick release-4.2 QE Verification was just completed, cherry picking to 4.2. |
@andrewballantyne: #3086 failed to apply on top of branch "release-4.2":
In response to this:
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. |
Was seeing if missed a step for it to be linked. |
@andrewballantyne: Bugzilla bug 1763725 is in an unrecognized state (VERIFIED) and will not be moved to the MODIFIED state. In response to this:
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. |
Fixes https://jira.coreos.com/browse/ODC-2064
…e start