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

Update dependencies for Windows build and drop 32-bit support #567

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

andyundso
Copy link
Member

Closes #526
Relates to #552

The main goal of this PR is to update dependencies for the precompiled Windows build. However, it also contains a few other changes.

I replaced the action we use to setup the MSSQL server for testing. I developed the new action myself. It contains three advantages over the previous action:

  • Installation of MSSQL 2017 on Windows works again (see Switch to GitHub Actions #556).
  • It would be compatible with the new Ubuntu 24.04 runner. We currently do not use it since MSSQL 2017 in Docker does not work with Ubuntu 24.04.
  • It allows to force an encrypted connection to the MSSQL server.

The last point is relevant since I planned to update the OpenSSL version in the Windows build. I wanted to make sure that such a major upgrade will not cause any issues for the end users. Connections to MSSQL servers are unencrypted by default, so I suspected that even if freetds will compile against OpenSSL v3, the relevant encryption code is not used at all. By adjusting our CI to force encryption to the MSSQL server, I think this scenario is covered well. This is only done on Windows, as on Linux, everybody compiles freetds on their own.

The dependency updates for the Windows build are:

  • OpenSSL: From v1.1.1s to v3.4.0
  • libiconv: From v1.15 to v1.17
  • freetds: From v1.1.24 to v1.4.23

In this process, I also dropped the 32-bit build for Windows. It was untested and in very low demand (see #552 for details).

The new action allows us to specify if the MSSQL server should enforce encryption at all times. This helps us to verify that our precompiled build on Windows, where we compile OpenSSL ourselves, will work as expected.
Also bump the cache key to force a recompilation of freetds against the new OpenSSL version.
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.

Nice work, I left a couple inconsequential comments. Also, can you remind me where to find built gems in the gh actions maze for this PR? I want to smoke test the dependency updates by installing the .gem manually

@@ -138,12 +140,12 @@ jobs:
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse

- name: Setup MSSQL
uses: potatoqualitee/mssqlsuite@v1.7
uses: andyundso/setup-mssql@v1
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth bringing this into the rails-sqlserver github org?

* Raise error if FreeTDS is unable to sent command buffer to the server
* Use freetds v1.4.23, libiconv v1.17 and OpenSSL v3.4.0 for Windows builds
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. extconts sets these versions for all platforms, right? And it's that their statically linked for Windows. But building for other platforms would also use these versions?
  2. Any concern doing this large of a version jump for OpenSSL?

with:
install: sqlengine, sqlclient
components: sqlcmd,sqlengine
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a yaml list instead of a comma delimited string?

Comment on lines +223 to +224
- "false"
- "true"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these strings instead of actual true/false?

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.

Compatibility with OpenSSL v3
2 participants