Skip to content
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

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

ppalaga
Copy link
Contributor

@ppalaga ppalaga commented Jun 24, 2020

…re built in parallel

Fix #10217

@ppalaga ppalaga requested a review from machi1990 June 24, 2020 10:59
@gsmet gsmet changed the title Fix #10217 quarkus-extension-processor race conditions when modules a… Fix quarkus-extension-processor race conditions when modules are built in parallel Jun 24, 2020
@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 24, 2020

The CI failure does not seem to be related.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 25, 2020

Any chance to review, @machi1990 ?

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 25, 2020

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.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 26, 2020

Could somebody review pretty please? It would be so nice to get back at the mvnd level of productivity.

@famod
Copy link
Member

famod commented Jun 29, 2020

Does this also fix the following?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile (default-compile) on project quarkus-core-deployment: Fatal error compiling: java.lang.IllegalArgumentException: argument "content" is null

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 29, 2020

Does this also fix the following?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2:compile (default-compile) on project quarkus-core-deployment: Fatal error compiling: java.lang.IllegalArgumentException: argument "content" is null

Not sure, TBH.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 30, 2020

Added triage/backport in hope that it attracts some reviewers.

@gsmet gsmet added this to the 1.7.0 - master milestone Jul 6, 2020
Copy link
Member

@gsmet gsmet left a 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

@machi1990
Copy link
Member

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.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 13, 2020

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

Thanks for the feedback @gsmet! I have fixed those in d8c7962. I also made sure that docs/target/generated-docs is the same before and after the change.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 13, 2020

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.

I vote for considering the current non-locking proposal as long as there is any hope that it can work correctly.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 14, 2020

Let me check what's up with -Ddocumentation-pdf

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 14, 2020

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.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 14, 2020

OK, the CI passed now. Could you please re-review?

@gsmet
Copy link
Member

gsmet commented Jul 16, 2020

Normal builds look OK now. Let's merge it and see if we detect any further issues.

@gsmet gsmet merged commit 8f6365d into quarkusio:master Jul 16, 2020
@ppalaga
Copy link
Contributor Author

ppalaga commented Jul 16, 2020

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quarkus-extension-processor race conditions when modules are built in parallel
5 participants