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

Explicitly set argLine property #12928

Closed
wants to merge 1 commit into from

Conversation

ksobolew
Copy link
Contributor

Description

This property is used by Jacoco to store its agent properties; it's then used in Surefire configuration to paste these properties as JVM command arguments. Normally this is managed by two profiles in Airbase POM: jacoco-check, which configures the Jacoco plugin to initialize this property, and jacoco-defaults, which sets the property to empty. These two profiles are activated by the air.check.skip-all property being false and true respectively.

The problem is, though, that we disable Jacoco by setting air.check.skip-jacoco instead. This means that the Jacoco plugin is configured, but not executed - and the profile which sets argLine to empty is not activated. This leaves the argLine property uinitialized, and the Surefire configuration ends up having literal ${argLine} in the JVM commands. This confuses some tools which rely on this configuration (though not Surefire itself), including at least one popular IDE.

Is this change a fix, improvement, new feature, refactoring, or other?

Fix.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Build scripts.

How would you describe this change to a non-technical end user or system administrator?

Makes some tests work in an IDE.

Related issues, pull requests, and links

airlift/airbase#300

airlift/airbase#301

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

This property is used by Jacoco to store its agent properties; it's then
used in Surefire configuration to paste these properties as JVM command
arguments. Normally this is managed by two profiles in Airbase POM:
`jacoco-check`, which configures the Jacoco plugin to initialize this
property, and `jacoco-defaults`, which sets the property to empty. These
two profiles are activated by the `air.check.skip-all` property being
`false` and `true` respectively.

The problem is, though, that we disable Jacoco by setting
`air.check.skip-jacoco` instead. This means that the Jacoco plugin is
configured, but not executed - and the profile which sets `argLine` to
empty is not activated. This leaves the `argLine` property uinitialized,
and the Surefire configuration ends up having literal `${argLine}` in
the JVM commands. This confuses some tools which rely on this
configuration (though not Surefire itself), including at least one
popular IDE.
@cla-bot cla-bot bot added the cla-signed label Jun 22, 2022
@ksobolew ksobolew requested review from findepi and nineinchnick June 22, 2022 11:02
@@ -39,6 +39,9 @@
<air.check.skip-spotbugs>true</air.check.skip-spotbugs>
<air.check.skip-pmd>true</air.check.skip-pmd>
<air.check.skip-jacoco>true</air.check.skip-jacoco>
<!-- Jacoco is explicitly disabled, but the profiles setting this property are activated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean this?

Suggested change
<!-- Jacoco is explicitly disabled, but the profiles setting this property are activated
<!-- Jacoco is explicitly disabled, but profiles referencing this property are activated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these profiles are not referencing argLine, they are initializing it. argLine is referenced in the Surefire configuration.

@findepi
Copy link
Member

findepi commented Jun 22, 2022

airlift/airbase#315 (comment)

Can Trino define a default for argLine if it has Jacoco always disabled?

The bug is in airbase. In trino we can workaround, sure, but can we fix this here?

@ksobolew
Copy link
Contributor Author

This is better fixed in Airbase: airlift/airbase#318. This PR can be considered a temporary workaround until that fix trickles down into Trino.

@ksobolew
Copy link
Contributor Author

Obsoleted by #12979

@ksobolew ksobolew closed this Jun 24, 2022
@ksobolew ksobolew deleted the kudi/fix-argline branch June 24, 2022 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants