Skip to content

Commit

Permalink
[dev] update dev image (#20417)
Browse files Browse the repository at this point in the history
* [dev] update dev image

* update cookie test
  • Loading branch information
iQQBot authored Dec 5, 2024
1 parent b743e38 commit b888cca
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/actions/delete-preview/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/deploy-gitpod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/deploy-monitoring-satellite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/preview-create/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
steps:
- uses: actions/checkout@v4
- name: Setup Environment
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
ports:
- 6379:6379
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
env:
DB_HOST: "mysql"
DB_PORT: "23306"
Expand Down Expand Up @@ -425,7 +425,7 @@ jobs:
- create-runner
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
if: needs.configuration.outputs.with_integration_tests != ''
concurrency:
group: ${{ needs.configuration.outputs.preview_name }}-integration-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-environment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ide-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
outputs:
name: ${{ steps.configuration.outputs.name }}
version: ${{ steps.configuration.outputs.version }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
needs: [configuration, infrastructure, create-runner]
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
volumes:
- /var/tmp:/var/tmp
- /tmp:/tmp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jetbrains-auto-update-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
update-jetbrains:
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
needs: [ create-runner ]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jetbrains-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
jetbrains-smoke-test-linux:
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-check-regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
if: ${{ needs.configuration.outputs.skip == 'false' }}
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
volumes:
- /var/tmp:/var/tmp
- /tmp:/tmp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-gc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
outputs:
names: ${{ steps.set-matrix.outputs.names }}
count: ${{ steps.set-matrix.outputs.count }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workspace-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
outputs:
name: ${{ steps.configuration.outputs.name }}
version: ${{ steps.configuration.outputs.version }}
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
needs: [configuration, infrastructure, create-runner]
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
steps:
- uses: actions/checkout@v4
- name: Integration Test
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
workspaceLocation: gitpod/gitpod-ws.code-workspace
checkoutLocation: gitpod
ports:
Expand Down
20 changes: 15 additions & 5 deletions components/ws-proxy/pkg/proxy/cookies.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,37 @@ func readCookies(h http.Header, filter string) []*http.Cookie {
if filter != "" && filter != name {
continue
}
val, ok := parseCookieValue(val, true)
val, quoted, ok := parseCookieValue(val, true)
if !ok {
continue
}
cookies = append(cookies, &http.Cookie{Name: name, Value: val})
cookies = append(cookies, &http.Cookie{Name: name, Value: val, Quoted: quoted})
}
}
return cookies
}

func parseCookieValue(raw string, allowDoubleQuote bool) (string, bool) {
// parseCookieValue parses a cookie value according to RFC 6265.
// If allowDoubleQuote is true, parseCookieValue will consider that it
// is parsing the cookie-value;
// otherwise, it will consider that it is parsing a cookie-av value
// (cookie attribute-value).
//
// It returns the parsed cookie value, a boolean indicating whether the
// parsing was successful, and a boolean indicating whether the parsed
// value was enclosed in double quotes.
func parseCookieValue(raw string, allowDoubleQuote bool) (value string, quoted, ok bool) {
// Strip the quotes, if present.
if allowDoubleQuote && len(raw) > 1 && raw[0] == '"' && raw[len(raw)-1] == '"' {
raw = raw[1 : len(raw)-1]
quoted = true
}
for i := 0; i < len(raw); i++ {
if !validCookieValueByte(raw[i]) {
return "", false
return "", quoted, false
}
}
return raw, true
return raw, quoted, true
}

func validCookieValueByte(b byte) bool {
Expand Down

0 comments on commit b888cca

Please sign in to comment.