Skip to content

Commit 384700c

Browse files
docs(ci): add warnings about diff limitations
1 parent 0246894 commit 384700c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

ci/tasks.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,18 @@ def diff(
231231
if result.stdout:
232232
full_diff += result.stdout
233233

234-
msg = (
235-
f"```diff\n{full_diff}```\n"
236-
if full_diff
237-
else f"No {driver if driver else 'manifest'} changes found for {c.calitp_config.channel}.\n"
234+
msg = "\n\n".join(
235+
[
236+
"The following changes will be applied to the production Kubernetes cluster upon merge.",
237+
"**BE AWARE** this may not reveal changes that have been manually applied to the cluster getting undone—applying manual changes to the cluster should be avoided.",
238+
(
239+
f"```diff\n{full_diff}```\n"
240+
if full_diff
241+
else f"No {driver if driver else 'manifest'} changes found for {c.calitp_config.channel}.\n"
242+
)
243+
]
238244
)
245+
239246
if outfile:
240247
print(f"writing {len(msg)=} to {outfile}", flush=True)
241248
with open(outfile, "w") as f:

kubernetes/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ The workflows described above also define their triggers. In general, developer
1515
1. Check out a feature branch
1616
2. Put up a PR for that feature branch, targeting `main`
1717
- `preview-kubernetes` will run and add a comment showing the diff of changes that will affect the production Kubernetes cluster
18+
19+
**BE AWARE**: This diff may *NOT* reveal any changes that have been manually applied to the cluster being undone. The `helm diff` plugin used under the hood compares the new manifests against the saved snapshot of the last ones Helm deployed rather than the current state of the cluster. It has to work that way because that most accurately reflects how helm will apply the changes. This is why it is important to avoid making manual changes to the cluster.
20+
1821
3. Merge the PR
1922
- `deploy-kubernetes` will run and deploy to `prod` this time
2023

0 commit comments

Comments
 (0)