Release v1.6.62 - #255
Open
roncodes wants to merge 3 commits into
Open
Conversation
Every other resource in the platform is addressed by a prefixed public id; a custom field was addressed by its uuid, so any API handing one out exposed an internal identifier. FleetOps' inspection API is the case in point — a submission names the field each answer belongs to, and had nothing but a uuid to name it with. Existing rows are backfilled, and the column is nullable and indexed rather than unique-and-required so the migration is safe on a table that is already populated. A field created on the fly through setCustomField() is saved quietly, which skips the hook that mints the id, so that path mints its own.
The release branch carried the feature and nothing else: composer.json still read 1.6.61 and RELEASE.md still described v1.6.61's IAM authorization work. release.yml refuses the tag unless both agree with the branch name, and its RELEASE.md check exists precisely to catch the previous release's notes left in place — which is what these were. composer.json is this repository's single source of the version, and RELEASE.md now opens with the version it describes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 6750 6750
===========================================
Files 398 398
Lines 22502 22505 +3
===========================================
+ Hits 22502 22505 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release branch for v1.6.62, cut from
mainfor the custom-field public id.What it carries
Give custom fields a public id (#254) — every other resource in the platform is addressed by a prefixed public id; a custom field was addressed by its uuid, so any API handing one out exposed an internal identifier. FleetOps' inspection API was the case in point: a submission names the field each answer belongs to, and had nothing but a uuid to name it with.
CustomFieldtakesHasPublicIdwith$publicIdType = 'custom_field', andpublic_idjoins$fillable.nullable()->index()rather than unique-and-required, following thegroupsprecedent, so it is safe on an already-populated table.HasCustomFields::setCustomField()creates a field withsaveQuietly(), which skips thecreatinghook that mints the id, so that path mints its own — otherwise a field created on the fly would be the only one without one.Scope
CustomFieldis platform-wide, so this gives every custom field a public id — orders, vendors, drivers, not only inspections.withCustomFields()'s public projection emits field names and is unchanged.Downstream
FleetOps #319 emits the public id on a form's fields and on a submission's answers, falling back to the uuid until this lands — so nothing breaks in the interim, and the ids simply start appearing once it does. The collection (fleetbase/postman#62, #63) and the PHP SDK (fleetbase/fleetbase-php#17) already document the public-id form.
Checks
#254 was green before merge: build, Postman contract, and both codecov gates.
vendor/bin/pestran 1434 tests with 0 failures, php-cs-fixer clean, and a newgenerates custom field public idstest covers the minting.