Skip to content

Fix fuel integration credential persistence and sync history records - #79

Merged
roncodes merged 2 commits into
release/v0.2.1from
feature/fuel-integration-data-contracts
Sep 16, 2026
Merged

roncodes merged 2 commits into
release/v0.2.1from
feature/fuel-integration-data-contracts

Conversation

@roncodes

@roncodes roncodes commented Sep 16, 2026

Copy link
Copy Markdown
Member

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

  • ESLint passed for all eight changed JavaScript files.
  • Full instrumented suite: 1,051 tests passed, 0 failed.
  • Exact 100% coverage across 147 source files: 2,258 statements, 1,467 branches, 727 functions, and 2,205 lines, all covered.
  • Added summary fallback and cache-invalidation regressions; coverage thresholds and exclusions are unchanged.
  • git diff --cached --check: passed.

- 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

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1428e53) to head (297e76a).

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     
Flag Coverage Δ
fleetops-data 100.00% <100.00%> (ø)

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

Files with missing lines Coverage Δ
addon/models/fuel-provider-connection.js 100.00% <100.00%> (ø)
addon/serializers/fuel-provider-connection.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1428e53...297e76a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
@roncodes
roncodes merged commit cdbea0f into release/v0.2.1 Sep 16, 2026
5 checks passed
@roncodes
roncodes deleted the feature/fuel-integration-data-contracts branch September 16, 2026 06:51
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