Skip to content

[build-tools] Add eas/posthog_annotation workflow function#3948

Open
gwdp wants to merge 1 commit into
gwdp/eng-21551-posthog-upload-sourcemapsfrom
gwdp/eng-21551-posthog-annotation
Open

[build-tools] Add eas/posthog_annotation workflow function#3948
gwdp wants to merge 1 commit into
gwdp/eng-21551-posthog-upload-sourcemapsfrom
gwdp/eng-21551-posthog-annotation

Conversation

@gwdp

@gwdp gwdp commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Why

Drop a labeled marker on PostHog charts from a workflow, so a deploy or release shows up as a line across every graph. Reasoning: Makes it easy to see whether errors spiked right after a ship.

How

Adds eas/posthog_annotation. POSTs to the PostHog annotations API with content and an optional date_marker (defaults to now). Same personal key as the flag and metric steps; the key needs the annotation:write scope.

ignore_error (default false) fails the step on error; set it true to warn and continue.

Test Plan

CI passes. Not live-run yet, since the connect key needs the annotation:write scope. Will run it before undrafting. Test workflow below.

Test workflow
name: PostHog annotation test

jobs:
  annotate_now:
    environment: production
    steps:
      - uses: eas/posthog_annotation
        with:
          content: Test annotation from an EAS workflow

  annotate_dated:
    environment: production
    steps:
      - uses: eas/posthog_annotation
        with:
          content: Release marker, back-dated
          date_marker: 2026-07-03T00:00:00Z
Screenshot 2026-07-03 at 2 24 25 PM Screenshot 2026-07-03 at 2 24 53 PM

@linear-code

linear-code Bot commented Jul 3, 2026

Copy link
Copy Markdown

ENG-21551

gwdp commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-annotation branch from d0f40ee to 9ce8b59 Compare July 3, 2026 20:47
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-upload-sourcemaps branch from 229312f to 98e807a Compare July 3, 2026 20:47
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-annotation branch from 9ce8b59 to aa30fd2 Compare July 3, 2026 20:58
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-upload-sourcemaps branch from 98e807a to f34df26 Compare July 3, 2026 20:58
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.46%. Comparing base (eb91e64) to head (bccd6db).

Additional details and impacted files
@@                             Coverage Diff                              @@
##           gwdp/eng-21551-posthog-upload-sourcemaps    #3948      +/-   ##
============================================================================
+ Coverage                                     59.44%   59.46%   +0.03%     
============================================================================
  Files                                           940      941       +1     
  Lines                                         41337    41364      +27     
  Branches                                       8705     8709       +4     
============================================================================
+ Hits                                          24568    24595      +27     
  Misses                                        16674    16674              
  Partials                                         95       95              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-annotation branch from aa30fd2 to 9c65fdb Compare July 3, 2026 21:09
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-upload-sourcemaps branch from f34df26 to b6df873 Compare July 3, 2026 21:09
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-upload-sourcemaps branch from b6df873 to eb91e64 Compare July 3, 2026 21:40
@gwdp gwdp force-pushed the gwdp/eng-21551-posthog-annotation branch from 9c65fdb to bccd6db Compare July 3, 2026 21:40
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@gwdp gwdp requested a review from sjchmiela July 3, 2026 21:47
@gwdp gwdp marked this pull request as ready for review July 3, 2026 21:48
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

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.

1 participant