Skip to content
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

Rust: Add Postgres crate Models #18536

Merged
merged 4 commits into from
Jan 21, 2025
Merged

Rust: Add Postgres crate Models #18536

merged 4 commits into from
Jan 21, 2025

Conversation

GeekMasher
Copy link
Member

This PR is to add support for Postgres SQL Injection sinks

Requires this PR merging first:

Pull Request checklist

All query authors

Internal query authors only

  • Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • Adding a new query? Consider also adding the query to autofix.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 20, 2025
geoffw0
geoffw0 previously approved these changes Jan 20, 2025
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

LGTM, great to have models for this SQL implementation.

@geoffw0
Copy link
Contributor

geoffw0 commented Jan 20, 2025

The test failures:

+| main.rs:11:25:11:37 | //... | Missing result: sql-sink |
...

I think these will go away if you merge main into the branch, now that the dependency #18535 is in main.

-| file://:0:0:0:0 | [summary param] 0 in lang:alloc::::crate::fmt::format | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::::crate::fmt::format | MaD:14 |
...
+| file://:0:0:0:0 | [summary param] 0 in lang:alloc::::crate::fmt::format | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::::crate::fmt::format | MaD:24 |
...

We're aware of this issue, it's a problem with the amount of data we're including in test outputs. I think @hvitved has an idea how to solve it.

@GeekMasher GeekMasher marked this pull request as ready for review January 20, 2025 16:10
@GeekMasher
Copy link
Member Author

@geoffw0 it doesn't seem to have worked. The postgres tests are passing now but the file://:0:0:0:0 tests aren't. Anything I can do from my end?

@geoffw0
Copy link
Contributor

geoffw0 commented Jan 20, 2025

Anything I can do from my end?

You can work around it by accepting the results from CI into your .expected file. That should allow us to merge this pull request.

@GeekMasher
Copy link
Member Author

@geoffw0 Seems that worked! Let me know if you need any other changes before merging

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Nope, all LGTM.

@geoffw0 geoffw0 merged commit ab9ab0e into github:main Jan 21, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants