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

test(mssql): flaky test around dataframe interchange protocol #9654

Closed
cpcloud opened this issue Jul 22, 2024 · 2 comments · Fixed by #9658
Closed

test(mssql): flaky test around dataframe interchange protocol #9654

cpcloud opened this issue Jul 22, 2024 · 2 comments · Fixed by #9658
Labels
mssql The Microsoft SQL Server backend
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Jul 22, 2024

This CI run fails every once in a while in the same way. Not sure what's happening but it would be nice if we could track down the flakiness at some point.

@cpcloud cpcloud added the mssql The Microsoft SQL Server backend label Jul 22, 2024
@cpcloud
Copy link
Member Author

cpcloud commented Jul 22, 2024

@cpcloud
Copy link
Member Author

cpcloud commented Jul 22, 2024

I suspect a "simple" workaround would be to avoid running mssql tests in parallel in CI.

gforsyth pushed a commit that referenced this issue Jul 22, 2024
… performed (#9658)

This PR attempts to address flaky behavior of MS SQL observed in CI.

It seems like calling `commit()`/`rollback()` with a `SELECT` statement,
AKA autocommit behavior
can cause this issue.

The origin is not 100% clear to me, but there are a number of places
where the
same problem (function sequence error) with the same solution show up
(disabling autocommit or not calling commit with a `SELECT` statement):

-
https://stackoverflow.com/questions/25769043/function-sequence-error-in-pyodbc
- ansible-collections/community.general#1137
-
https://www.reddit.com/r/learnpython/comments/x8568m/function_sequence_error_in_sqlalchemy/
- explorerhq/sql-explorer#423


Here I avoid calling `cur.commit()` unless a DDL statement is being
executed.

The remaining case is `raw_sql()`, which I opted to avoid calling
`commit` in
since that would have this problem when calling it with a `SELECT`
statement.

Users of `raw_sql` are therefore responsible for handling
commit/rollback when
invoking it for DDL statements.

Closes #9654.
@github-project-automation github-project-automation bot moved this from backlog to done in Ibis planning and roadmap Jul 22, 2024
@cpcloud cpcloud added this to the 9.3 milestone Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mssql The Microsoft SQL Server backend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant