cloudflare / cloudflare/developer-platform

CloudFlare Workers seems to only see Build Variables & Secrets on main branch on some projects

Open
#72 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

CloudFlare Workers - Build Variables & Secrets don't appear consistently in build jobs.

### Expected Behavior

I have an NPM_TOKEN registered in multiple workers so that during the build phase, a private NPM module can be installed. This works in some workers but not others.

### Steps to Reproduce

1. If you visit https://dash.cloudflare.com/aa1e065f6f6da808def1292426bed033/workers/services/view/greg-l-turnquist/production/settings, you can see clearly that NPM_TOKEN is set. And if you dig in, this value has been set for some time.
2. In the Deployments version history, this works just fine WHEN you build on main branch. However, any builds NOT on main branch fail due to NPM_TOKEN not being visible.
3. This implies that setting NPM_TOKEN doesn't end up being universal.

Contrast this with another CloudFlare Worker, that seems to build just fine.

1. If you check out https://dash.cloudflare.com/aa1e065f6f6da808def1292426bed033/workers/services/view/pro-coder-io/production/settings, it also has NPM_TOKEN configured. And it builds fine on main branch.
2. But it ALSO builds fine on branch builds as recently as 15 days ago => https://dash.cloudflare.com/aa1e065f6f6da808def1292426bed033/workers/services/view/pro-coder-io/production/builds/8e058b56-e576-4f3c-9452-46f545c12acf

This is wholly inconsistent behavior, implying something under the hood has changed.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the Cloudflare Workers settings and deployment histories linked in the report for greg-l-turnquist and pro-coder-io. Reproduce builds on main and non-main branches, checking whether the configured NPM_TOKEN is available during each build. Done means the branch-dependent behavior is reproduced and its cause is identified or documented with supporting build evidence.

Written by the indexing model from the issue text.

Assessment

Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.