Skip the download digest when it is not configured - #307
Open
jiweiyuan wants to merge 1 commit into
Open
Conversation
The nightly digest has failed every night since it was added and has never once succeeded. The cause is not the code: three of its four secrets were never set, so the script exits on `CF_ANALYTICS_TOKEN and CF_ZONE_ID are required` before it does anything. A check that is always red is one people stop reading, which is what happened — eight consecutive failures went unnoticed on the trunk. Now the job checks its configuration first and, when the secrets are missing, emits a notice naming them and skips the two steps that need them. A run that cannot do its work reports that instead of failing, and a red here goes back to meaning something broke. This does not turn the digest on. That needs CF_ANALYTICS_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID added to the repo secrets.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Download statshas failed every night since it was added and has never once succeeded — I checked the last 30 runs. Eight consecutive reds sat on the trunk unnoticed, which is the whole problem: a check that is always red is one nobody reads.The cause is not the code. Three of its four secrets do not exist:
So the script exits before doing anything, every night, forever.
This PR does not turn the digest on — it stops it lying. The job now checks its configuration first, and when secrets are missing it emits a
::notice::naming them and skips the two steps that need them. A run that cannot do its work says so instead of failing, and a red here goes back to meaning something actually broke.To actually enable it, add
CF_ANALYTICS_TOKEN,TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_IDto repo secrets.Two things worth a look while you are in there, which I did not change because both alter which credential is used:
CLOUDFLARE_API_TOKENalready exists. If it carriesZone > Analytics > Read, the digest may only need renaming rather than a new token — but it may equally lack that scope, so I did not silently repoint it.CF_ZONE_IDandCLOUDFLARE_ZONE_IDare both set, and the workflow's own comment says they are the same value. That duplication is worth collapsing.Release Notes:
No user-facing change.