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

[CT-2533] [Feature] Support sqlparse 0.4.4 #7515

Closed
3 tasks done
lukehsiao opened this issue May 5, 2023 · 11 comments · Fixed by #7993
Closed
3 tasks done

[CT-2533] [Feature] Support sqlparse 0.4.4 #7515

lukehsiao opened this issue May 5, 2023 · 11 comments · Fixed by #7993
Assignees
Labels
dependency_conflicts Python dependencies that are too narrow or in conflict enhancement New feature or request help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors
Milestone

Comments

@lukehsiao
Copy link

lukehsiao commented May 5, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

sqlparse <0.4.4 contains a moderate security vulnerability: GHSA-rrm6-wvj7-cwh2

dbt-core has started to pin to <0.4.4 in #7394 which makes it difficult for packages using dbt to update to the fixed version.

Would it be possible for dbt to support v0.4.4?

Describe alternatives you've considered

The answer might just be "no". In which case we will have to wait until a new version of sqlparse addresses the issue. It does not seem like there is anything upstream sqlparse tracking work to resolve #7396. So, if the answer is no, then I would hope the appropriate effort upstream can be made so we have a path forward eventually.

Who will this benefit?

All users of dbt-core who want to update to a non-vulnerable sqlparse version.

Are you interested in contributing this feature?

No response

Anything else?

No response

@lukehsiao lukehsiao added enhancement New feature or request triage labels May 5, 2023
@github-actions github-actions bot changed the title [Feature] Support sqlparse 0.4.4 [CT-2533] [Feature] Support sqlparse 0.4.4 May 5, 2023
@dimoschi
Copy link

dimoschi commented May 5, 2023

+1 even a moderate security vulnerability can be a problem for some organizations.

@dbeatty10
Copy link
Contributor

Thanks for reaching out @lukehsiao and @dimoschi 🙏

We might need to wait until a new version of sqlparse addresses the issue. The best next step would be for someone to open a relevant issue upstream with sqlparse so that it has the opportunity to be fixed.

I can take it as an action item to open an issue with sqlparse and provide them with a reproduction case that mimics the failure of the test_singular_tests_ephemeral test in our CI here.

Background for those just tuning in

We introduced a pin of sqlparse<0.4.4 because our functional testing suite was failing for sqlparse==0.4.4, and you can read more here:
#7396 (comment)

Side note: The CI tests actually worked for macOS Windows and it was only failing for Linux (Ubuntu).

@dbeatty10 dbeatty10 self-assigned this May 5, 2023
@dimoschi
Copy link

dimoschi commented May 5, 2023

Gonna try reproduce the issue and look if I can open a PR at sqlparse. Thanks for providing context @dbeatty10

@jtcohen6 jtcohen6 added help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors dependencies Changes to the version of dbt dependencies Team:Language and removed triage labels May 7, 2023
@jtcohen6
Copy link
Contributor

jtcohen6 commented May 7, 2023

Another user just reported (#7521) seeing the same issue with sqlparse==0.4.4 on Debian GNU/Linux 11 (bullseye)

@dbeatty10 dbeatty10 added dependency_conflicts Python dependencies that are too narrow or in conflict and removed dependencies Changes to the version of dbt dependencies labels May 10, 2023
@dbeatty10
Copy link
Contributor

@MauroLuzzatto provided some very useful information here, namely:

I have also seen the error disappearing after retriggering the GHA run.

So maybe there's some kind of state that is available to subsequent executions that isn't available to the first one in a fresh environment?

This is the context reported by @MauroLuzzatto:

So far, I have only seen the errors on

  • python:3.8-slim-bullseye
  • Ubuntu: 22.04.2 LTS

And not in any local development environment:

  • macOS Ventura Version 13.3.1

However, that might also be connected to the fact that the dbt and other modules are installed there (CI and deployment) on every run.

@emmyoop
Copy link
Member

emmyoop commented Jun 5, 2023

We should replace sqlparse with a manual solution.

@dbeatty10
Copy link
Contributor

💡 @emmyoop do we have an issue in GitHub to replace sqlparse with a manual solution? Or would that issue need to be created?

@emmyoop
Copy link
Member

emmyoop commented Jun 5, 2023

Closing in favor of #7791

@emmyoop emmyoop closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2023
@jtcohen6
Copy link
Contributor

Reopening per #7791 (comment)

@jtcohen6 jtcohen6 reopened this Jun 27, 2023
@jtcohen6 jtcohen6 assigned gshank and unassigned dbeatty10 Jun 27, 2023
@jtcohen6 jtcohen6 added this to the v1.5.x milestone Jun 27, 2023
@bdashrad
Copy link

Looks like #7919 has pivoted back to use sqlparse 0.4.4 as well

@gshank
Copy link
Contributor

gshank commented Jul 27, 2023

New fix in #8215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency_conflicts Python dependencies that are too narrow or in conflict enhancement New feature or request help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants