From ea34ec75381d45b5e0638dda434fad1938d85e7f Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Fri, 18 Aug 2023 10:50:43 +0200 Subject: [PATCH] chore(site): regenerate provisioner stub (#9151) --- .github/workflows/ci.yaml | 8 +++++++- Makefile | 9 ++++++++- scripts/helm.sh | 2 +- site/e2e/provisionerGenerated.ts | 9 +++++++++ site/package.json | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8212e77e9b..5510e0005b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -508,9 +508,15 @@ jobs: - name: Setup Terraform uses: ./.github/actions/setup-tf + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + + - name: Run the Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v2 + - name: Build run: | - make -B site/out/index.html + nix-shell --command 'make -B site/out/index.html' - run: pnpm playwright:install working-directory: site diff --git a/Makefile b/Makefile index 4ec4157cd7..0a112b24a8 100644 --- a/Makefile +++ b/Makefile @@ -470,7 +470,8 @@ gen: \ .prettierignore \ site/.prettierrc.yaml \ site/.prettierignore \ - site/.eslintignore + site/.eslintignore \ + site/e2e/provisionerGenerated.ts .PHONY: gen # Mark all generated files as fresh so make thinks they're up-to-date. This is @@ -492,6 +493,7 @@ gen/mark-fresh: site/.prettierrc.yaml \ site/.prettierignore \ site/.eslintignore \ + site/e2e/provisionerGenerated.ts \ " for file in $$files; do echo "$$file" @@ -538,6 +540,11 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find ./coders cd site pnpm run format:types +site/e2e/provisionerGenerated.ts: + cd site + ../scripts/pnpm_install.sh + pnpm run gen:provisioner + coderd/rbac/object_gen.go: scripts/rbacgen/main.go coderd/rbac/object.go go run scripts/rbacgen/main.go ./coderd/rbac > coderd/rbac/object_gen.go diff --git a/scripts/helm.sh b/scripts/helm.sh index 1397281c7e..fa3283b1ac 100755 --- a/scripts/helm.sh +++ b/scripts/helm.sh @@ -75,7 +75,7 @@ cdroot temp_dir="$(mktemp -d)" cdroot -cd ./helm/$chart +cd "./helm/${chart}" log "--- Updating dependencies" helm dependency update . log "--- Packaging helm chart $chart for version $version ($output_path)" diff --git a/site/e2e/provisionerGenerated.ts b/site/e2e/provisionerGenerated.ts index 6acdde763f..66b6c222c9 100644 --- a/site/e2e/provisionerGenerated.ts +++ b/site/e2e/provisionerGenerated.ts @@ -64,7 +64,10 @@ export interface RichParameter { validationMax?: number | undefined validationMonotonic: string required: boolean + /** legacy_variable_name was removed (= 14) */ displayName: string + order: number + ephemeral: boolean } /** RichParameterValue holds the key/value mapping of a parameter. */ @@ -356,6 +359,12 @@ export const RichParameter = { if (message.displayName !== "") { writer.uint32(122).string(message.displayName) } + if (message.order !== 0) { + writer.uint32(128).int32(message.order) + } + if (message.ephemeral === true) { + writer.uint32(136).bool(message.ephemeral) + } return writer }, } diff --git a/site/package.json b/site/package.json index 43ec541d14..8976fe4659 100644 --- a/site/package.json +++ b/site/package.json @@ -19,7 +19,7 @@ "lint:types": "tsc --noEmit", "playwright:install": "playwright install --with-deps chromium", "playwright:test": "playwright test --config=e2e/playwright.config.ts", - "gen:provisioner": "protoc --plugin=./node_modules/.bin/protoc-gen-ts-proto --ts_proto_out=./e2e/ --ts_proto_opt=outputJsonMethods=false,outputEncodeMethods=encode-no-creation,outputClientImpl=false,nestJs=false,outputPartialMethods=false,fileSuffix=Generated,suffix=hey -I ../provisionersdk/proto ../provisionersdk/proto/provisioner.proto && prettier --cache --write './e2e/provisionerGenerated.ts'", + "gen:provisioner": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./e2e/ --ts_proto_opt=outputJsonMethods=false,outputEncodeMethods=encode-no-creation,outputClientImpl=false,nestJs=false,outputPartialMethods=false,fileSuffix=Generated,suffix=hey -I ../provisionersdk/proto ../provisionersdk/proto/provisioner.proto && pnpm exec prettier --ignore-path '/dev/null' --cache --write './e2e/provisionerGenerated.ts'", "storybook": "STORYBOOK=true storybook dev -p 6006", "storybook:build": "storybook build --webpack-stats-json", "test": "jest --selectProjects test",