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

Zookeeper Path handling #2561

Open
wants to merge 2 commits into
base: development/8.7
Choose a base branch
from

Conversation

benzekrimaha
Copy link
Contributor

@benzekrimaha benzekrimaha commented Oct 17, 2024

Issue : BB-542

@bert-e
Copy link
Contributor

bert-e commented Oct 17, 2024

Hello benzekrimaha,

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 TBA
/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.

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.75%. Comparing base (31d9ca6) to head (1c59b2c).

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/BackbeatAPI.js 89.42% <100.00%> (+0.01%) ⬆️

... and 6 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 66.66% <ø> (ø)
Core Library 74.12% <100.00%> (-0.02%) ⬇️
Ingestion 69.24% <ø> (ø)
Lifecycle 75.83% <ø> (ø)
Oplog Populator 82.95% <ø> (ø)
Replication 57.42% <ø> (ø)
Bucket Scanner 85.60% <ø> (-0.16%) ⬇️
@@                 Coverage Diff                 @@
##           development/8.7    #2561      +/-   ##
===================================================
+ Coverage            69.67%   69.75%   +0.08%     
===================================================
  Files                  194      194              
  Lines                12819    12893      +74     
===================================================
+ Hits                  8931     8993      +62     
- Misses                3878     3890      +12     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.64% <100.00%> (+<0.01%) ⬆️
api:routes 9.54% <100.00%> (+<0.01%) ⬆️
bucket-scanner 85.60% <ø> (-0.16%) ⬇️
ingestion 12.48% <0.00%> (-0.01%) ⬇️
lib 7.52% <0.00%> (-0.01%) ⬇️
lifecycle 19.33% <0.00%> (-0.01%) ⬇️
notification 0.88% <0.00%> (-0.01%) ⬇️
replication 18.91% <0.00%> (-0.01%) ⬇️
unit 44.64% <100.00%> (+0.06%) ⬆️

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

@benzekrimaha benzekrimaha force-pushed the improvement/BB-542-zookeeper-handling branch from 8f975b4 to 1056812 Compare October 17, 2024 14:34
@benzekrimaha benzekrimaha changed the title path handle Zookeeper Path handling Oct 18, 2024
@benzekrimaha benzekrimaha force-pushed the improvement/BB-542-zookeeper-handling branch from 93f65d3 to d3f3a90 Compare October 18, 2024 07:32
Changes: the zookeeperUrl was adapted based on
the config to differenciate between S3C and Artesca
please note that a new parameter has been added to ease
the unit testing on the function , it has the default
value of the zookeeperManager class.
Issue : BB-542
@benzekrimaha benzekrimaha force-pushed the improvement/BB-542-zookeeper-handling branch from d3f3a90 to 1c59b2c Compare October 18, 2024 07:35
@scality scality deleted a comment from bert-e Oct 18, 2024
@bert-e
Copy link
Contributor

bert-e commented Oct 18, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@benzekrimaha benzekrimaha marked this pull request as ready for review October 18, 2024 07:35
Comment on lines +25 to +27
sinon.stub(redis.prototype, 'connect').returns(Promise.resolve());
sinon.stub(redis.prototype, 'on').returnsThis();
sinon.stub(redis.prototype, 'quit').returns(Promise.resolve());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sinon.stub(redis.prototype, 'connect').returns(Promise.resolve());
sinon.stub(redis.prototype, 'on').returnsThis();
sinon.stub(redis.prototype, 'quit').returns(Promise.resolve());
sinon.stub(redis.prototype, 'connect').resolves();
sinon.stub(redis.prototype, 'on').returnsThis();
sinon.stub(redis.prototype, 'quit').resolves();

Comment on lines +226 to +236
class MockZookeeperManager {
constructor(url, options, logger) {
zkManagerArgs = { url, options, logger };
this.once = sinon.stub().callsFake((event, callback) => {
if (event === 'connected') {
callback();
}
});
this.removeAllListeners = sinon.stub();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should define this class outside of a describe

});

it('should append zookeeperPath to connectionString if this._queuePopulator.mongo does not exist', done => {
delete bbapi._queuePopulator.mongo;
Copy link
Contributor

Choose a reason for hiding this comment

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

As we should not rely on the order ot unit tests for them to pass, I think this should be reverted at the end of the test (or just mock the value)

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.

3 participants