Repository navigation
fix: ci build apt install list error - #17086
Conversation
📝 WalkthroughWalkthroughThe Docker builder stage now refreshes apt metadata with missing-package recovery before installing build dependencies and uses ChangesBuilder dependency installation
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Dockerfile`:
- Around line 189-190: Update the Dockerfile’s apt-get update command to use the
Acquire::Retries option with three retries, replacing the ineffective
--fix-missing flag while preserving the existing package installation flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| apt-get update --fix-missing && \ | ||
| apt-get install -y build-essential libpython3-dev libicu-dev libgbm-dev && \ |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the relevant Dockerfile region with line numbers.
nl -ba Dockerfile | sed -n '180,198p'
# Look for any other uses of apt-get update/install flags in the repo.
rg -n "apt-get (update|install).*(fix-missing|Acquire::Retries|retry)" -S .Repository: infiniflow/ragflow
Length of output: 196
🌐 Web query:
apt-get update --fix-missing semantics apt-get 8 update option missing package archives retries
💡 Result:
The apt-get --fix-missing option and the behavior regarding retries and missing package archives function as follows: --fix-missing (or -m) Semantics The --fix-missing option is primarily designed for installation and upgrade operations (e.g., apt-get install or apt-get upgrade), not for the update command [1][2][3]. It instructs APT to ignore packages that cannot be retrieved or that fail integrity checks (e.g., corrupted files) by holding them back rather than aborting the entire process [1][2][4]. When used with apt-get update, it generally does not change the behavior of the index downloading process, as update is focused on retrieving package lists rather than individual packages [1]. Retries for Package Archives Modern versions of APT (specifically since version 2.3.2) include built-in support for automatically retrying failed downloads [5]. You can control this behavior using the Acquire::Retries configuration option [6]. To configure retries, you can set the number of attempts in an APT configuration file (e.g., /etc/apt/apt.conf.d/99retries): Acquire::Retries "3"; This setting tells APT to retry failed file downloads the specified number of times before giving up [6]. This is distinct from --fix-missing, as it addresses transient network or server errors by attempting to re-fetch the data, whereas --fix-missing handles situations where a package is fundamentally unavailable or corrupted by excluding it from the transaction [1][2][5][6]. Summary of Differences --fix-missing: A command-line flag used to skip packages that fail to download or verify during an install/upgrade, holding them back instead of stopping the process [1][3]. Acquire::Retries: A configuration setting that enables automatic retries for failed download attempts during any APT operation, including updates [5][6]. For scenarios involving persistent failures during apt-get update, ensuring your repositories are correctly configured and using the Acquire::Retries setting is the recommended approach to handle transient network issues [5][6][7].
Citations:
- 1: https://askubuntu.com/questions/462690/what-does-apt-get-fix-missing-do-and-when-is-it-useful
- 2: https://manpages.debian.org/bookworm/apt/apt-get.8
- 3: https://manpages.ubuntu.com/manpages/jammy/man8/apt-get.8.html
- 4: https://man.archlinux.org/man/extra/apt/apt-get.8.en
- 5: https://bugs.launchpad.net/bugs/1876035
- 6: https://man.archlinux.org/man/apt.conf.5.en
- 7: https://bugs.launchpad.net/bugs/2003851
🌐 Web query:
Debian apt-get manual --fix-missing update Acquire::Retries apt-get update option semantics
💡 Result:
The options --fix-missing and Acquire::Retries serve distinct purposes in managing APT operations on Debian-based systems. --fix-missing (also known as --ignore-missing) The --fix-missing option is a command-line flag for apt-get (and often accepted by other APT tools) [1][2]. Its primary function is to instruct APT to ignore packages that cannot be retrieved or that fail an integrity check (e.g., corrupted files) after download [3][1]. Instead of aborting the operation, APT will hold back those problematic packages and proceed with the rest of the installation or upgrade [3][1]. This is not a "fix" in the sense of repairing corruption, but rather a way to bypass failed packages so that the remainder of the transaction can complete [3]. It is often used after an interrupted download or when mirror issues prevent certain files from being fetched [3]. Acquire::Retries Acquire::Retries is a configuration option defined in apt.conf (or /etc/apt/apt.conf.d/ files) that instructs APT to automatically retry failed file downloads [4][5]. - Semantics: When set to a non-zero integer, APT will attempt to re-download a file that failed to transfer the specified number of times [4][6]. - Scope: This option applies to temporary network errors, such as connection timeouts or 5xx server errors [7]. - Limitations: It generally does not retry on 404 Not Found errors, as APT considers these to be permanent failures [7][8]. If a 404 occurs, it usually indicates a mirror synchronization issue, which cannot be resolved by simply increasing the retry count [7]. To configure this globally, you can add the following to a file in /etc/apt/apt.conf.d/ (e.g., /etc/apt/apt.conf.d/80-retries): Acquire::Retries "3"; This setting is particularly useful in automated environments like Docker builds to handle transient network instability [7][6].
Citations:
- 1: https://manpages.debian.org/bookworm/apt/apt-get.8
- 2: https://manpages.ubuntu.com/manpages/jammy/man8/apt-get.8.html
- 3: https://askubuntu.com/questions/462690/what-does-apt-get-fix-missing-do-and-when-is-it-useful
- 4: https://manpages.debian.org/trixie/apt/apt.conf.5.en.html
- 5: https://man.archlinux.org/man/apt.conf.5.en
- 6: https://groups.google.com/g/linux.debian.bugs.dist/c/KxDg_Wht3HY
- 7: https://stackoverflow.com/questions/73293088/how-to-force-retry-when-an-apt-install-has-failed-aptacquireretries-does-n
- 8: https://askubuntu.com/questions/1423024/acquireretries-does-not-seem-to-handle-404-errors
Use Acquire::Retries for apt-get update. --fix-missing only affects missing packages, so it won’t retry transient index-download failures. apt-get update -o Acquire::Retries=3 is the better fit here.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Dockerfile` around lines 189 - 190, Update the Dockerfile’s apt-get update
command to use the Acquire::Retries option with three retries, replacing the
ineffective --fix-missing flag while preserving the existing package
installation flow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17086 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 650 650
Misses 39 39
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
fix : build error, apt list cache is old, before install, update list