Skip to content

fix: setting konnect flag before concurrent handling#459

Merged
shivaygupta-dotcom merged 1 commit intomainfrom
fix/gql-rl-cost-deco-konnect
Apr 22, 2026
Merged

fix: setting konnect flag before concurrent handling#459
shivaygupta-dotcom merged 1 commit intomainfrom
fix/gql-rl-cost-deco-konnect

Conversation

@shivaygupta-dotcom
Copy link
Copy Markdown
Contributor

@shivaygupta-dotcom shivaygupta-dotcom commented Apr 22, 2026

Note: This PR is successor of attached PR: #428

Summary

https://github.com/Kong/deck/actions/runs/24771118558/job/72477519286

This PR fixes a data race which we got on above run of apply test from decK.

The SetKonnectFlag flag was previously being accessed and modified across goroutines, which made it unsafe. To address this, SetKonnectFlag is now executed once upfront, before any goroutines are spawned.

Additionally, graphqlRateLimitingCostDecorationCRUD.Delete has been updated to rely on a precomputed isKonnect field instead of calling IsKonnectMode() at runtime. This brings it in line with how other CRUD implementations already handle the same logic, and avoids repeated access to shared state.

Full changelog

  • [Implement ...]
  • [Fix ...]

Issues resolved

Fix #XXX

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.40%. Comparing base (99ca2f8) to head (aad4318).

Files with missing lines Patch % Lines
pkg/diff/diff.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   28.40%   28.40%   -0.01%     
==========================================
  Files         123      123              
  Lines       20722    20726       +4     
==========================================
  Hits         5887     5887              
- Misses      14204    14208       +4     
  Partials      631      631              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shivaygupta-dotcom shivaygupta-dotcom marked this pull request as ready for review April 22, 2026 10:08
@shivaygupta-dotcom shivaygupta-dotcom merged commit 9ce5bc7 into main Apr 22, 2026
18 checks passed
@shivaygupta-dotcom shivaygupta-dotcom deleted the fix/gql-rl-cost-deco-konnect branch April 22, 2026 10:47
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.

3 participants