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

Update devcontainer.json schema with "hostRequirements" #5144

Closed
chrmarti opened this issue Jun 4, 2021 · 7 comments
Closed

Update devcontainer.json schema with "hostRequirements" #5144

chrmarti opened this issue Jun 4, 2021 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Jun 4, 2021

"hostRequirements": {
  "cpus": 8,
  "memory": "16gb", // otherwise is bytes - allows for other units like mb, or k
  "storage": "32gb" // otherwise is bytes - allows for other units like tb, or mb, or k
}
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers labels Jun 4, 2021
@chrmarti chrmarti self-assigned this Jun 4, 2021
@chrmarti chrmarti added this to the May 2021 milestone Jun 4, 2021
@chrmarti chrmarti added the candidate Issue identified as probable candidate for fixing in the next release label Jun 4, 2021
@chrmarti chrmarti closed this as completed Jun 4, 2021
@rzhao271
Copy link

rzhao271 commented Jun 7, 2021

@chrmarti I'm wondering how to verify this issue?
I added the following to my devcontainer.json, and rebuilt and reopened the workspace in a container, and the container opened as usual:

"hostRequirements": {
	"cpus": 100,
	"memory": "2kb",
	"storage": "1mb
}

@rzhao271 rzhao271 reopened this Jun 7, 2021
@chrmarti
Copy link
Contributor Author

chrmarti commented Jun 8, 2021

@rzhao271 I should have mentioned: This is only implemented in Codespaces right now.

To verify make sure you get proposals for the new properties, their format (number or number with unit) is validated and there are no errors/warnings when using valid values.

@chrmarti chrmarti closed this as completed Jun 8, 2021
@rzhao271
Copy link

rzhao271 commented Jun 8, 2021

@chrmarti I adjusted the values in Codespaces Web and rebuilt the container.
The values pass validation, but I'm not sure whether Codespaces handled the values properly.

examplecs

@chrmarti
Copy link
Contributor Author

chrmarti commented Jun 9, 2021

I'm not sure what the fallback is when the requirements can't be met. /fyi @jshorty see screenshot above.

@jshorty
Copy link

jshorty commented Jun 9, 2021

At the moment the only place where these get used is in surfacing the list of available machine types for a new/existing codespace— for example here's the UI in GH to create one for github/github:
Screen Shot 2021-06-09 at 9 10 00 AM
and related hostRequirements:

  "hostRequirements": {    // Require specs of the extremeLinux machine type for codespaces
    "storage": "64gb",
    "memory": "64gb"
  },

When creating from within VS Code it'll filter the list down to eligible choices but won't display these grayed-out ones.

There isn't really a fallback in either case, we'll just display warning messages— but in GH the modal context should help explain. In the VS Code case, I believe the extension would give the following error:

"There are currently no machine types available for which you have access. Please check the repository's devcontainer configuration or contact support."

@rzhao271
Copy link

rzhao271 commented Jun 9, 2021

@chrmarti I'll let you create a new issue for #5144 (comment) as you see fit.

Marking this issue as verified.

@rzhao271 rzhao271 added the verified Verification succeeded label Jun 9, 2021
@jshorty
Copy link

jshorty commented Jun 9, 2021

If desired, we could update the GH API to give a more specific message in the case where the user would have access to one ore more machine types, but they're all excluded by devcontainer requirements.

oxy pushed a commit to coder/code-server that referenced this issue Jun 10, 2021
b4c1bd0a9b0 Merge pull request #125817 from microsoft/aeschli/125786
33d504f8455 clarify nls comment
d5fbc9f45fa fix localization strings with `command:`. For  #125786
f8b576c274b trust the empty window by default (#125788)
c5e845182bf Dont use exp service for choosing first content behaviour (#125780)
78429fb8736 Use interpolation to keep special syntax out of strings to be translated (#125790)
47c2272a70d candy/125576 (#125787)
1e7b9242e89 Merge pull request #125773 from microsoft/roblou/fix122768
134cc8b7711 Update values for keybinding query context to match real keybindings. Fix #122768
26317e8dccd fixes #125722 (#125768)
629091038fc allow a 3rd character for first part of language id (#125761)
5e6379fd7a9 Merge pull request #125741 from microsoft/tyriar/r157_125729
098c99e2237 Set terminal title in ctor for custom pty terminals
c7119ae8b63 Merge pull request #125679 from microsoft/isidorn/fixRunMenu
0ef242cb5cc Merge pull request #125728 from microsoft/joh/fix/125716
c188ea91a64 make sure to transform notebook data metadata
e27b85b9958 fix #125702 (#125703)
008c3ecf4cd Port fix for git diff paths in webviews to 1.57 (#125704)
c926ecf021a Clone object before applying migrated setting (#125696)
6d4a8af5cfc Hide terminal menu if no process support is registered
2c9833b549d better context key for run menu
bf84ee619e0 #125527 (#125651)
2c4bd4f2b3c Merge pull request #125654 from microsoft/hediet/reduce-flickering-of-inline-completions
2e9321da48b Merge pull request #125657 from microsoft/hediet/adjust-inline-completions-color
b915673f7b2 Fix #125569 (#125650)
1c5f331fa08 Merge pull request #125653 from microsoft/hediet/fix-no-focus-after-accept
9bde5523814 Adjusts inline completions color. Fixes #125646.
7b724945310 Reduces flickering of inline completions & fixes context key.
5ba2e425f31 Fixes #125524 by focusing editor after commit.
6cdc6160057 Merge pull request #125649 from microsoft/joh/fix/125550
b3d2cd902b7 re-throw and dispose reference when resolving failed
dcc182fe3d2 Revert ESBuild updates and fix #125518 (#125574)
bdafbc3b5f2 Merge pull request #125552 from microsoft/roblou/disableRunToolbar
ce8505d5580 Add "hostRequirements" to schema (microsoft/vscode-remote-release#5144)
de98ebbc81e only show notification once per window reload (#125548)
31a11d3b786 Disable consolidated run button by default. Fix #125544

git-subtree-dir: lib/vscode
git-subtree-split: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants