Skip to content

Conversation

strangelookingnerd
Copy link
Contributor

@strangelookingnerd strangelookingnerd commented Oct 10, 2025

See JENKINS-76192.

Issue initially found in jenkinsci/sonargraph-integration-plugin#31

It appears that during FilePath#unzip the file that was just unpacked cannot be found in the following calls, causing NoSuchFileException to be thrown.

The issue occurs in com.hello2morrow.sonargraph.integration.jenkins.controller.CustomMetricTest#testSameReportDoesNotAddMetricId
It could only be reproduced on ci.jenkins.io on both, linux and windows agent. I was unable to reproduce it in my local environment.

First I tried to add a retry-loop with a Thread.sleep as I suspected a slow filesystem being the cause but could not confirm this being the case. My checks show that the file is indeed present and there does not seem to be anything wrong with it. So ignoring the exception seemed to be the only remedy. My working theory is that it could be an issue of the environment.

While I'm not a big fan of these kinds of workarounds, I think it will not cause any real harm here to ignore the expections.

Testing done

I would not know how to create a unit test that validates the behavior, however jenkinsci/sonargraph-integration-plugin#34 shows that the fix appears to be working.

Proposed changelog entries

  • Ignore NoSuchFileException in FilePath#unzip

Proposed changelog category

/label bug

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@jenkinsci/core-pr-reviewers

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@strangelookingnerd strangelookingnerd changed the title [JENKINS-76192] Add retry loop for FilePath#chmod [JENKINS-76192] Ignore NoSuchFileException in FilePath#chmod Oct 12, 2025
@strangelookingnerd strangelookingnerd changed the title [JENKINS-76192] Ignore NoSuchFileException in FilePath#chmod [JENKINS-76192] Ignore NoSuchFileException in FilePath#unzip Oct 13, 2025
@comment-ops-bot comment-ops-bot bot added the bug For changelog: Minor bug. Will be listed after features label Oct 13, 2025
@strangelookingnerd strangelookingnerd marked this pull request as ready for review October 13, 2025 08:58
Copy link

@A1exKH A1exKH left a comment

Choose a reason for hiding this comment

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

LGTM.

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

Labels

bug For changelog: Minor bug. Will be listed after features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants