Skip to content

Conversation

jesson1
Copy link

@jesson1 jesson1 commented Sep 17, 2025

Problem

When Writable.Pipeline is updated, the runtime previously only updated topics/transforms per pipeline ID. This PR changes the update to a full replacement: pipelines absent from the new config are removed (and their metrics unregistered) and new pipelines are created and registered. Incoming topics are expanded with the message-bus base prefix.

What changed

  • Build full topics using base topic prefix before applying config.
  • Replace per-field setters with UpdateFunctionsPipelines(...).
  • UpdateFunctionsPipelines:
    • acquires a lock,
    • unregisters metrics and deletes pipelines not in the new config,
    • creates new FunctionPipeline instances and registers their metrics.

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/app-functions-sdk-go/blob/main/.github/CONTRIBUTING.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.18%. Comparing base (5dd841c) to head (b704129).

Files with missing lines Patch % Lines
internal/runtime/runtime.go 0.00% 16 Missing ⚠️
internal/app/configupdates.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1748      +/-   ##
==========================================
- Coverage   48.37%   48.18%   -0.20%     
==========================================
  Files          64       64              
  Lines        4934     4954      +20     
==========================================
  Hits         2387     2387              
- Misses       2337     2357      +20     
  Partials      210      210              

☔ View full report in Codecov by Sentry.
📢 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.

@jesson1 jesson1 changed the title Fully replace pipelines on Writable.Pipeline update fix: Fully replace pipelines on Writable.Pipeline update Sep 19, 2025
Previously only updated topics/transforms per pipeline ID.
Now perform full replacement: remove pipelines not in config (unregister metrics),
create/register new pipelines, and build full topics with base prefix.

Signed-off-by: jiasheng.yu <[email protected]>
@jesson1 jesson1 force-pushed the fix/pipline-updates branch from 2a716a1 to b704129 Compare September 19, 2025 07:58
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