Skip to content

Conversation

@zhming0
Copy link
Contributor

@zhming0 zhming0 commented Dec 12, 2025

Description

E2E Test for GCS artifact upload/download

Context

PB-1007

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

Human

@zhming0 zhming0 requested review from a team December 12, 2025 04:36
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 19 to 20
- export BUILDKITE_GS_APPLICATION_CREDENTIALS_JSON="$$GCP_E2E_TEST_CREDENTIALS_JSON"
- {{ .buildkite_agent_binary }} artifact download artifact.txt . && if [[ $(cat artifact.txt) == "hello world" ]]; then exit 0; else exit 1; fi
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment probably applies to the other artifact test cases, but perhaps we can simplify by using set -e:

Suggested change
- export BUILDKITE_GS_APPLICATION_CREDENTIALS_JSON="$$GCP_E2E_TEST_CREDENTIALS_JSON"
- {{ .buildkite_agent_binary }} artifact download artifact.txt . && if [[ $(cat artifact.txt) == "hello world" ]]; then exit 0; else exit 1; fi
- set -e
- export BUILDKITE_GS_APPLICATION_CREDENTIALS_JSON="$$GCP_E2E_TEST_CREDENTIALS_JSON"
- {{ .buildkite_agent_binary }} artifact download artifact.txt .
- [[ $(cat artifact.txt) == "hello world" ]]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason I don't quite understand, our agent does not like - [[ $(cat artifact.txt) == "hello world" ]] being the last line, it fails with 127 every time.

I don't think I have enough time to debug this today so I will merge the slightly verbose version first.

@zhming0 zhming0 enabled auto-merge December 14, 2025 23:37
@zhming0 zhming0 merged commit daa0e36 into main Dec 14, 2025
2 checks passed
@zhming0 zhming0 deleted the ming/pb-1007 branch December 14, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants