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

Binder build fail on PRs #14264

Closed
krassowski opened this issue Mar 22, 2023 · 3 comments · Fixed by #14273
Closed

Binder build fail on PRs #14264

krassowski opened this issue Mar 22, 2023 · 3 comments · Fixed by #14273
Labels
bug maintenance status:Needs Triage Applied to new issues that need triage

Comments

@krassowski
Copy link
Member

Description

 ---> 4b2667f29033
Step 47/52 : RUN ./binder/postBuild
 ---> Running in fc72849731c8
+ mkdir _reports_
+ tee _reports_/00_yarn.txt
+ yarn --ignore-scripts --ignore-optional
Unknown Syntax Error: Unsupported option name ("--ignore-scripts").

$ yarn cache clean [--mirror] [--all]
$ yarn cache clean [--mirror] [--all]
$ yarn config get [--json] [--no-redacted] <name>
$ yarn config set [--json] [-H,--home] <name> <value>
$ yarn config unset [-H,--home] <name>
$ yarn set resolution [-s,--save] <descriptor> <resolution>
$ yarn set version from sources [--path #0] [--repository #0] [--branch #0] [--plugin #0] [--no-minify] [-f,--force] [--skip-plugins]
$ yarn set version [--only-if-needed] <version>
$ yarn workspaces list [--since] [-R,--recursive] [--no-private] [-v,--verbose] [--json]
$ yarn --clipanion=definitions
$ yarn help
$ yarn help
$ yarn help
$ yarn <leadingArgument> ...
$ yarn -v
$ yarn -v
$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
$ yarn bin [-v,--verbose] [--json] [name]
$ yarn config [-v,--verbose] [--why] [--json]
$ yarn dedupe [-s,--strategy #0] [-c,--check] [--json] [--mode #0] ...
$ yarn exec <commandName> ...
$ yarn explain peer-requirements [hash]
$ yarn explain [--json] [code]
$ yarn info [-A,--all] [-R,--recursive] [-X,--extra #0] [--cache] [--dependents] [--manifest] [--name-only] [--virtuals] [--json] ...
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
$ yarn link [-A,--all] [-p,--private] [-r,--relative] <destination>
$ yarn unlink [-A,--all] ...
$ yarn node ...
$ yarn plugin import from sources [--path #0] [--repository #0] [--branch #0] [--no-minify] [-f,--force] <name>
$ yarn plugin import <name>
$ yarn plugin remove <name>
$ yarn plugin list [--json]
$ yarn plugin runtime [--json]
$ yarn rebuild ...
$ yarn remove [-A,--all] [--mode #0] ...
$ yarn run
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
$ yarn up [-i,--interactive] [-E,--exact] [-T,--tilde] [-C,--caret] [-R,--recursive] [--mode #0] ...
$ yarn why [-R,--recursive] [--json] [--peers] <package>
$ yarn workspace <workspaceName> <commandName> ...
$ yarn create [-p,--package #0] [-q,--quiet] <command> ...
$ yarn dlx [-p,--package #0] [-q,--quiet] <command> ...
$ yarn init [-p,--private] [-w,--workspace] [-i,--install]
$ yarn npm audit [-A,--all] [-R,--recursive] [--environment #0] [--json] [--severity #0] [--exclude #0] [--ignore #0]
$ yarn npm info [-f,--fields #0] [--json] ...
$ yarn npm login [-s,--scope #0] [--publish]
$ yarn npm logout [-s,--scope #0] [--publish] [-A,--all]
$ yarn npm publish [--access #0] [--tag #0] [--tolerate-republish] [--otp #0]
$ yarn npm tag add <package> <tag>
$ yarn npm tag list [--json] [package]
$ yarn npm tag remove <package> <tag>
$ yarn npm whoami [-s,--scope #0] [--publish]
$ yarn pack [--install-if-needed] [-n,--dry-run] [--json] [-o,--out #0]
$ yarn patch-commit [-s,--save] <patchFolder>
$ yarn patch [--json] <package>
$ yarn unplug [-A,--all] [-R,--recursive] [--json] ...

real    0m1.565s
user    0m1.509s
sys     0m0.194s
Removing intermediate container fc72849731c8
The command '/bin/sh -c ./binder/postBuild' returned a non-zero code: 1

Reproduce

Try binder badge on #14109 or #14205

Expected behavior

Binder works.

@andrii-i
Copy link
Contributor

andrii-i commented Mar 23, 2023

Noticed broken binder on all PRs and on majority of jupyterlab/jupyterlab branches. Fixing it would make reviewing easier as I won't have to pull and build the PRs locally to test them, would be able to just use binder instead.

Also note that binder link from jupyterlab/jupyterlab master builds version 3.2.9, not head-of-master.

@bollwyvl
Copy link
Contributor

bollwyvl commented Mar 25, 2023

My guess is that jupyter lab --dev-mode is just too slow to start. This is not surprising, as it seems to reinstall node_modules a fairly hard way, and then do most of a fairly hard build.

I am testing this out on #14273, but it's just a band-aid for what might be a very broken test/build/demo/contribute workflow that someone clever can fix better.

Binder

bollwyvl added a commit to bollwyvl/jupyterlab that referenced this issue Mar 25, 2023
@krassowski
Copy link
Member Author

This is not surprising, as it seems to reinstall node_modules a fairly hard way, and then do most of a fairly hard build.

But it should not do that...

So it is because ensure_node_modules check was not ported correctly to yarn 3 which no longer has yarn check:

def ensure_node_modules(cwd, logger=None):
"""Ensure that node_modules is up to date.
Returns true if the node_modules was updated.
"""
logger = _ensure_logger(logger)
yarn_proc = ProgressProcess(
["node", YARN_PATH, "check", "--verify-tree"], cwd=cwd, logger=logger
)

yarn check was deprecated and removed see yarnpkg/berry#1689 https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-remove-yarn-check.md

I believe we can get a behaviour which is close enough with yarn install --immutable

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug maintenance status:Needs Triage Applied to new issues that need triage
Projects
None yet
3 participants