Skip to content

Make uv install in CI more robust#94

Merged
ejfine merged 9 commits intomainfrom
curl
Sep 17, 2025
Merged

Make uv install in CI more robust#94
ejfine merged 9 commits intomainfrom
curl

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented Sep 17, 2025

Link to Issue or Message thread

#93

Why is this change necessary?

Sometimes it times out and the whole job fails

How does this change address the issue?

Adds some retry logic

What side effects does this change have?

None

How is this change tested?

This repo CI and downstream repo CI

Other

Added some context versions.

the Get Values job now displays the github context for troubleshooting

Summary by CodeRabbit

  • New Features

    • Added new template context variables (uuid utils plus several frontend/tooling package versions) and updated pnpm/types versions to support richer project generation.
  • Chores

    • Improved installer reliability with connection timeouts and retries.
    • Updated Dev Container metadata comment (no functional change).
    • Added a CI workflow step to print the full GitHub context for debugging.

@ejfine ejfine requested a review from Copilot September 17, 2025 13:29
@ejfine ejfine self-assigned this Sep 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Updated devcontainer comment hash, hardened the non-Windows UV installer curl call with timeouts/retries, added multiple dependency/version keys to the template/runtime context, and inserted a workflow step that prints the full GitHub Actions github context before checkout.

Changes

Cohort / File(s) Summary
Devcontainer metadata
.devcontainer/devcontainer.json
Updated the devcontainer context hash string in a comment; no functional change.
CI tooling installer (runtime + template)
.devcontainer/install-ci-tooling.py, template/.devcontainer/install-ci-tooling.py.jinja-base
Replaced the simple curl invocation with a curl command that adds --connect-timeout, --max-time, --retry 3, --retry-delay 5, --retry-connrefused, and --proto '=https' for the non-Windows UV installer; invocation otherwise unchanged.
Context updater (runtime + template)
extensions/context.py, template/extensions/context.py.jinja-base
Added new context keys (uuid_utils_version, iconify_vue_version, iconify_json_lucide_version, nuxt_fonts_version, nuxtjs_color_mode_version, vue_test_utils_version, nuxt_test_utils_version) and bumped pnpm_version and types_node_version; no signature or control-flow changes.
GitHub Actions workflow template
template/.github/workflows/get-values.yaml.jinja-base
Inserted a step named "Display full GitHub context" that prints toJSON(github) prior to the Checkout step; no other workflow behavior changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Actions Runner
  participant Show as "Display full GitHub context"
  participant Checkout as "Checkout code"

  Dev->>GH: Trigger get-values workflow
  GH->>Show: Run step -> toJSON(github)
  Note right of Show #E8F5E9: Prints full `github` context JSON
  Show-->>GH: Step completes
  GH->>Checkout: Run checkout step
  Checkout-->>GH: Repository checked out
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Readme update #72: Touches ContextUpdater.hook and devcontainer installer metadata; overlaps with context and devcontainer edits.
  • Bump nuxt and other deps #86: Bumps dependency/version keys in extensions/context.py (same context variables updated).
  • Bump pytest-cov #92: Modifies ContextUpdater.hook and devcontainer comment/hash updates, overlapping the same files.

Poem

I nibble at hashes, versions, and curls,
I hop through templates, flags, and whirls.
Contexts sprout keys, retries hum anew—
The workflow shows what GitHub knew.
Rabbit applauds: small changes, big view. 🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Make uv install in CI more robust" is a concise, single-sentence summary that directly reflects the primary change in this PR—adding retry and timeout flags to the uv installer used in CI to reduce intermittent timeouts. It focuses on the main intent without extraneous detail and would be clear to reviewers scanning history. Therefore it satisfies the repository's title guidelines.
Description Check ✅ Passed The pull request description follows the repository template and includes the required sections: link to the issue, why the change is necessary (CI timeouts), how the change addresses the issue (adds retry logic), side effects (none), testing (CI runs), and an "Other" note about added context versions and the Get Values job change. The content is concise yet sufficient for reviewers to understand intent and testing, and it references the linked issue for additional context. A minor enhancement would be to include links to successful CI runs or point to the specific diff/lines changed for faster verification. Overall the description is complete enough to meet the template requirements.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch curl

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0edff3d and e681cb5.

📒 Files selected for processing (4)
  • .devcontainer/devcontainer.json (1 hunks)
  • .devcontainer/install-ci-tooling.py (1 hunks)
  • template/.devcontainer/install-ci-tooling.py.jinja-base (1 hunks)
  • template/.github/workflows/get-values.yaml.jinja-base (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • template/.devcontainer/install-ci-tooling.py.jinja-base
  • .devcontainer/devcontainer.json
  • template/.github/workflows/get-values.yaml.jinja-base
  • .devcontainer/install-ci-tooling.py

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 and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Improves the robustness of uv installation in CI by adding retry logic and connection parameters to prevent timeout failures. Additionally includes various version updates for Python and Node.js dependencies.

  • Enhanced uv installation with timeout and retry parameters to handle network issues
  • Added new version context variables for various dependencies
  • Integrated GitHub context display for troubleshooting purposes

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
template/extensions/context.py.jinja-base Adds new context variables for uuid-utils and various Node.js dependencies
template/.github/workflows/get-values.yaml.jinja-base Adds GitHub context display step for debugging
template/.devcontainer/install-ci-tooling.py.jinja-base Enhances curl command with timeout and retry parameters
extensions/context.py Updates dependency versions and adds new context variables
.devcontainer/install-ci-tooling.py Applies same curl improvements as template version
.devcontainer/devcontainer.json Updates hash value reflecting devcontainer changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
template/.github/workflows/get-values.yaml.jinja-base (1)

27-29: Gate context dump behind an opt-in and fix capitalization.
Unconditional full-context logs can be noisy; make it opt-in via a repo variable and avoid accidental shell interpolation.

-      - name: Display full Github context
-        run: echo "${{ toJSON(github) }}"
+      - name: Display full GitHub context
+        if: ${{ vars.SHOW_GITHUB_CONTEXT == 'true' }}
+        run: echo '${{ toJSON(github) }}'
template/.devcontainer/install-ci-tooling.py.jinja-base (1)

68-68: Harden curl retries/timeouts for fewer flaky installs; keep TLS strict.
Add conn-refused retries, a higher max-time, and enforce HTTPS protocol.

-                f"curl -fsSL --connect-timeout 20 --max-time 40 --retry 3 --retry-delay 5 https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
+                f"curl -fsSL --connect-timeout 20 --max-time 180 --retry 5 --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh",

Optional follow-up: mirror similar retry logic for the Windows PowerShell path (install.ps1) for parity.

.devcontainer/install-ci-tooling.py (1)

55-55: Same resiliency improvements recommended here.
Align flags with the template to reduce CI flakes.

-                f"curl -fsSL --connect-timeout 20 --max-time 40 --retry 3 --retry-delay 5 https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
+                f"curl -fsSL --connect-timeout 20 --max-time 180 --retry 5 --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbf71c5 and 7a50bff.

📒 Files selected for processing (6)
  • .devcontainer/devcontainer.json (1 hunks)
  • .devcontainer/install-ci-tooling.py (1 hunks)
  • extensions/context.py (2 hunks)
  • template/.devcontainer/install-ci-tooling.py.jinja-base (1 hunks)
  • template/.github/workflows/get-values.yaml.jinja-base (1 hunks)
  • template/extensions/context.py.jinja-base (2 hunks)
🔇 Additional comments (3)
.devcontainer/devcontainer.json (1)

62-62: LGTM: metadata hash update only.
No functional change; safe to merge.

extensions/context.py (1)

46-46: Approve — context keys synced with template
All new version keys are present in template/extensions/context.py.jinja-base and mirrored in extensions/context.py; no drift detected.

template/extensions/context.py.jinja-base (1)

41-41: Template keys in sync with runtime context — approved.
The referenced keys are present in template/extensions/context.py.jinja-base; keep them wired into generated package manifests.

@ejfine ejfine merged commit 8f2ecc6 into main Sep 17, 2025
7 checks passed
@ejfine ejfine deleted the curl branch September 17, 2025 17:43
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.

2 participants