Skip to content

Minor tweaks to caching#925

Merged
timja merged 1 commit intojenkinsci:mainfrom
timja:caching-too-aggressive
Jul 25, 2025
Merged

Minor tweaks to caching#925
timja merged 1 commit intojenkinsci:mainfrom
timja:caching-too-aggressive

Conversation

@timja
Copy link
Member

@timja timja commented Jul 25, 2025

I was having a look at the latest version of this plugin after deploying it to ci.jenkins.io.

I noticed that the allSteps call was being cached although the build was running:

https://ci.jenkins.io/job/Core/job/jenkins/job/PR-10186/13/pipeline-overview/?selected-node=186

image

I couldn't reproduce it locally but I'm guessing it was a timing issue.

I've moved some pieces out of guessing based on state and used the flag to check it on the run.
I've also switching from inProgress to isBuilding which does an additional check to make sure the build has started.

This may not fix the issue as I didn't hit it locally.

Testing done

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

@timja timja added the bug Something isn't working label Jul 25, 2025
@timja timja marked this pull request as ready for review July 25, 2025 15:16
@timja timja requested a review from a team as a code owner July 25, 2025 15:16
@felipecrs
Copy link
Contributor

felipecrs commented Jul 25, 2025

I also have had complaints from users that steps aren't showing up for certain builds, whereas they show up in private tabs.

These complaints aren't very solid as it's very difficult to reproduce them, but I would appreciate if you can merge this.

I can then ask my users to keep monitoring on whether it happens again.

@timja timja enabled auto-merge (squash) July 25, 2025 15:33
@timja
Copy link
Member Author

timja commented Jul 25, 2025

I also have had complaints from users that steps aren't showing up for certain builds, whereas they show up in private tabs.

These complaints aren't very solid as it's very difficult to reproduce them, but I would appreciate if you can merge this.

I can then ask my users to keep monitoring on whether it happens again.

Thanks for letting me know that, it'll only help for new builds, (unless they force refresh to clear the cache).

@timja timja merged commit 56a84da into jenkinsci:main Jul 25, 2025
16 of 17 checks passed
@timja timja deleted the caching-too-aggressive branch July 25, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants