Skip to content

Commit d486970

Browse files
Merge branch 'gitpod-io:main' into dashboard-lint-fix-loginpage
2 parents 788e590 + 213a191 commit d486970

File tree

114 files changed

+12374
-994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+12374
-994
lines changed

.github/actions/deploy-gitpod/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ leeway run dev/preview/previewctl:download
2626
echo "Setting up access to core-dev and harvester"
2727
previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
2828

29-
echo "Install kubectx for the preview environment"
30-
previewctl install-context --log-level debug --timeout 10m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
3129

30+
PREVIEW_NAME="$(previewctl get-name --branch "${INPUT_NAME}")"
31+
export PREVIEW_NAME
32+
33+
previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 10m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
3234
leeway run dev/preview:deploy-gitpod
3335
previewctl report >> "${GITHUB_STEP_SUMMARY}"

.github/actions/deploy-gitpod/metadata.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
sa_key:
55
description: "The service account key to use when authenticating with GCP"
66
required: true
7+
name:
8+
description: "The name of the preview environment to deploy Gitpod to"
9+
required: false
710
version:
811
description: "The version of Gitpod to install"
912
required: true

.github/actions/preview-create/entrypoint.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ export HOME=/home/gitpod
66
export PREVIEW_ENV_DEV_SA_KEY_PATH="$HOME/.config/gcloud/preview-environment-dev-sa.json"
77
# shellcheck disable=SC2155
88
export LEEWAY_WORKSPACE_ROOT="$(pwd)"
9-
export TF_INPUT=0
10-
export TF_IN_AUTOMATION=true
119
export PATH="$PATH:$HOME/bin"
1210

1311
mkdir $HOME/bin
1412

15-
echo "${INPUT_SA_KEY}" > "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
13+
echo "${INPUT_SA_KEY}" >"${PREVIEW_ENV_DEV_SA_KEY_PATH}"
1614
gcloud auth activate-service-account --key-file "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
1715

1816
leeway run dev/preview/previewctl:download
1917
previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
2018

19+
TF_VAR_preview_name="$(previewctl get-name --branch "${INPUT_NAME}")"
20+
export TF_VAR_preview_name
21+
export TF_VAR_infra_provider="${INPUT_INFRASTRUCTURE_PROVIDER}"
22+
export TF_VAR_with_large_vm="${INPUT_LARGE_VM}"
23+
export TF_INPUT=0
24+
export TF_IN_AUTOMATION=true
2125
leeway run dev/preview:create-preview

.github/actions/preview-create/metadata.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: "Create preview environment"
22
description: "Creates the infrastructure for a preview environment"
33
inputs:
4+
name:
5+
description: "The name of the preview environment to deploy Gitpod to"
6+
required: false
7+
infrastructure_provider:
8+
description: "The infrastructure provider to use"
9+
required: true
10+
large_vm:
11+
description: "Whether to use a larger VM for the env"
12+
required: true
13+
default: false
414
sa_key:
515
description: "The service account key to use when authenticating with GCP"
616
required: true

