Title: setup-java post action caching for v4 is slower than v3 · Issue #601 · actions/setup-java · GitHub
Open Graph Title: setup-java post action caching for v4 is slower than v3 · Issue #601 · actions/setup-java
X Title: setup-java post action caching for v4 is slower than v3 · Issue #601 · actions/setup-java
Description: Description: When switching from setup-java v3 to v4 the post run part is significantly slower. Task version: v4 Platform: Ubuntu macOS Windows Runner type: Hosted Self-hosted Repro steps: Slow: jobs: verify: runs-on: ubuntu-22.04 steps:...
Open Graph Description: Description: When switching from setup-java v3 to v4 the post run part is significantly slower. Task version: v4 Platform: Ubuntu macOS Windows Runner type: Hosted Self-hosted Repro steps: Slow: jo...
X Description: Description: When switching from setup-java v3 to v4 the post run part is significantly slower. Task version: v4 Platform: Ubuntu macOS Windows Runner type: Hosted Self-hosted Repro steps: Slow: jo...
Opengraph URL: https://github.com/actions/setup-java/issues/601
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"setup-java post action caching for v4 is slower than v3","articleBody":"**Description:**\r\nWhen switching from setup-java v3 to v4 the post run part is significantly slower.\r\n\r\n**Task version:**\r\nv4\r\n\r\n**Platform:**\r\n- [x] Ubuntu\r\n- [ ] macOS\r\n- [ ] Windows\r\n\r\n**Runner type:**\r\n- [x] Hosted\r\n- [ ] Self-hosted\r\n\r\n**Repro steps:** \r\n\r\nSlow:\r\n```\r\njobs:\r\n verify:\r\n runs-on: ubuntu-22.04\r\n steps:\r\n - uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0\r\n - uses: actions/setup-java@v4\r\n with:\r\n java-version: '11'\r\n distribution: 'temurin'\r\n cache: 'maven'\r\n - name: run maven\r\n run: |\r\n mvn -B --settings .mvn/settings.xml verify\r\n shell: bash\r\n\r\n```\r\n\r\n\r\n---\r\nFast:\r\n```\r\njobs:\r\n verify:\r\n runs-on: ubuntu-22.04\r\n steps:\r\n - uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0\r\n - uses: actions/setup-java@v3\r\n with:\r\n java-version: '11'\r\n distribution: 'temurin'\r\n cache: 'maven'\r\n - name: run maven\r\n run: |\r\n mvn -B --settings .mvn/settings.xml verify\r\n shell: bash\r\n``` \r\n\r\n\r\n\r\n**Expected behavior:**\r\nv4 should have the same speed as v3. \r\nBoth executions had no cache hits and the amount of data was approx 30MB.\r\n\r\n**Actual behavior:**\r\nv4 is in this case orders of magnitude slower than v3.\r\n\r\n**Additional information:**\r\n\r\nI have seen that actions setup-node https://github.com/actions/setup-node/issues/878\r\nand setup-ruby https://github.com/ruby/setup-ruby/issues/543 have had the same problem.\r\nIt seems that it had to do with the upgrade of the actions/cache version.\r\n\r\nI think their solution was to exit the process manually after caching is complete as otherwise the job simply hangs until some timeout.\r\n\r\nAfter looking at this repo for a very short time **my guess** is that perhaps somewhere \r\nhere -\u003e https://github.com/actions/setup-java/blob/9704b39bf258b59bc04b50fa2dd55e9ed76b47a8/src/cache.ts#L150\r\na ` process.exit(0)` could solve the problem (as I said, I'm only guessing based on the node and ruby solutions).\r\n","author":{"url":"https://github.com/htpaf","@type":"Person","name":"htpaf"},"datePublished":"2024-02-29T10:50:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/601/setup-java/issues/601"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:56264dcc-c4d9-4661-be79-abc1a4e59346 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D4A:17CBFE:44BCE3:5CA6FB:6A629984 |
| html-safe-nonce | b52f959dc4ac7b0ec638cd011bd6bb5e05786b7bc4ad943caeb4b254af3323f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDRBOjE3Q0JGRTo0NEJDRTM6NUNBNkZCOjZBNjI5OTg0IiwidmlzaXRvcl9pZCI6IjM5NzA4MDAyMjU4OTI4NjY0MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 484c41d2c7d6d38c53ddfab16b34cad2f746347a2705b764821d010aadd9b695 |
| hovercard-subject-tag | issue:2160965065 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/601/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bab40f78fe3ed1af4ba6cdd82552be2243985ab8933e70051bb910ad41355707/actions/setup-java/issues/601 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bab40f78fe3ed1af4ba6cdd82552be2243985ab8933e70051bb910ad41355707/actions/setup-java/issues/601 |
| og:image:alt | Description: When switching from setup-java v3 to v4 the post run part is significantly slower. Task version: v4 Platform: Ubuntu macOS Windows Runner type: Hosted Self-hosted Repro steps: Slow: jo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | htpaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 10ffaff7e212112a3b4eeb224665f909dff951514db9af4f00de33b681024427 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-java git https://github.com/actions/setup-java.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 196057608 |
| octolytics-dimension-repository_nwo | actions/setup-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 196057608 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e470e2fc66e1ac7f528caec0fd8825047788d563 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width