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

Can't parse PSQL respose when updating autovacuum settings in alembic migration #320

Closed
luisgc93 opened this issue Oct 24, 2023 · 1 comment · Fixed by #321
Closed

Can't parse PSQL respose when updating autovacuum settings in alembic migration #320

luisgc93 opened this issue Oct 24, 2023 · 1 comment · Fixed by #321
Labels

Comments

@luisgc93
Copy link

luisgc93 commented Oct 24, 2023

First of all, thanks for building this great tool, really appreciate it.

I have an alembic migration that does not seem to be supported by squawk. My team decided to create a migration for these autovacuum setting changes in order to keep track of them in version control:

Upgrade:

ALTER TABLE table_name SET (autovacuum_vacuum_scale_factor = 0.0);
ALTER TABLE table_name SET (autovacuum_vacuum_threshold = 100000);

Downgrade:

ALTER TABLE table_name SET (autovacuum_vacuum_scale_factor = 0.2);
ALTER TABLE table_name SET (autovacuum_vacuum_threshold = 50);

When I run the command alembic upgrade head --sql | squawk I get the following error:

note: Squawk schema failed to parse Postgres response. This indicates a bug with Squawk. 
Please report this error to https://github.com/sbdchd/squawk. Schema error: unknown variant
`List`, expected one of `TypeCast`, `FuncCall`, `Constraint`, `ColumnDef`, `A_Const`,
`ReplicaIdentityStmt`, `SQLValueFunction`, `PartitionCmd` at line 1 column 509925
 
help: Modify your Postgres statement to use valid syntax.

find detailed examples and solutions for each rule at https://squawkhq.com/docs/rules

If I remove just that particular migration, the command works as expected.

@sbdchd sbdchd added the bug label Oct 24, 2023
chdsbd added a commit that referenced this issue Oct 24, 2023
@kodiakhq kodiakhq bot closed this as completed in #321 Oct 25, 2023
kodiakhq bot pushed a commit that referenced this issue Oct 25, 2023
@chdsbd
Copy link
Collaborator

chdsbd commented Oct 25, 2023

@luisgc93 Thanks for the report! squawk-cli@0.24.1 has been released with a fix.

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 a pull request may close this issue.

3 participants