Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`diffProtection` does not work when stack contains tokens

Aperta
#300 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, typescript
Ambito
ci-cd

Direzione di ricerca

Inizia in src/pipeline.ts intorno alla riga 300 e riproduci il problema eseguendo cdk synth in GitHub Actions con un gitHubActionRoleArn il cui valore sia un token. Confronta il workflow generato con il file versionato e determina come diffProtection gestisce la modifica delle rappresentazioni dei token; il lavoro è completato quando i workflow generati validi non attivano più l'errore “Please commit the updated workflow file”.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug effort-small p1

The line: https://github.com/cdklabs/cdk-pipelines-github/blob/main/src/pipeline.ts#L300 does not seem to work when the stack contains tokens.

For example. I create the GitHub OIDC role in an app in my root CDK template, and pass this in to my GitHubWorkflow.gitHubActionRoleArn variable. When running the cdk synth in GHA, I get an error:

Please commit the updated workflow file

Which is caused because the workflow appears different because the tokens have changed:

-          role-to-assume: ${Token[TOKEN.227]}
+          role-to-assume: ${Token[TOKEN.234]}

This happens even though the template generates properly in the actual workflow file.

Is there a way to fix this? (Apart from setting "cdk-pipelines-github:diffProtection": false in my cdk.json)

Lingua principale
TypeScript
Stelle
385
Fork
45
Merge medio
1g 52m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cdklabs/cdk-pipelines-github

Tutte le issue di cdklabs/cdk-pipelines-github

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.