.github/workflows/build.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ jobs:
1414
group: ${{ github.head_ref || github.ref }}-configuration
1515
cancel-in-progress: true
1616
outputs:
17+
is_main_branch: ${{ steps.output.outputs.is_main_branch }}
1718
version: ${{ steps.output.outputs.version }}
1819
preview_enable: ${{ steps.output.outputs.preview_enable }}
1920
preview_infra_provider: ${{ steps.output.outputs.preview_infra_provider }}
2021
with_github_actions: ${{ steps.output.outputs.with_github_actions }}
2122
build_no_cache: ${{ steps.output.outputs.build_no_cache }}
2223
build_no_test: ${{ steps.output.outputs.build_no_test }}
2324
build_leeway_target: ${{ steps.output.outputs.build_leeway_target }}
25+
with_large_vm: ${{ steps.output.outputs.with_large_vm }}
2426
steps:
2527
- name: "Determine Branch"
2628
id: branches
@@ -32,21 +34,24 @@ jobs:
3234
shell: bash
3335
run: |
3436
{
35-
echo "version=${{ steps.branches.outputs.sanitized-branch-name }}.${{github.run_number}}"
37+
echo "is_main_branch=${{ (github.head_ref || github.ref) == 'refs/heads/main' }}"
38+
echo "version=${{ steps.branches.outputs.sanitized-branch-name }}-gha.${{github.run_number}}"
3639
echo "with_github_actions=${{ contains(github.event.pull_request.body, '[x] /werft with-github-actions') }}"
3740
echo "preview_enable=${{ contains(github.event.pull_request.body, '[x] /werft with-preview') }}"
3841
echo "preview_infra_provider=${{ contains(github.event.pull_request.body, '[X] /werft with-gce-vm') && 'gce' || 'harvester' }}"
3942
echo "build_no_cache=${{ contains(github.event.pull_request.body, '[x] leeway-no-cache') }}"
4043
echo "build_no_test=${{ contains(github.event.pull_request.body, '[x] /werft no-test') }}"
4144
echo "build_leeway_target=$(echo "$PR_DESC" | sed -n -e 's/^.*leeway-target=//p' | sed 's/\r$//')"
45+
echo "with_large_vm=${{ contains(github.event.pull_request.body, '[X] /werft with-large-vm') }}"
4246
} >> $GITHUB_OUTPUT
4347
4448
build-previewctl:
4549
name: Build previewctl
4650
needs: [configuration]
4751
concurrency:
4852
group: ${{ github.head_ref || github.ref }}-build-previewctl
49-
cancel-in-progress: true
53+
# see comment in build-gitpod below for context
54+
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
5055
runs-on: [self-hosted]
5156
container:
5257
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:mads-leeway-v0.7.3.4
@@ -68,7 +73,7 @@ jobs:
6873
6974
export LEEWAY_WORKSPACE_ROOT="$(pwd)"
7075
leeway build dev/preview/previewctl:docker -Dversion="${{needs.configuration.outputs.version}}"
71-
echo "previewctl_hash=$(leeway describe dev/preview/previewctl:docker -t '{{ .Metadata.Version }}')" >> $GITHUB_OUTPUT
76+
echo "previewctl_hash=$(leeway describe dev/preview/previewctl:docker -Dversion="${{needs.configuration.outputs.version}}" -t '{{ .Metadata.Version }}')" >> $GITHUB_OUTPUT
7277
7378
infrastructure:
7479
needs: [configuration, build-previewctl]
@@ -79,22 +84,25 @@ jobs:
7984
steps:
8085
- uses: actions/checkout@v3
8186
- name: Create preview environment infrastructure
82-
env:
83-
TF_VAR_infra_provider: ${{ needs.configuration.outputs.preview_infra_provider }}
8487
id: create
8588
uses: ./.github/actions/preview-create
8689
with:
90+
name: ${{ github.head_ref || github.ref }}
8791
sa_key: ${{ secrets.GCP_CREDENTIALS }}
92+
infrastructure_provider: ${{ needs.configuration.outputs.preview_infra_provider }}
8893
previewctl_hash: ${{ needs.build-previewctl.outputs.previewctl_hash }}
94+
large_vm: ${{ needs.configuration.outputs.with_large_vm }}
8995

9096
build-gitpod:
9197
name: Build Gitpod
9298
needs: [configuration]
93-
if: ${{ needs.configuration.outputs.with_github_actions == 'true' }}
99+
if: ${{ needs.configuration.outputs.is_main_branch == 'true' || needs.configuration.outputs.with_github_actions == 'true' }}
94100
runs-on: [self-hosted]
95101
concurrency:
96102
group: ${{ github.head_ref || github.ref }}-build-gitpod
97-
cancel-in-progress: true
103+
# For the main branch we always want the build job to run to completion
104+
# For other branches we only care about the "latest" version, so it is fine to cancel in-progress builds
105+
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
98106
services:
99107
mysql:
100108
image: mysql:5.7
@@ -210,8 +218,9 @@ jobs:
210218
id: deploy-gitpod
211219
uses: ./.github/actions/deploy-gitpod
212220
with:
213-
sa_key: ${{ secrets.GCP_CREDENTIALS }}
221+
name: ${{ github.head_ref || github.ref }}
214222
version: ${{needs.configuration.outputs.version}}
223+
sa_key: ${{ secrets.GCP_CREDENTIALS }}
215224
previewctl_hash: ${{ needs.build-previewctl.outputs.previewctl_hash }}
216225

217226
monitoring:

