openfaas / openfaas/faas-cli

Exclusive use of --update --replace

Open
#294 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design/review proposal
Dominant language
Go
Stars
816
Forks
230
Avg merge
6h 4m
Merged PRs (30d)
1

Description

deploy and store deploy have --update and --replace flags, which should be strictly exclusive to ensure consistency of these flags

Current Behaviour

Valid

--update=false --replace=true
--update=true --replace=false
--update=false --replace=false

Invalid

--replace=true
--update=true --replace=true

New Behaviour

Valid

--replace=true
--replace=false
--update=true
--update=false (both false)

Invalid

--update=true --replace=true
--update=true --replace=false
--update=false --replace=true
--update=false --replace=false

Possible Solution

User should use one of these flags at once.
If user use --replace, --update changes its default value to false

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the command entry points for deploy and store deploy, then inspect how their --update and --replace flags are defined and validated. Clarify the intended truth-table inconsistency in the issue, enforce the agreed mutually exclusive behavior, and verify the relevant flag combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.