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

Save artifacts only once #330

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

ochaplashkin
Copy link

@ochaplashkin ochaplashkin commented Sep 26, 2023

Since commit 1 the Server:save_artifacts() function was called more than once. Due to this fact we could overwrite already saved artifacts. Added a flag that will ensure that the saving will be executed only once.

There was also a problem when copying artifacts was not performed but the path to the artifacts was formed as a directory with artifacts:

    artifacts:
        server -> /tmp/t/artifacts/server-XXX

And if we tried to look at these artifacts, we could see this:

    $ ls -la /tmp/t/artifacts/server-XXX
    ls: cannot access '/tmp/t/artifacts/server-XXX': No such file or
    directory

To show explicitly that the saving failed with an error, the following
string will now be written to the artifacts:

    artifacts:
        server -> Failed to copy artifacts for server (alias: server-XXX
        workdir: /tmp/t/artifacts/server-XXX)

Footnotes

  1. https://github.com/tarantool/luatest/commit/251b35f

@ochaplashkin ochaplashkin marked this pull request as draft September 26, 2023 20:51
@ochaplashkin ochaplashkin force-pushed the fix-save-artifacts branch 2 times, most recently from ae9f463 to 0bad71e Compare October 2, 2023 13:26
@ochaplashkin ochaplashkin marked this pull request as ready for review October 2, 2023 13:30
luatest/server.lua Outdated Show resolved Hide resolved
luatest/server.lua Outdated Show resolved Hide resolved
luatest/server.lua Outdated Show resolved Hide resolved
Since commit [1] the `Server:save_artifacts()` function was called more
than once. Due to this fact we could overwrite already saved artifacts.
Added a flag that will ensure that the saving will be executed only
once.

There was also a problem when copying artifacts was not performed but
the path to the artifacts was formed as a directory with artifacts:

    artifacts:
        server -> /tmp/t/artifacts/server-XXX

And if we tried to look at these artifacts, we could see this:

    $ ls -la /tmp/t/artifacts/server-XXX
    ls: cannot access '/tmp/t/artifacts/server-XXX': No such file or
    directory

To show explicitly that the saving failed with an error, the following
string will now be written to the artifacts:

    artifacts:
        server -> Failed to copy artifacts for server (alias: server-XXX
        workdir: /tmp/t/artifacts/server-XXX)

[1] tarantool/luatest@251b35f

Part of tarantool#304
@ylobankov ylobankov merged commit 9c7710e into tarantool:master Oct 6, 2023
6 checks passed
@ylobankov ylobankov changed the title Fix save artifacts Save artifacts only once Oct 9, 2023
@ylobankov ylobankov added this to the 1.0.0 milestone Nov 20, 2023
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