-
Notifications
You must be signed in to change notification settings - Fork 441
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
Drop lint from preventing deployment #5650
Drop lint from preventing deployment #5650
Conversation
What we do in the Galaxy code base is fix whatever new linting rule (think eslint, ruff, black) we're applying before making it a requirement, we should follow that same principle here. |
I understand the frustration, but I think we need a better solution. But in my opinion, this change is just fixing symptoms. If there is an error in the linter then it should be fixed upstream instead of disabling linting (note that we already skip linter warnings - which is fine). If the linter is correct then we may need to pin the linter version, i.e. planemo (?), in order to have control over the linter (code/version) that is applied .. and IUC has the possibility to fix the code before updating the pin. Maybe (self-critically) we also need a better review (or more rigorous testing) of changes made in the linting code.
Ideally yes :) My perception is that IUC does not have the resources or interest (obviously each of us is interested only in a subset of the tools and cares more about those than others) in fixing existing problems. An example of the lack of resources is that there haven't been successful weekly CI tool tests for a very long time (and with your argumentation, we could also disable tool tests for deployment). For linting there are numerous issues systematically listing linter warnings and other problems (#4100, #4094, #4093, #4091, #4085, #4009) that did not receive much attention. I remember that I once wanted to add linting to CI, but it was noted that this creates too much noise, i.e. at the moment we don't even know what is broken wrt. linting. So, in my opinion, we need any help we can get. Often linter warnings are very easy to fix and people who open PRs for tools obviously care for them. So why shouldn't we point them to other things that could be fixed and kindly ask/nudge them to do so? In the end, they don't have to.
Would be fine for me as long as the commits are atomic. |
Yes, see #5650 (comment).
Not every IUC member needs to care about all tools, but I know you and I are not alone in this, to that non-exhaustive list I would add at least @nsoranzo and @bgruening (apologies if I missed anyone there). This is the reason for my continued involvement here, I otherwise really don't care about any particular tool. Now another question is the timeline of introducing major changes affecting contributors.
Because that's how you make it seem that contributing here is always a huge effort. As you said that:
... for us We sure have the resources to fix all linting errors on a per rule basis, but that needs to be coordinated and prioritized.
it is not fine for me at all, and it's quite problematic when every bugfix potentially comes with a new bug. atomicity means nothing if you can't install those commits. enforcing this is IMHO a waste of our time, it has zero impact and is the last thing I would do after everything important has been addressed. I hope that's not anything that currently fails the CI. hard for me to see why that's important but I give you that it may hide some bugs that seems important, but do we lint for this ? unclear how that's supposed to be fixed and why it is a problem. Is there a linter for it ? Would you be onboard with this plan:
|
Yes, https://github.com/galaxyproject/galaxy/blob/1ed254ff72b1c6c4399e0d47dbc7716bc68ff01c/lib/galaxy/tool_util/linters/outputs.py#L50 .. but super hard to fix since it affects
I only would like to do this for linter messages that are not valid, i.e. false positives of the linter. Or even better just fix the linter if possible. For me, the problem with rolling back all of them is
We certainly have to work on this. My suggestion for the meantime would be:
This part I fully support. For a start, I just ran
If I'm not wrong we have a total of 53 unique warning messages in our linters and 76 error messages (determined by just Wondering how to discuss/prioritize those most efficiently. I could imagine a shared document that everyone can reorder/comment on might be more useful than a GitHub issue, or? I'm also sure some of the problems can also be solved by automatic means. I think what we could need on the long run is a code for each linter message (like the pep8/flake codes), such that the repos / users can select which rules should apply. Maybe also restructure the linter code, such that we have 1 linter function per message. |
[noci] seems fine in that case ?
I do not understand the argument. Take one rule, fix it, done. There isn't really any viable alternative. Noone is going to fix all issues in a single go. And if they did it'd be practically unreviewable.
Exactly! We should not force this on people, certainly for things that are of no consequence. Now I think the language server is the right place to show these messages, and it can be more strict than we are here.
Thanks for that. Let's start by redefining what errors are:
Only two items here would qualify as an actual error in my book, The rest seem like warnings at best.
This cannot be "the long run", this must happen before we can reasonably clean up large categories, like the warning linters. I was under the impression that we can do that already with |
I agree, but wrt your point on atomic comits / PRs this also would result in a non-installable intermediate tool version. But this is certainly fine for me.
The question is what you meant by "roll back any warning level failures ". I understood to remove / disable the linter rules, i.e. in
Those two are certainly of the highest priority. My problem is that we do not have a definition of what an error is. I guess that your definition of an error is everything that makes the tool run fail. My definition would be more strict: everything that makes any part of the tool fail would qualify as an error, e.g. But this discussion in large parts can be avoided if we have the possibility for a more fine grained selection.
+1 I guess, we can just add a linter code here and think of a naming scheme. Could be just numbers like for PEP or a few capital letters that identify each message. Then restructure the code such that each error/warning code corresponds to one linter class. Some of the linters might even have a
We can only skip whole linters, e.g. the Would my plan for the meantime be acceptable for you, i.e. use error as fail level and install weekly linter CI? |
our fail level is now warning for PRs (https://github.com/galaxyproject/tools-iuc/blob/main/.github/workflows/pr.yaml#L132), this isn't reasonable currently. We can either keep it at warning and skip the ones that are currently not fixed across tools-iuc, or move it back to error. If that isn't visible enough we can use the
yes, I agree, that's a very valuable thing to do. |
I started .. open for discussion galaxyproject/galaxy#17081 |
I think that it would be very good that this keeps moving forward, I very often these days think twice on whether to make changes to old tools because of the effort it involves to please the linter on so many things that are irrelevant for the tool to keep working as it has been so far. |
@pcm32 I think way forward will be the possibility to enable/disable linter rules in planemo. This will be possible soonish. The ingredients are
Then we can disable all rules that are not fulfilled repo-wide (and systematically work on them). @mvdbeek could you find the time to do a new release (or pre replease) of the python packages for 24.0 such that we can progress on planemo? |
Newer than https://pypi.org/project/galaxy-tool-util/24.0.0/ ? |
I remember that most of the problems in the planemo 24.0 PR should be fixed in galaxyproject/galaxy#17899 I was assuming that we need new packages to fix this in the PR. Am I wrong? Is there a way to speed this up (e.g. by having a conditional requirement in planemo's requirement.txt that installs galaxy packages from git if in CI)? |
I've created a new minor release, should have new packages once https://github.com/galaxyproject/galaxy/actions/runs/8924916026/job/24512355542 completes. |
And yes, you can also install from git, |
and we should really take a good look at the signal we're sending by applying linting rules to PRs for things that are already broken. It does increase the barrier to contribution significantly and leads to PRs that do more than one thing and that's bad IMO.
FOR CONTRIBUTOR: