Skip to content

[7441] Consolidate broker credential generation #7642

Open
n-lark wants to merge 1 commit into
mainfrom
7441-createClient
Open

[7441] Consolidate broker credential generation #7642
n-lark wants to merge 1 commit into
mainfrom
7441-createClient

Conversation

@n-lark

@n-lark n-lark commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Extracts the duplicated find-and-destroy → generate → insert → return logic from the six createClientFor* functions into one shared createClient helper, leaving each as a thin wrapper frfr.

Related Issue(s)

Resolves #7441

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark self-assigned this Jun 30, 2026
@n-lark n-lark requested a review from cstns June 30, 2026 19:45
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.56%. Comparing base (abe7b49) to head (0da171d).

Files with missing lines Patch % Lines
forge/db/controllers/BrokerClient.js 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7642      +/-   ##
==========================================
- Coverage   76.58%   76.56%   -0.02%     
==========================================
  Files         413      413              
  Lines       21845    21823      -22     
  Branches     5757     5752       -5     
==========================================
- Hits        16730    16709      -21     
+ Misses       5115     5114       -1     
Flag Coverage Δ
backend 76.56% <96.66%> (-0.02%) ⬇️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Consolidate broker credential generation

1 participant