Conversation
plugin_microservice.rb exec()s the configured cmd, which replaces the process image and kills the Metric update thread it just started. A cmd that is itself an OpenC3::Microservice builds a new Metric and keeps reporting, but a plugin running a Rails app, a python script or any other binary never loads the OpenC3 libraries, so its cpu and memory froze at whatever the bootstrap sampled and never changed again. - Add OpenC3::ProcessStats to sample cpu/memory for an arbitrary pid, using Etc.sysconf rather than shelling out to getconf and splitting /proc/<pid>/stat from the last paren so a comm containing spaces or parens can't shift the field offsets - Sample every child pid from Operator#publish_process_metrics each cycle, keeping one ProcessStats per microservice so cpu deltas accumulate across cycles and resetting it when a respawn changes pid - Store operator reported values under MetricModel::PROCESS_PRIMARY_KEY and merge them on read, so the operator and the microservice are never two writers of one field - Skip Metric.add_update_generator when OPENC3_OPERATOR_PROCESS_METRICS is set, which microservice_operator.rb sets on every child it spawns - Drop the bootstrap metrics row in PluginMicroservice#run before exec so the stale sample is never published Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Describe the processed/ and error/ split under decom_logs and how to retry a file by moving it back once the cause is fixed - Add error/ to the directories to remove after verifying the data - Note the migration microservice idles when done, so the plugin should be uninstalled from the Admin Console Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
_log_info always printed to stdout, so info messages bypassed the microservice logger that _log_warn and _log_error already use. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3959 +/- ##
==========================================
+ Coverage 80.11% 80.16% +0.05%
==========================================
Files 901 903 +2
Lines 68370 68516 +146
Branches 2699 2699
==========================================
+ Hits 54773 54929 +156
+ Misses 12929 12918 -11
- Partials 668 669 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Microservice.run publishes INITIALIZED, then sets @State to RUNNING in memory only and calls run. Plugins never start the periodic status thread, and PluginMicroservice#run exec()s the configured cmd, so the RUNNING state was never written. A plugin running a Rails app, a python script or any other binary showed INITIALIZED in the Microservices tab forever even though it was running. A cmd that is itself an OpenC3::Microservice publishes its own status and overwrites this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changed
Why it changed
Testing strategy
Built enterprise and installed the CFDP plugin. Watched the System Health Microservice Metrics on the CFDP processes to verify the Sample Cpu Utilization was changing during scripts. Here is a screenshot of them at rest:
Here's an example of running the cfdp_test_suite.py. Note the Sample Cpu Utilization ... previously that would have just been 0 for the DEFAULT__USER__CFDP and DEFAULT__USER__CFDP2.