-
Notifications
You must be signed in to change notification settings - Fork 584
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
feat: postgres triggers #4860
feat: postgres triggers #4860
Conversation
…triggers page and backend function
…op for database_trigger
All contributors have signed the CLA ✍️ ✅ |
Deploying windmill with Cloudflare Pages
|
e36281c
to
f85cf46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on a8639b7 in 1 minute and 56 seconds
More details
- Looked at
764
lines of code in20
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. backend/.sqlx/query-01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a.json:3
- Draft comment:
Consider revising the 'RETURNING true' clause. Typically, 'RETURNING' is used to return specific columns or values from the updated rows. If not needed, it might be better to remove it. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The RETURNING clause appears to be intentional as the query's type signature expects a boolean return value (see type_info: "Bool"). This suggests the true return value is being used by the application code. The comment is questioning something that appears to be working as designed.
I might be missing some SQL best practices about RETURNING clauses. Maybe there's a more idiomatic way to return a success indicator.
Even if there are alternative approaches, the current implementation is valid and matches the expected return type. The comment doesn't provide concrete improvement suggestions.
Delete the comment. The RETURNING clause appears intentional and matches the query's type signature. The comment questions working code without providing clear improvements.
2. backend/.sqlx/query-833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257.json:3
- Draft comment:
Consider revising the 'RETURNING 1' clause. Typically, 'RETURNING' is used to return specific columns or values from the updated rows. If not needed, it might be better to remove it. - Reason this comment was not posted:
Marked as duplicate.
3. backend/.sqlx/query-fd1db7530acf3c84b2ab696504905a50d1ed4f69629c43de7d874769c340d909.json:3
- Draft comment:
Consider revising the 'RETURNING 1' clause. Typically, 'RETURNING' is used to return specific columns or values from the updated rows. If not needed, it might be better to remove it. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_t8de5LvhFYPd2umG
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 2b58ca8 in 58 seconds
More details
- Looked at
22
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/triggers/TriggersEditor.svelte:15
- Draft comment:
The import statement was updated toPostgresTriggersPanel
, which matches its usage in the code. Ensure thatDatabaseTriggersPanel
is not used elsewhere in the codebase if it was removed. - Reason this comment was not posted:
Confidence changes required:50%
The import statement forPostgresTriggersPanel
was updated, but the previous importDatabaseTriggersPanel
is not used anywhere else in the file. This suggests that the import statement was corrected to match the actual usage in the code.
Workflow ID: wflow_OGhVDf4oLTkYoxWa
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 8fa23b1 in 1 minute and 6 seconds
More details
- Looked at
30
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/script_helpers.ts:634
- Draft comment:
The 'database' field was removed from the preprocessor function's argument, but this change is not reflected in the BUN_PREPROCESSOR_MODULE_CODE. Ensure consistency across all preprocessor definitions. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_r0VwqyWNxx6qy2Mp
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 29eb196 in 2 minutes and 1 seconds
More details
- Looked at
633
lines of code in20
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/WorkerGroup.svelte:880
- Draft comment:
Consider using an object instead of a Map forenv_vars_static
andenv_vars_allowlist
to ensure consistency and avoid potential issues with JSON serialization.
nconfig.env_vars_static = {}
nconfig.env_vars_allowlist = []
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
- The code is already treating env_vars_static like an object with object notation. 2. The Map vs object choice doesn't seem to cause any actual issues. 3. This appears to be a speculative suggestion without clear evidence of problems. 4. The code is working as is and the change would be purely preferential.
The comment could be right that objects are more idiomatic in JavaScript/TypeScript than Maps for simple key-value storage. Maybe there are JSON serialization issues I'm not seeing.
While objects may be more idiomatic, there's no evidence of actual problems with the current implementation. The code works fine with Maps and any serialization is handled appropriately.
Delete the comment as it's a speculative suggestion without clear evidence of issues. The current implementation with Maps is working fine.
Workflow ID: wflow_Wo4ot33aADJHWY9c
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 68b1ddd in 1 minute and 9 seconds
More details
- Looked at
55
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_1F6BBh7QsIvcDZGd
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on fef622c in 1 minute and 9 seconds
More details
- Looked at
66
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-api/src/variables.rs:677
- Draft comment:
Theencrypt
anddecrypt
functions are removed but still used in other files. Ensure these functions are defined or imported correctly to avoid compilation errors. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_MJWLaC7O07Uhtizl
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 4bd4349 in 59 seconds
More details
- Looked at
14
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-api/src/postgres_triggers/trigger.rs:278
- Draft comment:
The error message is logged twice, once with the path and once without. Consider logging the error message consistently with the path for clarity. - Reason this comment was not posted:
Confidence changes required:50%
The error message logging in thelisten_to_transactions
function is inconsistent. The error message is logged twice, once with the path and once without. This can be improved for consistency and clarity.
Workflow ID: wflow_1rvDyARkMszkPiml
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on f8b7117 in 1 minute and 7 seconds
More details
- Looked at
786
lines of code in21
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_0KjL9r9JGBudqsa6
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 3248fd0 in 1 minute and 1 seconds
More details
- Looked at
10
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/.vscode/settings.json:15
- Draft comment:
Consider adding back the line"rust-analyzer.cargo.features": ["postgres_trigger"]
if it's still relevant to the project. If not, ensure that its removal is intentional and documented. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_3NLDLyuNvqNye0ql
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
PostgreSQL database trigger implementation that captures transaction events (INSERT, UPDATE, DELETE). Currently, the implementation identifies the type of transaction.
Currently working on decoding the trigger message to extract detailed information about the underlying data that caused the trigger to fire.
Important
Add PostgreSQL triggers to capture database events and trigger scripts, with backend logic and frontend UI for management.
postgres_triggers
module.handler.rs
andtrigger.rs
.converter.rs
andrelation.rs
for data conversion and relation handling.PostgresTriggersPanel.svelte
and related components for UI management of PostgreSQL triggers.+page.svelte
files to include PostgreSQL triggers management.DetailPageLayout.svelte
to support PostgreSQL triggers in flow and script views.openapi.yaml
to include new API endpoints for PostgreSQL triggers.Cargo.toml
andCargo.lock
to include new dependencies for PostgreSQL handling.This description was created by for 3248fd0. It will automatically update as commits are pushed.