Skip to content

Release v2.0.3 - #339

Merged
roncodes merged 11 commits into
mainfrom
release/v2.0.3
Nov 19, 2026
Merged

roncodes merged 11 commits into
mainfrom
release/v2.0.3

Conversation

@roncodes

@roncodes roncodes commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Release PR for v2.0.3. Merging it into main tags v2.0.3 through release.yml.

What's in it

Merge order

  1. Merge fix(migrations): make the columns foreign keys point at unique #338 into this branch.
  2. Merge Push apps: an organization's own apps send pushes with their own credentials #340 into this branch.
  3. Merge this PR into main.

Fleet-Ops' push app support (in fleetops release/v0.7.2) requires core-api 2.0.3, so this ships first.

Then fleetbase/fleetbase's release/v0.8.2 needs fleetbase/core-api 2.0.3 in its lock (fleetbase/fleetbase#764).

MySQL 8.4 turns on restrict_fk_on_non_standard_key by default. With it on,
MySQL refuses any ALTER of a table that a foreign key points at through a
non-unique key (1553). v2.0.2 turned the setting off while migrations run;
this removes the cause.

uuid becomes unique on chat_channels, chat_messages, chat_participants,
comments, custom_fields, dashboards and reports, and id on permissions and
roles, whose spatie migration declared it ->index() rather than ->primary().
The old single-column index is dropped in favour of <table>_<column>_unique.
Columns a unique or primary key already covers are left alone, tables with
duplicate values are skipped with a message, and re-running changes nothing.

A second migration drops the sandbox's access_token_id foreign keys from
api_events, api_request_logs and webhook_request_logs. They point at
personal_access_tokens, which only the main database has. Nothing happens on
the main connection.
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5348fb3) to head (c521083).

Additional details and impacted files
@@             Coverage Diff              @@
##                main      #339    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity      9718      9961   +243     
============================================
  Files            520       532    +12     
  Lines          29864     30371   +507     
============================================
+ Hits           29864     30371   +507     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

…own credentials

- push_apps: one app's APNs and FCM credentials (encrypted, never serialized)
  and a key the app registers devices with; user_devices gets push_app_uuid
  and company_uuid.
- PushAppChannel sends to push-app devices with their app's credentials:
  APNs environment from the device or production then sandbox, dead tokens
  removed, failures logged, nothing thrown.
- The PushesToApps trait builds the message from a notification's title,
  message and data.
- User::routeNotificationForApn/Fcm leave out push-app devices, so the
  install-wide channels and PushAppChannel never send to the same device.
fix(migrations): make the columns foreign keys point at unique
Push apps: an organization's own apps send pushes with their own credentials
…mposer project

fleetbase/fleetbase moves installed extensions into their own Composer project
(api/extensions, fleetbase/fleetbase#754). Utils only read core's composer.lock
and vendor/composer/installed.json, so mysql:createdb, sandbox:migrate and the
seeder, migration and auth-schema scans never saw those extensions.

Read both projects (core first, core wins on duplicates) and resolve each
package's directory to whichever vendor folder holds it. The extensions project
comes from the app's path.extensions binding, else base_path('extensions') when
it has a composer.json. Without one nothing changes.
fix(utils): discover extensions installed in a separate extensions Composer project
…ugh the service that issued its token

Push apps keep their settings in one providers map, by provider key (apn, fcm), instead of
fixed apn and fcm columns. Each provider implements PushProvider: it checks the settings
entered for it (with messages saying exactly what to fix), summarizes them without secrets,
says which tokens it recognizes, and sends. Extensions can add one with
PushProviders::register(), with no schema change.

Devices get push_provider, the service that issued their token. Left empty, it's worked out:
a token shaped like an FCM registration token goes through FCM even on iOS, so iOS apps that
get their token from the Firebase SDK work without changes; otherwise the platform decides.

A database that ran the earlier push apps migration has its apn and fcm columns moved into
providers by 2026_11_19_000002.
…nding

Brings the coverage gate back to 100% after the extensions project discovery change.
@roncodes
roncodes merged commit 0ee36de into main Nov 19, 2026
7 checks passed
@roncodes
roncodes deleted the release/v2.0.3 branch November 19, 2026 07:47
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