Screwdriver: [Feature Request] Disable "Start pipeline from here" for specific jobs

Created on 8 Jan 2020  路  18Comments  路  Source: screwdriver-cd/screwdriver

What happened:
Some users want to disable "Start pipeline from here button" for safety.

Screen Shot 2020-01-08 at 16 51 15

What you expected to happen:
This is just an idea.

jobs:
  main:
    requires: [ pr, commit ]
    manualtrigger: disable
    steps:
        - steps: echo some important command

Then /event UI does not provide the button "Start pipeline from here" for main job.

feature

Most helpful comment

Proposal 3

This idea disables both API and UI. The UI exists to call the API, so if it can be called by the UI, it should be operable by the API.

And vice versa.

jobs:
  main:
    requires: [ pr, commit ]
    annotations:
        screwdriver.cd/startManually: false
    steps:
        - steps: echo some important command

For this case, other candidates of annotations:
manualTrigger
triggerOnly

All 18 comments

Before getting into full swing, I revisited the naming. This name respected the wording of the UI.

How about idea below.

Proposal 1

jobs:
  main:
    requires: [ pr, commit ]
    startFromUI: false
    steps:
        - steps: echo some important command

The first idea manualtrigger was awkward considering starting from the API manually.

Somehow, I have a feeling annotations of screwdriver.cd/*** is more appropriate.
Our plan would be to make it impossible to not only start from the UI, but also from the API? If so, startFromUI would be a bit strange.

@wahapo Thank you.

Somehow, I have a feeling annotations of screwdriver.cd/* is more appropriate.

Actually, I was concerning from the same point of view as you. I add it as proposal 2.

I think it's a trivial matter, but why did you think the idea was better?

Proposal 2

jobs:
  main:
    requires: [ pr, commit ]
    annotations:
        screwdriver.cd/startFromUI: false
    steps:
        - steps: echo some important command

@wahapo

Our plan would be to make it impossible to not only start from the UI, but also from the API? If so, startFromUI would be a bit strange.

This is only for UI. Even if we do API matter, I think they should be able to be set individually.

I think it's a trivial matter, but why did you think the idea was better?

I believe that the settings of a job should only be related to the basic behavior. Users will find it easier to understand if the settings can be set in annotations, such as fine feature on/off and control of minor features, where the settings do not affect the outcome of the job.

@wahapo

I believe that the settings of a job should only be related to the basic behavior. Users will find it easier to understand if the settings can be set in annotations, such as fine feature on/off and control of minor features, where the settings do not affect the outcome of the job.

I understood. Thanks. Proposal 2 is better.

Users will have to do the following if they want to operate completely safely. Will the user need such delicate control?

jobs:
  main:
    requires: [ pr, commit ]
    annotations:
        screwdriver.cd/startFromUI: false
        screwdriver.cd/startFromAPI: false
    steps:
        - steps: echo some important command

@wahapo

Users will have to do the following if they want to operate completely safely. Will the user need such delicate control?

In fact, I don't know. I haven't received any API requests from my users. So now I think it's enough to tackle the question of what name is appropriate when disabling it from the UI.

I think they should be able to be set individually.

@yoshwata what do you think it should be set individually for? I also think identifying a API call is from UI is a little complicated.

@tk3fftk

what do you think it should be set individually for?

So far there is nothing but api and ui.

I also think identifying a API call is from UI is a little complicated.

I hope the user knows that the annotation removes the item from the menu from the UI.

Proposal 3

This idea disables both API and UI. The UI exists to call the API, so if it can be called by the UI, it should be operable by the API.

And vice versa.

jobs:
  main:
    requires: [ pr, commit ]
    annotations:
        screwdriver.cd/startManually: false
    steps:
        - steps: echo some important command

For this case, other candidates of annotations:
manualTrigger
triggerOnly

Proposal 4

This idea is come from GitLab's when. The default setting is:

jobs:
  main:
    requires: [ pr, commit ]
    annotations:
        screwdriver.cd/when:
            - on_success
            - manual
    steps:
        - steps: echo some important command

User can overwrite it to disable manual starting.

Hi @jithine . We plan to implement this feature in Proposal 3. Please let us know if you have any concerns.

I am good with proposal 3 of solving this at API level. As for the annotation name, startManually or manualTrigger looks good to me, @tkyi any thoughts ?

I think manualStartEnabled or manualTriggerEnabled is more clear, since the expected value would more likely be a true/false value.

We can now hide the link for start from the UI by setting screwdriver.cd/manualStartEnabled: false.

We will add similar specifications to the API in the future.

@wahapo please add this annotation to guide as well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

catto picture catto  路  7Comments

stjohnjohnson picture stjohnjohnson  路  5Comments

nkatzman picture nkatzman  路  3Comments

stjohnjohnson picture stjohnjohnson  路  5Comments

nkatzman picture nkatzman  路  8Comments