Skip to content

Show additional pipeline values in logStatus output#1628

Open
desusaiteja wants to merge 2 commits into
OpenEnergyDashboard:developmentfrom
desusaiteja:issue-1618-log-more-pipeline-values
Open

Show additional pipeline values in logStatus output#1628
desusaiteja wants to merge 2 commits into
OpenEnergyDashboard:developmentfrom
desusaiteja:issue-1618-log-more-pipeline-values

Conversation

@desusaiteja
Copy link
Copy Markdown

@desusaiteja desusaiteja commented May 22, 2026

Resolves #1618

Adds the newer pipeline flags to logStatus() and updates each call site so they appear in the standardized logging output.

Also adds a focused server-side test for the expanded log message. CLA submitted as per the guidelines.

Verification

  • node --check src/server/services/pipeline-in-progress/processData.js
  • node --check src/server/test/db/processDataTests.js
  • ./node_modules/.bin/mocha --timeout 15000 "src/server/test/db/processDataTests.js"

@desusaiteja desusaiteja force-pushed the issue-1618-log-more-pipeline-values branch from d6cffc0 to 9db5297 Compare May 22, 2026 03:57
@desusaiteja desusaiteja force-pushed the issue-1618-log-more-pipeline-values branch from 9db5297 to 4761d72 Compare May 22, 2026 04:00
Copy link
Copy Markdown
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

@desusaiteja Thank you for this contribution. Review and testing found it works as desired. I made a few comments to consider. One involves an oversight in the issue that will require more work. If you want to discuss then just let me know. If anything is not clear or you have questions/thoughts then just let me know.

Comment thread oed-pr-body.md Outdated
@@ -0,0 +1,11 @@
Resolves #1618
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.

This seems to be a description of your work that is in the PR description. It should not be part of the OED repository and this file should be removed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch. I removed oed-pr-body.md from the branch since that content belongs in the PR description, not the repository.

Comment thread src/server/test/db/processDataTests.js Outdated
@@ -0,0 +1,59 @@
/*
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.

I think this is a nice test of the work you did. My thoughts on it are:

  • It does not test any other values in the log msgs so it isn't a general test of the code.
  • OED has not tested logging across the code base so this is different than the rest of the code. That does not mean it is bad/wrong but if OED starts doing this then it should be continued across more of the code base. Given logging has not direct impact on the OED results, I have mixed feelings about doing this.
  • A stronger test would be to make sure all the values passed to the function are actually shown so any new ones would not be missed in the future. That would be more complex but likely of greater value moving forward.

Given all of this, I am inclined to remove this test even though it is a nice usage of sinon. I welcome your thoughts.

Note if this is removed then the new export at the end of processDataTests.js can be removed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, that makes sense. Since the existing CSV pipeline tests cover the affected output, I removed the focused logging test and the temporary logStatus export.

cumulativeReset, resetStart, resetEnd, readingGap, readingLengthVariation, onlyEndTime) {
cumulativeReset, resetStart, resetEnd, readingGap, readingLengthVariation, onlyEndTime, honorDst,
relaxedParsing, useMeterZone, warnOnCumulativeReset, useMeterFrequency, useMeterFrequencyVariation) {
let message = 'For reading #' + rowNum + ' on meter ' + meterName + ' in pipeline: ' + 'previous reading has value ' + prevReading.reading + ' start time '
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.

I ran the pipeline tests (npm run testsome src/server/test/web/csvPipelineTest.js) and 57 failed. I forgot when I created the issue that many of these tests check the returned information that is modified by this work. As a result, the new values need to be added to each of these tests. This is non-trivial work that will require looking at each failure message to see it is okay and copying the new values into the test code. Is this something you are willing to do? If not, someone else can do it but it needs to be done for this to merge.

Note I think this will effectively test what you added in processDataTests.js and I commented on it in that file. Given that, I am even more inclined to remove that test.

I also ran the full tests (npm run test) and no other tests failed due to your changes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for catching this. I updated csvPipelineTest.js so the expected pipeline log output includes the newly added status fields, including the honorDst cases. I also reran ./node_modules/.bin/mocha --timeout 15000 "src/server/test/web/csvPipelineTest.js", and it passes locally with 67 passing tests.

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.

show more pipeline values in logging

2 participants