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

ruby 3x support #521

Closed
wants to merge 1 commit into from
Closed

Conversation

bryanwieg
Copy link
Contributor

No description provided.

@bryanwieg bryanwieg force-pushed the ruby_3.0 branch 6 times, most recently from 0db09c5 to 376d868 Compare November 30, 2022 03:51
@bryanwieg
Copy link
Contributor Author

@aharpervc , if you have a moment, just let me know if this is headed in a good direction. seems ruby 3.0 is passing with little change needed

as a matter of note, a bit off topic perhaps, for the short term:
i have already discovered that ruby 3.1 introduces some sort of breaking change to the gem.

all tests fail as unable to connect to sql server. and, even worse, the gem causes the 2017-ga version of mssql to crash upon attempting to connect. mssql cli will even return error "TCP Provider: Error code 0x2746" until the sql service is restarted. although later versions of mssql do not hard crash when the gem attempts to connect, the gem is still unable to successfully connect and pass any tests.

i only spent a short time on it. the resolution may reside in another dependency that needs to be updated, and i figured for now it may be good to just focus on ruby 3.0 since it seems rather straight forward.

please let me know any observations or thoughts you have

Copy link
Contributor

@aharpervc aharpervc left a comment

Choose a reason for hiding this comment

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

Can you split this out into a couple commits? Whatever makes sense as discreet behavior changes. For example, fixes for local development scripts in one, then JUST adding 3.0 to the rake task & CI version list

sudo useradd circleci_tinytds -u 3434 -g 3434
sudo usermod -a -G circleci_tinytds circleci_tinytds
sudo chgrp -R circleci_tinytds .
if $(dpkg --compare-versions $ruby_version lt 3.1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, all of this is a bit confusing. Is it to prepare for Ruby 3.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was from the 3.1 work, yes. circleci changed the permissions in their container. i will stash this change for a future commit

@@ -5,7 +5,7 @@ networks:

services:
mssql:
image: metaskills/mssql-server-linux-tinytds:2017-GA
image: mcr.microsoft.com/mssql/server:2022-RTM-ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the pro/con on this tag vs a more generic one, such as 2022-latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, i wondered if you had any thoughts about this

mssql 2022 came out this month. do you have a preference for 2022 or to stay on 2019-latest?

i suppose as long as 2022-latest passes everything, i don't see a reason not to test on it.

@aharpervc
Copy link
Contributor

all tests fail as unable to connect to sql server. and, even worse, the gem causes the 2017-ga version of mssql to crash upon attempting to connect. mssql cli will even return error "TCP Provider: Error code 0x2746" until the sql service is restarted. although later versions of mssql do not hard crash when the gem attempts to connect, the gem is still unable to successfully connect and pass any tests.

Exciting lol

please let me know any observations or thoughts you have

There's a couple more changes I'd like to see in the CI config (could be this PR or separate PRs or a mix);

  • It seems like we ought to be able to cache the "ports" compilation steps, hopefully by adding "./ports" to the restore_cache & save_cache steps. For example, on this PR building openssl on windows took about 10 minutes, but if it was cached that should speed things up a lot.
  • The final .gem packages should be set up as a CI artifact, so they can easily be downloaded from this page for each job. That'll make PR validation easier for more people, since they can just download & install that gem without building themselves
  • At some point we should set up the store_test_results config so that we get a better UI here

@andyundso
Copy link
Member

hello @bryanwieg / @aharpervc, I wanted to ask what's the state with this pull request as I'm currently blocked on one project that uses Windows to upgrade to Ruby 3.

Given what's documented here, I could also cherry-pick the necessary changes for Ruby 3 and create a new PR to get a timely release (or pre-release). Then we could continue with implementing the proposed CI improvements and start on the Ruby 3.1 / 3.2 changes. what do you think?

@bryanwieg
Copy link
Contributor Author

bryanwieg commented Jan 6, 2023

it may be best for you to open another pr. i've had to divide my attention to multiple projects here.

As a side note, i want to report that i may have found the issue with ruby 3.1 and the tests. it looks like it has to do with tls. setting the build option for freetds to not use openssl and instead use gnutls --with-gnutls seems to help with the issue.

in any case, it could potentially be a few months before i can resume work on these pr's

This was referenced Jan 7, 2023
@bryanwieg bryanwieg closed this Feb 14, 2023
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.

3 participants