FreeCAD / FreeCAD-snap

The official Snap package of the FreeCAD project
https://snapcraft.io/freecad
9 stars 9 forks source link

Daily builds failure 2024-10-10 #127

Closed furgo16 closed 4 days ago

furgo16 commented 1 week ago

The daily builds (see run #874 and #875) are currently failing since two days: https://github.com/FreeCAD/FreeCAD-snap/actions

The error in question is happening during snapcraft build:

image

Failed to refresh package list: failed to run apt update.

It's a strange one: if I understand it correctly, it would seem that snapcraft is not able to reach Ubuntu's apt server's (or KDE Neon's apt servers, where I believe the packages are being pulled from as per snapcraft.yaml). It would seem that there have not been recent changes in this repo to trigger this failure.

Another data point: on my fork I activated this workflow and it works, at least when manually triggered: https://github.com/furgo16/FreeCAD-snap/actions/runs/11301498114

Could perhaps an admin have a look, and potentially also trigger a manual workflow run? Thanks!

chennes commented 1 week ago

I don't know how to get at the log file that it references, but I've re-triggered with debug logging enabled, so maybe that will tell us something.

chennes commented 1 week ago

And, no. No useful details, as far as I can tell: https://github.com/FreeCAD/FreeCAD-snap/actions/runs/11301166736/job/31451278645

Any idea how we can get our hands on the reference log file?

furgo16 commented 6 days ago

I'm thinking perhaps it needs to be uploaded as an artifact too to make it available in the UI?

furgo16 commented 6 days ago

Or perhaps an easier option would be to call snapcraft from the workflow file with an option to be more verbose:

snapcraft --help
Usage:
    snapcraft [help] <command>

Summary:    Package, distribute, and update snaps for Linux and IoT

Global options:
                       -h, --help:  Show this help message and exit
                    -v, --verbose:  Show debug information and be more
                                    verbose
                      -q, --quiet:  Only show warnings and errors, not
                                    progress
                      --verbosity:  Set the verbosity level to 'quiet',
                                    'brief', 'verbose', 'debug' or
                                    'trace'
                    -V, --version:  Show the application version and
                                    exit
[...]
furgo16 commented 6 days ago

I'm testing doing both on my fork. I'll submit a PR once the builds in the fork finish and I can confirm it works.

furgo16 commented 5 days ago

Related PR: https://github.com/FreeCAD/FreeCAD-snap/pull/129

furgo16 commented 4 days ago

Thanks @chennes for the quick merge. We now have the log downloadable as an artifact after the build failure => https://github.com/FreeCAD/FreeCAD-snap/actions/runs/11337190566

Pending further analysis, and at a quick glance, it seems that for some reason during the snapcraft execution the repositories are unexpectedly switched from jammy (Ubuntu 22.04) to noble (Ubuntu 24.04). Then when the elmer-csc-ubuntu:elmer-csc-ppa is refreshed, the failure occurs, as it has no noble packages.

Log extract ``` 2024-10-15 00:42:59.367 Installing package repositories... 2024-10-15 00:43:00.178 Loading launchpad url: ~elmer-csc-ubuntu/+archive/elmer-csc-ppa 2024-10-15 00:43:00.309 Retrieved launchpad PPA key ID: 1FE4A88ACFEE8388A409F23A89358ABF9FB7E178 2024-10-15 00:43:00.309 Keyring file not found: /etc/apt/keyrings/craft-9FB7E178.gpg 2024-10-15 00:43:00.309 Executing command: ['gpg', '--batch', '--no-default-keyring', '--with-colons', '--keyring', 'gnupg-ring:/etc/apt/keyrings/craft-9FB7E178.gpg', '--homedir', '/tmp/tmpbmh0nrl_', '--keyserver', 'keyserver.ubuntu.com', '--recv-keys', '1FE4A88ACFEE8388A409F23A89358ABF9FB7E178'] 2024-10-15 00:43:00.785 Processing repo: PackageRepositoryAptPPA(type='apt', priority=None, ppa='elmer-csc-ubuntu/elmer-csc-ppa', key_id=None) 2024-10-15 00:43:01.520 Loading launchpad url: ~elmer-csc-ubuntu/+archive/elmer-csc-ppa 2024-10-15 00:43:01.672 Retrieved launchpad PPA key ID: 1FE4A88ACFEE8388A409F23A89358ABF9FB7E178 2024-10-15 00:43:01.681 Installed sources: /etc/apt/sources.list.d/craft-ppa-elmer-csc-ubuntu_elmer-csc-ppa.sources 2024-10-15 00:43:01.681 Keyring file not found: /etc/apt/keyrings/craft-55751E5D.gpg 2024-10-15 00:43:01.681 Executing command: ['gpg', '--batch', '--no-default-keyring', '--with-colons', '--keyring', 'gnupg-ring:/etc/apt/keyrings/craft-55751E5D.gpg', '--homedir', '/tmp/tmpci4xax_s', '--keyserver', 'keyserver.ubuntu.com', '--recv-keys', '444DABCF3667D0283F894EDDE6D4736255751E5D'] 2024-10-15 00:43:02.082 Processing repo: PackageRepositoryApt(type='apt', priority=None, url='http://origin.archive.neon.kde.org/user', key_id='444DABCF3667D0283F894EDDE6D4736255751E5D', architectures=None, formats=None, path=None, components=['main'], key_server='keyserver.ubuntu.com', suites=['jammy'], pocket=None, series=None) 2024-10-15 00:43:02.091 Installed sources: /etc/apt/sources.list.d/craft-http_origin_archive_neon_kde_org_user.sources 2024-10-15 00:43:02.091 Refreshing package repositories... 2024-10-15 00:43:02.091 Executing: ['apt-get', 'update'] 2024-10-15 00:43:02.201 :: Get:1 https://packages.microsoft.com/repos/azure-cli noble InRelease [3564 B] 2024-10-15 00:43:02.211 :: Get:2 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B] 2024-10-15 00:43:02.258 :: Hit:3 http://azure.archive.ubuntu.com/ubuntu noble InRelease 2024-10-15 00:43:02.260 :: Get:4 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] 2024-10-15 00:43:02.263 :: Hit:5 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease 2024-10-15 00:43:02.264 :: Get:6 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB] 2024-10-15 00:43:02.278 :: Get:7 https://packages.microsoft.com/repos/azure-cli noble/main amd64 Packages [754 B] 2024-10-15 00:43:02.327 :: Get:8 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [12.1 kB] 2024-10-15 00:43:02.331 :: Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [8310 B] 2024-10-15 00:43:02.335 :: Get:10 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [5061 B] 2024-10-15 00:43:02.353 :: Ign:11 http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu noble InRelease 2024-10-15 00:43:02.429 :: Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [547 kB] 2024-10-15 00:43:02.435 :: Err:13 http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu noble Release 2024-10-15 00:43:02.435 :: 404 Not Found [IP: 185.125.190.80 80] 2024-10-15 00:43:02.435 :: Get:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [137 kB] 2024-10-15 00:43:02.437 :: Get:15 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [9080 B] 2024-10-15 00:43:02.439 :: Get:16 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [421 kB] 2024-10-15 00:43:02.442 :: Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [176 kB] 2024-10-15 00:43:02.445 :: Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [15.0 kB] 2024-10-15 00:43:02.445 :: Get:19 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [14.8 kB] 2024-10-15 00:43:02.446 :: Get:20 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse Translation-en [3820 B] 2024-10-15 00:43:02.476 :: Get:21 http://origin.archive.neon.kde.org/user jammy InRelease [193 kB] 2024-10-15 00:43:02.536 :: Get:22 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [384 kB] 2024-10-15 00:43:02.540 :: Get:23 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [84.6 kB] 2024-10-15 00:43:02.583 :: Get:24 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [4708 B] 2024-10-15 00:43:02.584 :: Get:25 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [278 kB] 2024-10-15 00:43:02.586 :: Get:26 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [117 kB] 2024-10-15 00:43:02.588 :: Get:27 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [10.4 kB] 2024-10-15 00:43:02.996 :: Get:28 http://origin.archive.neon.kde.org/user jammy/main amd64 Packages [4115 kB] 2024-10-15 00:43:03.571 :: Get:29 http://origin.archive.neon.kde.org/user jammy/main all Packages [1068 kB] 2024-10-15 00:43:03.675 :: Get:30 http://origin.archive.neon.kde.org/user jammy/main amd64 Components [1655 kB] 2024-10-15 00:43:03.869 :: Get:31 http://origin.archive.neon.kde.org/user jammy/main amd64 c-n-f Metadata [63.8 kB] 2024-10-15 00:43:10.034 :: Reading package lists... 2024-10-15 00:43:10.042 :: E: The repository 'http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu noble Release' does not have a Release file. 2024-10-15 00:43:10.043 Failed to refresh package list: failed to run apt update. 2024-10-15 00:43:10.048 Traceback (most recent call last): 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/application.py", line 495, in main 2024-10-15 00:43:10.048 return app.run() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_application/application.py", line 568, in run 2024-10-15 00:43:10.048 return_code = self._run_inner() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/application.py", line 215, in _run_inner 2024-10-15 00:43:10.048 return_code = super()._run_inner() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_application/application.py", line 515, in _run_inner 2024-10-15 00:43:10.048 dispatcher = self._get_dispatcher() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/application.py", line 443, in _get_dispatcher 2024-10-15 00:43:10.048 self._check_for_classic_fallback() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/application.py", line 355, in _check_for_classic_fallback 2024-10-15 00:43:10.048 raise errors.ClassicFallback() 2024-10-15 00:43:10.048 snapcraft.errors.ClassicFallback 2024-10-15 00:43:10.048 2024-10-15 00:43:10.048 During handling of the above exception, another exception occurred: 2024-10-15 00:43:10.048 Traceback (most recent call last): 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_parts/packages/deb.py", line 449, in refresh_packages_list 2024-10-15 00:43:10.048 process_run(cmd) 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_parts/packages/deb.py", line 820, in process_run 2024-10-15 00:43:10.048 os_utils.process_run(command, logger.debug, **kwargs) 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_parts/utils/os_utils.py", line 345, in process_run 2024-10-15 00:43:10.048 raise subprocess.CalledProcessError(ret, command) 2024-10-15 00:43:10.048 subprocess.CalledProcessError: Command '['apt-get', 'update']' returned non-zero exit status 100. 2024-10-15 00:43:10.048 2024-10-15 00:43:10.048 The above exception was the direct cause of the following exception: 2024-10-15 00:43:10.048 Traceback (most recent call last): 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/parts/parts.py", line 202, in run 2024-10-15 00:43:10.048 self._install_package_repositories() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/snapcraft/parts/parts.py", line 254, in _install_package_repositories 2024-10-15 00:43:10.048 self._lcm.refresh_packages_list() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_parts/lifecycle_manager.py", line 227, in refresh_packages_list 2024-10-15 00:43:10.048 packages.Repository.refresh_packages_list() 2024-10-15 00:43:10.048 File "/snap/snapcraft/12823/lib/python3.10/site-packages/craft_parts/packages/deb.py", line 451, in refresh_packages_list 2024-10-15 00:43:10.048 raise errors.PackageListRefreshError( 2024-10-15 00:43:10.048 craft_parts.packages.errors.PackageListRefreshError: Failed to refresh package list: failed to run apt update. 2024-10-15 00:43:10.048 Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20241015-004258.027938.log' ```