Skip to content

Handle false return by TinyTDS if connection fails and fixed CI #818

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

Merged
merged 1 commit into from
May 15, 2020

Conversation

aidanharan
Copy link
Contributor

@aidanharan aidanharan commented May 13, 2020

Ruby 25 (https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32855936/job/6lxy5y73pv8d4h6y) and 26 (https://ci.appveyor.com/project/rails-sqlserver/activerecord-sqlserver-adapter/builds/32856253/job/aymtvlvjfb3c9qon) both fail with File does not exist: tiny_tds/tiny_tds error. Allow these CIs to fail. They can be added as issues to be fixed later.

Allowing Ruby 27 and 27-x64 to fail as they are not installed on the AppVeyor Windows instance. See https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32868782/job/vx7gopv5benhf8in

TinyTDS returns false instead of results if the database fails. Updated adapter to throw a TinyTds::Error if false returned by TinyTDS. This has resolved the NoMethodError: undefined method do for false:FalseClass CI errors on Windows (example of this error https://ci.appveyor.com/project/rails-sqlserver/activerecord-sqlserver-adapter/builds/32850932/job/gop6taxai5sblxgd). This issue is open in the TinyTDS project as rails-sqlserver/tiny_tds#464

https://github.com/rails-sqlserver/tiny_tds/blob/7fb858045e8c918b81f8001dc46e3aafe7cbb2c3/ext/tiny_tds/client.c#L256

@aidanharan aidanharan force-pushed the tsql-db-send-failed branch 2 times, most recently from c7f18b1 to 0bab3ea Compare May 14, 2020 09:34
@aidanharan aidanharan force-pushed the tsql-db-send-failed branch from a29edb3 to 7719b0d Compare May 14, 2020 10:45
@aidanharan aidanharan marked this pull request as ready for review May 14, 2020 12:33
@aidanharan aidanharan changed the title WIP: Rails 6: Handle false return by tiny_tds if connection fails WIP: Rails 6: Handle false return by TinyTDS if connection fails and fixed CI May 14, 2020
@wpolicarpo wpolicarpo merged commit 8406db2 into rails-sqlserver:master May 15, 2020
@wpolicarpo wpolicarpo changed the title WIP: Rails 6: Handle false return by TinyTDS if connection fails and fixed CI WIP: Handle false return by TinyTDS if connection fails and fixed CI May 15, 2020
@wpolicarpo wpolicarpo changed the title WIP: Handle false return by TinyTDS if connection fails and fixed CI Handle false return by TinyTDS if connection fails and fixed CI May 15, 2020
wpolicarpo added a commit that referenced this pull request May 15, 2020
TinyTDS returns false instead of raising an exception if connection fails while
executing a query.

Getting around this by raising an exception ourselves while this PR
rails-sqlserver/tiny_tds#469 is not released.

The solution came from #717 and #818, I am just adjusting the error
message to make it the same as that TinyTDS PR.
wpolicarpo added a commit that referenced this pull request May 15, 2020
TinyTDS returns false instead of raising an exception if connection fails while
executing a query.

Getting around this by raising an exception ourselves while this PR
rails-sqlserver/tiny_tds#469 is not released.

The solution came from #717 and #818, I am just adjusting the error
message to make it the same as that TinyTDS PR.
wpolicarpo added a commit that referenced this pull request Jun 23, 2020
wpolicarpo added a commit that referenced this pull request Jun 25, 2020
@aidanharan aidanharan deleted the tsql-db-send-failed branch July 16, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants