Jonatan Bjork
09/21/2023, 1:42 PMpact-broker can-i-deploy - I was (incorrectly) specifying the flag --environment staging instead of (the correct) --to-environment staging and getting the warning:
WARN: It is recommended to specify the environment into which you are deploying. Without the environment, this result will not be reliable.
Turns out pact-broker CLI does not validate unknown arguments. It will happily run with anything and ignore it 😄
pact-broker can-i-deploy --to--disneyworld yes --and-disneyland maybe ...
Is it worth throwing an error in those cases?Yousaf Nabi (pactflow.io)
Jonatan Bjork
09/22/2023, 10:26 AMpact-broker record-deployment takes --environment while can-i-deploy takes --to-environment.
But the main concern I think is silently ignoring invalid arguments. They should hard fail. Maybe difficult to do now since it is used in the wild, you would probably have to deprecate that behaviour and log warnings for the next few minor releases, and then start failling in the next major release.Beth (pactflow.io/Pact Broker/pact-ruby)
--to-environment because before we had support for environments, we used tags, and the syntax was --to TAGBeth (pactflow.io/Pact Broker/pact-ruby)