Skip to content

Hide/remove Java installations logs from v2 #157

Closed

Description

@asarkar

Description:
v2 seems to be more verbose, especially the downloading JDK part. May be hide it unless verbose: true is set?

v1

Run actions/setup-java@v1
/usr/bin/tar --version
tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/temp_1161855869 -f /home/runner/work/_temp/abd98200-ef11-4248-8e23-b2b76bf9846e
creating settings.xml with server-id: github; environment variables: username=$GITHUB_ACTOR, *** and gpg-passphrase=null
writing /home/runner/.m2/settings.xml

v2

Run actions/setup-java@v2
Trying to resolve the latest version from remote
Resolved latest version as 8.0.282+8
Trying to download...
Downloading Java 8.0.282+8 (Zulu) from https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz ...
Extracting Java archive...
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/89eaf85a-fb1a-4dd2-822e-925174a055b4 -f /home/runner/work/_temp/648b7ad7-d4ed-4f1e-b303-11adf58a3fae
Java 8.0.282+8 was downloaded
Setting Java 8.0.282+8 as the default

Java configuration:
  Distribution: zulu
  Version: 8.0.282+8
  Path: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.282-8/x64

Creating settings.xml with server-id: github
Writing to /home/runner/.m2/settings.xml

Justification:
There is no use of Java installation steps in my build logs.

Activity

  1. maxim-lobanov commented on Apr 8, 2021

    @maxim-lobanov
    Contributor

    @asarkar thank you for raising this point.

    v2 provides less output if using pre-cached version on Hosted runners:

    Resolved Java 11.0.10+9 from tool-cache
    Setting Java 11.0.10+9 as the default
    
    Java configuration:
      Distribution: adopt
      Version: 11.0.10+9
      Path: /Users/runner/hostedtoolcache/Java_Adopt_jdk/11.0.10-9/x64/Contents/Home
    
    Creating settings.xml with server-id: github
    Writing to /Users/runner/.m2/settings.xml
    

    We have discussed it internally and we would like to keep this level of verbosity by default for cases when Java is downloading in runtime because in our understanding it will be easier to track the actual progress and debug in case of any issues

  2. asarkar commented on Apr 8, 2021

    @asarkar
    Author

    If you want to debug, why don't you introduce a flag to enable verbose logging as is done in most software, instead of asking the user to accept logs they've no use for? Just like distribution, a verbose flag can be introduced that'll be false by default, and true for debugging purposes.
    No one runs production code with verbose logging unless they specifically enable it. Why'd this software be any different?

  3. maxim-lobanov commented on Apr 8, 2021

    @maxim-lobanov
    Contributor

    We don't consider current output as verbose logging. The output that you have shared is normal logging and the information is useful to understand what action does at this moment. I guess any tool reports to the output the current progress of running command.

    Verbosity logging can be enabled by the following guide: https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging
    And it will produce even more logs, see example in https://github.com/maxim-lobanov/test-repo/runs/2294998433?check_suite_focus=true

  4. konradpabjan commented on Apr 8, 2021

    @konradpabjan
    Contributor

    I share the same sentiment as @maxim-lobanov , the current output is very very limited for an action (less than 20 lines). There should always be some information logged by default. There was even even this request to log more information which is a pretty clear indication that we weren't logging enough and this information is useful for users: #92

    Verbose logging should only be used for things like extra information. @actions/upload-artifact is a good example where debug logs tell you things like the upload time of each file, the resource URLs and a host of other information. See: https://github.com/konradpabjan/artifact-test/runs/2282151605?check_suite_focus=true#step:3:27

    No one runs production code with verbose logging unless they specifically enable it

    The vast majority of GitHub actions users unfortunately do not have step debugging enabled.

    Users shouldn't have to turn on debugging to see very basic things so I'm going to label this as-designed since we won't be changing this.

  5. added
    *as-designedDescribed behavior is as designed
    and removed
    feature requestNew feature or request to improve the current logic
    on Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *as-designedDescribed behavior is as designed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions