Skip to content

ci: SDK QA & release automation - #86

Merged
mattinannt merged 46 commits into
mainfrom
dhruwang/sdk-qa-release-automation
Nov 17, 2026
Merged

mattinannt merged 46 commits into
mainfrom
dhruwang/sdk-qa-release-automation

Conversation

@Dhruwang

@Dhruwang Dhruwang commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What

Part of the SDK QA & Release Automation project (Linear P-ENG-89). Consistent CI checks (PR Check Summary as the single required check), native E2E against the release Docker image, and a tag-driven release workflow.

Decisions: https://linear.app/formbricks/document/4-engineering-decisions-2de7e803ebdc

Tickets

  • Closes ENG-7218 — Flutter: CI parity
  • Closes ENG-7219 — Flutter: Patrol golden journey (Android + iOS)
  • Closes ENG-7220 — Flutter: tag-driven release + changelog + verify

Changes SDK users will notice

  • The declared minimum is now Dart 3.12 / Flutter 3.44. The dependencies already required them.

Before merging

  • All checks are green, including E2E: the full targeted journey runs against the org secret ENTERPRISE_LICENSE_KEY (Enterprise license with Contacts).
  • After merging, the ruleset's only required check becomes PR Check Summary (source: GitHub Actions).

Runbook: https://app.notion.com/p/419e5de84a5881cd8091c30193db8607

Add tested release scripts: set the pubspec version from the tag, add the
GitHub release notes to the published CHANGELOG.md, and ask pub.dev whether
a version is live. On main the pubspec holds the 0.0.0-dev placeholder and
CHANGELOG.md points to GitHub Releases.
The tag push stays the trigger because pub.dev OIDC accepts only tag
pushes; publishing the GitHub release creates that tag. The workflow now
runs build, publish and verify only: it sets the version from the tag,
skips a version pub.dev already has, adds the release notes to the
published CHANGELOG.md, and polls the pub.dev API until the version is
served. Add RELEASING.md.
The package declared Dart 3.6 / Flutter 3.27, but webview_flutter_android
^4.14.1 needs Dart 3.12 / Flutter 3.44, so the old floor never resolved.
Raising the language version moves dart format to the tall style and
enables use_null_aware_elements, prefer_initializing_formals and
unnecessary_underscores; apply both. Also fix the unresolved dartdoc
references that pana reported.
Add a package example and fail pana on any lost point.
One ci.yml on pull_request, merge_group and push to main replaces the
analyze, build, test, pana, publish dry-run, SonarQube and dependency
review workflows. Jobs: lint, format, build, unit-tests (pinned and
min SDK), package-check, sonarqube (quality gate wait), dependency-review,
workflow-lint (actionlint + zizmor) and PR Check Summary, which fails on
anything but success or an allowed skip.
…on' into dhruwang/eng-7218-flutter-ci-parity
Flutter 3.44's flutter_test pins clock 1.1.2, so clock ^1.1.3 made the
declared Flutter 3.44 floor unresolvable for any app using flutter_test.
e2e/server/ is byte-for-byte the js pilot's (ENG-7207), e2e/tunnel/ the ios
pilot's (ENG-7213).
patrol_test/golden_journey_test.dart sets up, identifies the user, sets
plan = pro, tracks qa-action, and answers the survey in the SDK's native
WebView. The manual survey-filtering QA test moves to patrol_test/ and runs
only with SURVEY_ID. The playground gets User ID and attribute fields, and
the Patrol native setup (Android runner + orchestrator, iOS RunnerUITests
with the Flutter Swift package). e2e/flutter/run-journey.sh builds and runs
it with one retry.
e2e.yml: an Android emulator job with the server on the same runner, and
an iOS simulator job that reaches a Linux server through a Cloudflare quick
tunnel. ci.yml calls it as e2e-tests (fork and Dependabot PRs skip it) and
PR Check Summary needs it.
…ntent

Patrol 4.x depends on uiautomator 2.3.0, which sets
FLAG_RETRIEVE_INTERACTIVE_WINDOWS; the survey WebView then shows up with no
children (leancodepl/patrol#3178).
…sees

Native taps can't answer the survey: on Android (WebView 109) the
accessibility bounds of a re-rendered card are offset, so the Next tap lands
on the app behind; on iOS an XCUITest tap reaches the Flutter platform view
but the page never registers it. The answers now go in through the SDK
WebView's DOM, like Espresso-Web and Playwright in the other SDKs, while
$.platform still waits for the NPS scale and the Thanks! card. Setup may take
up to 180 s: the first sync through a fresh tunnel once took over 60 s.
e2e/server/ takes the js integration tip's renamed copy (the only change).
Removes the anonymous-journey experiment (seed without targeting, skipped
identity, relaxed V1 assertion). CI run 43822468271 passed it on Android and
iOS.
The script now reads EVENT_NAME and IS_FORK_PR and decides the allowed
skips itself, so its tests cover them. Dependabot PRs no longer get the
fork exception for sonarqube and e2e-tests.
dependency-review runs on pull_request and merge_group only, and passes
base-ref and head-ref so the merge-group diff is the queued one. It uses
the action's default severity and license policy.
unit-tests writes the SDK's lcov report and uploads it; sonarqube needs
unit-tests, downloads the report and no longer runs the tests again.
A server-version job validates the image tag; android and server read it
from its output, and ios waits for it so a bad tag stops all three. The
harness script tests move out of E2E (they run in CI unit-tests).
make script-tests runs the summary, release and e2e/*/test scripts; the
unit-tests job runs it (pinned leg), so fork PRs run them too.
workflow-lint now only lints: make shellcheck covers .github/scripts,
tool/ and e2e/.
Drops the push-to-main and branch_protection_rule triggers. CodeQL gets
the shared concurrency block.
sonarqube-scan-action v8.5.0 and setup-java v6.3.0, the newest versions
used across the SDK repos. Dependency Submission runs on push to main, so
it gets the shared concurrency block.
check_prerelease_flag.sh compares the GitHub release's isPrerelease
with whether the tag has a semver prerelease suffix (build metadata
excluded). A tag without a GitHub release fails too.
build (no id-token) sets the version, checks the pre-release flag, adds
the notes to CHANGELOG.md, analyzes and runs the publish dry run, then
hands the versioned pubspec and changelog to publish. publish is the
only job with id-token: write. verify also runs after a skipped publish.
The golden journey covers its end-to-end part: an identified user with
plan = pro sees the segment-targeted survey from the real runtime, and
the finished response is stored. The SDK unit tests cover every
filtering scenario it checked: displayOnce, displayLimit, recontactDays,
displayPercentage, anonymous and identified segments, and the refilter
after logout (filter_surveys_test, utils_test, user_test,
update_queue_test).
RELEASING.md now links the Notion page, and describes the build ->
publish -> verify jobs, the pre-release flag check, and that a tag
without a GitHub release fails.
@Dhruwang
Dhruwang marked this pull request as ready for review November 16, 2026 10:26
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 81bd0b43-a6aa-4dd3-99bd-d9c33090ea7a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Dhruwang and others added 6 commits November 16, 2026 16:13
…e-runnable

- curl in api() gets a connect and total timeout, so a hung server or tunnel
  fails the step instead of the job timeout.
- bootstrap.sql skips rows that already exist; seed.sh deletes a previous
  seed before creating its data again.
- seed.sh waits for the outbox drain like up.sh, instead of failing on a
  partial result.
- assert-response.sh retries a non-2xx answer until its deadline.
The iOS job now waits for the server job's result, so a failure on either
side fails both and "Re-run failed jobs" re-runs the pair. actions: read
moves to the two jobs that poll artifacts.
"Re-run failed jobs" re-runs publish with build's old registry answer, so
publish checks pub.dev itself before uploading. The release runs build,
publish and verify only, without analyze. RELEASING.md says how to recover
a tag pushed without a GitHub release.
@sonarqubecloud

Copy link
Copy Markdown

@Dhruwang
Dhruwang requested a review from mattinannt November 17, 2026 07:53

@mattinannt mattinannt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you :-)

Some e2e take a long time with ~23 minutes, but I think in this repository where we don't have that many PRs it's fine :-)

@mattinannt
mattinannt added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 63b877e Nov 17, 2026
18 checks passed
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.

3 participants