.github/workflows/permissions.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: permissions
2+
on:
3+
pull_request:
4+
paths:
5+
- install/installer/pkg/components/spicedb/data/schema.yaml
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: "authzed/action-spicedb-validate@v1"
12+
with:
13+
validationfile: "install/installer/pkg/components/spicedb/data/schema.yaml"
Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,79 @@
11
name: "Preview environment regression check"
22
on:
3+
workflow_run:
4+
workflows: ["Build"]
5+
types: [completed]
6+
branches: ["main"]
37
workflow_dispatch:
8+
inputs:
9+
name:
10+
required: true
11+
description: "The name of the preview environment"
12+
version:
13+
required: true
14+
description: "The version of Gitpod to install"
15+
infrastructure_provider:
16+
description: "The infrastructure provider to use. Valid options: harvester, gcp"
17+
required: false
18+
default: harvester
419
jobs:
20+
configuration:
21+
name: Configuration
22+
runs-on: [self-hosted]
23+
outputs:
24+
skip: ${{ steps.configuration.outputs.skip }}
25+
name: ${{ steps.configuration.outputs.name }}
26+
version: ${{ steps.configuration.outputs.version }}
27+
infrastructure_provider: ${{ steps.configuration.outputs.infrastructure_provider }}
28+
steps:
29+
- name: "Set outputs"
30+
id: configuration
31+
run: |
32+
if [[ '${{ github.event.inputs.name }}' != '' ]]; then
33+
# The workflow was triggered by workflow_dispatch
34+
{
35+
echo "version=${{ github.event.inputs.version }}"
36+
echo "name=${{ github.event.inputs.name }}"
37+
echo "infrastructure_provider=${{ github.event.inputs.infrastructure_provider }}"
38+
echo "skip=false"
39+
} >> $GITHUB_OUTPUT
40+
else
41+
# The workflow was triggered by workflow_run
42+
{
43+
echo "version=main-gha.${{ github.event.workflow_run.run_number }}"
44+
echo "name=preview-regression-check-main-${{ github.run_id }}-${{ github.run_attempt }}"
45+
echo "infrastructure_provider=harvester"
46+
echo "skip=${{ github.event.workflow_run.conclusion == 'failure' }}"
47+
} >> $GITHUB_OUTPUT
48+
fi
549
check:
650
name: Check for regressions
51+
needs: [configuration]
52+
if: ${{ needs.configuration.outputs.skip == 'false' }}
753
runs-on: [self-hosted]
854
steps:
955
- uses: actions/checkout@v3
56+
- name: Create preview environment infrastructure
57+
uses: ./.github/actions/preview-create
58+
with:
59+
name: ${{ needs.configuration.outputs.name }}
60+
infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
61+
large_vm: false
62+
sa_key: ${{ secrets.GCP_CREDENTIALS }}
63+
- name: Deploy Gitpod to the preview environment
64+
id: deploy-gitpod
65+
uses: ./.github/actions/deploy-gitpod
66+
with:
67+
name: ${{ needs.configuration.outputs.name }}
68+
sa_key: ${{ secrets.GCP_CREDENTIALS }}
69+
version: ${{ needs.configuration.outputs.version}}
1070
- name: Check
11-
run: echo "No regressions caught because I didn't check anything 🤡"
71+
run: |
72+
echo "No regressions caught because I didn't check anything 🤡 Sleeping for 2 minutes."
73+
sleep 60
74+
- name: Delete preview environment
75+
if: always()
76+
uses: ./.github/actions/delete-preview
77+
with:
78+
name: ${{ needs.configuration.outputs.name }}
79+
sa_key: ${{ secrets.GCP_CREDENTIALS }}

.github/workflows/preview-env-delete.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Delete preview environment"
1+
name: "Preview environment delete"
22
on:
33
workflow_dispatch:
44
inputs:

.github/workflows/preview-env-gc.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Preview environment garbage collection"
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
gc:
6+
name: "Delete unused preview environments"
7+
runs-on: [self-hosted]
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Garbage collect
11+
run: |
12+
echo "Not implemented yet 🧹"

.github/workflows/public-api.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: public-api-compatibility
2-
on: pull_request
2+
on:
3+
pull_request:
4+
paths:
5+
- components/public-api/**
36
jobs:
47
build:
58
runs-on: ubuntu-latest

.werft/jobs/build/prepare.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ async function decideHarvesterVMCreation(werft: Werft, config: JobConfig) {
4040
// createVM only triggers the VM creation.
4141
// Readiness is not guaranted.
4242
async function createVM(werft: Werft, config: JobConfig) {
43-
const cpu = config.withLargeVM ? 12 : 6;
44-
const memory = config.withLargeVM ? 24 : 12;
4543
const infra = config.withGceVm ? "gce" : "harvester"
4644
const replace = config.withGceVm ? "module.preview_gce[0].google_compute_instance.default" : "module.preview_harvester[0].harvester_virtualmachine.harvester"
4745

@@ -51,16 +49,14 @@ async function createVM(werft: Werft, config: JobConfig) {
5149
"GOOGLE_APPLICATION_CREDENTIALS": GCLOUD_SERVICE_ACCOUNT_PATH,
5250
"TF_VAR_cert_issuer": config.certIssuer,
5351
"TF_VAR_preview_name": config.previewEnvironment.destname,
54-
"TF_VAR_vm_cpu": `${cpu}`,
55-
"TF_VAR_vm_memory": `${memory}Gi`,
52+
"TF_VAR_with_large_vm": `${config.withLargeVM}`,
5653
"TF_VAR_infra_provider": `${infra}`,
5754
}
5855

5956
if (config.storageClass.length > 0) {
6057
environment["TF_VAR_vm_storage_class"] = config.storageClass
6158
}
6259

63-
6460
const variables = Object
6561
.entries(environment)
6662
.filter(([_, value]) => value.length > 0)

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Change Log
22

33
## January 2023
4+
- Update README links ([#16127](https://github.com/gitpod-io/gitpod/pull/16127)) - [@axonasif](https://github.com/axonasif)
5+
- removed org slugs ([#16070](https://github.com/gitpod-io/gitpod/pull/16070)) - [@svenefftinge](https://github.com/svenefftinge)
6+
- teams are now called organizations ([#16050](https://github.com/gitpod-io/gitpod/pull/16050)) - [@svenefftinge](https://github.com/svenefftinge)
7+
- [ws-rollout] Add prometheus init check ([#16000](https://github.com/gitpod-io/gitpod/pull/16000)) - [@Pothulapati](https://github.com/Pothulapati)
8+
- ([#16086](https://github.com/gitpod-io/gitpod/pull/16086)) - [@mads-hartmann](https://github.com/mads-hartmann)
9+
- [ws-rollout] Fix Build Versioning ([#15999](https://github.com/gitpod-io/gitpod/pull/15999)) - [@Pothulapati](https://github.com/Pothulapati)
10+
- [installer]: deprecate static message bus password and replace with secret ([#15905](https://github.com/gitpod-io/gitpod/pull/15905)) - [@]()
11+
- Added support to JetBrains Gateway v2023.1 ([#15971](https://github.com/gitpod-io/gitpod/pull/15971)) - [@felladrin](https://github.com/felladrin)
12+
- Teams get the first 1000 credits for 9 USD/€ ([#15877](https://github.com/gitpod-io/gitpod/pull/15877)) - [@svenefftinge](https://github.com/svenefftinge)
413
- [installer]: promote PodConfig to config main ([#15900](https://github.com/gitpod-io/gitpod/pull/15900)) - [@mrsimonemms](https://github.com/mrsimonemms)
514
- [installer]: promote experimental agent-smith config ([#15841](https://github.com/gitpod-io/gitpod/pull/15841)) - [@mrsimonemms](https://github.com/mrsimonemms)
615
- [installer]: promote experimental telemetry config ([#15840](https://github.com/gitpod-io/gitpod/pull/15840)) - [@mrsimonemms](https://github.com/mrsimonemms)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You can upvote [popular feature requests](https://github.com/gitpod-io/gitpod/is
7878

7979
We work with quarterly roadmaps in autonomous product teams.
8080

81-
- [Gitpod Architecture](https://www.notion.so/gitpod/Architecture-0e39e570b10f4e8ba7b259629ee3cb74)
81+
- [Gitpod Architecture](https://www.youtube.com/watch?v=svV-uE0Cdjk)
8282
- [Product Roadmap](https://github.com/orgs/gitpod-io/projects/27)
8383

8484
### How do GitHub Issues get prioritized?

components/dashboard/src/AppNotifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function AppNotifications() {
5151
if (notifications.length === 1) {
5252
href = `${gitpodHostUrl}billing`;
5353
} else if (notifications.length === 2) {
54-
href = `${gitpodHostUrl}t/${notifications[notifications.length - 1]}/billing`;
54+
href = `${gitpodHostUrl}/org-billing`;
5555
}
5656
return (
5757
<span>

0 commit comments

Comments
 (0)