Skip to content

Conversation

@gchan
Copy link
Contributor

@gchan gchan commented Jan 28, 2026

Description

This PR removes the requirement for the CI environment variable to be set for test results to be uploaded to Buildkite Test Engine. The presence of BUILDKITE_ANALYTICS_TOKEN is now the sole determinant for whether uploads occur.

Previously, PR #71 introduced a check that required both the CI environment variable and BUILDKITE_ANALYTICS_TOKEN to be present for uploads to happen. This caused issues for users who carefully manage environment variables in isolated container environments, as reported in #74.

The customer feedback highlighted that the CI variable is not namespaced under BUILDKITE_* and conflicts with their environment variable management policies. Since BUILDKITE_ANALYTICS_TOKEN is an explicit opt-in signal that users want to upload test results, requiring an additional CI check was unnecessary.

This change removes the CI check from the API.submit() method while preserving the self.ci attribute for potential future debugging or logging use. The implementation maintains full backward compatibility - users with CI set will continue to work, and users without it can now successfully upload when they have a valid token.

Context

Resolves TE-4628
Fixes #74

This addresses customer feedback from aiven-amartin and unblocks gqmelo from upgrading to v1.3.0.

Changes

  • Remove CI environment variable check from API.submit() method in api.py
  • Update specs to verify CI is not required but warning is logged when token is missing

Verification

Backed by specs.

The specs verifies that uploads work when BUILDKITE_ANALYTICS_TOKEN is present but CI is not set.

Deployment

Low risk. This change makes the collector more permissive by removing a check, so existing configurations continue to work. Users who were previously blocked by the CI requirement will now be able to upload results.

Rollback

Yes

The presence of BUILDKITE_ANALYTICS_TOKEN is sufficient to determine
upload intent. Previously, both CI and token were required, which caused
issues for users who carefully manage environment variables in isolated
container environments.

This change removes the CI check from the API.submit() method while
preserving the self.ci attribute for potential future use. Now only
BUILDKITE_ANALYTICS_TOKEN determines whether uploads happen.

Fixes #74
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.

Toggling behaviour based on the CI variable is a misfeature/regression that I cannot turn off

3 participants