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

Patch dagre to fix bug #17691

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions js_modules/dagster-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"post-build": "cd ../../python_modules/dagster-webserver/dagster_webserver && rm -rf webapp && mkdir -p webapp && cp -r ../../../js_modules/dagster-ui/packages/app-oss/build ./webapp/ && mkdir -p webapp/build/vendor && cp -r graphql-playground ./webapp/build/vendor && cp ../../../js_modules/dagster-ui/packages/app-oss/csp-header.txt ./webapp/build",
"lint": "yarn workspace @dagster-io/app-oss lint && yarn workspace @dagster-io/ui-core lint && yarn workspace @dagster-io/ui-components lint",
"start": "yarn workspace @dagster-io/app-oss start",
"ts": "yarn workspace @dagster-io/app-oss ts && yarn workspace @dagster-io/ui-components ts"
"ts": "yarn workspace @dagster-io/app-oss ts && yarn workspace @dagster-io/ui-components ts",
"postinstall": "patch-package"
},
"workspaces": {
"packages": [
Expand All @@ -18,9 +19,12 @@
},
"packageManager": "[email protected]",
"dependencies": {
"graphql.macro": "^1.4.2"
"graphql.macro": "^1.4.2",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0"
},
"devDependencies": {
"@types/dagre": "^0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this one need to be here? It feels odd because the patcher doesn't need to be able to parse the src?

"file-loader": "^6.2.0"
}
}
2 changes: 1 addition & 1 deletion js_modules/dagster-ui/packages/ui-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"codemirror": "^5.65.2",
"color": "^3.0.0",
"cronstrue": "^1.84.0",
"dagre": "^0.8.2",
"dagre": "^0.8.5",
"date-fns": "^2.28.0",
"dayjs": "^1.11.7",
"deepmerge": "^4.2.2",
Expand Down
15 changes: 15 additions & 0 deletions js_modules/dagster-ui/patches/dagre+0.8.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/dagre/lib/order/index.js b/node_modules/dagre/lib/order/index.js
index 4ac2d9f..a2182fe 100644
--- a/node_modules/dagre/lib/order/index.js
+++ b/node_modules/dagre/lib/order/index.js
@@ -73,7 +73,9 @@ function sweepLayerGraphs(layerGraphs, biasRight) {
function assignOrder(g, layering) {
_.forEach(layering, function(layer) {
_.forEach(layer, function(v, i) {
- g.node(v).order = i;
+ try {
+ g.node(v).order = i;
+ } catch (e) {}
});
});
}
120 changes: 115 additions & 5 deletions js_modules/dagster-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2265,8 +2265,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "@dagster-io/dagster-ui-workspace@workspace:."
dependencies:
"@types/dagre": ^0
file-loader: ^6.2.0
graphql.macro: ^1.4.2
patch-package: ^8.0.0
postinstall-postinstall: ^2.1.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2454,7 +2457,7 @@ __metadata:
codemirror: ^5.65.2
color: ^3.0.0
cronstrue: ^1.84.0
dagre: ^0.8.2
dagre: ^0.8.5
date-fns: ^2.28.0
dayjs: ^1.11.7
deepmerge: ^4.2.2
Expand Down Expand Up @@ -6694,6 +6697,13 @@ __metadata:
languageName: node
linkType: hard

"@types/dagre@npm:^0":
version: 0.7.51
resolution: "@types/dagre@npm:0.7.51"
checksum: 6a23cc406082fe867dc0be0a117ae0c493bcfb6e08b83ea55a09b4f43e6eb5efc34a102d1a039fa82d2df700d55ee5481c0c3febdf710b972bb345c8a7f6c316
languageName: node
linkType: hard

"@types/dagre@npm:^0.7.42":
version: 0.7.49
resolution: "@types/dagre@npm:0.7.49"
Expand Down Expand Up @@ -8020,6 +8030,13 @@ __metadata:
languageName: node
linkType: hard

"@yarnpkg/lockfile@npm:^1.1.0":
version: 1.1.0
resolution: "@yarnpkg/lockfile@npm:1.1.0"
checksum: 05b881b4866a3546861fee756e6d3812776ea47fa6eb7098f983d6d0eefa02e12b66c3fff931574120f196286a7ad4879ce02743c8bb2be36c6a576c7852083a
languageName: node
linkType: hard

"abab@npm:^2.0.6":
version: 2.0.6
resolution: "abab@npm:2.0.6"
Expand Down Expand Up @@ -8760,6 +8777,13 @@ __metadata:
languageName: node
linkType: hard

"at-least-node@npm:^1.0.0":
version: 1.0.0
resolution: "at-least-node@npm:1.0.0"
checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e
languageName: node
linkType: hard

"atob@npm:^2.1.2":
version: 2.1.2
resolution: "atob@npm:2.1.2"
Expand Down Expand Up @@ -10045,6 +10069,13 @@ __metadata:
languageName: node
linkType: hard

"ci-info@npm:^3.7.0":
version: 3.9.0
resolution: "ci-info@npm:3.9.0"
checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87
languageName: node
linkType: hard

"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3":
version: 1.0.4
resolution: "cipher-base@npm:1.0.4"
Expand Down Expand Up @@ -10980,7 +11011,7 @@ __metadata:
languageName: node
linkType: hard

"dagre@npm:^0.8.2":
"dagre@npm:^0.8.5":
version: 0.8.5
resolution: "dagre@npm:0.8.5"
dependencies:
Expand Down Expand Up @@ -13238,6 +13269,15 @@ __metadata:
languageName: node
linkType: hard

"find-yarn-workspace-root@npm:^2.0.0":
version: 2.0.0
resolution: "find-yarn-workspace-root@npm:2.0.0"
dependencies:
micromatch: ^4.0.2
checksum: fa5ca8f9d08fe7a54ce7c0a5931ff9b7e36f9ee7b9475fb13752bcea80ec6b5f180fa5102d60b376d5526ce924ea3fc6b19301262efa0a5d248dd710f3644242
languageName: node
linkType: hard

"flat-cache@npm:^3.0.4":
version: 3.0.4
resolution: "flat-cache@npm:3.0.4"
Expand Down Expand Up @@ -13402,6 +13442,18 @@ __metadata:
languageName: node
linkType: hard

"fs-extra@npm:^9.0.0":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
at-least-node: ^1.0.0
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20
languageName: node
linkType: hard

"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
Expand Down Expand Up @@ -15222,7 +15274,7 @@ __metadata:
languageName: node
linkType: hard

"is-wsl@npm:^2.2.0":
"is-wsl@npm:^2.1.1, is-wsl@npm:^2.2.0":
version: 2.2.0
resolution: "is-wsl@npm:2.2.0"
dependencies:
Expand Down Expand Up @@ -16647,7 +16699,7 @@ __metadata:
languageName: node
linkType: hard

"json-stable-stringify@npm:^1.0.1":
"json-stable-stringify@npm:^1.0.1, json-stable-stringify@npm:^1.0.2":
version: 1.0.2
resolution: "json-stable-stringify@npm:1.0.2"
dependencies:
Expand Down Expand Up @@ -16750,6 +16802,15 @@ __metadata:
languageName: node
linkType: hard

"klaw-sync@npm:^6.0.0":
version: 6.0.0
resolution: "klaw-sync@npm:6.0.0"
dependencies:
graceful-fs: ^4.1.11
checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475
languageName: node
linkType: hard

"kleur@npm:^3.0.3":
version: 3.0.3
resolution: "kleur@npm:3.0.3"
Expand Down Expand Up @@ -18673,6 +18734,16 @@ __metadata:
languageName: node
linkType: hard

"open@npm:^7.4.2":
version: 7.4.2
resolution: "open@npm:7.4.2"
dependencies:
is-docker: ^2.0.0
is-wsl: ^2.1.1
checksum: 3333900ec0e420d64c23b831bc3467e57031461d843c801f569b2204a1acc3cd7b3ec3c7897afc9dde86491dfa289708eb92bba164093d8bd88fb2c231843c91
languageName: node
linkType: hard

"open@npm:^8.0.4, open@npm:^8.4.0":
version: 8.4.2
resolution: "open@npm:8.4.2"
Expand Down Expand Up @@ -18967,6 +19038,31 @@ __metadata:
languageName: node
linkType: hard

"patch-package@npm:^8.0.0":
version: 8.0.0
resolution: "patch-package@npm:8.0.0"
dependencies:
"@yarnpkg/lockfile": ^1.1.0
chalk: ^4.1.2
ci-info: ^3.7.0
cross-spawn: ^7.0.3
find-yarn-workspace-root: ^2.0.0
fs-extra: ^9.0.0
json-stable-stringify: ^1.0.2
klaw-sync: ^6.0.0
minimist: ^1.2.6
open: ^7.4.2
rimraf: ^2.6.3
semver: ^7.5.3
slash: ^2.0.0
tmp: ^0.0.33
yaml: ^2.2.2
bin:
patch-package: index.js
checksum: d23cddc4d1622e2d8c7ca31b145c6eddb24bd271f69905e766de5e1f199f0b9a5479a6a6939ea857288399d4ed249285639d539a2c00fbddb7daa39934b007a2
languageName: node
linkType: hard

"path-browserify@npm:^1.0.1":
version: 1.0.1
resolution: "path-browserify@npm:1.0.1"
Expand Down Expand Up @@ -19621,6 +19717,13 @@ __metadata:
languageName: node
linkType: hard

"postinstall-postinstall@npm:^2.1.0":
version: 2.1.0
resolution: "postinstall-postinstall@npm:2.1.0"
checksum: e1d34252cf8d2c5641c7d2db7426ec96e3d7a975f01c174c68f09ef5b8327bc8d5a9aa2001a45e693db2cdbf69577094d3fe6597b564ad2d2202b65fba76134b
languageName: node
linkType: hard

"prelude-ls@npm:^1.2.1":
version: 1.2.1
resolution: "prelude-ls@npm:1.2.1"
Expand Down Expand Up @@ -21191,7 +21294,7 @@ __metadata:
languageName: node
linkType: hard

"rimraf@npm:^2.6.1":
"rimraf@npm:^2.6.1, rimraf@npm:^2.6.3":
version: 2.7.1
resolution: "rimraf@npm:2.7.1"
dependencies:
Expand Down Expand Up @@ -24508,6 +24611,13 @@ __metadata:
languageName: node
linkType: hard

"yaml@npm:^2.2.2":
version: 2.3.4
resolution: "yaml@npm:2.3.4"
checksum: e6d1dae1c6383bcc8ba11796eef3b8c02d5082911c6723efeeb5ba50fc8e881df18d645e64de68e421b577296000bea9c75d6d9097c2f6699da3ae0406c030d8
languageName: node
linkType: hard

"yargs-parser@npm:^18.1.2":
version: 18.1.3
resolution: "yargs-parser@npm:18.1.3"
Expand Down