Skip to content

feat: Fix CI: Update mssql-tools installation for Ubuntu 24.04#86

Merged
nomeguy merged 2 commits intomasterfrom
copilot/fix-ci-error
Nov 14, 2025
Merged

feat: Fix CI: Update mssql-tools installation for Ubuntu 24.04#86
nomeguy merged 2 commits intomasterfrom
copilot/fix-ci-error

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Fix: #85

CI failing on mssql-tools installation because workflow uses Ubuntu 16.04 packages on ubuntu-latest (now Ubuntu 24.04), causing msodbcsql17 post-install script to fail with exit code 127.

Changes

  • Update package repository: ubuntu/16.04/produbuntu/22.04/prod (22.04 packages are compatible with 24.04)
  • Upgrade tooling: mssql-toolsmssql-tools18 (includes ODBC Driver 18 with proper TLS support)
  • Fix key management: Replace deprecated apt-key add with /etc/apt/trusted.gpg.d/
  • Non-interactive install: Add ACCEPT_EULA=Y and -y flags
  • Certificate trust: Add -C flag to sqlcmd (required for ODBC Driver 18)
# Before
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get install mssql-tools unixodbc-dev

# After
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18 unixodbc-dev
Original prompt

This section details on the original issue you should resolve

<issue_title>[bug] fix CI error</issue_title>
<issue_description>See: https://github.com/jcasbin/jdbc-adapter/actions/runs/19366024059/job/55409257411

Install mssql-tools

Run curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
  sudo apt-get update
  sudo apt-get install mssql-tools unixodbc-dev
  echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
  shell: /usr/bin/bash -e {0}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

100   975  100   975    0     0  16006      0 --:--:-- --:--:-- --:--:-- 16250
OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main
100    78  100    78    0     0   1374      0 --:--:-- --:--:-- --:--:--  1392
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Hit:6 https://packages.microsoft.com/repos/azure-cli noble InRelease
Get:7 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
Get:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:8 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease [3638 B]
Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [11.2 kB]
Get:10 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [50.2 kB]
Get:11 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [67.3 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1585 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [175 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [15.7 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1499 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [303 kB]
Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [378 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [31.4 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Components [212 B]
Get:20 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:21 http://azure.archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [7148 B]
Get:22 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [11.0 kB]
Get:23 http://azure.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:24 http://azure.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B]
Get:25 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [1309 kB]
Get:26 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [215 kB]
Get:27 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Components [21.5 kB]
Get:28 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [9416 B]
Get:29 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [908 kB]
Get:30 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [204 kB]
Get:31 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Components [52.3 kB]
Get:32 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [19.4 kB]
Get:33 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted amd64 Components [212 B]
Get:34 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [212 B]
Get:35 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main all Packages [3745 B]
Get:36 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [152 kB]
Fetched 7416 kB in 1s (6318 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libodbccr2 libodbcinst2 msodbcsql17 unixodbc unixodbc-common
The fo...

</details>

- Fixes jcasbin/jdbc-adapter#85

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

@hsluoyz
Copy link
Member

hsluoyz commented Nov 14, 2025

@tangyang9464 @imp2002 please review

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI error in mssql-tools installation Fix CI: Update mssql-tools installation for Ubuntu 24.04 Nov 14, 2025
Copilot AI requested a review from nomeguy November 14, 2025 13:54
@nomeguy nomeguy marked this pull request as ready for review November 14, 2025 14:14
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.33%. Comparing base (490645a) to head (4351291).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   73.33%   73.33%           
=======================================
  Files           3        3           
  Lines          90       90           
  Branches       26       26           
=======================================
  Hits           66       66           
  Misses         13       13           
  Partials       11       11           
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nomeguy nomeguy changed the title Fix CI: Update mssql-tools installation for Ubuntu 24.04 feat: Fix CI: Update mssql-tools installation for Ubuntu 24.04 Nov 14, 2025
@nomeguy nomeguy merged commit 02549ab into master Nov 14, 2025
6 of 7 checks passed
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.

[bug] fix CI error

4 participants

Comments