-
Notifications
You must be signed in to change notification settings - Fork 900
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(core/pipeline): fix type mismatch in pipeline trigger, broken webhook trigger #7018
fix(core/pipeline): fix type mismatch in pipeline trigger, broken webhook trigger #7018
Conversation
import { Application } from '@spinnaker/core'; | ||
import { Subject } from 'rxjs/Subject'; | ||
|
||
type IPipelineTriggerConfig = Omit<IPipelineTrigger, 'parentExecution' | 'parentPipelineId' | 'user' | 'rebake'>; |
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.
this was a maybe-temporary way of accurately typing what's really an acceptable input to onTriggerUpdated
. I'd like to investigate how feasible having config-only trigger interfaces would be so we can use those in configs rather than the interfaces for triggers that show up in executions.
|
||
export interface IPipelineTriggerConfigProps { | ||
status: string[]; | ||
trigger: IPipelineTrigger; | ||
application: Application; | ||
pipelineId: string; | ||
triggerUpdated: (trigger: IPipelineTrigger) => void; | ||
triggerUpdated: (trigger: IPipelineTriggerConfig) => void; |
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.
this is fine for now because the thing that passes in triggerUpdated
is a vanilla JS file 🤷♂
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.
Nice. Thanks for fixing this!
80af468 fix(core/pipeline): fix type mismatch in pipeline trigger, broken webhook trigger (spinnaker#7018) 53cb422 refactor(kubernetes): convert deploy manifest stage to react (spinnaker#7002) 96ac95a fix(artifacts): Artifacts are shown on pipeline execution when artifactsRewrite is enabled (spinnaker#6973) 5b6ad2a fix(core): Hide "Run as user" when using managed service users (spinnaker#7013)
80af468 fix(core/pipeline): fix type mismatch in pipeline trigger, broken webhook trigger (#7018) 53cb422 refactor(kubernetes): convert deploy manifest stage to react (#7002) 96ac95a fix(artifacts): Artifacts are shown on pipeline execution when artifactsRewrite is enabled (#6973) 5b6ad2a fix(core): Hide "Run as user" when using managed service users (#7013)
few fixes for the new react-powered pipeline and webhook triggers:
Set
s coming fromChecklist
to arrays, which got masked by the fact that theonUpdateTrigger
method is typed withany
. End result was that once a status was changed the underlying JSON was malformed and made the trigger component un-renderable on the next navigation to the same viewPipelineTrigger
like not triggering thedestroy$
subject on unmount and not using the pre-existingstatus
list if one existed