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

isFatal and asych #36

Merged
merged 4 commits into from
Mar 6, 2022
Merged

isFatal and asych #36

merged 4 commits into from
Mar 6, 2022

Conversation

golanha
Copy link
Member

@golanha golanha commented Mar 2, 2022

This change is Reviewable

@golanha golanha requested a review from yehiyam March 2, 2022 15:40
Copy link
Contributor

@yehiyam yehiyam left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @golanha)


lib/core/client.js, line 67 at r1 (raw file):

    }

    isFatal(err) {

Add unittest


lib/layout/discovery/discovery.js, line 25 at r1 (raw file):

    }

    async set(option) {

Why do you need to add async here? and if you need, why not in delete, register, and all other methods.
Is it so you will know to await the result in the wrapper?
I think it will be better to wrap the methods in state-manager.js and not the low level methods.

Copy link
Member Author

@golanha golanha left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 6 files reviewed, 2 unresolved discussions (waiting on @yehiyam)


lib/core/client.js, line 67 at r1 (raw file):

Previously, yehiyam wrote…

Add unittest

Done.


lib/layout/discovery/discovery.js, line 25 at r1 (raw file):

Previously, yehiyam wrote…

Why do you need to add async here? and if you need, why not in delete, register, and all other methods.
Is it so you will know to await the result in the wrapper?
I think it will be better to wrap the methods in state-manager.js and not the low level methods.

Done.

@golanha golanha requested a review from yehiyam March 6, 2022 09:15
@yehiyam yehiyam self-requested a review March 6, 2022 09:26
Copy link
Contributor

@yehiyam yehiyam left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 5 files at r2, all commit messages.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @golanha and @yehiyam)


tests/test.js, line 8 at r2 (raw file):

const triggersTreeExpected = require('./mocks/triggers-tree.json');
const Semaphore = require('await-done').semaphore;
const { ExecuteWrapper } = require('cockatiel/dist/common/Executor');

not used

Code quote:

 ExecuteWrapper

Copy link
Contributor

@yehiyam yehiyam left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @golanha and @yehiyam)


tests/test.js, line 2431 at r2 (raw file):

        describe('isFatal', () => {
            it('return isFatal true on etcd problem', async () => {
                const { GRPCGenericError, EtcdError } = require('etcd3');

why not require it at the top?

@yehiyam yehiyam requested review from yehiyam March 6, 2022 09:27
Copy link
Contributor

@yehiyam yehiyam left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @golanha and @yehiyam)


tests/test.js, line 2431 at r2 (raw file):

        describe('isFatal', () => {
            it('return isFatal true on etcd problem', async () => {
                const { GRPCGenericError, EtcdError } = require('etcd3');

required but not used

Code quote:

EtcdError

Copy link
Member Author

@golanha golanha left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @yehiyam)


tests/test.js, line 8 at r2 (raw file):

Previously, yehiyam wrote…

not used

Done.


tests/test.js, line 2431 at r2 (raw file):

Previously, yehiyam wrote…

why not require it at the top?

Done.

Code quote:

const { GRPCGenericError, EtcdError } = require('etcd3');

tests/test.js, line 2431 at r2 (raw file):

Previously, yehiyam wrote…

required but not used

Done.

Copy link
Contributor

@yehiyam yehiyam left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @golanha)

@golanha golanha merged commit b0d40ff into master Mar 6, 2022
github-actions bot pushed a commit that referenced this pull request Mar 6, 2022
isFatal and asych .... bump version [skip ci]
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.

None yet

2 participants