Skip to content

Fix expiration check for well-known configuration#758

Open
Zwyx wants to merge 1 commit into
jenkinsci:masterfrom
Zwyx:patch-1
Open

Fix expiration check for well-known configuration#758
Zwyx wants to merge 1 commit into
jenkinsci:masterfrom
Zwyx:patch-1

Conversation

@Zwyx

@Zwyx Zwyx commented May 29, 2026

Copy link
Copy Markdown

While investigating for issue #757, I found that the logic here is inverted. wellKnownExpires.isBefore(now) is true when the expiry has passed (cache stale). So the config is re-downloaded on every call until 1h after first load, then sticks with the cached copy forever.

Testing done

Not covered.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

While investigating for issue jenkinsci#757, I found that the logic here is inverted. `wellKnownExpires.isBefore(now)` is true when the expiry has passed (cache stale). So the config is re-downloaded on every call until 1h after first load, then sticks with the cached copy forever.
@Zwyx Zwyx requested a review from a team as a code owner May 29, 2026 09:58
@michael-doubez

Copy link
Copy Markdown
Contributor

LGTM

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants