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

fix(pipeline): triggers were not reverting in the ui #7485

Merged
merged 3 commits into from
Oct 4, 2019

Conversation

Jammy-Louie
Copy link

Triggers were not being reverted when revert was being triggered.

https://jaredpalmer.com/formik/docs/api/formik#enablereinitialize-boolean

set enableReinitialize to true in formik to resolve the problem

@maggieneterval
Copy link
Contributor

@Jammy-Louie I flailed around in the UI for a while trying to figure out what you meant before asking this probably dumb question but...how do you revert a trigger?

And just to clarify my formik understanding, I'm assuming we should set enableReinitialize to true if and only if there are events that can occur outside the scope of the formik-managed form that should be able to reset the form values?

@christopherthielen
Copy link
Contributor

christopherthielen commented Oct 3, 2019

we should set enableReinitialize to true if and only if there are events that can occur outside the scope of the formik-managed form that should be able to reset the form values?

Yes, exactly. If something outside of formik is managing the form state then this flag will allow those changes to flow in via initialValues

@christopherthielen
Copy link
Contributor

how do you revert a trigger?

When reverting edits to a pipeline with the Revert button on the bottom left

@Jammy-Louie Jammy-Louie merged commit 7d91de6 into spinnaker:master Oct 4, 2019
@Jammy-Louie
Copy link
Author

@spinnakerbot cherry-pick 1.16

@spinnakerbot
Copy link
Contributor

Cherry pick successful: #7490

@maggieneterval
Copy link
Contributor

Thanks @christopherthielen, you learn something new about Spinnaker every day!

erikmunson pushed a commit to erikmunson/deck that referenced this pull request Oct 4, 2019
a5f192e feat(core/presentation): Add helper functions for generating categorized validation messages (spinnaker#7488)
7d91de6 fix(pipeline): triggers were not reverting in the ui (spinnaker#7485)
5c3fcc7 refactor(core/help): Migrate HelpContext to react hooks style (spinnaker#7487)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (spinnaker#7481)
523c6bb fix(triggers): fix a few minor issues with manual execution triggers (spinnaker#7484)
0d0caa9 fix(monitored deploy): properly initialize defaults (spinnaker#7473)
dc2a74b feat(core/presentation): Put margin between StandardFieldLayout's input and validation (spinnaker#7476)
6cd7e9d refactor(pipeline): Reactify the copy stage modal (spinnaker#7453)
5867de1 feat(precondition): add custom message to precondition (spinnaker#7448)
f121b71 fix(artifacts/bitbucket): Update the help key to the correct reference to bitbucket (spinnaker#7475)
ee18eb0 fix(core/serverGroup): Correct 'simple scaling' heuristic (spinnaker#7385)
30c7f2c fix(core/utils): Support traversing keys which contain dots in them using array notation (spinnaker#7471)
f2790a7 feat(core/presentation): Begin adding support for error categories in validation API (spinnaker#7467)
erikmunson pushed a commit that referenced this pull request Oct 4, 2019
a5f192e feat(core/presentation): Add helper functions for generating categorized validation messages (#7488)
7d91de6 fix(pipeline): triggers were not reverting in the ui (#7485)
5c3fcc7 refactor(core/help): Migrate HelpContext to react hooks style (#7487)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (#7481)
523c6bb fix(triggers): fix a few minor issues with manual execution triggers (#7484)
0d0caa9 fix(monitored deploy): properly initialize defaults (#7473)
dc2a74b feat(core/presentation): Put margin between StandardFieldLayout's input and validation (#7476)
6cd7e9d refactor(pipeline): Reactify the copy stage modal (#7453)
5867de1 feat(precondition): add custom message to precondition (#7448)
f121b71 fix(artifacts/bitbucket): Update the help key to the correct reference to bitbucket (#7475)
ee18eb0 fix(core/serverGroup): Correct 'simple scaling' heuristic (#7385)
30c7f2c fix(core/utils): Support traversing keys which contain dots in them using array notation (#7471)
f2790a7 feat(core/presentation): Begin adding support for error categories in validation API (#7467)
@christopherthielen
Copy link
Contributor

Unfortunately, this change has caused problems with the validation code in the react triggers. I think the entire formik state gets reset, including touched and errors.

trigger bug

@Jammy-Louie
Copy link
Author

@christopherthielen I'll revisit this again and hopefully come up with something that satisfies everything

yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
a5f192e feat(core/presentation): Add helper functions for generating categorized validation messages (spinnaker#7488)
7d91de6 fix(pipeline): triggers were not reverting in the ui (spinnaker#7485)
5c3fcc7 refactor(core/help): Migrate HelpContext to react hooks style (spinnaker#7487)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (spinnaker#7481)
523c6bb fix(triggers): fix a few minor issues with manual execution triggers (spinnaker#7484)
0d0caa9 fix(monitored deploy): properly initialize defaults (spinnaker#7473)
dc2a74b feat(core/presentation): Put margin between StandardFieldLayout's input and validation (spinnaker#7476)
6cd7e9d refactor(pipeline): Reactify the copy stage modal (spinnaker#7453)
5867de1 feat(precondition): add custom message to precondition (spinnaker#7448)
f121b71 fix(artifacts/bitbucket): Update the help key to the correct reference to bitbucket (spinnaker#7475)
ee18eb0 fix(core/serverGroup): Correct 'simple scaling' heuristic (spinnaker#7385)
30c7f2c fix(core/utils): Support traversing keys which contain dots in them using array notation (spinnaker#7471)
f2790a7 feat(core/presentation): Begin adding support for error categories in validation API (spinnaker#7467)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants