Skip to content

Conversation

@Kaniska244
Copy link
Contributor

Ref: https://github.com/github/codespaces/issues/22031

Description of changes:

  • The above codespace availability incident was created to address the multiple outages noticed in DockerHub registry which caused downtime for codepaces as devcontainer up and build commands injects syntax directive # syntax=docker/dockerfile:1.4 which forces devcontainer cli to download docker/dockerfile:1.4 parser image from DockerHub registry. This change was added in PR with #syntax directives + buildkit + user namespace remapping by auto-injecting the #syntax directive in dev container build. This is not required for docker engine version v23 onwards as the default moby buildkit version includes docker/dockerfile:1.4 or higher version of the parser. As part of this PR adding precautionary check to call DockerHub registry URL and confirm the availability before auto-injecting the #syntax directive.

Changelog:

  • Changed src/spec-node/utils.ts by changing the faulty error logging in retry function.
  • Added a new precautionary check as described above, in src/spec-node/containerFeatures.ts file.

Checklist:

  • All checks are passed.

@Kaniska244 Kaniska244 changed the title Adding precautionary check for dockerhub registry availability in dev container cli Adding precautionary check for DockerHub registry availability in dev container cli Nov 28, 2025
@Kaniska244 Kaniska244 marked this pull request as ready for review December 1, 2025 12:57
@Kaniska244 Kaniska244 requested a review from a team as a code owner December 1, 2025 12:57
@sam-byng sam-byng requested review from a team and sam-byng and removed request for a team December 1, 2025 14:25
sam-byng
sam-byng previously approved these changes Dec 1, 2025
Copy link

@sam-byng sam-byng left a comment

Choose a reason for hiding this comment

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

LGTM - I'm happy with this, if we've done sufficient testing

We could have made a general utility function in utils.ts to check the dockerhub auth/ registry access status, and placed the image name/version as variables, but i'm happy with this, can extend this in future if we need.

question: What testing have you done here? Can you update the PR description to state this?

Co-authored-by: Sam Byng <sam-byng@github.com>
sam-byng
sam-byng previously approved these changes Dec 1, 2025
@Kaniska244 Kaniska244 requested a review from sam-byng December 1, 2025 16:52
Copy link

@sam-byng sam-byng left a comment

Choose a reason for hiding this comment

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

Thanks - looks better now ✅

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