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

Triggers start modal #4984

Merged

Conversation

andrewballantyne
Copy link
Contributor

@andrewballantyne andrewballantyne commented Apr 9, 2020

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

Analysis / Root cause:
Need a way to associate trigger resources with a Pipeline.

Solution Description:
Create a "Add Trigger" modal and under the hood bind everything together.

Main notes:

  • Reworked PipelineResources form section (resources no longer create inside the modal)
    • No longer a sub-form in the PipelineResources
  • Cleaned up a lot of misc Pipeline stuff to make good reuse where possible
  • Modals are structured differently now to support flexibility
  • Add Trigger Modal always requests new resources out of the gate
  • Start Pipeline Modal always tries to make use of existing resources out of the gate

Screen shots / Gifs for design review:
@openshift/team-devconsole-ux

Add Trigger Modal:
Screen Shot 2020-04-12 at 12 53 29 AM

Variables:
Screen Shot 2020-04-12 at 12 53 43 AM

Use of variables mixed with static text:
Screen Shot 2020-04-12 at 12 54 56 AM

Trigger Modal requests new resources to allow easy use of Parameters, but naturally not all resources need to be created fresh and thus can be referenced against existing resources:
Screen Shot 2020-04-12 at 12 55 05 AM

TriggerTemplate that was created at the finish of the modal:
Screen Shot 2020-04-12 at 12 56 45 AM

Unit test coverage report:

  • Write some tests

Test setup:

  • Need the OpenShift Pipelines Operator
  • Need an existing Pipeline (ideally with at least one parameter or resource)
  • Need a TriggerBinding resource in order to map
    • There is currently an awkward "nothing to do" when no TriggerBindings exist

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

/kind feature

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. component/dev-console Related to dev-console labels Apr 9, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2020
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 3 times, most recently from e12a592 to 8423c7d Compare April 12, 2020 01:19
@openshift-ci-robot openshift-ci-robot added component/shared Related to console-shared and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 12, 2020
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 2 times, most recently from 36aa0ec to 315d091 Compare April 12, 2020 03:40
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2020
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 2 times, most recently from 0375b41 to 395e910 Compare April 12, 2020 04:43
@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 12, 2020
@andrewballantyne
Copy link
Contributor Author

cc @siamaksade @serenamarie125

I had to change the way the Pipeline Resources worked... I tried for several hours today to try and make a reuse of existing structure, but we cannot be creating resources mid-modal and still use that logic for Triggers as the TriggerBinding params cannot be referenced from a fully-created and stand alone PipelineResource.

It was too much duplicate not to impact the way the start modal was done as well. I prefer it this way tbh, resources shouldn't be created mid-modal - as if you cancel out, you shouldn't have extra resources.

@andrewballantyne andrewballantyne changed the title [WIP] Triggers start modal Triggers start modal Apr 12, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 12, 2020
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2020
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 2 times, most recently from e163ec9 to 5c1dbcc Compare April 16, 2020 15:36
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2020
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2020
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 2 times, most recently from 64f16d3 to 4f7d41e Compare April 16, 2020 19:38
@andrewballantyne andrewballantyne force-pushed the triggers-start-modal branch 3 times, most recently from ecc49b0 to 481e8b5 Compare April 17, 2020 15:02
Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2020
Copy link
Contributor

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

/lgtm

verified changes locally

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, rohitkrai03, sahil143

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

@divyanshiGupta
Copy link
Contributor

/retest

2 similar comments
@andrewballantyne
Copy link
Contributor Author

/retest

@andrewballantyne
Copy link
Contributor Author

/retest

@andrewballantyne
Copy link
Contributor Author

/test e2e-gcp-console

@spadgett
Copy link
Member

/hold
for #5100

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2020
@spadgett
Copy link
Member

/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2020
@openshift-merge-robot openshift-merge-robot merged commit 0d7d4ff into openshift:master Apr 18, 2020
@spadgett spadgett added this to the v4.5 milestone Apr 20, 2020
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. component/dev-console Related to dev-console component/shared Related to console-shared kind/feature Categorizes issue or PR as related to a new feature. 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

7 participants