Some polish for sdk compliance#79
Conversation
rafaeelaudibert
left a comment
There was a problem hiding this comment.
2 quick requests before we can merge this! tysm, as always!
| @@ -1,2 +1,2 @@ | |||
| elixir 1.18.3-otp-27 | |||
| erlang 27.3.3 | |||
| elixir 1.19.5-otp-28 | |||
There was a problem hiding this comment.
Gotta add Elixir 1.19 to the .github/workflows/ci.yml file to keep track of them
| def client(api_key, api_host) do | ||
| client = | ||
| Req.new(base_url: api_host) | ||
| Req.new(base_url: api_host, retry: :transient) |
There was a problem hiding this comment.
Since this was changed here we need a new patch release, can you create a sampo changeset like you did in your previous PR (install sampo and run sampo add)
|
The bot couldn't post in a community PR so here's the output. As expected, we're only missing gzip after this is merged. Thanks!!! posthog-elixir Compliance ReportDate: 2026-02-10 03:37:04 UTC
|
| Test | Status | Duration |
|---|---|---|
| Format Validation.Event Has Required Fields | ✅ | 609ms |
| Format Validation.Event Has Uuid | ✅ | 609ms |
| Format Validation.Event Has Lib Properties | ✅ | 610ms |
| Format Validation.Distinct Id Is String | ✅ | 610ms |
| Format Validation.Token Is Present | ✅ | 609ms |
| Format Validation.Custom Properties Preserved | ✅ | 609ms |
| Format Validation.Event Has Timestamp | ✅ | 609ms |
| Retry Behavior.Retries On 503 | ✅ | 5612ms |
| Retry Behavior.Does Not Retry On 400 | ✅ | 2612ms |
| Retry Behavior.Does Not Retry On 401 | ✅ | 2612ms |
| Retry Behavior.Respects Retry After Header | ✅ | 5615ms |
| Retry Behavior.Implements Backoff | ✅ | 15625ms |
| Retry Behavior.Retries On 500 | ✅ | 5615ms |
| Retry Behavior.Retries On 502 | ✅ | 5615ms |
| Retry Behavior.Retries On 504 | ✅ | 5615ms |
| Retry Behavior.Max Retries Respected | ✅ | 15625ms |
| Deduplication.Generates Unique Uuids | ✅ | 619ms |
| Deduplication.Preserves Uuid On Retry | ✅ | 5615ms |
| Deduplication.Preserves Uuid And Timestamp On Retry | ✅ | 10614ms |
| Deduplication.Preserves Uuid And Timestamp On Batch Retry | ✅ | 5616ms |
| Deduplication.No Duplicate Events In Batch | ✅ | 614ms |
| Deduplication.Different Events Have Different Uuids | ✅ | 610ms |
| Compression.Sends Gzip When Enabled | ❌ | 609ms |
| Batch Format.Uses Proper Batch Structure | ✅ | 609ms |
| Batch Format.Flush With No Events Sends Nothing | ✅ | 606ms |
| Batch Format.Multiple Events Batched Together | ✅ | 614ms |
| Error Handling.Does Not Retry On 403 | ✅ | 2611ms |
| Error Handling.Does Not Retry On 413 | ✅ | 2612ms |
| Error Handling.Retries On 408 | ✅ | 5617ms |
Failures
compression.sends_gzip_when_enabled
Header \'Content-Encoding\' with value \'gzip\' not found in requests
We've changed .tool-versions to run on elixir 1.19 so let's add it to CI too
|
oops, sorry for the delay, I mostly do OS on weekends, so hard to keep up mid-week! |
|
@martosaur don't worry! you gave me permission to update your remote so went ahead and did it for you :) |
Looked into SDK compliance adapter today and did some loosely related housekeeping:
TrackedClientto be a non-intrusive Req pluginAnd finally, set
Reqretry strategy totransient(instead of the defaultsafe_transient), which enables retries of POST requests and should fix 11 out of 12 failing compliance tests.