Skip to content

Conversation

@hbelmiro
Copy link
Contributor

@hbelmiro hbelmiro commented Nov 14, 2025

Description of your changes:
This PR adds a new integration test that uploads and runs a pipeline which generates a large binary artifact, then exercises the artifact read endpoint to ensure it correctly returns the artifact data. The test validates both the response metadata (HTTP headers, status codes) and payload format (JSON with base64‑encoded, gzip‑compressed data) to catch regressions in large artifact handling.

Checklist:

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from hbelmiro. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hbelmiro
Copy link
Contributor Author

/retest

@hbelmiro hbelmiro force-pushed the test-artifact-download branch from b66ed61 to 6d2a857 Compare November 14, 2025 11:26
@hbelmiro hbelmiro force-pushed the test-artifact-download branch from 8bbd54f to c5e5bdd Compare November 14, 2025 21:08
@hbelmiro hbelmiro changed the title WIP - Test artifact download test(backend): Add integration tests for artifact reading and large artifacts handling Nov 14, 2025
@hbelmiro
Copy link
Contributor Author

hbelmiro commented Nov 14, 2025

@HumairAK we can use this test to ensure that Open
Implemented HTTP Artifact Streaming to Prevent OOM Errors with Large Files #12394
won't break compatibility.
We can merge this PR prior to #12394 or just ignore it, since #12394 comprises the same test.

/assign @HumairAK

func (s *ArtifactAPITest) extractWorkflowNodeID(runID string) string {
t := s.T()

resp, err := http.Get(fmt.Sprintf("http://localhost:8888/apis/v1beta1/runs/%s", runID))
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you re-use the api server host info (as well as the scheme http/https) from backend/test/config/flags.go instead of hardcoding it? This applies to everywhere, this applies to any place you are hardcoding localhost:8888

t := s.T()

resp, err := http.Get(fmt.Sprintf("http://localhost:8888/apis/v1beta1/runs/%s", runID))
require.NoError(t, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

handle error (same with other resp.Body.Close() calls)

s.deleteAllPipelineVersions(pipelineID)
}()

s.waitForRunCompletion(runID)
Copy link
Collaborator

@HumairAK HumairAK Nov 18, 2025

Choose a reason for hiding this comment

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

Sorry I should have been more clear, what I was suggesting we test is the endpoint allows us to continue testing that we can download artifacts - and not that we can download large files. My concern around download large files is that it can choke the CI and cause flaky behavior.

My preference is to just write a simple pipeline that will output an artifact (using @component instead of ContainerOp). The artifact shouldn't be large, we just need to confirm we can continue to download the artifact via this endpoint, and then verify the data is what we expect. This helps us ensure your PR doesn't break the current api behavior.

Verifying large downloads in master doesn't help us verify the issue once it's fixed, since to do that you would need to emulate the DOS for api server, and this is more of a perf test for which we don't have CI infrastructure for. So I think we should just rely on the fact blob handles this gracefully since that's in its spec, and don't test large file downloads for this endpoint.

Also, you can make this part of the original PR to keep things simple.

@HumairAK
Copy link
Collaborator

closed in favor of : #12394

@HumairAK HumairAK closed this Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants