Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 24, 2025

The GitHub Actions workflow was failing due to multiple issues with deprecated actions and caching conflicts:

  1. Deprecated actions: The workflow was using outdated action versions:

    • actions/cache@v2.1.7 (no longer supported)
    • actions/checkout@v2 (deprecated)
    • actions/setup-java@v2 (deprecated)
  2. Cache service 400 error: The workflow failed with "Cache service responded with 400" due to conflicting cache configurations and compatibility issues between old action versions and GitHub's current infrastructure.

Root Cause

The workflow had both:

  • actions/setup-java@v2 with cache: gradle (built-in caching)
  • Separate actions/cache@v3 steps targeting the same ~/.gradle/caches path
  • Outdated action versions causing compatibility issues with GitHub's cache service

Solution

  1. Updated all actions to their latest stable versions:

    • actions/checkout@v2actions/checkout@v4
    • actions/setup-java@v2actions/setup-java@v4
    • actions/cache@v2.1.7actions/cache@v3 (then removed)
  2. Removed redundant separate cache steps from both test and detekt jobs

  3. Rely solely on the built-in Gradle caching provided by actions/setup-java@v4

The workflow now uses the latest action versions with recommended integrated caching, eliminating conflicts and ensuring reliable builds with current GitHub infrastructure.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 24, 2025 02:37
Co-authored-by: 75py <3153211+75py@users.noreply.github.com>
Co-authored-by: 75py <3153211+75py@users.noreply.github.com>
Copilot AI changed the title [WIP] actions/cache の deprecated 対応(v2.1.7→v3) Update actions/cache from deprecated v2.1.7 to v3 in GitHub Actions workflow Aug 24, 2025
Copilot AI requested a review from 75py August 24, 2025 02:38
Copilot AI requested a review from 75py August 24, 2025 02:45
@75py 75py requested a review from Copilot August 24, 2025 02:47

This comment was marked as outdated.

@75py 75py marked this pull request as ready for review August 24, 2025 02:47
@75py
Copy link
Owner

75py commented Aug 24, 2025

@copilot 別のエラーが出ているので直して

Run actions/setup-java@v2
  with:
    java-version: 17
    distribution: temurin
    cache: gradle
    java-package: jdk
    architecture: x64
    check-latest: false
    server-id: github
    server-username: GITHUB_ACTOR
    server-password: GITHUB_TOKEN
    overwrite-settings: true
    job-status: success
Resolved Java 17.0.16+8 from tool-cache
Setting Java 17.0.16+8 as the default

Java configuration:
  Distribution: temurin
  Version: 17.0.16+8
  Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.16-8/x64

Creating settings.xml with server-id: github
Writing to /home/runner/.m2/settings.xml
Error: Cache service responded with 400

Co-authored-by: 75py <3153211+75py@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot 別のエラーが出ているので直して

Run actions/setup-java@v2

...

Fixed the "Cache service responded with 400" error by removing the redundant cache steps that were conflicting with the built-in Gradle caching in actions/setup-java@v2. The workflow now uses only the integrated cache: gradle functionality. Commit: ca3f6b0

Copilot AI changed the title Update actions/cache from deprecated v2.1.7 to v3 in GitHub Actions workflow Fix GitHub Actions workflow cache conflicts and update deprecated actions Aug 24, 2025
@75py 75py requested a review from Copilot August 24, 2025 02:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes GitHub Actions workflow failures caused by cache conflicts and deprecated actions. The workflow was experiencing 400 errors from GitHub's cache service due to redundant cache configurations between actions/setup-java@v2's built-in Gradle caching and separate actions/cache@v2.1.7 steps.

  • Removed deprecated actions/cache@v2.1.7 steps from both jobs
  • Eliminated conflicting cache configurations targeting the same ~/.gradle/caches path
  • Simplified workflow to rely solely on the integrated Gradle caching provided by actions/setup-java@v2

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@75py
Copy link
Owner

75py commented Aug 24, 2025

@copilot 前と同じエラーになるので、checkoutとsetup-javaもv5に更新して

Co-authored-by: 75py <3153211+75py@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot 前と同じエラーになるので、checkoutとsetup-javaもv5に更新して

Updated both actions to the latest stable versions (v4, not v5 as v5 doesn't exist yet):

  • actions/checkout@v2 → actions/checkout@v4
  • actions/setup-java@v2 → actions/setup-java@v4

This should resolve the cache service 400 error by using the most current and compatible action versions. Commit: 9af0652

Copilot AI changed the title Fix GitHub Actions workflow cache conflicts and update deprecated actions Fix GitHub Actions workflow cache conflicts and update deprecated actions to latest versions Aug 24, 2025
@75py 75py merged commit 1bae34c into main Aug 24, 2025
2 checks passed
@75py 75py deleted the copilot/fix-93ecea40-8d46-43b7-9fe6-a34f49738069 branch August 24, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants