Fix fuel integration credential persistence and sync history records - #79
Merged
roncodes merged 2 commits intoSep 16, 2026
Merged
Conversation
- Declare credentials on fuel provider connections so the token and auth method verified by Test Connection are included when saving an integration. - Omit null or absent credentials on updates to fetched records, preserving stored write-only tokens unless the operator supplies a replacement. - Expose imported and unmatched summary counts with explicit computed dependencies so integration tables update when their summaries change. - Register fuel-provider-sync-run models and serializers in addon and host namespaces, including date windows, progress, outcomes, errors and metadata. - Add regression coverage for create/update serialization, write-only save responses, repeated public-ID queries retaining UUID record identity, and deserialization of connection-scoped sync history. Companion data contracts for the Fleet-Ops fuel integration improvements in fleetbase/fleetops@cce089dc, targeting the v0.2.1 release branch. Validation: all 23 focused fuel-provider tests passed; all eight changed JavaScript files passed ESLint, and the staged diff passed whitespace checks.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v0.2.1 #79 +/- ##
================================================
Coverage 100.00% 100.00%
================================================
Files 114 115 +1
Lines 2913 2922 +9
Branches 694 697 +3
================================================
+ Hits 2913 2922 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Exercise lastImported and lastUnmatched for new connections, absent or partial sync summaries, explicit null counts, populated results, and zero unmatched purchases. Verify that replacing a sync result and updating its nested counts both invalidate the cached display values. These two previously untested getters accounted for all CI coverage gaps: two statements, two functions, two lines, and four branch paths. Keep the 100% coverage thresholds, instrumentation, and exclusions unchanged. Validation: 1,051 tests passed. The full coverage gate passes across 147 source files: 2,258/2,258 statements, 1,467/1,467 branches, 727/727 functions, and 2,205/2,205 lines. The changed test also passes ESLint.
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.
Summary
Fuel integrations could pass Test Connection and then fail to save because the connection model did not serialize credentials. Sync history also requested an unregistered record type.
This change declares the connection credentials attribute and includes supplied tokens in create/update requests. Null or absent credentials are omitted on fetched-record updates so renaming a connection preserves its stored token. It also registers the sync-run model and serializer, adds imported/unmatched summary counts, and covers repeated public-ID queries that must reuse the UUID-backed record.
Companion to Fleet-Ops fuel integration improvements. Deploy both packages together for the updated fuel integration workflow.
Validation
git diff --cached --check: passed.