Repository navigation
Implement migration banner - #251
Conversation
That's an interesting idea! I think it's doable though somewhat non-trivial. Incidentally, some of the needed pieces are implemented in my PR for app package re-installation in aiidalab/aiidalab#515, which I aim to merge shortly. One would need to determine whether the AiiDAlab app has a corresponding python package (by checking whether |
Let's discuss Monday over a call if you have time 🙏 I'll try a few other things on my end in the meantime 🙂 |
0c00e11 to
d195c7e
Compare
01d6d05 to
425bb56
Compare
425bb56 to
df9a5da
Compare
|
@danielhollas have a look, but also okay to wait until we resolve the danger zone discussion. Note that @yakutovicha is back tomorrow, AFAIK. |
|
Thanks! Interesting idea with the checkboxes! I am travelling today, will have a closer look once the danger zone is done. Couple quick comments:
|
I think maybe they do, but wasn't sure. I'll check at some point as this advances and update accordingly.
Right right, I wrote this point prior to considering a .local reset only option, so when I only had .local + apps reset as an option. But I think either case it results in what you say, they can simply uninstall it. Will update. |
df9a5da to
e44c82f
Compare
There was a problem hiding this comment.
Thanks, @edan-bainglass, I started the review, but I couldn't finish it because we need to make some decisions.
Let's check if you agree with my comments below. The most important one: shall we put the migration in its own module?
dcbcb9f to
35f03a5
Compare
|
Tested. Works nicely. A couple of comments:
Update the text. @danielhollas @yakutovicha can you test on your end? Also, happy to iterate on the banner text if needed 🙂 |
35f03a5 to
39b05de
Compare
There was a problem hiding this comment.
Thanks, @edan-bainglass. As discussed, I am going to do some manipulations with the tests, the other suggestions I leave as comments.
|
@yakutovicha have another look. I applied your suggestions but also decided to encapsulate all migration matters within the widget. For example, |
|
Just dumping this here; very easy to test the migration with aiidalab-launch: aiidalab-launch stop -p aiidalab-demo-312
aiidalab-launch reset -p aiidalab-demo-312 --yes
for v in home conda; do
docker volume create aiidalab_aiidalab-demo-312_$v
docker run --rm -v aiidalab_aiidalab-demo_$v:/from:ro -v aiidalab_aiidalab-demo-312_$v:/to alpine cp -a /from/. /to/
done
aiidalab-launch start -p aiidalab-demo-312 |
ALso remove test_existing_migration_flag_shows_widget_without_marker, as we don't need this functionality anymore.
5f0989b to
7dd748a
Compare
This PR introduces
MigrationWidgetspecifically for the purpose of migrating from Python 3.9 to 3.12.A more general migration policy is deferred.
The banner displays based on a simple heuristic of checking if
~/.local/lib/python3.9exists. If it does, the widget writes.FLAG_PENDING_MIGRATIONto the user's home, which serves as another reason for the banner to display. The banner includes a button to confirm migration, blocked by a set of task checkboxes. Clicking the button removes the flag from disk and banner from the home page.Based on a local branch representing a merge of the current control page PRs, for testing against its .local reset feature. Note that the danger zone panel of the control page is under discussion. See #257.