-
Notifications
You must be signed in to change notification settings - Fork 189
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
Update update-dependency flow to resolve issue #3930 #3957
Conversation
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 @csadorf !
I'm fine with the general approach - one question: would it be possible to include information about the dependency conflicts directly in the comment that is added in the PR or not?
From a user point of view this would seem like the easiest solution (if they want to fix it themselves).
If this is difficult, the comment could point the user to the output of a particular workflow (either with a direct link or just with words, also fine), since I guess you already provide detailed info there on what the conflicts are.
You can keep the link to the wiki but I think we should aim for people being able to fix things without reading it.
@ltalirz I updated the workflow to provide a more detailed error message, please have a look. |
4800677
to
6826197
Compare
@ltalirz I added a README.md file to the requirements/ directory and in the course detected (and fixed) two bugs:
This should be ready for merge (after reverting the debug commit that disables tests). |
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 @csadorf , this is exactly what I had in mind.
I have a couple of phrasing suggestions; all quick to fix.
Feel free to already uncomment the relevant other parts of the workflow for the final review
Just ping me when it's ready for the final review. |
Identify and attempt to remedy inconsistencies of the requirements/ files with setup.json.
With inconsistent requirements/ files those tests are misleading.
With some refactorization of the utils/dependency_management.py script.
To avoid the duplication of the warnings as part of the 'test-install' workflow.
To provide some context for the purpose of the contained files.
Co-Authored-By: Leopold Talirz <[email protected]>
Co-Authored-By: Leopold Talirz <[email protected]>
Co-Authored-By: Leopold Talirz <[email protected]>
Codecov Report
@@ Coverage Diff @@
## develop #3957 +/- ##
===========================================
- Coverage 78.44% 78.44% -0.01%
===========================================
Files 461 461
Lines 34077 34077
===========================================
- Hits 26732 26731 -1
- Misses 7345 7346 +1
Continue to review full report at Codecov.
|
@ltalirz This is ready to be reviewed and merged. I've hopefully resolved all issues that caused failing tests due to syntax or whitespace errors. Unfortunately codecov is complaining, no idea why. I've updated the wiki page to reflect the workflow implemented here. I've tested the flow on the following test PRs:
|
Is there a way that we can put a bigger tolerance to prevent these false positives? It is a bit annoying to have build officially fail just because a false positive in the coverage. Not only do PRs look like they are failing, even though everything is fine, but even when merging, it could mark the |
At the moment we haven't set any margins for this, however, this may be done in in the ´.coveragerc` file in the package root according to the codecov docs. |
As a note, I had the same |
I have now created #3975 and will investigate further. |
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 guys. @csadorf just for future reference, as stated in the wiki, next time you squash merge a PR, please take a bit of time to clean up the commit message. Github gives you a textarea to reformat the commit message such that it becomes readable. Just squashing and leaving the message as is, typically leads to a lot of noise in the commit message that makes it difficult to distill the important information that relate directly to the changes. For example the commit of this merge contains a lot of redundant and unnecessary noise:
|
@sphuber I am sorry, I guess I'm not yet fully adjusted to your preferred level of detail on commit messages. I agree that there are a few comments in there that are not adding much information and that I should have removed prior to merging (specifically all commit messages that were added by merging the PR comments), but I overall took care in ensuring that the commits on this branch remain clean and concise while I developed it. I therefore reject the notion that I just left everything as-is without a second thought. While the commit message lacks a concise summary, the bullet points describe all of the independent changes that were made on this branch. Would you prefer to remove them all? |
First of all, I don't mean to be annoying or criticising just for the hell of it. If my comment came off as crass, I apologize for that, that certainly is not my intention. Since I have spent a lot of time trying to understand the reasoning behind certain changes in the code of
If it really is the case that you did not just merge as-is, then I retract that statement, but I think you agree that that is in direct conflict with your former acknowledgment that you should have removed at the very least the PR updating comments, which would have taken at most 2 seconds.
What I am missing in this commit message is the why and how? You already had a solution in place for a particular problem, but that didn't really work. You did a lot of work and testing to figure out a better solution. From the current commit message, it is extremely difficult to make up what the problem was that it is addressing, what the final solution is and why you chose that one and not another one. This is super useful and important information for anyone else that will have to deal with this part of the code at some stage. Messages like:
and
are just not very instructive and don't contain much informational value to anyone reading the commit message trying to understand the reason for these code changes. The "what" can be figured out from the code diff itself, it is the "how" and the "why" that are important.
I have tried to convey the general idea as best I can on the wiki. If that is not clear, please let me know and I will try to improve it. Looking at the OP of your PR and the corresponding issue, you have actually already done exactly what I am looking for. It should just make its way into the commit. Something like the following:
If this suggested message is not correct, that proves my point why I think it is so important for the committer to try and write it, because I spent quite some time analyzing the available information scattered around PRs and issues on Github and apparently still failed. |
@sphuber I appreciate your detailed response and I must apologize, because I think I responded a bit too quickly. I think the main reason that I did not react super gracefully to your comment, is that I really put a lot of effort into trying to keep commits on this branch atomic and the commit history overall as clean as possible. I indeed read through the squashed commit message before merging and at the time deemed it to be sufficiently concise and decided (wrongly) that the few additional redundant messages are not too distracting. I absolutely see your point, and as I said before, it is self-evident that the commit message lacks a summary of changes and some of the bullet points that might have made sense in the context of the diff should have been removed. |
No need to apologize. I just think these things are important and hope that we can discuss them. I really appreciate your effort to keep the commits in the PR branch self-contained (as well as your detailed analysis in the issue and the PR OP itself), however, since we squash merge these kinds of PRs, the commit history of the PR branch is less important than the actual resulting commit. Do you agree that even though the individual commit messages that got squashed were concise, they did not really provide the necessary context and important information on the how/why? Or do you feel that the bullet list of individual commit messages is sufficient? |
Like I said, I agree with you, that the commit message lacks a summary that provides context and a brief overview of the most important changes.
No, but I think it would still make sense to include a furbished version of the list, but only in combination with a summary. |
This pull requests updates our update-dependency flow to resolve the issues described in #3930 .
The flow no longer relies on the aiida-bot, because using the bot did not actually resolve the underlying issue that GitHub actions has severe limitations when it comes to pull requests from forks. These issues must be resolved by GitHub, there is nothing we can do. Please see issue #3930 for a more detailed description of the problem.
Summary of the update-dependency flow:
setup.json
and creates pull request.Please see this exemplary PR for how this flow works in practice: csadorf#23
Once this PR is approved for merge, I will update the description of this flow on the wiki. I will also recommend that updates to the dependencies are committed directly to a branch on the main repo instead of a fork, however this is not a hard requirement. In either case -- whether dependencies are updated from the main repo or a fork -- the behavior of this update flow should be well-defined.
This PR disables some of the CI steps to reduce the workload during debugging. I will revert this commit after I receive general approval for this PR.
Tasks before merge: