feat(sync): upstream the jobs scheduler and metaschema store modules from constructive-db - #123
Merged
Merged
Conversation
…es from constructive-db - jobs/database-jobs: concurrency-safe run_scheduled_job (row lock, in-flight key dedupe, unschedule on deleted schedule) - metaschema-modules: internal_config_module replaces config_secrets_user_module, new cluster_module, refreshed store module comments
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Downstream sync of the three pgpm modules whose
deploy/trees had diverged from their source of truth inconstructive-io/constructive-db(pgpm-modules/*). Nothing here is hand-written: trees were copied from upstream and repackaged withpgpm package; only themetaschema-modulestest expectations (repo-owned) were edited to match.jobs/database-jobs—app_jobs.run_scheduled_jobis now concurrency-safe. Two concurrent runners ticking the same schedule could both enqueue. Upstream serializes on the schedule row and treats an in-flight job carrying the same key as already covering the tick:(previously a plain
… INTO last_idlookup with no lock and no key conflict handling)metaschema-modules— the store-module quadrants settle.config_secrets_user_moduleis dropped and replaced byinternal_config_module(the namespace-free, Postgres-resident plaintext quadrant, never projected into Kubernetes), andcluster_moduleis added. Theinfra_config_module/infra_secrets_module/internal_secrets_moduletables change only in their reference comments.Test churn in
packages/metaschema-modules/__tests__/modules.test.ts: the expected-module list swapsconfig_secrets_user_moduleforinternal_config_module+cluster_module, and the FK-relationship snapshot is regenerated.Package suites pass locally:
jobs4/4,database-jobs7/7,metaschema-modules8/8.Link to Devin session: https://app.devin.ai/sessions/f824ef1a6c9c40ada3d1c15cd1b6334d
Requested by: @pyramation