DECK_SKIP_DEFAULTS_FILL: nested blocks such as upstream healthchecks must be written in full
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 56/100
Direzione di ricerca
Start by tracing how DECK_SKIP_DEFAULTS_FILL affects defaults and nested field comparison in deck gateway diff, using the minimal kong.yaml configuration and expected versus actual diff in the issue as the reproduction. Check the diff tests around upstream healthchecks and add coverage for a partial passive block. Done means sync followed by diff reports no changes for this case, or the behavior and documentation are clarified if skipping defaults is intended to require full nested blocks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
With DECK_SKIP_DEFAULTS_FILL=true (the workaround suggested in #2199 for the redis-ee partial drift), an upstream that declares only part of its healthchecks block is reported as changed on every deck gateway diff / sync, even right after a successful sync.
Konnect stores the full healthchecks tree (active, passive, threshold) with Kong's defaults. Since decK no longer fills defaults before diffing, the omitted nested fields are compared against the values Konnect returns.
Minimal configuration:
kong.yaml:
_format_version: "3.0"
services:
- name: example-service
host: example-upstream
port: 443
protocol: https
upstreams:
- name: example-upstream
healthchecks:
passive:
type: https
targets:
- target: backend.example.com:443
With DECK_SKIP_DEFAULTS_FILL=true, deck gateway sync kong.yaml followed by deck gateway diff kong.yaml should report no changes, but it reports an update on example-upstream, every time.
Actual:
DecK lists every healthchecks field that Konnect stores but the file does not declare as a - line, i.e. a field it would remove (output shortened, the long lists of HTTP status codes are replaced by { ... }):
updating upstream example-upstream {
"healthchecks": {
- "active": {
- "concurrency": 10,
- "healthy": {
- "http_statuses": [200, 302],
- "interval": 0,
- "successes": 0
- },
- "http_path": "/",
- "https_verify_certificate": true,
- "timeout": 1,
- "type": "http",
- "unhealthy": { ... }
- },
"passive": {
- "healthy": { ... },
"type": "https",
- "unhealthy": {
- "http_failures": 0,
- "http_statuses": [429, 500, 503],
- "tcp_failures": 0,
- "timeouts": 0
- }
},
- "threshold": 0
},
"id": "...",
"name": "example-upstream"
}
Summary:
Created: 0
Updated: 1
Deleted: 0
Workaround:
Write the whole healthchecks block that Konnect stores (active with both intervals at 0, passive healthy/unhealthy statuses, threshold 0). With the same DECK_SKIP_DEFAULTS_FILL=true, the next diff then reports Created: 0, Updated: 0, Deleted: 0. This means every default of the block has to be spelled out in the state file, and kept in line with Kong's defaults across upgrades.
Question:
Is this the intended behaviour of skipping the defaults fill? If so, could the docs for DECK_SKIP_DEFAULTS_FILL say that nested blocks must then be written in full? If not, should decK ignore omitted nested fields when the defaults fill is skipped?
Related to #2199
Environment:
decK version: 1.69
Konnect control plane (EU region, https://eu.api.konghq.com), type: [Hybrid, from Gateway Manager]
- Lingua principale
- Go
- Stelle
- 507
- Fork
- 142
- Merge medio
- 1g 15h
- PR unite (30g)
- 9
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Kong/deck
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Bugs in kong2tf in certain entities like partials, consumers, etcForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
cmd/fix, x/tools/go/analysis/passes/modernize: mapsloop moves comments out of the range operandForse già presa @muratmirgun l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Cojekt/LibreDental#258 ·
I maintainer di solito rispondono entro 1 giorno
-
go good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opensro-dev/opensro#4949 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 3 giorni