Skip to content

fix: ci build apt install list error - #17086

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
myf-bee:fix-dockerflie-install-lib
Jul 20, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
myf-bee:fix-dockerflie-install-lib

Conversation

@myf-bee

@myf-bee myf-bee commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

fix : build error, apt list cache is old, before install, update list

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 20, 2026
@myf-bee myf-bee added the ci Continue Integration label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Docker builder stage now refreshes apt metadata with missing-package recovery before installing build dependencies and uses apt-get install, while preserving the existing packages and cleanup.

Changes

Builder dependency installation

Layer / File(s) Summary
Refresh apt metadata before package installation
Dockerfile
The builder stage runs apt-get update --fix-missing, switches to apt-get install, and retains the existing package list and apt-list cleanup.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: lynn-inf, jinhai-cn, yuzhichang

Poem

I’m a rabbit in the builder’s den,
Refreshing apt, then building again.
Packages hop in, lists disappear,
A sturdier Docker step is here! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main CI APT install fix.
Description check ✅ Passed The description includes the required Summary section and explains the build-failure fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8763b46-836e-4ca4-a420-165786268160

📥 Commits

Reviewing files that changed from the base of the PR and between b20ca45 and 23ee6cf.

📒 Files selected for processing (1)
  • Dockerfile

Comment thread Dockerfile
Comment on lines +189 to +190
apt-get update --fix-missing && \
apt-get install -y build-essential libpython3-dev libicu-dev libgbm-dev && \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 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:


🌐 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:


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

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (3da2425) to head (23ee6cf).
⚠️ Report is 7 commits behind head on main.

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wangq8
wangq8 merged commit 65b7d15 into infiniflow:main Jul 20, 2026
8 checks passed
@myf-bee
myf-bee deleted the fix-dockerflie-install-lib branch August 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants