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

Added sync start #66

Merged
merged 5 commits into from
Feb 20, 2024
Merged

Added sync start #66

merged 5 commits into from
Feb 20, 2024

Conversation

RonShvarz
Copy link
Contributor

@RonShvarz RonShvarz commented Feb 19, 2024

kube-HPC/hkube#1887

Added sync function to use with existing algorithms


This change is Reviewable

@RonShvarz RonShvarz requested a review from golanha February 20, 2024 06:20
Copy link
Member

@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: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @RonShvarz)


commands/sync/start.js line 16 at r1 (raw file):

    if (res.result.error || res.error) {
        let msg;
        if (res.result.error.code === 400) {

Check for the specific error message to know that the reason for the failure is that the algorithm doesn't exsist, 400 is still general.

Code quote:

res.result.error.code === 400

commands/sync/start.js line 61 at r1 (raw file):

            describe: 'base image for the algorithm',
            type: 'string'
        }

why do we need these parameters?

Code quote:

        env: {
            describe: 'algorithm runtime environment',
            type: 'string',
            choices: ['python', 'nodejs']

        },
        entryPoint: {
            describe: 'the main file of the algorithm',
            type: 'string',
            alias: ['e']
        },
        baseImage: {
            describe: 'base image for the algorithm',
            type: 'string'
        }

Copy link
Contributor Author

@RonShvarz RonShvarz 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: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @golanha)


commands/sync/start.js line 16 at r1 (raw file):

Previously, golanha (Golan Hallel) wrote…

Check for the specific error message to know that the reason for the failure is that the algorithm doesn't exsist, 400 is still general.

Api server's update function concats many required base parameters depending on what is missing from the body,

"return {

error: {

name: options.name,

code: 400,

message: `Error updating ${options.name} ${error.message}`

}

};"

If there requierments change in the future, and i check for their existance in a stream-wise operation, it might not be future proof. Your opinion ?


commands/sync/start.js line 61 at r1 (raw file):

Previously, golanha (Golan Hallel) wrote…

why do we need these parameters?

Forgot to cleanup after we decided not to invoke watch from the start function. done

@RonShvarz RonShvarz requested a review from golanha February 20, 2024 08:54
Copy link
Member

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

Reviewed 1 of 2 files at r1, 1 of 3 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @RonShvarz)


commands/sync/start.js line 32 at r4 (raw file):

        algorithmName: {
            demandOption: true,
            describe: 'The name of the algorithm to sync data into',

files

Code quote:

data

commands/sync/stop.js line 30 at r4 (raw file):

        algorithmName: {
            demandOption: true,
            describe: 'The name of the algorithm to sync data into',

The name of the algorithm to stop syncing files into.

Code quote:

The name of the algorithm to sync data into

Copy link
Contributor Author

@RonShvarz RonShvarz 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 3 files reviewed, 2 unresolved discussions (waiting on @golanha)


commands/sync/start.js line 32 at r4 (raw file):

Previously, golanha (Golan Hallel) wrote…

files

Done.


commands/sync/stop.js line 30 at r4 (raw file):

Previously, golanha (Golan Hallel) wrote…

The name of the algorithm to stop syncing files into.

Done.

@RonShvarz RonShvarz merged commit d164b4c into master Feb 20, 2024
2 of 3 checks passed
@RonShvarz RonShvarz deleted the sync_start branch February 20, 2024 09:47
github-actions bot pushed a commit that referenced this pull request Feb 20, 2024
Added sync start .... bump version
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