Skip to content

fix: prevent missing limits from overwriting existing limits - #4549

Merged
igor-kupczynski merged 1 commit into
mainfrom
prevent-missing-limit-overwrites
Jul 28, 2026
Merged

fix: prevent missing limits from overwriting existing limits#4549
igor-kupczynski merged 1 commit into
mainfrom
prevent-missing-limit-overwrites

Conversation

@igor-kupczynski

@igor-kupczynski igor-kupczynski commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

When one tenant resource-limit row is missing, recovery reuses overwrite-capable upsert semantics and can alter unrelated existing or custom limits.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Test changes (add, refactor, improve or change a test)

What's Changed

  • Add a dedicated insert-only conflict path for missing defaults.
  • Add focused Postgres regression tests and generated sqlc output.

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog

Testing

  • go test -count=1 -timeout 10m -v -run 'TestCanCreate_MissingIncomingWebhook_' ./pkg/repository/

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.

  • Details: Cursor (GPT-5.6 Sol) assisted with implementation, tests, and PR preparation; the changes were reviewed and verified with the commands above.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Jul 28, 2026 1:25pm

Request Review

@github-actions github-actions Bot added the engine Related to the core Hatchet engine label Jul 28, 2026
@igor-kupczynski
igor-kupczynski marked this pull request as ready for review July 28, 2026 13:28
@igor-kupczynski igor-kupczynski changed the title Prevent missing limits from overwriting existing limits fix: prevent missing limits from overwriting existing limits Jul 28, 2026
@igor-kupczynski
igor-kupczynski requested a review from grutt July 28, 2026 13:31
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=false). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@igor-kupczynski
igor-kupczynski merged commit 4f65734 into main Jul 28, 2026
60 of 63 checks passed
@igor-kupczynski
igor-kupczynski deleted the prevent-missing-limit-overwrites branch July 28, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Related to the core Hatchet engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants