-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix quarkus-extension-processor race conditions when modules are built in parallel #10218
Conversation
The CI failure does not seem to be related. |
Any chance to review, @machi1990 ? |
Ad validation of this change: I made sure that this change is not causing any changes in documentation or in bom-descriptor-json/target/extensions.json . Not sure there are other locations that might be impacted. |
Could somebody review pretty please? It would be so nice to get back at the |
core/processor/src/main/java/io/quarkus/annotation/processor/ExtensionAnnotationProcessor.java
Outdated
Show resolved
Hide resolved
Does this also fix the following?
|
Not sure, TBH. |
Added triage/backport in hope that it attracts some reviewers. |
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.
It doesn't seem to work.
When doing a simple mvn clean install -DskipTests -DskipITs
, I end up with various warnings, including:
[INFO] asciidoctor: INFO: datasource.adoc: line 490: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-datasource.adoc
[INFO] asciidoctor: INFO: datasource.adoc: line 495: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-agroal.adoc
[INFO] asciidoctor: INFO: datasource.adoc: line 583: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-reactive-datasource.adoc
[INFO] asciidoctor: INFO: datasource.adoc: line 587: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-reactive-db2-client.adoc
[INFO] asciidoctor: INFO: datasource.adoc: line 591: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-reactive-mysql-client.adoc
[INFO] asciidoctor: INFO: datasource.adoc: line 595: optional include dropped because include file not found: /data/home/gsmet/git/quarkus/target/asciidoc/generated/config/quarkus-reactive-pg-client.adoc
[INFO] Rendered /data/home/gsmet/git/quarkus/docs/src/main/asciidoc/datasource.adoc
Maybe we can use file based locking / synchronization on this part here https://github.com/quarkusio/quarkus/blob/master/core/processor/src/main/java/io/quarkus/annotation/processor/ExtensionAnnotationProcessor.java#L238-L246 without impacting much on how files are generated. Yes, we'll incur a small performance cost but that will be better than the race condition. |
Thanks for the feedback @gsmet! I have fixed those in d8c7962. I also made sure that |
I vote for considering the current non-locking proposal as long as there is any hope that it can work correctly. |
Let me check what's up with |
…modules are built in parallel
Hm... I cannot reproduce the error seen in https://github.com/quarkusio/quarkus/pull/10218/checks?check_run_id=866741427#step:8:46462 locally. 7b364b6 is just rebased to see if the error will occur again. |
OK, the CI passed now. Could you please re-review? |
Normal builds look OK now. Let's merge it and see if we detect any further issues. |
Perfect, thanks! |
…re built in parallel
Fix #10217