-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Add Nohttp Checks #22839
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 Nohttp Checks #22839
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 for the PR @rwinch
Looks good to me, I've added a few comments. Did you have a target branch in mind for this? Looks like 5.1.x
would be a good candidate.
e9f1afa
to
87932ef
Compare
@snicoll Thanks for the comments. I was not sure where the Framework team wanted this merged. It appears that @jhoeller is ok with the general changes going into 5.1.x except for the nohttp being added to the build. I'll let him verify what his thoughts are. As per the discussion on Slack, I pushed changes to make it so that BeanDefinitionParserDelegate now uses http://www.springframework/schema/ so it is automatically ignored by nohttp. This means there is no need for suppressions.xml at all anymore. |
Indeed, the documentation changes in particular could easily go into 5.1.x. |
@rwinch a build based on that branch does not work for me. Is that to be expected?
|
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 for the PR, I've added a few comments. I must share I am bit confused as when to add https
and when http
is ok in example URLs. I wonder how the tool is supposed to catch that.
Also, 18 commits sounds a bit invasive for such a change. I had started to polish it to 3: one to add the plugin to the build, one to change the header to https and one with all the rest (with the note that one commit should be a separate PR IMO).
Would you mind rebase and squash the URLs changes in one commit?
...-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java
Show resolved
Hide resolved
...est/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java
Show resolved
Hide resolved
...src/test/java/org/springframework/test/web/servlet/htmlunit/HtmlUnitRequestBuilderTests.java
Show resolved
Hide resolved
@rwinch As Stephane suggested, can we decompose this PR a bit? Separating the nohttp tool bit from the doc changes seems worthwhile indeed. Also, it's not entirely clear to me either which example URLs we should really be using now. |
FWIW, I'll make the license headers in those two new test sources consistent with the rest in a separate revision. That's really a plain oversight even aside from the nohttp tool, in contrast to the headers in the gradlew scripts which are generated... So those remaining changes are really primarily motivated by the tool, and we need to take into account that those gradlew scripts get regenerated on a Gradle upgrade. |
It does not fail for me. Can you post more details (i.e. files and the failures)? Perhaps you have stale files from the build or IDE still? Did you try a fresh clone or using
See https://github.com/spring-io/nohttp/tree/master/nohttp#thought-process
No problem. Done. |
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 reviewed the changes within the GitHub UI, and I didn't notice anything that seemed out of place.
@snicoll The Please run |
Yes, I've edited my comment in the meantime. It does not run in 3s for me though. What about the |
Hmm...not sure I understand this. I don't see an edit since I commented?
How long does it take?
You could add an exclusion on them in nohttp configuration if you want to. I'm not sure how much this is going to gain since |
In my edit 5h ago, I wrote the following
|
Ok thanks that clarifies the edit and the amount of time it is taking. I'm still wondering:
|
@rwinch yeah probably my use case was odd. I hadn't rebuild your PR in my IDE so it blew up but I guess once we're good it's not really necessary. The only use case I see is someone making a mistake in an xml file, fixing it, then the build would fail again until a build is done at the IDE level. I still think excluding those directories would be better (especially as it represents a duplication) |
I pushed an update to my branch that:
|
Running the build breaks for me as it's looking at |
@rwinch did you test this branch against a fresh checkout or something (i.e. without building the framework first). I thought I had some outdated artifacts but it looks like the exclusions are not properly applied. Here is a gist that shows the error I currently have: https://gist.github.com/snicoll/ac6b5ba8c469bd79a22183704b5df852 I am happy to revisit those and polish the PR but I'd like to first understand if I am missing something and if it's ok to exclude those resources. |
The build works for me even though I have built other branches. It seems like the failures you are getting are due to the build directory of modules that no longer exist in source control. For example, |
Sorry @rwinch I was focused on the It's now merged, I also upgraded to |
The updates to So hopefully that takes care of everything for this PR. |
Ooops, for some reason I had a stale version of the PR. Thanks for noticing Sam! |
No description provided.