Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Devcontainer upgrade to Ubuntu Noble & Node 22 #10770

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

GingerGeek
Copy link
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Upgrades Dev Container to Ubuntu 24.04 base and Node 22 (latest LTS)

Also migrates VSCode configuration/settings to correct place in schema

Adds a fairly hacky workaround for #10769 where if the start or serve commands are ran within Remote Containers it will default to 127.0.0.1 instead of localhost. Ideally this would have been a cleaner refactor, or fixed somewhere upstream (ie vscode forwards port correctly, or webpack dev server support dual-stack binding)

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

#10769

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 14, 2024
Copy link

netlify bot commented Dec 14, 2024

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit ff5be65
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6771f969c9d70a00081de527
😎 Deploy Preview https://deploy-preview-10770--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Dec 14, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 71 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 52 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 72 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 62 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🔴 47 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 72 🟢 100 🟢 100 🟠 86 Report

@slorber slorber linked an issue Dec 26, 2024 that may be closed by this pull request
7 tasks
Comment on lines 1 to 27
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import logger from '@docusaurus/logger';

export function forceV4OnRemoteContainers(
userCLIConfig: OptionallyProvidedHost,
): void {
if (process.env.REMOTE_CONTAINERS === 'true') {
if (!userCLIConfig.host) {
userCLIConfig.host = '127.0.0.1';
logger.info(
'Will default to binding to IPv4 local address to better support VSCode Remote port forwarding',
);
} else {
logger.warn('VSCode Remote may not support IPv6');
}
}
}

export type OptionallyProvidedHost = {
host?: string;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't want to add Devcontainer specific things into Docusaurus core.

At best I can propose to implement docusaurus start --host 127.0.0, it's already supported for docusaurus serve. Devcontainer hacks should be added "from the outside"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will pull out the hack from this PR so it's just the devcontainer upgrade

@slorber slorber marked this pull request as draft December 26, 2024 12:47
@GingerGeek GingerGeek changed the title Devcontainer upgrade and implement workaround for #10769 Devcontainer upgrade to Ubuntu Noble & Node 22 Dec 30, 2024
@GingerGeek GingerGeek changed the title Devcontainer upgrade to Ubuntu Noble & Node 22 chore: Devcontainer upgrade to Ubuntu Noble & Node 22 Dec 30, 2024
@GingerGeek GingerGeek marked this pull request as ready for review December 30, 2024 01:41
@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Dec 30, 2024
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

thanks 👍

@slorber slorber merged commit 56ccf19 into facebook:main Dec 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev Containers with VS Code Remote on Windows do not support IPv6 loopback
3 participants