Skip to content

Add retry logic for transient HTTP 504 errors on CBL Mariner package installation#1570

Draft
Copilot wants to merge 21 commits into
copilot/unify-user-selection-logicfrom
copilot/fix-github-actions-workflow-yet-again
Draft

Add retry logic for transient HTTP 504 errors on CBL Mariner package installation#1570
Copilot wants to merge 21 commits into
copilot/unify-user-selection-logicfrom
copilot/fix-github-actions-workflow-yet-again

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

The docker-in-docker feature fails on CBL Mariner when packages.microsoft.com returns HTTP 504 Gateway Timeout errors during dependency installation (e.g., perl-overloading package). These are transient CDN failures.

Changes

  • src/docker-in-docker/install.sh: Added 3-attempt retry logic with 2-second delays to install_azure_linux_deps() function
  • src/docker-in-docker/devcontainer-feature.json: Version bump 2.16.0 → 2.17.0

Implementation

install_azure_linux_deps() {
    local max_retries=3
    local retry_count=0
    local install_ok="false"
    
    until [ "${install_ok}" = "true" ] || [ "${retry_count}" -eq "${max_retries}" ]; do
        if ${PKG_MGR_CMD} -y install libseccomp libtool-ltdl systemd-libs libcgroup tar xz; then
            install_ok="true"
        else
            echo "(*) Package installation failed, retrying... (attempt $((retry_count + 1))/${max_retries})"
            retry_count=$((retry_count + 1))
            [ "${retry_count}" -lt "${max_retries}" ] && sleep 2
        fi
    done
}

Pattern follows existing retry mechanisms in the script for docker daemon startup and cgroup configuration.

Original prompt

Fix the failing GitHub Actions workflow "PR - Test Updated Features / test-scenarios (docker-in-docker) (pull_request)".
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 63284158114
Job URL: /devcontainers/features/actions/runs/21916238984/job/63284158114?pr=1552


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 19 commits January 29, 2026 13:37
…ehensive tests

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
…ection

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
…handling, remove dead code

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
…n refactor

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
The validator expects all directories in src/ to be valid features with devcontainer-feature.json. By renaming to .common (hidden directory), it's excluded from validation while remaining accessible to features.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
The devcontainer CLI packages each feature independently and doesn't include parent directories or hidden directories in the build context. The helper script must be copied into each feature's _lib/ directory to be accessible at runtime.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Created scripts/lib/common-setup.sh as the source of truth and scripts/sync-common-setup.sh to deploy to all features. This provides a shared code model within devcontainer packaging constraints.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
common-utils has different semantics than other features - it CREATES users rather than just using existing ones. Restored the original inline logic that uses _REMOTE_USER without validation since the user will be created.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
* Initial plan

* Fix conda installation by switching from apt repository to direct Miniconda installer

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Add error handling for Miniconda download and installation

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Use APT::Key::GPGVCommand=1 option to bypass SHA1 signature check

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Fix version to 1.2.1 for semantic versioning

* Revert to Miniconda installer approach - APT option caused gpgv errors

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Use mktemp for secure temporary file creation

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Replace Miniconda installer with direct .deb package download and apt install

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Fix apt-get install syntax and improve error handling

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Fix package filename - use architecture-specific deb and extract Filename from Packages

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Update version to 1.2.3

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Fix apt-get install path - remove ./ prefix for absolute paths

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Fix version matching for specific conda versions - handle version suffixes

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
…tu:focal (#1567)

* Initial plan

* Fix kubectl SHA256 download URL and bump version to 1.3.1

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Add timeout and fallback for kubectl version fetching

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Improve error messages and diagnostics for kubectl version fetching

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Address code review feedback: clean up error handling

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Improve error message to reference VERSION option

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Use hardcoded fallback version instead of git tags fallback

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Add version validation and comment for fallback version

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Extract fallback version to constant at top of file

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Update fallback version of kubectl to v1.35.1

* Add alternative URL fallback before using hardcoded version

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Co-authored-by: Abdurrahmaan Iqbal <abdurriq@github.com>
… features (#1569)

* Initial plan

* Add update-ca-certificates call after installing ca-certificates package

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Bump feature versions: docker-outside-of-docker to 1.8.0, docker-in-docker to 2.16.0

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Add error handling and documentation for update-ca-certificates calls

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>

* Remove invalid test for docker-compose when v2 isn't installed

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Co-authored-by: Abdurrahmaan Iqbal <abdurriq@github.com>
Copilot AI and others added 2 commits February 11, 2026 18:11
…errors

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
…bility

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for test scenarios Feb 11, 2026
Copilot AI requested a review from abdurriq February 11, 2026 18:13
@abdurriq abdurriq force-pushed the copilot/unify-user-selection-logic branch from e943772 to db61bb9 Compare April 1, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants