klarna / bec

The BitBucket Erlang Client
Apache License 2.0
47 stars 12 forks source link

Add a flag for performing a sanity check after enforcing #33

Open jmickelin opened 3 years ago

jmickelin commented 3 years ago

We ran into a couple of issues where BEC reported that it was updating some settings, but Bitbucket (for various reasons) silently throwing away those changes. In order to detect when this happens in the future, we are considering changing our pipeline to run BEC in verify-mode again after enforcing, sort of like a sanity check.

Suggestion: The possibility of this happening (however rare) is not clear from the documentation I have read, but it can have disastrous consequences, say if some access permissions are not successfully enforced (as was the case for us). Adding a new flag -s, --sanity-check that can be used together with -e, and which causes the program to run a final verification after processing each repository would both highlight the possibility of this edge case and provide a more ergonomic solution than running the command twice.

jesperes commented 2 years ago

It seems like this could be accomplished by rerunning bec without the -e option afterwards.