Skip to content

Remove unnecessary param from Start function #934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2025

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jun 24, 2025

latestSchema is no longer needed in the Start function of operations.

Requires #931

@github-actions github-actions bot temporarily deployed to Docs Preview June 24, 2025 14:59 Inactive
@kvch kvch force-pushed the remove-unnecessary-param-from-start branch from 25d156b to 7438e01 Compare June 25, 2025 14:16
@github-actions github-actions bot temporarily deployed to Docs Preview June 25, 2025 14:16 Inactive
@kvch kvch force-pushed the remove-unnecessary-param-from-start branch from 7438e01 to 6999169 Compare June 27, 2025 09:43
@github-actions github-actions bot temporarily deployed to Docs Preview June 27, 2025 09:43 Inactive
@kvch kvch marked this pull request as ready for review June 27, 2025 09:45
Copy link
Collaborator

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

Looks good 👍

It's possible to set a PR's base branch to a non-main branch. By setting the base branch to #931 for this PR, the diff and commit list would show only the parameter removal, without also including the changes from #931.

kvch added a commit that referenced this pull request Jul 1, 2025
This PR introduces consolidates backfilling of the same column into a
single trigger. I am merging all triggers for a table into a single
trigger in a follow-up PR.

I added a new data structure `OperationTrigger` that contains the
trigger configuration of an operation. Trigger consolidation happens
when a backfill task is added to the job. `triggerConfig` stayed the
consolidated configuration storage for the trigger template.

In a later PR I am removing `latestSchema` from the parameter list of
`Start`, as it is no longer necessary. We can pass it from `Roll` to the
`backfill.Job`: #934
@kvch kvch force-pushed the remove-unnecessary-param-from-start branch from 6999169 to 268a81a Compare July 1, 2025 15:51
@github-actions github-actions bot temporarily deployed to Docs Preview July 1, 2025 15:52 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview July 1, 2025 15:53 Inactive
Copy link

github-actions bot commented Jul 1, 2025

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgroll/pkg/migrations 76.11% (ø)
github.com/xataio/pgroll/pkg/roll 79.52% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgroll/pkg/migrations/migrations.go 94.12% (ø) 17 16 1
github.com/xataio/pgroll/pkg/migrations/op_add_column.go 86.54% (ø) 104 90 14
github.com/xataio/pgroll/pkg/migrations/op_alter_column.go 90.09% (ø) 111 100 11
github.com/xataio/pgroll/pkg/migrations/op_change_type.go 92.86% (ø) 14 13 1
github.com/xataio/pgroll/pkg/migrations/op_create_constraint.go 83.81% (ø) 105 88 17
github.com/xataio/pgroll/pkg/migrations/op_create_index.go 67.50% (ø) 40 27 13
github.com/xataio/pgroll/pkg/migrations/op_create_table.go 83.97% (ø) 131 110 21
github.com/xataio/pgroll/pkg/migrations/op_drop_column.go 83.33% (ø) 24 20 4
github.com/xataio/pgroll/pkg/migrations/op_drop_constraint.go 90.48% (ø) 42 38 4
github.com/xataio/pgroll/pkg/migrations/op_drop_index.go 90.91% (ø) 11 10 1
github.com/xataio/pgroll/pkg/migrations/op_drop_multicolumn_constraint.go 93.10% (ø) 58 54 4
github.com/xataio/pgroll/pkg/migrations/op_drop_not_null.go 93.33% (ø) 15 14 1
github.com/xataio/pgroll/pkg/migrations/op_drop_table.go 90.00% (ø) 20 18 2
github.com/xataio/pgroll/pkg/migrations/op_raw_sql.go 88.89% (ø) 18 16 2
github.com/xataio/pgroll/pkg/migrations/op_rename_column.go 93.33% (ø) 30 28 2
github.com/xataio/pgroll/pkg/migrations/op_rename_constraint.go 100.00% (ø) 16 16 0
github.com/xataio/pgroll/pkg/migrations/op_rename_table.go 100.00% (ø) 15 15 0
github.com/xataio/pgroll/pkg/migrations/op_set_check.go 86.96% (ø) 23 20 3
github.com/xataio/pgroll/pkg/migrations/op_set_comment.go 90.00% (ø) 10 9 1
github.com/xataio/pgroll/pkg/migrations/op_set_default.go 85.71% (ø) 21 18 3
github.com/xataio/pgroll/pkg/migrations/op_set_fk.go 75.00% (ø) 32 24 8
github.com/xataio/pgroll/pkg/migrations/op_set_notnull.go 86.36% (ø) 22 19 3
github.com/xataio/pgroll/pkg/migrations/op_set_replica_identity.go 100.00% (ø) 17 17 0
github.com/xataio/pgroll/pkg/migrations/op_set_unique.go 77.27% (ø) 22 17 5
github.com/xataio/pgroll/pkg/roll/execute.go 78.36% (ø) 171 134 37

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@kvch kvch merged commit 6dfeb32 into main Jul 1, 2025
30 checks passed
@kvch kvch deleted the remove-unnecessary-param-from-start branch July 1, 2025 15:55
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