-
Notifications
You must be signed in to change notification settings - Fork 12
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
pack: added TCM file packaging #1092
base: master
Are you sure you want to change the base?
Conversation
b4b5da6
to
9f99d09
Compare
76aa1a8
to
1ab11af
Compare
3688b87
to
c0e4502
Compare
c0e4502
to
891c97e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch! LGTM.
891c97e
to
da217d8
Compare
cli/configure/configure.go
Outdated
return "", fmt.Errorf(`found Tcm binary '%s' isn't executable: %s`, | ||
localTcm, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be here need wrapping an error?
return "", fmt.Errorf(`found Tcm binary '%s' isn't executable: %s`, | |
localTcm, err) | |
return "", fmt.Errorf(`found Tcm binary '%s' isn't executable: %w`, | |
localTcm, err) |
cli/configure/configure.go
Outdated
|
||
cmdCtx.Cli.TcmCli.Executable = localTcm | ||
} else if !os.IsNotExist(err) { | ||
return "", fmt.Errorf("failed to get access to Tcm binary file: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping?
return "", fmt.Errorf("failed to get access to Tcm binary file: %s", err) | |
return "", fmt.Errorf("failed to get access to Tcm binary file: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment.I took an example of the error above in the code
cli/pack/common.go
Outdated
} else { | ||
if err := util.CopyFileDeep(cmdCtx.Cli.TcmCli.Executable, | ||
util.JoinPaths(pkgBin, "tcm")); err != nil { | ||
return fmt.Errorf("failed copying tarantool: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("failed copying tarantool: %s", err) | |
return fmt.Errorf("failed copying tarantool: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment.I took an example of the error above in the code
da217d8
to
7125c3e
Compare
// Copy tcm. | ||
if packCtx.WithBinaries { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add test cases into Test_prepareBundle
in the common_test.go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/integration/pack/test_pack.py
Outdated
@@ -787,6 +787,7 @@ def test_pack_tgz_compat_with_binaries(tt_cmd, tmp_path): | |||
|
|||
assert os.path.isfile(os.path.join(app_path, "tt")) | |||
assert os.path.isfile(os.path.join(app_path, "tarantool")) | |||
assert os.path.isfile(os.path.join(app_path, "tcm")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I don't understand where this file came from? I don't see any "tcm" file is created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleared it, this line is superfluous here.Verification added on line 1017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/tarantool/tt/tree/master/test/integration/pack/test_bundles/bundle4/bin
I suppose we need to return the check and create a tcm_bin here to make tests working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это сделано в тесте test_pack_tgz_links_to_binaries там же мы используем https://github.com/tarantool/tt/tree/master/test/integration/pack/test_bundles/bundle4/bin
Is it worth updating the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я вот, если честно, не вижу где оно сделано. Проверки - вижу, чтобы мы создали какой-то новый файл - нет.
5c6aef2
to
1cea1f6
Compare
Closes #TNTP-1097
1cea1f6
to
74864b1
Compare
pack: added TCM file packaging
Closes #TNTP-1097