-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add "registry checks" section to the website #271
Conversation
|
67d4d4e
to
840681e
Compare
Thanks a lot @AhmedBasem20 , this is great! I have some minor requests
The final question is whether we want to keep the warnings as high up in the detail page as we currently do. Currently those warnings are not targeting users but rather the developers of the package, so perhaps they are not as important and could be moved to a top-level section at the end of the page.
After these minor edits, this is good to merge for me |
Thanks @ltalirz ,
I think this will still be needed because the PR preview currently doesn't support deploying from forks. |
840681e
to
193cb7b
Compare
You make a very good point there that I had not considered, but I think plugin developers have not actually looked at these warnings (also, for some reason they don't actually show up in the places where they should; e.g. if you look at #238 it does not have this comment; mostly I receive those via email for every new pull request and they have been more annoying than useful). I think it is ok that for the moment I will still manually have a look at the output of the fetch step in the github action workflow when someone adds a new plugin (let's be sure that the warnings are still printed there). |
193cb7b
to
cd9235b
Compare
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.
thanks a lot @AhmedBasem20 !
I will update the email now
@@ -105,6 +106,15 @@ function Details({pluginKey}) { | |||
</p> | |||
)} | |||
|
|||
{value.warnings && ( |
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.
Sorry, while writing the email I realized one more small request.
If there are no warnings, can we just show a "sucess"-style message "All checks passed"?
Many plugins pass all checks, so developers would be looking for this section and not finding it
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.
Are there cases where warnings will be empty for a reason other than everything being fine (some error encountered, so the code does not get to the stage of adding warnings)?
If so, we may need to track in the json somewhere whether the fetch
stage was completed for the plugin
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.
If there are no warnings, can we just show a "sucess"-style message "All checks passed"?
Done.
Are there cases where warnings will be empty for a reason other than everything being fine (some error encountered, so the code does not get to the stage of adding warnings)?
Yes this is the case for aiida-fenics
for example, the plugin link is broken, but even if the warnings is empty it will not display "All checks passed" because this depends on another condition that the detailed infomration must be fetched first. If not, nothing will be displayed.
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.
Thanks @ltalirz I got your point now, I think there is another issue, putting the registry checks on this section will not work for plugins that have empty metadata
key. I'll try to fix this
cd9235b
to
ef5f433
Compare
Thanks, both, I didn't look at the implementation. But the behavior is a bit strange to me. When I go to the detail page of |
Yes, ideally the test-install workflow would also add a warning in the checks pointing out that it failed (the equivalent of a missing checkmark) |
Yes, there seems to be a bug in the current preview.
|
Store fetch warnings in the JSON file and display it on the website. Delete comment.yml
d1ff265
to
f2cbc5c
Compare
aiida_registry/test_install.py
Outdated
plugins_warnings = REPORTER.plugins_warnings | ||
|
||
for name, warnings in plugins_warnings.items(): | ||
metadata["plugins"][name]["warnings"] = warnings |
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.
Hi @AhmedBasem20, the page build is successful but there's a problem here that the warnings are generated in two steps and test install warning will override the previous warnings. You can append the new message is it was there already.
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.
BTW, I can run aiida-registry test-install
on my Apple M1 Macbook, and use the new docker image which has arm64 supported.
# install colima
brew install colima
# Use new docker sock, the python docker API is use DOCKER_HOST to find the docker.sock
echo 'export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"' >> ~/.zprofile
# cd into the folder and run
aiida-registry test-install --container-image aiidateam/aiida-core-with-services:edge
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.
BTW, I can run aiida-registry test-install on my Apple M1 Macbook, and use the new docker image which has arm64 supported.
This is exactly what I need for this task😅 Thanks for the reminder!
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.
Yes, I know, I also try to reproduce it and find it takes so long to see what happened. It is nearly impossible to debug over action output 😄
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.
the warnings are generated in two steps and test install warning will override the previous warnings.
Yeah I see, also this function is called inside a loop it should only called once in the last step, I also see that the previous warnings coming from fetch_metadata.py
cannot be accessed and seen here, I'll try to figure out why.
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.
Also I see that those test-install
messages are actually errors not warnings, should we keep them with warnings or separate them? (i.e. plugin["warnings"]
, plugin["errors"]
)
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.
The "permission denied" error we saw yesterday was because the UID of my workstation is 1001
while the container has 1000
as default, so the file can not be written to the folder. I added the write permission and it is all good.
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.
Yes, I know, I also try to reproduce it and find it takes so long to see what happened. It is nearly impossible to debug over action output 😄
I have a very naive way on debugging over github actions by breaking the test-install
loop after five plugins for example (https://ahmedbasem20.github.io/aiida-registry/aiida-alloy). This is temporarily faster but I'll defiantly try to set the environment properly.
573bd49
to
666e603
Compare
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.
666e603
to
ffa42e3
Compare
Great, thanks @AhmedBasem20 I am merging this now; I notice one further small potential for improvement, which is to add a warning in the test-install workflow when we skip testing the plugin (e.g. because of mismatch in python version / planning stage / ...). But let's do that small fix in a follow-up PR |
Closes #268
Store fetch warnings in the JSON file and display it on the details page.
Edit:
The current PR preview workflow
preview.yml
gets the data fromgh-pages
and builds the react app using it, this works fine for most of the cases because the preview purpose is to show the UI so I thought using up-to-date data was not important, but for a scenario like in this PR, where we add new data to the JSON file and use it for the first time on the website, the preview will not display the new feature.This is solved in the second commit by using the data fetched in this PR.