Improve developers awareness of "gdk reconfigure" conflicts between local modifications and upstream changes
Triggered from this thread, in the development flow, sometimes we have to make changes to e.g. Procfile
for testing different functionalities. An example in my case would be to modify the startup command for gitlab-pages for testing authentication locally.
When later using gdk update
and then gdk reconfigure
, the latter might trigger upstream changes in those files that are incompatible with the local changes. The main problem is that sometimes those changes are a requirement to be able to startup gitlab components correctly after the code update, so developers are sometimes puzzled why their gdk installation stops working after an update that shows no issues in CI.
Currently, the behaviour of reconfigure
is to show a warning in the console and pause for a couple of seconds:
$ gdk reconfigure
...
-------------------------------------------------------------------------------------------------------------
Warning: Your `Procfile` is outdated. These are the changes GDK wanted to apply.
-------------------------------------------------------------------------------------------------------------
diff --git a/Procfile b/var/folders/2x/gttb0hgx0n1c1630w9vjlm200000gn/T/Procfile20190711-55136-1f1w8bl
index 292a75b..3b7b229 100644
--- a/Procfile
+++ b/var/folders/2x/gttb0hgx0n1c1630w9vjlm200000gn/T/Procfile20190711-55136-1f1w8bl
...
-------------------------------------------------------------------------------------------------------------
- To apply these changes run: `rm Procfile` and re-run `gdk update`.
- To silence this warning (at your own peril): `touch Procfile`
... Waiting 5 seconds for previous warning to be noticed.
-------------------------------------------------------------------------------------------------------------
...
I couldn't find this behaviour documented, and when first confronted with it, it wasn't very intuitive and easy to miss, since the command will output a lot of data, and it's possible to not read the messages.
Proposal
A good approach might be to indefinitely pause and wait for user input until this is solved, same as gdk update
expects gdk run db
to be up to apply the migrations.
Another idea was to show which files are changed at the end of gdk reconfigure