Skip to content

fix: enable CI checks to run from devcontainer - #1136

Open
vdstrizhkova wants to merge 1 commit into
microsoft:mainfrom
vdstrizhkova:feat/devcontainer-docker-megalinter
Open

fix: enable CI checks to run from devcontainer#1136
vdstrizhkova wants to merge 1 commit into
microsoft:mainfrom
vdstrizhkova:feat/devcontainer-docker-megalinter

Conversation

@vdstrizhkova

Copy link
Copy Markdown

What are you trying to address

This PR makes all CI checks runnable from the devcontainer, so contributors can validate their changes locally before pushing.

Changes:

  • .devcontainer/devcontainer.json — Adds the docker-in-docker devcontainer feature, required to run the MegaLinter Docker image from inside the devcontainer. Also migrates settings to the current customizations.vscode schema and adds the ms-azuretools.vscode-docker extension.
  • .devcontainer/devcontainer-lock.json — New lock file pinning the docker-in-docker feature to v2.17.0 for reproducible builds.
  • .devcontainer/Dockerfile — Updates the base image to mcr.microsoft.com/devcontainers/python:1-${VARIANT} and removes a stale Yarn apt repository that caused apt-get update failures.
  • .devcontainer/run-megalinter.sh — New helper script that mirrors the MegaLinter CI step locally. Running bash .devcontainer/run-megalinter.sh scans only changed files (matching VALIDATE_ALL_CODEBASE: false in CI); VALIDATE_ALL_CODEBASE=true bash .devcontainer/run-megalinter.sh scans everything.
  • requirements-docs.txt — Pins Pygments>=2,<2.20 to avoid an AttributeError introduced in Pygments 2.20.0, which caused the mkdocs build to crash when pymdownx.highlight passes filename=None to HtmlFormatter.
  • lychee.toml — Accepts HTTP 403 and 429 responses in addition to 2xx, preventing false-positive link-check failures on sites (including GitHub) that block automated crawlers. Also removes an invalid header table entry and excludes additional bot-blocking domains.

Checklist

  • Changes follow the repo structure and land in the appropriate folder and section
  • No confidential information
  • No duplicated content
  • Labeled appropriately
  • This PR was reviewed by at least one subject matter expert
  • No lint check errors related to your changes

Note: You may see link check errors on pages you have not touched. This is normal, and due to either broken links or sites that reject link checker bots. The reviewer will help you get to a green state on these.

- Add Docker-in-Docker feature and run-megalinter.sh script so MegaLinter
  can be executed locally via .devcontainer/run-megalinter.sh
- Update devcontainer base image to devcontainers/python:1 and remove
  stale Yarn apt repository that causes apt-get update failures
- Pin Pygments<2.20 in requirements-docs.txt to fix mkdocs build:
  Pygments 2.20.0 calls html.escape() on a filename option that pymdownx
  can pass as None, causing AttributeError during documentation build
- Accept HTTP 403/429 in lychee.toml to prevent false-positive link
  failures from GitHub rate-limiting and bot-protection in CI; also
  exclude known bot-blocking domains
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.

1 participant