Skip to content

Commit

Permalink
chore: allow complex workflow names (#715)
Browse files Browse the repository at this point in the history
* chore: allow complex workflow names

Signed-off-by: Carina Ursu <[email protected]>

* chore: fix buold:watch

Signed-off-by: Carina Ursu <[email protected]>

* chore: yarn.lock

Signed-off-by: Carina Ursu <[email protected]>

* chore: upgrade package

Signed-off-by: Carina Ursu <[email protected]>

---------

Signed-off-by: Carina Ursu <[email protected]>
  • Loading branch information
ursucarina authored Mar 9, 2023
1 parent 0a6ad81 commit 172664a
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 10 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ lint: #lints the package for common code smells
.PHONY: build_prod
build_prod:
yarn run clean
make pack
make types
BASE_URL=/console yarn run build:prod

.PHONY: pack
pack:
yarn workspaces focus --production --all
yarn run build:pack

.PHONY: types
types:
yarn workspaces focus --production --all
yarn run build:types

# test_unit runs all unit tests
.PHONY: test_unit
test_unit:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"ts-loader": "^9.2.6",
"ts-node": "^8.0.2",
"tsc-alias": "^1.7.0",
"tsc-watch": "^6.0.0",
"tslib": "^2.4.1",
"typescript": "^4.9.4",
"wait-on": "^6.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyteorg/console",
"version": "0.0.10",
"version": "0.0.11",
"description": "Flyteconsole main app module",
"main": "./dist/index.js",
"module": "./lib/index.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
"scripts": {
"debug": "NM_DEBUG_LEVEL=2 yarn",
"clean": "rm -rf dist && rm -rf lib && rm -rf **.tsbuildinfo || true",
"build:watch": "run -T tsc-watch --noClear -p ./tsconfig.es.build.json --onSuccess \"yarn build\"",
"build:watch": "run -T tsc-watch --noClear -p ./tsconfig.build.es.json --onSuccess \"yarn build\"",
"build": "yarn clean && yarn build:esm && yarn build:cjs",
"build:esm": "mkdir lib && cp -R src/assets ./lib && run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json",
"build:cjs": "mkdir dist && cp -R src/assets ./dist && run -T wait-on ./dist/assets && run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const EntityVersionsTable: React.FC<
state={state}
versionView={versionView}
onClick={handleClickRow({ ...row.id, resourceType })}
isChecked={entityVersion === row.id.version}
isChecked={decodeURIComponent(entityVersion) === row.id.version}
key={`workflow-version-row-${row.id.version}`}
/>
);
Expand Down
7 changes: 6 additions & 1 deletion packages/console/src/models/Common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export function makeIdentifierPath(
prefix: string,
{ project, domain, name, version }: Partial<Identifier>,
) {
const path = takeWhile([project, domain, name, version]).join('/');
const path = takeWhile([
project,
domain,
name,
decodeURIComponent(version || ''),
]).join('/');
return `${prefix}/${path}`;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/console/src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class Routes {
makeProjectDomainBoundPath(
project,
domain,
`/${entityType}/${entityName}/version/${version}`,
`/${entityType}/${entityName}/version/${encodeURIComponent(version)}`,
),
path: `${projectDomainBasePath}/:entityType/:entityName/version/:entityVersion`,
};
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@flyteorg/common": "^0.0.3",
"@flyteorg/console": "^0.0.10",
"@flyteorg/console": "^0.0.11",
"long": "^4.0.0",
"protobufjs": "~6.11.3",
"react-ga4": "^1.4.1",
Expand Down
104 changes: 101 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ __metadata:
resolution: "@flyteconsole/client-app@workspace:website"
dependencies:
"@flyteorg/common": ^0.0.3
"@flyteorg/console": ^0.0.10
"@flyteorg/console": ^0.0.11
"@types/long": ^3.0.32
long: ^4.0.0
protobufjs: ~6.11.3
Expand Down Expand Up @@ -2034,7 +2034,7 @@ __metadata:
languageName: unknown
linkType: soft

"@flyteorg/console@^0.0.10, @flyteorg/console@workspace:packages/console":
"@flyteorg/console@^0.0.11, @flyteorg/console@workspace:packages/console":
version: 0.0.0-use.local
resolution: "@flyteorg/console@workspace:packages/console"
dependencies:
Expand Down Expand Up @@ -10208,6 +10208,13 @@ __metadata:
languageName: node
linkType: hard

"duplexer@npm:~0.1.1":
version: 0.1.2
resolution: "duplexer@npm:0.1.2"
checksum: 62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0
languageName: node
linkType: hard

"duplexify@npm:^3.4.2, duplexify@npm:^3.6.0":
version: 3.7.1
resolution: "duplexify@npm:3.7.1"
Expand Down Expand Up @@ -10901,6 +10908,21 @@ __metadata:
languageName: node
linkType: hard

"event-stream@npm:=3.3.4":
version: 3.3.4
resolution: "event-stream@npm:3.3.4"
dependencies:
duplexer: ~0.1.1
from: ~0
map-stream: ~0.1.0
pause-stream: 0.0.11
split: 0.3
stream-combiner: ~0.0.4
through: ~2.3.1
checksum: 80b467820b6daf824d9fb4345d2daf115a056e5c104463f2e98534e92d196a27f2df5ea2aa085624db26f4c45698905499e881d13bc7c01f7a13eac85be72a22
languageName: node
linkType: hard

"event-target-shim@npm:^5.0.0":
version: 5.0.1
resolution: "event-target-shim@npm:5.0.1"
Expand Down Expand Up @@ -11570,6 +11592,7 @@ __metadata:
ts-loader: ^9.2.6
ts-node: ^8.0.2
tsc-alias: ^1.7.0
tsc-watch: ^6.0.0
tslib: ^2.4.1
typescript: ^4.9.4
wait-on: ^6.0.1
Expand Down Expand Up @@ -11754,6 +11777,13 @@ __metadata:
languageName: node
linkType: hard

"from@npm:~0":
version: 0.1.7
resolution: "from@npm:0.1.7"
checksum: b85125b7890489656eb2e4f208f7654a93ec26e3aefaf3bbbcc0d496fc1941e4405834fcc9fe7333192aa2187905510ace70417bbf9ac6f6f4784a731d986939
languageName: node
linkType: hard

"fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0":
version: 10.1.0
resolution: "fs-extra@npm:10.1.0"
Expand Down Expand Up @@ -15545,6 +15575,13 @@ __metadata:
languageName: node
linkType: hard

"map-stream@npm:~0.1.0":
version: 0.1.0
resolution: "map-stream@npm:0.1.0"
checksum: 38abbe4eb883888031e6b2fc0630bc583c99396be16b8ace5794b937b682a8a081f03e8b15bfd4914d1bc88318f0e9ac73ba3512ae65955cd449f63256ddb31d
languageName: node
linkType: hard

"map-visit@npm:^1.0.0":
version: 1.0.0
resolution: "map-visit@npm:1.0.0"
Expand Down Expand Up @@ -16337,6 +16374,13 @@ __metadata:
languageName: node
linkType: hard

"node-cleanup@npm:^2.1.2":
version: 2.1.2
resolution: "node-cleanup@npm:2.1.2"
checksum: 584cdc3e42560a998b4579f91ed8f936b27011628f3102e5a1093205f0691cdf8d899287d1f2e4d2071ea4ab1d615810bad6dbe2b988ef173a1cbaa76d8165b3
languageName: node
linkType: hard

"node-dir@npm:^0.1.10":
version: 0.1.17
resolution: "node-dir@npm:0.1.17"
Expand Down Expand Up @@ -17583,6 +17627,15 @@ __metadata:
languageName: node
linkType: hard

"pause-stream@npm:0.0.11":
version: 0.0.11
resolution: "pause-stream@npm:0.0.11"
dependencies:
through: ~2.3
checksum: 3c4a14052a638b92e0c96eb00c0d7977df7f79ea28395250c525d197f1fc02d34ce1165d5362e2e6ebbb251524b94a76f3f0d4abc39ab8b016d97449fe15583c
languageName: node
linkType: hard

"pbkdf2@npm:^3.0.3":
version: 3.1.2
resolution: "pbkdf2@npm:3.1.2"
Expand Down Expand Up @@ -18156,6 +18209,17 @@ __metadata:
languageName: node
linkType: hard

"ps-tree@npm:^1.2.0":
version: 1.2.0
resolution: "ps-tree@npm:1.2.0"
dependencies:
event-stream: =3.3.4
bin:
ps-tree: ./bin/ps-tree.js
checksum: e635dd00f53d30d31696cf5f95b3a8dbdf9b1aeb36d4391578ce8e8cd22949b7c5536c73b0dc18c78615ea3ddd4be96101166be59ca2e3e3cb1e2f79ba3c7f98
languageName: node
linkType: hard

"psl@npm:^1.1.33":
version: 1.9.0
resolution: "psl@npm:1.9.0"
Expand Down Expand Up @@ -20172,6 +20236,15 @@ __metadata:
languageName: node
linkType: hard

"split@npm:0.3":
version: 0.3.3
resolution: "split@npm:0.3.3"
dependencies:
through: 2
checksum: 2e076634c9637cfdc54ab4387b6a243b8c33b360874a25adf6f327a5647f07cb3bf1c755d515248eb3afee4e382278d01f62c62d87263c118f28065b86f74f02
languageName: node
linkType: hard

"split@npm:^1.0.0":
version: 1.0.1
resolution: "split@npm:1.0.1"
Expand Down Expand Up @@ -20305,6 +20378,15 @@ __metadata:
languageName: node
linkType: hard

"stream-combiner@npm:~0.0.4":
version: 0.0.4
resolution: "stream-combiner@npm:0.0.4"
dependencies:
duplexer: ~0.1.1
checksum: 844b622cfe8b9de45a6007404f613b60aaf85200ab9862299066204242f89a7c8033b1c356c998aa6cfc630f6cd9eba119ec1c6dc1f93e245982be4a847aee7d
languageName: node
linkType: hard

"stream-each@npm:^1.1.0":
version: 1.2.3
resolution: "stream-each@npm:1.2.3"
Expand Down Expand Up @@ -20891,7 +20973,7 @@ __metadata:
languageName: node
linkType: hard

"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.8":
"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.8, through@npm:~2.3, through@npm:~2.3.1":
version: 2.3.8
resolution: "through@npm:2.3.8"
checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd
Expand Down Expand Up @@ -21209,6 +21291,22 @@ __metadata:
languageName: node
linkType: hard

"tsc-watch@npm:^6.0.0":
version: 6.0.0
resolution: "tsc-watch@npm:6.0.0"
dependencies:
cross-spawn: ^7.0.3
node-cleanup: ^2.1.2
ps-tree: ^1.2.0
string-argv: ^0.3.1
peerDependencies:
typescript: "*"
bin:
tsc-watch: dist/lib/tsc-watch.js
checksum: 34e74a703ecb28689d0f6ba311781ff68be47f5f095439654b095f3ea4a5921708fca61b5727e33527639a9a147b42d10bc3fe3595afee92b41b2bacfba06043
languageName: node
linkType: hard

"tsconfig-paths@npm:^3.14.1":
version: 3.14.1
resolution: "tsconfig-paths@npm:3.14.1"
Expand Down

0 comments on commit 172664a

Please sign in to comment.