Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Topics Schema Storage #5053

Merged
merged 125 commits into from
Feb 11, 2025
Merged

MQTT Topics Schema Storage #5053

merged 125 commits into from
Feb 11, 2025

Conversation

hardillb
Copy link
Contributor

@hardillb hardillb commented Jan 24, 2025

Description

  • /api/v1/teams/:teamId/brokers/:brokerId/topics
    • GET returns all topics and meta data for a given broker
    • POST adds a new topic to a broker
  • /api/v1/teams/:teamId/brokers/:brokerId/topics/:topicId
    • PUT updates metadata for a give topic
    • DELETE deletes a topic and it's metadata

Related Issue(s)

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

Labels

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

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 65.10791% with 97 lines in your changes missing coverage. Please review.

Project coverage is 78.26%. Comparing base (ca8099c) to head (81da69a).
Report is 126 commits behind head on 3rd-party-broker.

Files with missing lines Patch % Lines
forge/ee/routes/teamBroker/schema.js 14.00% 43 Missing ⚠️
forge/ee/routes/teamBroker/3rdPartyBroker.js 66.38% 40 Missing ⚠️
forge/db/models/MQTTTopicSchema.js 84.00% 8 Missing ⚠️
forge/containers/stub/index.js 33.33% 2 Missing ⚠️
forge/containers/wrapper.js 75.00% 1 Missing ⚠️
...migrations/20250124-01-EE-add-mqtt-topic-schema.js 83.33% 1 Missing ⚠️
...migrations/20250203-01-EE-add-team-broker-creds.js 85.71% 1 Missing ⚠️
...db/migrations/20250205-01-EE-add-payload-schema.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           3rd-party-broker    #5053      +/-   ##
====================================================
+ Coverage             78.19%   78.26%   +0.07%     
====================================================
  Files                   333      337       +4     
  Lines                 15668    15858     +190     
  Branches               3610     3661      +51     
====================================================
+ Hits                  12252    12412     +160     
- Misses                 3416     3446      +30     
Flag Coverage Δ
backend 78.26% <65.10%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

knolleary and others added 11 commits February 10, 2025 10:11
Adds
- endpoint to query on backend
- adds status pill vue object
- queries status of broker on broker id change

Needs to poll status, not just load once
- removed brokerStatusBadge conditional from the template to the badge itself, template slot conditionals don't behave well with conditionals
- start the broker in an updating state
- removed the fetch state from the activeBrokerId and placed it on an activeBrokerId watcher
- removed the setInterval from the mounted method and placed it in the activeBrokerId watcher because it would not have update the status of the correct broker after changing between 3rd party brokers
- error handling
…tover after the previous fix, and it was causing the page to prematurely redirect to the default ff broker triggering the redirectIfNeeded method in the hasFfUnsClients watcher
Add option to reload topic hierarchy and remember state
@hardillb hardillb merged commit befbc5c into 3rd-party-broker Feb 11, 2025
19 of 20 checks passed
@hardillb hardillb deleted the mqtt-topic-schema-storge branch February 11, 2025 15:05
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.

4 participants