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

Lock template steps #2331

Closed
jithine opened this issue Jan 27, 2021 · 4 comments
Closed

Lock template steps #2331

jithine opened this issue Jan 27, 2021 · 4 comments
Assignees
Labels

Comments

@jithine
Copy link
Member

jithine commented Jan 27, 2021

What happened:

As a template owner I want to prevent users from overriding my step. This is useful to provide the bare minimum steps a user must run to use my template. Also with Template composition involved I would like to prevent another Template from redefining a step which must run, let's say a step for doing security scanning.

What you expected to happen:

  1. Provide a mechanism for template owner to specify that this step should not be overridden

eg:

steps:
 - run: ./run.sh
 - scan:
     command: ./scan.sh
     locked: true
  1. User's shouldn't be able to override step scan in their screwdriver.yaml

How to reproduce it:

N/A

Related

There are few issues related to expanding a step's capabilities.

  1. Continue step on failure.
  2. Retry step on failure.
@jithine
Copy link
Member Author

jithine commented Jan 27, 2021

cc @klu909 @tkyi

@jithine
Copy link
Member Author

jithine commented Feb 15, 2021

How locked step interfaces with template composition.

Locked status of a step should be preserved in template composition.

  1. If order is being used, a child template author must include a locked step, else it will throw an error.
    1. It will be up to child template author to figure out if position of the step in the order is correct.
  2. A child template author cannot redefine a locked step.

While this results in a child template author to lose flexibility when dealing with steps of parent template, making a locked step immutable preserves the intent that this is a step which must run always and should run as it was originally defined.

@jithine
Copy link
Member Author

jithine commented Feb 16, 2021

Also one aspect to keep in mind is how to handle transition if a template owner makes a step locked which a user was overriding in the past.

@tkyi
Copy link
Member

tkyi commented Mar 1, 2021

Screen Shot 2021-03-01 at 3 14 40 PM

Working with these versions:
screwdrivercd/screwdriver - v4.1.65
screwdrivercd/ui - v1.0.602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants