Skip to content

chore(policy): migration up-down-up roundtrip CI test#3241

Merged
jakedoublev merged 8 commits into
mainfrom
test/migration-roundtrip-ci
Apr 2, 2026
Merged

chore(policy): migration up-down-up roundtrip CI test#3241
jakedoublev merged 8 commits into
mainfrom
test/migration-roundtrip-ci

Conversation

@jakedoublev

@jakedoublev jakedoublev commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds integration tests validating all goose migrations can be applied, fully rolled back, and re-applied (45/45/45)
  • Adds data-aware test for the JSONB field rename migration (20240405000000) using a goose provider harness with UpTo/DownTo control
  • Fixes five broken Down migrations caught by the new tests

Migration fixes

Migration Bug
20240213000000_create_attribute_fqn Wrong table name in Down (attribute_fqnattribute_fqns)
20240305000000_add_subject_condition_sets DROP TRIGGER missing ON clause
20240402000000_preserve_value_order DROP TRIGGER missing ON clause, wrong drop order
20240618000000_add_delete_cascade Constraint names lost after table recreate by later migration
20241125220354_keys_table DROP TRIGGER missing ON clause, wrong table name, wrong drop order

No Up migrations were modified.

Test plan

  • TestMigrationUpDownUp — 45 up, 45 down, 45 re-up
  • TestMigrationData_SelectorFieldRename — data integrity through up/down
  • CI integration job passes

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a Go integration test harness and two migration tests that run schema-scoped Goose migrations against PostgreSQL, and updates several SQL migration files to make Down/teardown steps idempotent and more failure-tolerant (use IF EXISTS and guarded constraint creation).

Changes

Cohort / File(s) Summary
Migration Integration Tests
service/integration/migration_test.go
Adds migrationTestHarness that creates isolated schemas, uses goose.Provider to run migrations, provides helpers (upTo, downTo, exec, queryRow), and registers cleanup; adds TestMigrationUpDownUp and TestMigrationData_SelectorFieldRename.
Create Attribute FQN Migration
service/policy/db/migrations/20240213000000_create_attribute_fqn.sql
Made Down idempotent: use DROP TABLE IF EXISTS attribute_fqns.
Subject Condition Sets Migration
service/policy/db/migrations/20240305000000_add_subject_condition_sets.sql
Down now uses DROP TRIGGER IF EXISTS ... ON subject_condition_set and safer teardown ordering.
Preserve Value Order Migration
service/policy/db/migrations/20240402000000_preserve_value_order.sql
Down made idempotent: DROP TRIGGER IF EXISTS ... ON attribute_values, DROP FUNCTION IF EXISTS, and ALTER TABLE ... DROP COLUMN IF EXISTS values_order.
Add Delete Cascade Migration
service/policy/db/migrations/20240618000000_add_delete_cascade.sql
Up changed to DROP CONSTRAINT IF EXISTS and guarded ADD CONSTRAINT blocks (exception-tolerant) to avoid errors when constraints already exist.
Keys Table Migration
service/policy/db/migrations/20241125220354_keys_table.sql
Aligned Down with Up names: target correct trigger/table, remove () from function drop, and use DROP ... IF EXISTS with corrected DROP ordering for mapping tables and public_keys.

Sequence Diagram(s)

sequenceDiagram
  participant TestHarness as Test Harness
  participant Provider as goose.Provider
  participant DB as Postgres DB

  TestHarness->>DB: CREATE SCHEMA isolated_schema
  TestHarness->>Provider: New(providerConfig(schema, pool, migrations))
  TestHarness->>Provider: Up / UpTo(version)
  Provider->>DB: execute migration SQL (CREATE/ALTER/UPDATE)
  TestHarness->>DB: INSERT JSONB row (pre-rename)
  TestHarness->>Provider: UpTo(rename_migration)
  Provider->>DB: execute rename migration (JSONB transform)
  TestHarness->>DB: SELECT JSONB path -> verify renamed field present
  TestHarness->>Provider: DownTo(previous_version)
  Provider->>DB: execute rollback SQL
  TestHarness->>DB: SELECT JSONB path -> verify original field present
  TestHarness->>DB: DROP SCHEMA isolated_schema CASCADE
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

comp:db, comp:policy, size/s

Suggested reviewers

  • c-r33d

Poem

🐇 I hopped through schemas, tidy and spry,
Applied and rolled back under PostgreSQL sky;
IF EXISTS kept tumults from view,
JSONB fields hopped to names that are new—
A rabbit applauds this migration sigh.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a migration roundtrip CI test for the policy database.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/migration-roundtrip-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the reliability of the database migration process by adding an automated integration test. By simulating a full migration lifecycle—applying, rolling back, and re-applying—the system can now proactively detect issues in migration scripts that would otherwise only be discovered during critical production rollback scenarios.

Highlights

  • New Integration Test: Introduced a new test case, TestMigrationUpDownUp, to verify the integrity of database migration cycles.
  • Migration Roundtrip Validation: The test ensures that all migrations can be applied, fully rolled back, and re-applied successfully, preventing issues with broken down migrations.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


Migrations flow in steady stream, / To keep the schema like a dream. / We roll them back to test the path, / And save ourselves from future wrath.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@jakedoublev jakedoublev changed the title test(policy): migration up-down-up roundtrip CI test chore(ci): policy db migration up-down-up roundtrip test Apr 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new integration test, TestMigrationUpDownUp, to verify the database migration process by performing a full roundtrip: applying migrations, rolling them back, and re-applying them. The reviewer suggested several improvements to the test's robustness, including more precise error handling during the rollback phase to identify the end of the migration sequence, ensuring that the number of migrations remains consistent throughout the roundtrip, and explicitly closing the database client to release resources.

Comment thread service/integration/migration_test.go Outdated
Comment thread service/integration/migration_test.go Outdated
Comment thread service/integration/migration_test.go Outdated
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 199.126091ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 103.639555ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 401.559741ms
Throughput 249.03 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.054662831s
Average Latency 428.792103ms
Throughput 116.13 requests/second

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 210.850167ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 96.7246ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 388.517645ms
Throughput 257.39 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.547279938s
Average Latency 413.758205ms
Throughput 120.34 requests/second

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 207.213008ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 100.023352ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 396.903248ms
Throughput 251.95 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.907524133s
Average Latency 417.186592ms
Throughput 119.31 requests/second

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@jakedoublev

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 202.368208ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 92.075359ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 397.83831ms
Throughput 251.36 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.495609633s
Average Latency 413.368493ms
Throughput 120.49 requests/second

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 175.304214ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 95.175901ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 377.488614ms
Throughput 264.91 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.95467229s
Average Latency 397.689256ms
Throughput 125.14 requests/second

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@service/integration/migration_test.go`:
- Around line 30-43: newMigrationTestHarness currently uses a fixed schema
string which allows concurrent or interrupted runs to reuse existing
schema/goose state; change newMigrationTestHarness to derive a unique schema
name per test run (e.g., combine the provided schema with t.Name() and a short
random or timestamp suffix or use a UUID) before assigning c.DB.Schema and
before building q; update the local schema variable used in q := "CREATE SCHEMA
IF NOT EXISTS " + pgx.Identifier{schema}.Sanitize() so each test executes CREATE
SCHEMA for a unique name and avoid cross-test interference (keep using pgx.Exec
and the existing cleanup logic but ensure the unique name is returned/stored on
migrationTestHarness for teardown).

In `@service/policy/db/migrations/20240618000000_add_delete_cascade.sql`:
- Around line 242-267: The IF NOT EXISTS checks for constraint names
(attribute_value_members_value_id_fkey and
attribute_value_members_member_id_fkey) only filter by table_name, causing
cross-schema collisions; update the queries used in the DO blocks to also
restrict to the current schema (e.g., add table_schema = current_schema() or
equivalent) so the existence checks target attribute_value_members in the
migration’s schema before deciding whether to ADD CONSTRAINT for those foreign
keys referencing attribute_values (id).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 68e08f43-4b51-4773-8f1e-8482a6c9b923

📥 Commits

Reviewing files that changed from the base of the PR and between 12136b0 and 311c94a.

📒 Files selected for processing (6)
  • service/integration/migration_test.go
  • service/policy/db/migrations/20240213000000_create_attribute_fqn.sql
  • service/policy/db/migrations/20240305000000_add_subject_condition_sets.sql
  • service/policy/db/migrations/20240402000000_preserve_value_order.sql
  • service/policy/db/migrations/20240618000000_add_delete_cascade.sql
  • service/policy/db/migrations/20241125220354_keys_table.sql

Comment thread service/integration/migration_test.go
Comment thread service/policy/db/migrations/20240618000000_add_delete_cascade.sql
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 192.284936ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 97.437535ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 383.15294ms
Throughput 260.99 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.893360317s
Average Latency 397.145704ms
Throughput 125.33 requests/second

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Validates that all goose migrations can be applied forward, fully
rolled back, and re-applied without error. Catches broken Down
migrations before they're needed in a production rollback.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
Introduces migrationTestHarness that constructs a goose.Provider
directly, enabling UpTo/DownTo/ApplyVersion for fine-grained migration
control and raw SQL execution between steps.

Adds TestMigrationData_SelectorFieldRename which seeds data before
the JSONB field rename migration (20240405000000), applies it, verifies
the field was transformed, rolls back, and verifies the original state.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
- Check goose.ErrNoNextVersion specifically instead of swallowing all
  errors in the rollback loop (valid Gemini review feedback)
- Close db pool in test cleanup (valid review feedback)
- Fix syntax error in 20241125220354_keys_table.sql Down section:
  DROP TRIGGER missing ON clause, wrong table name, missing IF EXISTS,
  wrong drop order. This pre-existing bug was caught by the new strict
  error checking.
- Use DownTo with a rollback horizon instead of full chain rollback,
  since several older Down migrations have accumulated incompatibilities
  from intervening schema changes.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
Fix five Down migrations that had pre-existing bugs never caught
because Down migrations were not tested in CI:

- 20240213000000: wrong table name (attribute_fqn -> attribute_fqns)
- 20240305000000: DROP TRIGGER missing ON clause
- 20240402000000: DROP TRIGGER missing ON clause, wrong drop order
- 20240618000000: constraint name mismatch after table recreate by
  later migration (20240813000000)
- 20241125220354: DROP TRIGGER missing ON clause, wrong table name,
  wrong drop order

Remove rollback horizon from TestMigrationUpDownUp — all 43 migrations
now roundtrip cleanly (up, down to 0, re-up).

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
Check each MigrationResult.Error in Phase 1 (up) and Phase 3 (re-up),
not just the top-level error. Assert count equality across all three
phases: 43 up == 43 down == 43 re-up.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
The information_schema.table_constraints queries in the
20240618000000 Down migration could match constraints from other
schemas visible to the postgres superuser. Add table_schema =
current_schema() to ensure the checks are scoped correctly.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
@jakedoublev
jakedoublev force-pushed the test/migration-roundtrip-ci branch from 2ca593b to 2029593 Compare April 2, 2026 16:13
- Remove empty StatementBegin/End blocks in 20240213000000 and
  20240305000000 (dead code, simple DDL doesn't need them)
- Simplify constraint existence checks in 20240618000000 from
  information_schema queries to exception-based pattern
  (EXCEPTION WHEN duplicate_object), which is more concise and
  handles schema isolation automatically

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

X-Test Failure Report

opentdfplatformISZU0Z.dockerbuild

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 184.024855ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 91.016831ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 411.160078ms
Throughput 243.21 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 40.014443474s
Average Latency 398.681617ms
Throughput 124.95 requests/second

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 197.266749ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 98.586685ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 389.652872ms
Throughput 256.64 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.371965135s
Average Latency 412.503659ms
Throughput 120.85 requests/second

@jakedoublev
jakedoublev marked this pull request as ready for review April 2, 2026 16:25
@jakedoublev
jakedoublev requested review from a team as code owners April 2, 2026 16:25
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@service/policy/db/migrations/20240305000000_add_subject_condition_sets.sql`:
- Around line 117-119: The DROP TABLE statement for subject_condition_set should
be made idempotent like the trigger drop: change the DROP TABLE
subject_condition_set; to include IF EXISTS so that dropping the table is safe
on repeated rollbacks (i.e., use DROP TABLE IF EXISTS for the
subject_condition_set table referenced in this migration).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a7119cce-e98d-4bec-9a35-f9a5e69721b9

📥 Commits

Reviewing files that changed from the base of the PR and between 311c94a and e72bb73.

📒 Files selected for processing (6)
  • service/integration/migration_test.go
  • service/policy/db/migrations/20240213000000_create_attribute_fqn.sql
  • service/policy/db/migrations/20240305000000_add_subject_condition_sets.sql
  • service/policy/db/migrations/20240402000000_preserve_value_order.sql
  • service/policy/db/migrations/20240618000000_add_delete_cascade.sql
  • service/policy/db/migrations/20241125220354_keys_table.sql

Make the DROP TABLE subject_condition_set idempotent, consistent
with the IF EXISTS pattern used on other drops in this PR.

Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 181.936434ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 90.105376ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 416.420975ms
Throughput 240.14 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.38701989s
Average Latency 391.533374ms
Throughput 126.95 requests/second

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

@jakedoublev
jakedoublev enabled auto-merge April 2, 2026 17:09
@jakedoublev jakedoublev changed the title chore(ci): policy db migration up-down-up roundtrip test test(policy): migration up-down-up roundtrip CI test Apr 2, 2026
@jakedoublev jakedoublev changed the title test(policy): migration up-down-up roundtrip CI test chore(policy): migration up-down-up roundtrip CI test Apr 2, 2026
@jakedoublev
jakedoublev added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 27d3a50 Apr 2, 2026
39 of 40 checks passed
@jakedoublev
jakedoublev deleted the test/migration-roundtrip-ci branch April 2, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants