Skip to content

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

Closed
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-ci-error-again
Closed

Fix CI: Update mssql-tools installation for Ubuntu 24.04#87
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-ci-error-again

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

CI failing on mssql-tools installation due to deprecated apt-key command and Ubuntu 16.04 repository configuration on Ubuntu 24.04 runners.

Changes

  • Replace deprecated apt-key add with modern keyring approach (/etc/apt/trusted.gpg.d/)
  • Update Microsoft repository from Ubuntu 16.04 to 22.04 (compatible with 24.04)
  • Upgrade to mssql-tools18 with updated PATH (/opt/mssql-tools18/bin)
  • Add ACCEPT_EULA=Y and -y flags for non-interactive installation
  • Add -C flag to sqlcmd for certificate trust (required by mssql-tools18)
# Before
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 install mssql-tools unixodbc-dev

# After
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
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 with 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:56
@nomeguy nomeguy marked this pull request as ready for review November 14, 2025 14:14
@nomeguy nomeguy closed this Nov 14, 2025
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.

4 participants

Comments