-
Notifications
You must be signed in to change notification settings - Fork 666
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
Increase yamllint coverage #1919
Conversation
846e188
to
4108371
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.
Don't indent sequences in YAML files mainly maintained by me. Other than that, it's fine.
@webknjaz Please don't take this personally by the whole point of the change is to avoid file exceptions in the linter. That is not a personal preference on indentation, that's the linter rule. |
I don't accept it because linter is wrong. And if you want to apply wrong rules to other files it's fine as long as it doesn't break files I care about. |
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.
This also enables people to run yamllint without extra parameters and avoid getting errors.
Worth it for this, I'd say.
No idea how you're going to persuade "not in my back garden" issue above though ...
4108371
to
c389327
Compare
That's very easily addressed with having |
While this is nice we shouldn't advertise "you can build/manage your envs manually without |
Please cite the part of the specification that is violated by writing a list in a mapping with indentation before the |
Yes, please spare us personal subjectivities of "wrong" ... |
Can you cite the part where it says that indented thing is more readable then? |
I never made a claim about readability, but you made a claim that Here's the spec on indenting sequences: https://yaml.org/spec/1.2/spec.html#id2759963 in Example 2.3, 2.9 and 2.10 indents sequences with 2 spaces. Also from there (emphasis mine): Edit: Also the "full examples" (2.27 and 2.28) indent lists this way (treating the |
Those examples aren't etalons of readability. Especially not that one next to your snippet example 2.4. Your snippet was too generic. There's a section about paragraphs https://yaml.org/spec/1.2/spec.html#-%20block%20sequence%20entry// saying: Plus we all know that parsers do not require it. ---
- item1:
- with:
-
some: subitem2
- item3:
- with:
-
some: subitem4
---
- item5:
- with:
-
some: subitem6
- item7:
- with:
-
some: subitem8
--- this example doesn't use too much nesting, but for more complex things it turns YAML from format for humans into yet another format for robots. |
The linter requires it. Every other YAML file in this repository conforms to it. It is valid and well-formed YAML. You claim that the linter is wrong. Prove it. |
Please fix the CI errors and let's get this merged. I think making an exception for specific maintainers in our configuration is not reasonable and I see a majority of community memebers arguing for this change to be accepted. |
Please unblock this @webknjaz. |
Majority of community members will not end up reading it. I'm not convinced. |
So... what would it take to convince you otherwise? |
@MarkusTeufelberger I've already explained my position. Let's listen to each other instead of just pushing for own vision. Readability matters. But what does this actually mean? |
Great, so you just need me to take over maintaining the .travis-ci file until travis finally dies. It takes ~500 lines to run only 28 jobs anyways and contains more anchors than Popeye's village, so I'll get started there right away. |
As I understand this: your position within this thread is "I maintain this file more than other people and I want it to be formatted the way I prefer". Every other community member on this thread has argued for "the project has a general configuration and it is more consistent to apply it across the entire project". So this is about a "project vision" and not our "own vision". This is not the first time that you have argued obstinately against other community members opinions and now you are in actual fact blocking that point of view from progressing. I find this both worrying and demoralising. |
Please see ansible/community#427 (comment). |
Ok, after looking into it: Using more than one variable env-var with Travis is a mess. There would be other options out there too (e.g. Circle-CI, which has nicer integration with Github checks too or Azure devops), but according to the latest meeting notes, molecule might switch to a different CI system anyways ( |
Again: it's just an end-effect of underlying reasoning everyone seems to have chosen to ignore. I've got actual supporting arguments there rather than just "this other guy also thinks so". You seem to be advocating to democracy (which evidently doesn't work well; seealso: trump/brexit) where the majority is considered to know better than everyone else. While I argue that quality is more important than quantity.
I'm sorry to hear that. I understand that discussions may become heated sometimes but it's never my intention to make anyone feel bad.
Before judging first take time to actually understand the reasoning behind the solution. I don't even know what else to say here. You can unwrap that into 1500 lines if that seems better maintainable to you... Yes, more explicit job configs are easier to read (this is where you're 100% correct) but unfortunately hard to maintain. At one point I even was going to have a CI config generator but never got to implement that...
Yes and no. There's advantages and drawbacks in all CIs. I've tried the majority of them. Travis' upside is that it has probably the best integration with GitHub while disadvantages include poor flexibility of the config file in particular. There's more. It's easy to judge what's wrong and it's hard to do what's right. Writing that something is bad is discouraging. Not having improvement suggestions while doing so is also making such criticism more or less useless. I did the best I could do with this which is having an explicit list of jobs with a few explicit variables for readability. |
I will work on adding a Travis-CIJust to confirm the comment made by @MarkusTeufelberger https://github.com/MarkusTeufelberger
I know the current Travis setup isn't the best, though I want us to avoid the switching cost of moving from Travis to X to Zuul. If the capacity currently allocated (10 concurrent jobs) in Travis-CI.com isn't enough I can fix that by throwing more money at 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.
Note for reviews, use the whitespace disabled flag ?w=1
https://github.com/ansible/molecule/pull/1919/files?w=1
I just triggered a fresh CI run:
|
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.
CI is failing as other regressions have been merged since this PR was created.
c389327
to
575c588
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.
fix the indentation
Makes yamllinting execution to cover files that previously were not linted in order to assure consistent formatting. This also enables people to run yamllint without extra parameters and avoid getting errors. Contains only one exception caused by a bug in pyup tool but we referenced the bug and once is fixed we can remove it. Signed-off-by: Sorin Sbarnea <[email protected]>
575c588
to
811130d
Compare
@@ -1,2 +1,3 @@ | |||
--- |
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 in my own fork to assure that it does not break DCO service.
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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 in my own fork to assure that it does not break RTD service.
@@ -2,6 +2,9 @@ extends: default | |||
ignore: | | |||
*.molecule/ | |||
molecule/cookiecutter/ | |||
.tox | |||
# HACK: https://github.com/pyupio/pyup/issues/346 | |||
.pyup.yml |
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.
PYUP is the only tool that seems to choke on "hardened" yaml files, so we skip 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.
@ssbarnea you can add a separate lint once you finish pre-commit one
@@ -51,7 +51,7 @@ commands = | |||
unit: python -m pytest test/unit/ --cov={toxinidir}/molecule/ --no-cov-on-fail {posargs} | |||
functional: python -m pytest test/functional/ {posargs} | |||
lint: python -m flake8 | |||
lint: python -m yamllint -s test/ molecule/ | |||
lint: python -m yamllint -s . |
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.
This the the major goal of this change: so we avoid adding YAML files to other locations that do not have standardized formatting.
Also this makes much eaiser to run run yamllint outside tox or from other tools like IDEs, hooks,...
Sorted, please recheck it.
* Increase yamllint coverage Makes yamllinting execution to cover files that previously were not linted in order to assure consistent formatting. This also enables people to run yamllint without extra parameters and avoid getting errors. Contains only one exception caused by a bug in pyup tool but we referenced the bug and once is fixed we can remove it. Signed-off-by: Sorin Sbarnea <[email protected]> * Transfer .travis.yml responsibility to @ssbarnea
Makes yamllinting execution to cover files that previously were not
linted in order to assure consistent formatting.
This also enables people to run yamllint without extra parameters
and avoid getting errors.
Signed-off-by: Sorin Sbarnea [email protected]
PR Type