Skip to content

Allow Extra NR catalogues to be included from the TeamType - #8946

Open
hardillb wants to merge 10 commits into
mainfrom
team-type-catalogues
Open

hardillb wants to merge 10 commits into
mainfrom
team-type-catalogues

Conversation

@hardillb

Copy link
Copy Markdown
Contributor

fixes FlowFuse/engineering#534

Description

Allow catalogue URLS to be added to team types and only added to devices and instance is they are not already present

Related Issue(s)

FlowFuse/engineering#534

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

fixes FlowFuse/engineering#534

Allow catalogue URLS to be added to team types and only added to
devices and instance is they are not already present
These didn't flag locally
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.02%. Comparing base (c8e2fba) to head (d1a1eb6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8946   +/-   ##
=======================================
  Coverage   80.01%   80.02%           
=======================================
  Files         476      476           
  Lines       26191    26199    +8     
  Branches     6982     6986    +4     
=======================================
+ Hits        20958    20966    +8     
  Misses       5233     5233           
Flag Coverage Δ
backend 80.02% <100.00%> (+<0.01%) ⬆️

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.

@hardillb

Copy link
Copy Markdown
Contributor Author

The failing UI tests appear to pass locally

@knolleary knolleary left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whilst this works, had some feedback for bits that might need tidying up.

In both deviceLive.js and project.js

  • Accesses team.TeamType?.properties?.extraCatalogues directory. Should be team.getProperty("extraCatalogues", null) so that it could be overridden at the team level
  • The check for that property assumes response.palette.catalogues exists. Earlier in the function is a check that initialises that property based on other properties. Not sure if there's a combination there that will trip us up
  • We only apply this setting if cert nodes is enabled - but at the TeamType dialog this is presented as a general option for additional catalogues that don't need to be certified. Either we want to make this option truly about adding catalogues without it being specific to cert nodes (move the work to append the catalogues out of the containing if block), or we update the dialog to be explicit this is about cert nodes.
  • URL.parse(cat) was flagged as a new API that cuts off Safari 17 which isn't that old. We don't use it in the code base already, so potentially breaking.

@hardillb

hardillb commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

I've fixed 1, 3 and 4

As for 2, I think we are safe as cert nodes or ffnodes has to be enabled, so we will have injected at least one catalogue.

@knolleary knolleary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to try/catch url constructor to handle invalid entries.

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>

This branch was successfully deployed

1 active deployment
staging — d1a1eb6e Deployed Nov 9, 2026 by hardillb via Deploy application #12935
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.

2 participants