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

Make new monitoring config to be disabled by default #1667

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

Chengxuan
Copy link
Contributor

@Chengxuan Chengxuan commented Mar 18, 2025

Proposed changes

Fixes issue discussed in https://discord.com/channels/905194001349627914/1351566571050504222/1351611062910451742

Switch logic to direct access to the config.Sections to ensure access to the loaded configuration data are not lost

We later found that's not the case^^

So the bug is the logic was unable to determine whether the YAML has opted into the new monitoring configuration or not because it's enabled by default. Therefore, the logic ignored the old metrics configuration altogether.


Types of changes

  • Bug fix
  • New feature added
  • Documentation Update

Please make sure to follow these points

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code or work.
  • [na] I have commented my code, particularly in hard-to-understand areas.
  • My changes generates no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • My changes have sufficient code coverage (unit, integration, e2e tests).

Screenshots (If Applicable)


Other Information

Any message for the reviewer or kick off the discussion by explaining why you considered this particular solution, any alternatives etc.

@Chengxuan Chengxuan requested a review from a team as a code owner March 18, 2025 17:52
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (71f04f3) to head (ab2a544).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1667   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         339      339           
  Lines       29780    29782    +2     
=======================================
+ Hits        29768    29770    +2     
  Misses          8        8           
  Partials        4        4           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Chengxuan Chengxuan changed the title ensure access to the sections are direct Make new monitoring config to be disabled by default Mar 18, 2025
@Chengxuan Chengxuan force-pushed the metrics-config-fix branch from e8c9df4 to ab2a544 Compare March 18, 2025 18:10
@Chengxuan
Copy link
Contributor Author

Chengxuan commented Mar 18, 2025

I kept the refactor of the if else logic as I found that even though it's more lines, they are easier to read.

Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

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

Thanks @Chengxuan

@EnriqueL8 EnriqueL8 merged commit ec71bca into hyperledger:main Mar 19, 2025
33 checks passed
@EnriqueL8 EnriqueL8 deleted the metrics-config-fix branch March 19, 2025 09:25
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