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

[JENKINS-60581] Disable download logs in all Maven invocations by default #216

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

stellargo
Copy link
Contributor

@stellargo stellargo commented Jan 5, 2020

Disable download logs in process-test-classes steps

@@ -24,6 +24,8 @@
*/
public class ExternalMavenRunner implements MavenRunner {

public static final String DISABLE_DOWNLOAD_LOGS = "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn";
Copy link
Member

Choose a reason for hiding this comment

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

isn't --no-transfer-progress / -ntp the preferred option for this now? not sure if you can pass an option through here though

Copy link
Member

Choose a reason for hiding this comment

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

We do not set high Maven requirements in the tool so far. -ntp option would fail in the current Dockerfile, for example: https://github.com/jenkinsci/plugin-compat-tester/blob/master/Dockerfile

Copy link
Member

Choose a reason for hiding this comment

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

probably no need for this to be public? even having it as a constant is debate-able?

Suggested change
public static final String DISABLE_DOWNLOAD_LOGS = "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn";
private static final String DISABLE_DOWNLOAD_LOGS = "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, i'll change it to private.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

LGTM. I suggest to do Maven requirement bump in a separate pull request.
@stellargo It may make sense to pass this property to all calls tho

@@ -24,6 +24,8 @@
*/
public class ExternalMavenRunner implements MavenRunner {

public static final String DISABLE_DOWNLOAD_LOGS = "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn";
Copy link
Member

Choose a reason for hiding this comment

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

We do not set high Maven requirements in the tool so far. -ntp option would fail in the current Dockerfile, for example: https://github.com/jenkinsci/plugin-compat-tester/blob/master/Dockerfile

@@ -49,6 +51,12 @@ public void run(Config config, File baseDirectory, File buildLogFile, String...
cmd.add("--define=" + entry);
}
cmd.addAll(Arrays.asList(goals));
for (String goal: goals){
Copy link
Member

Choose a reason for hiding this comment

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

Can be just hardcoded above for all invocations. E.g. like cmd.add("--batch-mode"); above

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

I plan to merge it tomorrow if no negative feedback

@oleg-nenashev oleg-nenashev changed the title [FIXED JENKINS-60581] Disable download logs in process-test-classes s… [FIXED JENKINS-60581] Disable download logs in all Maven invocations by default Jan 6, 2020
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Thanks a lot @stellargo ! I will go ahead and merge it. It should be released in the new version, maybe in few weeks. Docker images should be delivered by a CD flow within few hours for jenkins/pct:latest

@oleg-nenashev oleg-nenashev merged commit 08f02c7 into jenkinsci:master Jan 6, 2020
@stellargo
Copy link
Contributor Author

Thanks @oleg-nenashev and Tim, couldn't have done it without your help. Looking forward to contribute more :)

@oleg-nenashev oleg-nenashev changed the title [FIXED JENKINS-60581] Disable download logs in all Maven invocations by default [JENKINS-60581] Disable download logs in all Maven invocations by default Jan 8, 2020
@@ -24,6 +24,8 @@
*/
public class ExternalMavenRunner implements MavenRunner {

private static final String DISABLE_DOWNLOAD_LOGS = "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn";
Copy link
Member

Choose a reason for hiding this comment

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

Or -ntp in recent versions of Maven.

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.

4 participants