Repository navigation
v0.15.0
Changed: Cloud SQL backup settings are checked the way Cloud SQL checks them
Backup retention now defaults by edition and is range-checked (#1044):
ENTERPRISEdefaults to 7 retained backups and 7 days of transaction logs.ENTERPRISE_PLUS,
which includesPOSTGRES_16and later with no edition, defaults to 15 and 14. Before, every
edition got 7 and 7.transactionLogRetentionDaysmust be 1–7 on Enterprise and 1–35 on Enterprise Plus,
backupRetentionSettings.retainedBackupsmust be 1–365, and the log days can't exceed the
retained backups (7 and 7 is fine, 7 and 1 is not). An explicitretainedBackups: 0means the
edition's default.backupConfiguration.startTimemust be 24-hourHH:MM, such as07:00(#1059). Before, a value
such as7amwas stored, and the instance never took an Automated backup.
A setting that breaks these rules fails with 400 INVALID_ARGUMENT on insert, patch and update.
Stored values are never rewritten, but an instance that already holds such values fails every
patch, even an unrelated one, until its retention is fixed. Local Terraform or OpenTofu that relied
on the looser checks now fails on apply, as it would against GCP. Enterprise Plus instances created
without retention settings keep more backups and WAL than before, so they use more disk.
Changed: a Cloud SQL Operation fails while another one runs
A Cloud SQL instance now has the Operation lock GKE clusters already have (#979). A request that
would start an Operation while another runs fails with 409 operationInProgress instead of
queueing behind it, as Cloud SQL does. Scripts that fire several changes at one instance back to
back need to wait for each Operation to finish.
Changed: Cloud SQL dumps and archived WAL are gzipped
Backups and State snapshots are now stored as .sql.gz and streamed through the emulator, so a
dump is never held in memory whole (#1043). With point-in-time recovery, each archived WAL segment
is stored as <segment>.gz, which makes the WAL archive several times smaller (#1048, ADR 0072).
gcpemu still reads existing plain .sql dumps and WAL segments.
Don't downgrade below v0.15.0 with a data directory this release has written to. v0.14.0 reads
only plain .sql dumps and WAL, so it can't find or restore the gzipped ones.
Changed: the GKE Node limit is a setting, and the Instance reports it
- The Node limit is now an ordinary setting:
--gke-max-nodes,GCPEMU_GKE_MAX_NODESor
gkeMaxNodesin the config file, with a default of 5 (#1068). A value that isn't a positive
integer, such asabc,8or0, now failsgcpemu startwith an error that names it.
Before, any such value silently meant 5. /_emu/v1/infoandgcpemu statusreport the limit in force asgke.nodeLimit(#1065).- The Instance estimates the memory its GKE nodes need, using the README's "GKE sizing" formula.
When the estimate passes the Runtime machine's memory, the Instance logs a warning,gcpemu status
prints agke overcommitted:line, and/_emu/v1/infohasgke.overcommit(#1070). Nodes are never refused for this.
Changed: the CA injector refuses pods it can't give the Instance CA
The GKE webhook that gives pods the Instance CA now uses failurePolicy: Fail (#1053). If it can't
prepare the namespace's gcpemu-ca-bundle ConfigMap, it refuses the pod with a 503, and the pod's
controller retries. Before, it admitted the pod without the CA, and the pod's first Google API call
failed with x509: certificate signed by unknown authority. kube-system pods are always admitted unchanged, and most admissions no longer
call back into the cluster's API server, so the webhook no longer times out under load.
Changed: an update mask that names one map key changes only that key
An update mask path such as labels.env now sets or removes that one key, as GCP does (#1062,
#1086–#1090). Before, it replaced the whole map, and Artifact Registry also mangled the key's case. This applies
to Artifact Registry repositories (labels, cleanup_policies), Secret Manager, Pub/Sub,
Certificate Manager, IAM workload identity pool providers (attributeMapping) and Cloud Build.
A key path on a field that isn't a map is now INVALID_ARGUMENT.
Changed: CLI commands act only on a confirmed Live Instance
Every command that needs an Instance now asks the Instance at its address first, and acts only when
it answers with this data directory's Instance ID (#1024, ADR 0066). Before, a left-behind
endpoints.json sent commands to whatever answered at that address. gcpemu start goes ahead only
once a Live Instance is ruled out. gcpemu stop reports success only for an exit it confirmed, and
a stop that times out names what it waited for (#998, #999).
Changed for contributors: the build uses just, not Task
The build moved from Task to just ≥ 1.56.0 (#932, ADR 0061). Every recipe
keeps its name (just build, just vet, just e2e, …), except the ones that took arguments:
| Task | just |
|---|---|
task release VERSION=v1.2.3 |
just release v1.2.3 |
task image-check IMAGE=gcpemu:check |
just image-check gcpemu:check |
task echo:dist / task echo:image-check IMAGE=x |
just echo-dist / just echo-image-check x |
task conformance:record |
just conformance-record |
task prerelease RUNTIMES=a,b IMAGE=x |
just prerelease a,b x |
task generate GOOGLEAPIS=latest |
just generate latest |
There is no task shim. just doctor checks your toolchain.
Cloud SQL takes daily Automated backups
A running instance with backups enabled now takes an Automated backup once the Emulator clock
passes backupConfiguration.startTime each day, and keeps the newest retainedBackups of them
(#1038, ADR 0069). With point-in-time recovery, the backup also takes a Base backup, so old WAL is
dropped. Missed days produce one backup, not one per day, and an upgrade doesn't trigger one.
Artifact Registry runs cleanup policies and frees unused layers
A Registry cleanup pass now runs at start and every minute (on gcpemu time advance in a
Deterministic Instance). It applies standard repositories' cleanup policies (#1039), and frees
layers and uploads that nothing refers to (#1045). Deleting a version now frees the layers only it
used.
GKE
- Pods behind a NEG get the readiness gate
cloud.google.com/load-balancer-neg-ready, so a rollout
waits until the load balancer finds each new pod HEALTHY (#1036, ADR 0071). Before, a rollout
could serve503 failed_to_pick_backend. - Image garbage collection on each node is measured against its node pool's boot disk size, not the
runtime's disk, which under Docker Desktop is as big as the host's (#1052, ADR 0073). - A cluster counts its Cluster server's exits and failed restarts in one
UNAVAILABLEcondition,
visible throughclusters.getand the console (#1061). - A cluster delete that fails leaves the cluster in
ERROR, and the delete resumes on the next
start (#1145). A node removal cut off by a cluster delete finishes first (#1144). - A node readiness timeout says what each node was doing (#971).
gcpemu.log rotates by size
A detached Instance now keeps gcpemu.log under 100 MB, plus three older files, gcpemu.log.1 to
gcpemu.log.3 (#1040). gcpemu logs reads them oldest first.
Other fixes
- On macOS, Public roots come from the keychain and never include another Instance's CA (#1138).
- An Instance shuts down within its deadline: the API gateway, Services' own HTTP servers, Cloud
DNS and Cloud SQL stop by force once their time is up, and Teardown saves before stopping
Services (#1034, #1115–#1118). /_emu/v1/infono longer waits on the container runtime (#1025).- The Web console re-sends a write that got no response (#944), and a page whose script or
stylesheet failed to load reloads itself (#948, #969). - The Web console can download a Secret version's value with its exact bytes (#964). Copy can
change line endings on Windows.
What's Changed
- docs: ADR 0060, the Web console's bundle never overwrites a committed file (#931) by @linuxuser586 in #937
- fix(console): the Web console's build never overwrites a committed file (#931) by @linuxuser586 in #938
- test(console): the Workloads test waits for every kind's list by @linuxuser586 in #940
- docs: ADR 0062, the Web console re-sends a write that got no response, if repeating it is safe (#944) by @linuxuser586 in #945
- fix(console): the Web console re-sends a write that got no response (#944) by @linuxuser586 in #946
- docs: ADR 0063, the Web console reloads a page whose files failed to load (#948) by @linuxuser586 in #949
- test(console): the Cloud Build tests filter the Request log to their entries (#942) by @linuxuser586 in #950
- docs: ADR 0017 covers Vitest, and a timing flake fix shows a reproduction (#955) by @linuxuser586 in #956
- fix(console): a page whose script or stylesheet failed to load reloads itself (#948) by @linuxuser586 in #953
- ci(console): console-e2e names the tests that passed only on retry (#943) by @linuxuser586 in #951
- test(console): the IAM bucket policy test waits for what the URL shows (#947) by @linuxuser586 in #954
- test(console): the Pub/Sub seek test fills a whole-minute time (#952) by @linuxuser586 in #963
- test(console): every test run delays navigations, so reads that race one fail (#955) by @linuxuser586 in #960
- docs: ADR 0063, a failed stylesheet is fetched again, not reloaded (#969) by @linuxuser586 in #970
- test(console): e2e tests read the clipboard with LF line endings (#961) by @linuxuser586 in #967
- fix(gke): a later failed check keeps the Public endpoint error (#957) by @linuxuser586 in #973
- test(e2e): a pod readiness timeout says why the pods are not ready (#966) by @linuxuser586 in #968
- test(console): e2e navigations survive Chromium's ERR_NETWORK_CHANGED (#939) by @linuxuser586 in #965
- fix(gke): an Operation shows DONE after its Operation lock is released (#974) by @linuxuser586 in #975
- test(gke): TestPublicEndpointMoves starts its External network outside the runtime's pools (#958) by @linuxuser586 in #976
- feat(console): a Secret version's value can be downloaded with its exact bytes (#964) by @linuxuser586 in #978
- test(console): the Cloud SQL lifecycle test's deletes allow for queued Operations (#962) by @linuxuser586 in #980
- test(e2e): a failed Istio install shows every pod in istio-system (#966) by @linuxuser586 in #981
- docs: a flake with no reproduction stays open with no fix merged (#972) by @linuxuser586 in #989
- test(pubsub): message ages in TestMonitoringHistory follow only Advance (#959) by @linuxuser586 in #991
- docs: ADR 0017's reproduction rule covers any flake with no proven cause by @linuxuser586 in #995
- fix(console): a failed stylesheet is fetched again, never by a reload (#969) by @linuxuser586 in #986
- refactor(console): file downloads live in one shared helper (#977) by @linuxuser586 in #985
- fix(sql): an Operation fails with operationInProgress while another runs (#979) by @linuxuser586 in #987
- docs: ADR 0064,
gcpemu stopreports success only for an exit it confirmed (#990) by @linuxuser586 in #1001 - ci: jobs that run containers report free disk space (#993) by @linuxuser586 in #994
- docs(vmrelay): the Windows port pair path serves tests on Windows hosts (#988) by @linuxuser586 in #996
- fix(gke): a node readiness timeout says what each node was doing (#971) by @linuxuser586 in #983
- ci: a runner short of disk removes toolchains no job uses (#993) by @linuxuser586 in #1002
- test(vmrelay): TestInwardUDPTwinRefused holds the port pair UDP picks (#982) by @linuxuser586 in #992
- fix(instance): the PID file is written before endpoints.json (#990) by @linuxuser586 in #997
- test(console): an e2e test saves a Secret version's exact bytes (#984) by @linuxuser586 in #1003
- test(gke): killing a watched Cluster server never resets a Once in use (#1005) by @linuxuser586 in #1006
- fix(instance): WaitReady returns when the Instance shuts down (#1000) by @linuxuser586 in #1010
- fix(cli):
gcpemu stopreports success only for an exit it confirmed (#998) by @linuxuser586 in #1012 - test(vmrelay): the inward tests hold their port pair (#1007) by @linuxuser586 in #1014
- fix(cli): a stop that times out names what it waited on (#999) by @linuxuser586 in #1013
- test(gke): five TestGKE timeouts say what the pods were doing (#1004) by @linuxuser586 in #1016
- fix(instance): a stop at any point in startup is reported as a stop (#1009) by @linuxuser586 in #1015
- refactor(vmrelay): listen stops letting UDP pick a port (#1008) by @linuxuser586 in #1017
- ci: test, console-e2e and action report disk and free it on a small runner (#993) by @linuxuser586 in #1019
- fix(instance): teardown waits for Start, and Start gives up (#1011) by @linuxuser586 in #1021
- ci: setup-go frees disk itself, so go-cache and release get it (#993) by @linuxuser586 in #1022
- fix(cli): readers ask the Instance, not a left-behind endpoints.json (#1018) by @linuxuser586 in #1023
- fix(cli): commands act only on a confirmed Live Instance (#1024) by @linuxuser586 in #1026
- fix(instance): /_emu/v1/info does not wait on the container runtime (#1025) by @linuxuser586 in #1029
- fix(registryrelay): runtime tests take their ports from porttest (#1027) by @linuxuser586 in #1030
- fix(instance): shutdown ends a runtime connection in progress (#1028) by @linuxuser586 in #1032
- docs: "ready" is ambiguous for a pod behind a load balancer (#1036) by @linuxuser586 in #1037
- docs: a runtime connection and its Reclaim belong to the Instance (#1033) by @linuxuser586 in #1041
- docs: a Cloud SQL instance makes up a missed Automated backup once (#1038) by @linuxuser586 in #1042
- docs: the registry frees what nothing refers to and runs cleanup policies (#1039, #1045) by @linuxuser586 in #1046
- docs: name the Instance log (#1040) by @linuxuser586 in #1047
- docs: record dump-less and incremental Cloud SQL backups as out of scope (#1043) by @linuxuser586 in #1049
- docs: just runs the build and its control flow lives in Go (ADR 0061, #932) by @linuxuser586 in #1050
- build: migrate the build from Task to just (#932) by @linuxuser586 in #1051
- ci(console): console-e2e gets through an Ubuntu archive outage (#1054) by @linuxuser586 in #1056
- docs: ADR 0017 lets a test drop the resource its flake fails on (#972) by @linuxuser586 in #1057
- feat(gke): pods behind a NEG wait for the load balancer through the readiness gate (#1036) by @linuxuser586 in #1058
- feat(sql): take the daily Automated backup at backupConfiguration.startTime (#1038) by @linuxuser586 in #1060
- fix(ar): deleting a version frees its layers, and a Registry cleanup pass frees what nothing refers to (#1045) by @linuxuser586 in #1063
- feat(sql): gzip the archived WAL of point-in-time recovery (#1048) by @linuxuser586 in #1066
- docs(adr): ADR 0045 counts Cluster server exits in a cluster condition (#1061) by @linuxuser586 in #1071
- feat(ar): the Registry cleanup pass runs standard repositories' cleanup policies (#1039) by @linuxuser586 in #1067
- docs: GKE overcommit is warned of, never refused (#1070) by @linuxuser586 in #1073
- feat(cli): rotate gcpemu.log by size, and gcpemu logs reads the old files (#1040) by @linuxuser586 in #1072
- feat(gke): a node's image GC works against its node pool's boot disk size (#1052) by @linuxuser586 in #1074
- docs(gke): size the Runtime machine for a GKE cluster's nodes (#1069) by @linuxuser586 in #1075
- fix(ci): cross-compile all targets on x64 Linux only, and save no Playwright cache from PRs (#1055) by @linuxuser586 in #1076
- feat(sql): gzip Cloud SQL dumps and stream them through the emulator (#1043) by @linuxuser586 in #1077
- fix(gke): the CA injector refuses pods it can't give the Instance CA (#1053) by @linuxuser586 in #1079
- fix(sql): Cloud SQL backup retention defaults by edition and is range-checked, with log days ≤ retained backups (#1044) by @linuxuser586 in #1080
- feat(gke): count Cluster server exits in a cluster condition (#1061) by @linuxuser586 in #1081
- feat(gke): report the Instance's Node limit in /_emu/v1/info and gcpemu status (#1065) by @linuxuser586 in #1083
- docs(adr): an update-mask path naming a map key changes only that key (#1062) by @linuxuser586 in #1084
- fix(ar): an update mask naming one map key changes that key only (#1062) by @linuxuser586 in #1085
- fix(sql): reject a backupConfiguration.startTime that is not HH:MM (#1059) by @linuxuser586 in #1082
- fix(gke): make the Node limit a config setting that rejects unusable values (#1068) by @linuxuser586 in #1092
- docs(adr): a test's own host objects are tagged through a Test data dir (#1091) by @linuxuser586 in #1093
- fix(secrets): an update mask naming one map key changes that key only (#1086) by @linuxuser586 in #1094
- feat(gke): warn when an Instance's GKE nodes overcommit the Runtime machine's memory (#1070) by @linuxuser586 in #1095
- fix(console): console e2e Instances run in Test data dirs that a later run reclaims (#1035) by @linuxuser586 in #1096
- fix(build): an update mask naming one map key changes that key only (#1090) by @linuxuser586 in #1097
- fix(test): tag the overlap networks tests create through a Test data dir (#1091) by @linuxuser586 in #1098
- fix(iam): an update mask naming one attributeMapping key changes that key only (#1088) by @linuxuser586 in #1099
- fix(certs): an update mask naming one map key changes that key only (#1087) by @linuxuser586 in #1100
- fix(pubsub): an update mask naming one map key changes that key only (#1089) by @linuxuser586 in #1101
- fix(test): probe the published bind address for 8080 in lb tests (#1078) by @linuxuser586 in #1102
- fix(instance): removing an Instance's containers has a limit of its own (#1031) by @linuxuser586 in #1103
- fix(test): drain exec stdin before the fake daemon closes (#1104) by @linuxuser586 in #1107
- fix(test): hold the fake Docker lock while tagging in TestReclaim (#1105) by @linuxuser586 in #1108
- fix(runtime): a reset after the command exits ends ExecStream's output (#1106) by @linuxuser586 in #1111
- fix(instance): an Instance's runtime connection and its Reclaim belong to the Instance (#1033) by @linuxuser586 in #1112
- fix(sql): stage restore bundles in the Instance's data directory (#1110) by @linuxuser586 in #1113
- test(ar): hold #798's late-join window open through fetch hooks, with no socket (#972) by @linuxuser586 in #1114
- fix(gateway): a shutdown past its deadline closes connections by force (#1034) by @linuxuser586 in #1122
- docs(adr): Teardown closes the gate and saves before stopping Services (#1118) by @linuxuser586 in #1123
- docs(sql): name the WAL archive command and when an upgrade takes effect (#1120) by @linuxuser586 in #1124
- fix(dns): a Stop past its deadline is not a failure once both sockets closed (#1115) by @linuxuser586 in #1125
- fix(sql): Stop and Reset give cancelled work a 1s grace past an ended ctx (#1116) by @linuxuser586 in #1128
- fix(edgeagent): log a LAN relay as removed only when it was (#1119) by @linuxuser586 in #1127
- chore: ignore .claude/worktrees/ by @linuxuser586 in #1133
- fix(services): Services' own HTTP servers stop by force once ctx ends, as the API gateway does (#1117) by @linuxuser586 in #1126
- fix(instance): Teardown closes the gate and saves before stopping Services (#1118) by @linuxuser586 in #1129
- test(emutestx): a killed run's network may be reclaimed by another process (#1121) by @linuxuser586 in #1130
- test(sql): draw the WAL archive command upgrade line at the end of the restart (#1120) by @linuxuser586 in #1131
- docs: Docker Desktop 4.99.0 supports VLAN (8021q) by @linuxuser586 in #1137
- test(gke): the managed Prometheus test's pods answer simultaneous scrapes (#1132) by @linuxuser586 in #1134
- fix(gke): awaitNodes keeps the API server's error when the deadline cuts off a request (#1135) by @linuxuser586 in #1136
- fix(trust): Public roots on macOS come from the keychain, and never hold another Instance's CA (#1138) by @linuxuser586 in #1140
- test(prerelease): save each step's output to dist/ and link it from the report (#1139) by @linuxuser586 in #1141
- fix(runtime): RemoveContainer retries Docker's kill/exit race (#1142) by @linuxuser586 in #1143
- docs(gke): ADR 0081: a failed cluster delete leaves the cluster in ERROR and resumes on start (#1145) by @linuxuser586 in #1149
- test(e2e): TestAutopilot uses a project per version and logs the deferred tofu destroy (#1146) by @linuxuser586 in #1150
- fix(runtime): RemoveContainer waits out Docker's 409 "removal already in progress" (#1148) by @linuxuser586 in #1151
- fix(gke): a node removal cut off by cluster delete finishes before the delete removes the container (#1144) by @linuxuser586 in #1152
- fix(gke): a failed cluster delete leaves the cluster in ERROR and resumes on start (#1145) by @linuxuser586 in #1153
- test(emutest): a killed child's Instance may be reclaimed by another process's sweep (#1154) by @linuxuser586 in #1155
- ci: upload emulator log and docker events when autopilot/e2e/tofu jobs fail (#1147) by @linuxuser586 in #1157
- test(instance): hungRuntime.self is atomic, as a test sets it mid-run (#1158) by @linuxuser586 in #1159
- docs: release notes for v0.15.0 by @linuxuser586 in #1160
Full Changelog: v0.14.0...v0.15.0