Skip to content

Commit

Permalink
source-zendesk-support: omit tags from capture snapshot
Browse files Browse the repository at this point in the history
The `/tags` endpoint returns the most popular tags used in the last 60
days. After 60 days, it's possible for existing tags to not be returned
if they weren't used recently. The capture snapshot has been failing in
CI because of this. Instead of making a reminder to go into Zendesk
every 2 months and use a tag, I think it's easier to just remove tags
from the capture snapshot.
  • Loading branch information
Alex-Bair committed Oct 11, 2024
1 parent 6724620 commit cedc301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,6 @@
"url": "https://d3v-estuary.zendesk.com/api/v2/slas/policies/29006807867284.json"
}
],
[
"acmeCo/tags",
{
"_meta": {
"op": "u",
"row_id": 0,
"uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef"
},
"name": "redacted",
"count": 1
}
],
[
"acmeCo/ticket_audits",
{
Expand Down
13 changes: 5 additions & 8 deletions source-zendesk-support/tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@


def test_capture(request, snapshot):
OMITTED_STREAMS = [
"acmeCo/tags",
]

result = subprocess.run(
[
"flowctl",
Expand All @@ -25,7 +29,7 @@ def test_capture(request, snapshot):

for line in lines:
stream = line[0]
if stream not in seen:
if stream not in seen and stream not in OMITTED_STREAMS:
unique_stream_lines.append(line)
seen.add(stream)

Expand All @@ -37,13 +41,6 @@ def test_capture(request, snapshot):
rec["updated_at"] = "redacted"
if "last_login_at" in rec:
rec["last_login_at"] = "redacted"
if stream == "acmeCo/tags":
rec["name"] = "redacted"
# Updating count with rec["count"] = 1 sets count to be
# the tuple [1] instead of the int 1. We can get around
# this by deleting the attribute then re-setting it.
del rec["count"]
rec["count"] = 1


assert snapshot("capture.stdout.json") == unique_stream_lines
Expand Down

0 comments on commit cedc301

Please sign in to comment.