Skip to content

Extra destination field validation - #1431

Open
that70schris wants to merge 21 commits into
newjitsufrom
feat/posthog-validation
Open

Extra destination field validation#1431
that70schris wants to merge 21 commits into
newjitsufrom
feat/posthog-validation

Conversation

@that70schris

@that70schris that70schris commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Validation for URL fields, removed GA4 URL, made Segment API Base a dropdown

@that70schris
that70schris force-pushed the feat/posthog-validation branch from f819c53 to 3183e78 Compare July 28, 2026 16:44

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current PR diff (PostHog host validation additions in , , and the new schema helpers/tests). I focused on correctness, security, and user-visible regressions and did not find actionable bugs in the current change set. The client-side validator wiring and test coverage look consistent with the intended behavior.

@absorbb

absorbb commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

We probably can gather all destination validations in a single PR

jitsu-code-review[bot]
jitsu-code-review Bot previously approved these changes Jul 28, 2026

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PostHog host validation changes across , schema wiring, and the new unit tests. The validation flow and tests line up with the intended behavior (strict cloud-domain normalization while allowing general HTTP(S) self-hosted URLs). I didn’t find actionable bugs, security issues, or correctness regressions in the PR diff.

@that70schris that70schris changed the title Feat/posthog validation Extra destination field validation Jul 28, 2026
@that70schris
that70schris force-pushed the feat/posthog-validation branch from 71b102b to 7e643f9 Compare July 28, 2026 20:15

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PR diff for validation, security, and behavior changes across destination schemas and console validation wiring. I found two follow-ups: (1) a compile-time bug in destinations.tsx from duplicate imports, and (2) a potential compatibility regression from making Segment apiBase an enum-only value set.

Comment thread webapps/console/lib/schema/destinations.tsx

export const SegmentCredentials = z.object({
apiBase: z.string().default("https://api.segment.io/v1").describe("API Base::Segment API Base"),
apiBase: z.enum(SEGMENT_API_BASES).default(SEGMENT_API_BASES[0]).describe("API Base::Segment API Base"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: switching apiBase to z.enum(...) means any existing destination configs using a custom Segment-compatible endpoint will now fail schema validation. Do we have a migration/compatibility plan for already-saved configs that are outside these three values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should just revert to the default if it's not one of these options

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff from \ to , focusing on destination schema hardening, URL/client validation wiring in the console editor, and corresponding unit tests.\n\nI did not find additional actionable bugs or security regressions beyond the existing open discussion thread on Segment compatibility.

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff from c9fae06 to 7e643f9, focusing on destination schema hardening, URL/client validation wiring in the console editor, and the added unit tests.

I did not find additional actionable bugs or security regressions beyond the existing open discussion thread on Segment apiBase compatibility.

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.

2 participants