Skip to content

Support per extension log level - #2791

Open
SylvainSenechal wants to merge 3 commits into
development/9.5from
improvement/BB-807
Open

Support per extension log level#2791
SylvainSenechal wants to merge 3 commits into
development/9.5from
improvement/BB-807

Conversation

@SylvainSenechal

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.42%. Comparing base (7e9cc25) to head (152ea1b).

Files with missing lines Patch % Lines
bin/ingestion.js 0.00% 2 Missing ⚠️
extensions/mongoProcessor/mongoProcessorTask.js 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (42.85%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
extensions/ingestion/IngestionConfigValidator.js 100.00% <100.00%> (ø)
...ns/mongoProcessor/MongoProcessorConfigValidator.js 100.00% <100.00%> (ø)
lib/config/configItems.joi.js 96.29% <100.00%> (+0.14%) ⬆️
bin/ingestion.js 0.00% <0.00%> (ø)
extensions/mongoProcessor/mongoProcessorTask.js 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.22% <ø> (ø)
Core Library 81.22% <100.00%> (-0.58%) ⬇️
Ingestion 70.07% <50.00%> (-0.07%) ⬇️
Lifecycle 80.25% <ø> (ø)
Oplog Populator 85.83% <ø> (ø)
Replication 61.98% <ø> (-0.04%) ⬇️
Bucket Scanner 85.76% <ø> (ø)
@@                  Coverage Diff                   @@
##           improvement/BB-686    #2791      +/-   ##
======================================================
- Coverage               75.67%   75.42%   -0.26%     
======================================================
  Files                     201      201              
  Lines                   13929    13932       +3     
======================================================
- Hits                    10541    10508      -33     
- Misses                   3378     3414      +36     
  Partials                   10       10              
Flag Coverage Δ
api:retry 9.06% <42.85%> (+<0.01%) ⬆️
api:routes 8.84% <42.85%> (+<0.01%) ⬆️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 9.13% <42.85%> (-1.56%) ⬇️
ingestion 12.26% <42.85%> (+<0.01%) ⬆️
lib 8.79% <42.85%> (-0.01%) ⬇️
lifecycle 19.25% <42.85%> (+<0.01%) ⬆️
notification 1.00% <0.00%> (-0.01%) ⬇️
oplogPopulator 0.13% <0.00%> (-0.01%) ⬇️
replication 18.82% <42.85%> (+<0.01%) ⬆️
unit 54.73% <42.85%> (-0.01%) ⬇️

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

🚀 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.

Comment thread bin/ingestion.js
const log = new werelogs.Logger('Backbeat:IngestionPopulator');
werelogs.configure({ level: config.log.logLevel,
dump: config.log.dumpLevel });
const ingestionLogConfig = ingestionExtConfigs.log ?? config.log;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Partial extension log config drops the global fallback for omitted fields. If a user sets log: { logLevel: 'debug' } without dumpLevel, the ?? sees a non-nullish object and uses it as-is, so dumpLevel becomes undefined instead of falling back to config.log.dumpLevel. Merge at field level instead:

Suggested change
const ingestionLogConfig = ingestionExtConfigs.log ?? config.log;
const ingestionLogConfig = {
logLevel: ingestionExtConfigs.log?.logLevel ?? config.log.logLevel,
dumpLevel: ingestionExtConfigs.log?.dumpLevel ?? config.log.dumpLevel,
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mhh fair enough but im gonna go with the option of making both fields required when specified (If you provide log level you must provide dump level and other way around).
This is how the operator works anyway

Comment thread extensions/mongoProcessor/mongoProcessorTask.js
@SylvainSenechal
SylvainSenechal marked this pull request as ready for review August 4, 2026 13:12
@SylvainSenechal
SylvainSenechal requested review from a team, DarkIsDude and delthas August 4, 2026 13:12
const logJoiOptional =
joi.object({
logLevel: joi.alternatives()
.try('error', 'warn', 'info', 'debug', 'trace').required(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should it be a const array to avoid duplication ?

});

// logJoi with no default :
// Callers fall back to the global log config when this one is not configured

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is pretty standard behaviour ? Why a comment ?

Base automatically changed from improvement/BB-686 to development/9.5 August 7, 2026 16:26
@bert-e

bert-e commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Hello sylvainsenechal,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Conflict

There is a conflict between your branch improvement/BB-807 and the
destination branch development/9.5.

Please resolve the conflict on the feature branch (improvement/BB-807).

git fetch && \
git checkout origin/improvement/BB-807 && \
git merge origin/development/9.5

Resolve merge conflicts and commit

git push origin HEAD:improvement/BB-807

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