Skip to content

[CI]: Fix issue with cache - #8688

Open
kofoworola wants to merge 1 commit into
masterfrom
fix/cache-key-mismatch
Open

[CI]: Fix issue with cache#8688
kofoworola wants to merge 1 commit into
masterfrom
fix/cache-key-mismatch

Conversation

@kofoworola

Copy link
Copy Markdown
Contributor

This fixes a sneaky bug where the a cache miss for the gateway cache could potentially pull in the dashboard cache, because the restore ke loosely matched the dashbaord key, so this PR changes the key the gateway uses, to limit the restore to the gateway cache only.

Description

Related Issue

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

This fixes a sneaky bug where the a cache miss for the gateway cache
could potentially pull in the dashboard cache, because the restore ke
loosely matched the dashbaord key, so this PR changes the key the
gateway uses, to limit the restore to the gateway cache only.
@kofoworola
kofoworola requested a review from a team as a code owner September 10, 2026 12:16
@sentinelone-cnapp-eu1

Copy link
Copy Markdown

SentinelOne CNS Hardcoded Secret Detector
✅ Congratulations, your code is safe

SentinelOne CNS is a cloud-agnostic, agentless CSPM & CWPP solution that continuously detects and prevents vulnerabilities that have the highest probability of being exploited in Azure, AWS, Google Cloud, and Kubernetes.

@github-actions

Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: dee2e02
Failed at: 2026-09-10 12:16:56 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: neither branch name 'fix/cache-key-mismatch' nor PR title '[CI]: Fix issue with cache' contains a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

@github-actions

Copy link
Copy Markdown
Contributor

zizmor findings

Severity Count
High 27
Medium 68
Low 8
Info 24

Full details are in the workflow run.

@probelabs

probelabs Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a cache collision issue in the CI release workflow. The Go module cache key was too generic, causing potential conflicts where the gateway build could incorrectly restore the cache from a dashboard build. The fix introduces a more specific cache key by adding a -gw- infix, ensuring that each build uses only its intended cache and preventing unpredictable build behavior.

Files Changed Analysis

  • .github/workflows/release.yml: Modified the key and restore-keys for the Go module cache step to be more specific (${{ runner.os }}-go-gw-). This is the only file changed.

Architecture & Impact Assessment

  • Accomplishment: Prevents a CI cache key collision between different build jobs (gateway vs. dashboard), improving the reliability and correctness of the build process.
  • Key Technical Changes: The key and restore-keys in the actions/cache step of the release.yml workflow were updated from ${{ runner.os }}-go- to ${{ runner.os }}-go-gw-.
  • Affected Components: This change is confined to the CI/CD pipeline and does not affect any production code. It specifically impacts the caching mechanism of the release GitHub Actions workflow.

Scope Discovery & Context Expansion

  • The change corrects a logical flaw in the CI caching strategy. The previous key ${{ runner.os }}-go- was too broad, leading to a collision with a similar key likely used in a separate workflow for the Tyk Dashboard. By specifying -gw-, this key is now scoped exclusively to the gateway build, resolving the conflict.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: chore

Powered by Visor from Probelabs

Last updated: 2026-09-10T12:17:29.205Z | Triggered by: pr_opened | Commit: dee2e02

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs

probelabs Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✅ Security Check Passed

No security issues found – changes LGTM.

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Security Check Passed

No security issues found – changes LGTM.

\n\n

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

\n\n

✅ Performance Check Passed

No performance issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2026-09-10T12:17:27.848Z | Triggered by: pr_opened | Commit: dee2e02

💡 TIP: You can chat with Visor using /visor ask <your question>

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@kofoworola
kofoworola enabled auto-merge (squash) September 10, 2026 13:07
@kofoworola
kofoworola disabled auto-merge September 10, 2026 13:12
@olamilekan000
olamilekan000 enabled auto-merge (squash) September 10, 2026 13:18
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