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

Silence noise from download() when allow_fail=True #18484

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmmv
Copy link
Contributor

@jmmv jmmv commented May 23, 2023

We have a custom repository rule that uses download(..., allow_fail=True) to first check if an artifact is already in the repository cache. Obviously, this test is expected to fail when it is not, but Bazel is incredibly loud by printing a WARNING message for each attempt of the form:

WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

Given that allow_fail=True is meant to let the caller check for failures, warnings should be suppressed. This change makes this happen.

Verified

This commit was signed with the committer’s verified signature.
docktermj Michael Dockter
We have a custom repository rule that uses download(..., allow_fail=True) to
first check if an artifact is already in the repository cache.  Obviously,
this test is expected to fail when it is not, but Bazel is incredibly loud
by printing a WARNING message for each attempt of the form:

WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

Given that allow_fail=True is meant to let the caller check for failures,
warnings should be suppressed.  This change makes this happen.
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels May 23, 2023
@meteorcloudy meteorcloudy added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jun 6, 2023
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jun 10, 2024
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jun 20, 2024
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jun 21, 2024
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jun 26, 2024
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jun 28, 2024
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
Copy link

Thank you for contributing to the Bazel repository! This pull request has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this PR is still relevant and should stay open, please post any comment here and the PR will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Jan 20, 2025
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Jan 21, 2025
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
sfc-gh-mgalindo added a commit to Snowflake-Labs/bazel that referenced this pull request Feb 8, 2025
    We have a custom repository rule that uses download(..., allow_fail=True) to
    first check if an artifact is already in the repository cache.  Obviously,
    this test is expected to fail when it is not, but Bazel is incredibly loud
    by printing a WARNING message for each attempt of the form:

    WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

    Given that allow_fail=True is meant to let the caller check for failures,
    warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484

Author: Julio Merino <julio.merino+oss@snowflake.com>
Date:   Tue May 23 15:02:20 2023 -0700
jmmv added a commit to Snowflake-Labs/bazel that referenced this pull request Feb 13, 2025
We have a custom repository rule that uses download(..., allow_fail=True) to
first check if an artifact is already in the repository cache.  Obviously,
this test is expected to fail when it is not, but Bazel is incredibly loud
by printing a WARNING message for each attempt of the form:

WARNING: Download from file:/mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 failed: class java.io.FileNotFoundException /mnt/jenkins/home/jenkins/.cache/bazel/_bazel_jenkins/5d6e21225a0f8eb93bf6c0ff841144e1/external/anaconda-python_3.10_x86_64/python-3.10.9-h7a1cb2a_2.tar.bz2 (No such file or directory)

Given that allow_fail=True is meant to let the caller check for failures,
warnings should be suppressed.  This change makes this happen.

Upstream PR: bazelbuild#18484
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author stale Issues or PRs that are stale (no activity for 30 days) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants