Skip to content

Conversation

@scotwells
Copy link
Contributor

This PR introduces a new history command that can be used to diff a resource over time. This is helpful for analyzing what changes were made to a resource and who made the change.

What's shown here is an example of running the command against a resource in Datum Cloud so we could analyze the changes one of our system components was making to a resource.

▶ ./datumctl activity --project another-project-w24uyl history dnsrecordsets dns-record-set-www-ibm-com-5npagr-qp25o9 --diff

╭─────────────────────────────────────────────────────────────╮
│ Change #1   📝 patch    [200]
│ 🕐 2026-01-21 09:29:35
│ 👤 dns-operator
╰─────────────────────────────────────────────────────────────╯
📸 Initial state (oldest available change)

{
  "apiVersion": "dns.networking.miloapis.com/v1alpha1",
  "kind": "DNSRecordSet",
  "metadata": {
    "name": "dns-record-set-www-ibm-com-5npagr-qp25o9",
    "namespace": "default"
  },
  "spec": {
    ...
  },
  "status": {
    ...
  }
}

╭─────────────────────────────────────────────────────────────╮
│ Change #2   📝 patch    [200]
│ 🕐 2026-01-21 09:29:35
│ 👤 dns-operator
╰─────────────────────────────────────────────────────────────╯
📝 Changes: metadata only

--- Previous
+++ Current
@@ -143,7 +143,7 @@
     "conditions": [
       {
         "lastTransitionTime": "2025-12-03T10:10:17Z",
-        "message": "Record \"outer-global-dual.ibmcom-tls12.edgekey.net\": status 422: {\"error\": \"RRset outer-global-dual.ibmcom-tls12.edgekey.net.www.ibm.com. IN CNAME has more than one record\"}",
+        "message": "Record \"@\": status 422: {\"error\": \"RRset www.ibm.com. IN CNAME has more than one record\"}",
         "observedGeneration": 1,
         "reason": "PDNSError",
         "status": "False",

╭─────────────────────────────────────────────────────────────╮
│ Change #3   📝 patch    [200]
│ 🕐 2026-01-21 09:31:04
│ 👤 dns-operator
╰─────────────────────────────────────────────────────────────╯
📝 Changes: metadata only

--- Previous
+++ Current
@@ -143,7 +143,7 @@
     "conditions": [
       {
         "lastTransitionTime": "2025-12-03T10:10:17Z",
-        "message": "Record \"@\": status 422: {\"error\": \"RRset www.ibm.com. IN CNAME has more than one record\"}",
+        "message": "Record \"outer-global-dual.ibmcom-tls12.edgekey.net\": status 422: {\"error\": \"RRset outer-global-dual.ibmcom-tls12.edgekey.net.www.ibm.com. IN CNAME has more than one record\"}",
         "observedGeneration": 1,
         "reason": "PDNSError",
         "status": "False",

This commit introduces a new `history` command that can be used to diff
a resource over time.
@ecv
Copy link

ecv commented Jan 21, 2026

whoa that is cool

@scotwells scotwells merged commit 3f088ce into main Jan 21, 2026
4 checks passed
@scotwells scotwells deleted the feat/add-history-command branch January 21, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants