fix(3491): Enable the UI to determine which start method is used [1]#614
Draft
yakanechi wants to merge 4 commits intoscrewdriver-cd:masterfrom
Draft
fix(3491): Enable the UI to determine which start method is used [1]#614yakanechi wants to merge 4 commits intoscrewdriver-cd:masterfrom
yakanechi wants to merge 4 commits intoscrewdriver-cd:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
If you start a new event based on an event triggered by a branch-specific trigger, the branch is not properly inherited.
This is because
parentEventIdis not passed at the start.However, if you simply pass
parentEventIdalong, it will no longer be distinguishable from a restart, and the metadata will be carried over as well.As a temporary fix for this issue, we can pass the
baseBranchinformation from the UI on the payload.However, I hesitate to implement this solution without following points:
Currently, the only way to determine which start method was used from the UI is by checking whether a specific property is included in the payload (e.g., buildId, parentEventId).
In this issues, the fundamental issue is that the start or restart method is determined based on the existence of specific properties.
In general, the methods for initiating actions from the UI are limited to a finite number of types that can be expressed using enumerations, such as STATUS.
Therefore, it should be possible to clearly distinguish the start method in the API by including the start method in the payload sent from the UI.
Objective
Make it possible to check which start method was used from the UI.
Furthermore, we will ensure that this information can be accepted as the payload in a POST request.
References
screwdriver-cd/screwdriver#3491
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.