Skip to content

feat(index): No longer add a bewit to public artifacts URLs#8283

Merged
lotas merged 4 commits intotaskcluster:mainfrom
JohanLorenzo:fix-8035
Feb 18, 2026
Merged

feat(index): No longer add a bewit to public artifacts URLs#8283
lotas merged 4 commits intotaskcluster:mainfrom
JohanLorenzo:fix-8035

Conversation

@JohanLorenzo
Copy link
Contributor

@JohanLorenzo JohanLorenzo commented Feb 16, 2026

Github Issue: Partially addresses #8035. This PR takes care of the unecessary bewit addition but it doesn't change the number of redirects. The latter will be handled in #8284.

Patch also tested manually ⬇️

Before

curl -IL http://taskcluster/api/index/v1/task/e2e-test.bewit.artifacts/artifacts/public/hello.txt

HTTP/1.1 303 See Other
Content-Type: text/plain; charset=utf-8
Content-Length: 229
[...]
Location: http://taskcluster/api/queue/v1/task/TVtOlb97THWZYG36WoNxZg/artifacts/public%2Fhello.txt?bewit=c3RhdGljL3Rhc2tjbHVzdGVyL2luZGV4XDE3NzEyNjY1NzlcQ2FYVzhUcUxVUzNxMDZVaFhuZlRFZ1EwOWcxVkdPejJJbHlTdHJFNjBCUT1c
[...]

HTTP/1.1 303 See Other
Content-Type: application/json; charset=utf-8
Content-Length: 112
[...]
location: http://taskcluster/public-bucket/TVtOlb97THWZYG36WoNxZg/0/public/hello.txt
[...]

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 6
[...]
Last-Modified: Mon, 16 Feb 2026 17:35:55 GMT
ETag: "79790eaf1bb29e4a543a90d69d8dbd9b"
[...]

After

curl -IL http://taskcluster/api/index/v1/task/e2e-test.bewit.artifacts/artifacts/public/hello.txt

HTTP/1.1 303 See Other
Content-Type: text/plain; charset=utf-8
Content-Length: 114
[...]
Location: http://taskcluster/api/queue/v1/task/TVtOlb97THWZYG36WoNxZg/artifacts/public%2Fhello.txt
[...]

HTTP/1.1 303 See Other
Content-Type: application/json; charset=utf-8
Content-Length: 112
[...]
location: http://taskcluster/public-bucket/TVtOlb97THWZYG36WoNxZg/0/public/hello.txt
[...]

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 6
[...]
Last-Modified: Mon, 16 Feb 2026 17:35:55 GMT
ETag: "79790eaf1bb29e4a543a90d69d8dbd9b"
[...]

@JohanLorenzo JohanLorenzo reopened this Feb 16, 2026
@JohanLorenzo JohanLorenzo marked this pull request as ready for review February 17, 2026 11:06
@JohanLorenzo JohanLorenzo requested a review from a team as a code owner February 17, 2026 11:06
@JohanLorenzo JohanLorenzo requested review from lotas, matt-boris and petemoore and removed request for a team February 17, 2026 11:06
@lotas
Copy link
Contributor

lotas commented Feb 17, 2026

I probably don't understand why adding bewit is a problem at all?

};

export default { taskUtils, namespaceUtils, splitNamespace, namespaceFormat };
const satisfiesArtifactScope = async (anonymousScopeCache, artifactName) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can also export it directly and avoid renaming export, _satisfiesArtifactScope is a bit strange name for an export :)

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, is it because it is only used in tests? maybe not worth exporting this at all, and just testing isPublicArtifact

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to test _satisfiesArtifactScope more thoroughly than isPublicArtifact since isPublicArtifact depends on a mocked external service. That's the reason I introduced the split and the tests. Let me know if you prefer me to combine everything. I don't have a strong opinion on this.

@JohanLorenzo
Copy link
Contributor Author

I probably don't understand why adding bewit is a problem at all?

Discussed over Slack. We agreed that #6724 shows why always having bewits is confusing. Therefore, we agreed on removing bewit from public artifacts.

@lotas lotas merged commit 4b94210 into taskcluster:main Feb 18, 2026
73 checks passed
@JohanLorenzo JohanLorenzo deleted the fix-8035 branch February 18, 2026 10:36
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.

2 participants