-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump aiida-core to v2.4.0 and aiidalab to v23.3.2 #396
Conversation
AiiDA 2.4.0 is very recent so based on past experience maybe I would wait a bit before we switch (unless there is something that you need ASAP?). Also there's a database migration, with some potential manual steps, so we'll have to test carefully. |
aae8e4d
to
350d307
Compare
Fair, I separate the changes to #397 |
486feb1
to
0897d53
Compare
We are about to release aiida-core |
We still need to figure out / test how the DB migration is handled. |
As I know, it handled by these command
But it runs automatically without notifying the users, which might cause some issues, I think @yakutovicha had more expedience on this topic. |
This is precisely the migration line. What exactly is the issue? |
I can not foresee any immediate issues, when I wrote this I was think about maybe user do not what to migrate or what to trigger it manually with more control. I assume that was one of the idea to have a control app to do this? |
Well for one we need to test that it indeed works before merging.
Also the disadvantage is that this migration is hidden from the user. In
this particular case, there is an extra message at the end of the migration
with a command to recompute hashes of the calculation nodes due to a
caching fix. We currently do not enable caching so it is not critical, but
it is problematic that the user is completely unaware of this, unless they
check the container startup logs.
For the future, it would indeed be great if migration was explicitly
triggered by the user I the control page imo.
Dne út 17. 10. 2023 10:01 uživatel Jusong Yu ***@***.***>
napsal:
… I can not foresee any immediate issues, when I wrote this I was think
about maybe user do not what to migrate or what to trigger it manually with
more control. I assume that was one of the idea to have a control app to do
this?
—
Reply to this email directly, view it on GitHub
<#396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIY64M6VY2VIW4JMFGTIZDX7ZCPDAVCNFSM6AAAAAA2ERI2Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRVHE4DGNRVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sure, but why does it block this specific PR? This migration has been there for a while and never given problems (unless I am unaware). And we did go through database migrations in the past. To be practical, I would suggest merging the PR (provided that tests are successful). Before releasing a new version, I could test the new image on dev-aiidalab server. If it fails, we stop everything and we look closely at the issue. In the meantime, we can work on the proper user-controlled migration functionality. To make myself clear: I do agree that this functionality needs to be improved, but not at the cost of blocking things. |
@yakutovicha I don't think we had any migrations since the new Docker stack so I believe this warrants careful testing before merging. Otherwise I agree there are no blockers. |
The CI test failed for |
@unkcpz one observation I made when looking at the test failure on GitHub (not directly related to this PR specifically): It seems that when the tests fail, the image is not published on ghcr.io as it used to before your refactoring. That makes debugging problematic since you can't download the built image to debug locally. If my observation is correct, could you please move the image upload before the tests? Feel free to do it here or in a separate PR. |
Good point, I didn’t consider this situation. I hope add an always() can solve the problem. I’ll do it here since there is a failed test I can test for. |
Yeah that should work as well (you can check the syntax in AWB where I used this to always upload screenshots as artifacts). But why do you think this solution would be better than simply reordering the steps? |
Because the action that push the image to ghcr is in next action job not the next step (which is uploading the artifact to github). |
b258a2f
to
eba3da2
Compare
Oh, okay. But what artifact is it uploading then? 😅 |
Seems works after add
It uploads the built image saved (by docker load --input /tmp/aiidalab/full-stack-amd64.tar I personally am not a fan of pushing to ghcr, but since it was there I didn't change it during refactoring. It has two drawbacks:
|
@unkcpz but uploading the artifact is the slow part no? That wasn't happening before, and I suspect if we simply push to ghcr.io straightaway it would be much more efficient. I don't think artifacts were designed for such large uploads, and I don't really see the benefits. Even if you want to push to both places, you can do it in a single job, instead of having to download the artifact and upload it to ghcr, that's very inefficient |
Also, normal users should pull from Docker, so the number of tags on ghcr.io is not a problem. |
Back to the failed test itself, the issue related to aiidalab/aiidalab#397, I put here to cross link in case it is hard to find in the future. In order to solve this problem I did two changes here:
|
Just found another issue in terms of (EDIT: after a second thought, maybe make a |
fa6e066
to
08a0d7d
Compare
I don't think there have been many changes so this one seems more appropriate. Please go ahead with the release.
Well, I did not if fact made this change, the PR for that is still open and marked as blocked. :-P ispg-group/aiidalab-ispg#183 |
Haha, I was too aggressive in the move. I found it was removed at aiidalab/aiidalab-qe@3971334, although the commit is only for remove this single file but hide in the large refactoring PR aiidalab/aiidalab-qe#439.
We install the QeApp quite often, probably twice a day in my case. The problem is for development, it was installed using pip directly. In the docker image preparation, the Two things I learned:
|
I think we have been distracted a bit from various discussions here, I'll continue this discussion at #412 and hopefully, we can find the best solution and converge to a wiki post. For bump the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unkcpz thanks! I agree, that discussion should happen elsewhere.
I know this kind of contradicts the policy, but I would also suggest to publish a new aiidalab package version and bump it here. I looked at the commit history and besides the setup.py there are no functional changes. I would then do careful testing of everything (instead of having to test multiple times). Feel free to disagree though.
d845f42
to
5ff2408
Compare
If there is a test by hand, I don't know what reason I can find to disagree with it . Always better to have a human test. |
I've tested install of my app, both with and without setup.py. I will test the DB migration tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the DB migration and things seems to work. @unkcpz once you test with QeApp I think this is good to go. 🚀
Here's how I tested:
- Launch a fresh container with
aiidalab/full-stack:latest
image, with aiida-core=2.3.1 - Install my app and run some calculations
- Stop the container
- Edit profile configuration to use
aiidalab/full-stack:pr-396
- Relaunch the container.
- Check the container logs with
aiidalab-launch logs -p <test_profile>
I saw this in the logs:
++ verdi storage migrate --force
Report: Migrating to the head of the main branch
Warning: Invalidating the hashes of certain nodes. Please run `verdi node rehash -e aiida.node:process.calculation.calcjob`.
Report: - main_0001 -> main_0002
Success: migration completed
++ verdi daemon start
Starting the daemon with 1 workers... OK
- Verify in my app that the previous calculation is still there and that I can launch a new calculation without an issue.
@@ -5,7 +5,7 @@ | |||
def generate_aiidalab_install_output(aiidalab_exec, nb_user): | |||
def _generate_aiidalab_install_output(package_name): | |||
output = ( | |||
aiidalab_exec(f"aiidalab install --yes {package_name}", user=nb_user) | |||
aiidalab_exec(f"aiidalab install --yes --pre {package_name}", user=nb_user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is needed, since we're also installing directly from the branch in test_install_apps_from_default_branch
. But I guess it is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much appreciate for writing the detailed test flow, I'll test on QeApp with @superstar54 who has quite many containers with lots of calculations.
Per --pre
options I added, it is for QeApp specifically since we didn't make the release v23.10.0
yet but the prerelease version. The stable version is still v23.04.6
which pinning to aiida-core~=2.3.0
will try to downgrade aiida-core and fail the test (exactly what we improved in this PR).
I personally think here it is better to not use --pre
but only test the stable version. I will keep this PR until we make the release of v23.10.0
which the planned date is 6th November.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unkcpz @superstar54 friendly ping, would be good to test and merge so that others can test this via the edge
image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, all good. The migration is run and calculations can be reloaded with showing the same result properly.
We found a small issue with updating the I personally think we can keep on moving with the docker stacks and fix things on the app side, as the fixes I did in MFA-CSCS. |
The workflow triggering paths are added andbump the version of aiida-core to v2.4.0