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

fix: update sql server odbc18 & new path #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

datamweb
Copy link
Contributor

@datamweb datamweb commented Oct 4, 2024

Description
I've done some research and concluded that we can resolve the PHPUnit test failures with the following changes:

This program has encountered a fatal error and cannot continue running at Fri Oct  4 03:45:30 2024
   The following diagnostic information is available:
   SQL Server 2019 will run as non-root by default.
   This container is running as user mssql.
   To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.

ODBC Driver 18.0 Settings: Set the Encrypt option to optional and ensure that we use the new path /opt/mssql-tools18/bin/sqlcmd.

See :

  1. https://github.com/codeigniter4/shield/actions/runs/11173623167/job/31061981817
  2. https://techcommunity.microsoft.com/t5/sql-server-blog/odbc-driver-18-0-for-sql-server-released/ba-p/3169228
  3. https://sqlserverupdates.com/sql-server-2019-updates/

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

env:
SA_PASSWORD: 1Secure*Password1
ACCEPT_EULA: Y
MSSQL_PID: Developer
MSSQL_ENCRYPT: optional
Copy link
Member

Choose a reason for hiding this comment

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

Why optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’m not entirely sure if GitHub Actions in this repo uses a valid certificate for connecting to MSSQL. Therefore, as a precaution, I’ve set the MSSQL_ENCRYPT option to optional. This setting allows us to have an encrypted connection if a valid certificate is present, but it also ensures that we can continue to connect to the database even if a valid certificate is not available.
I previously tested these changes on repo codeigniter-dea-rule, and all tests ran successfully.

https://github.com/datamweb/codeigniter-dea-rule/blob/1e128372ed0c1ee6a7a6aff3fedf7c8463815f80/.github/workflows/phpunit.yml#L90

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