Ambiguity with COMMIT=true in rake scripts

As a katello+foreman user, I also (advice to) execute various rake scripts (clean tasks, katello refresh repos,…). And sometimes I forget to use COMMIT=true argument to really execute the script. Then it takes some time to realize why my intervention did not help, which is tedious.

Could be the COMMIT argument unified among freman+katello rake scripts?

So far I am aware of just three locations of the argument with default False, all in katello:

I understand that changing the default behaviour from “no-op” to “really-op” can be a backward-compatibility concern, though.

1 Like

It appears COMMIT=true is really a Katello convention so I’d like @katello to weigh in here.

I don’t know the history of why COMMIT defaults to false. For commands like this I personally prefer something more like dry-run=true to prevent any write operations. I have no issue with changing COMMIT in principle, but my suspicion is that the behavior of these commands is somewhat ingrained in people’s minds - so changing the default may come as a surprise to some. Would like feedback from the rest of my team on that.