Skip to content

Update tarantool if there is more fresh version #14

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

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

rosik
Copy link
Contributor

@rosik rosik commented Feb 5, 2021

The patch resolves the problem described in #9 (comment).

Once a version is installed it's cached. A user could drop the cache manually (by updating the cache-key), but it should be automated.

This patch changes the caching logic. The cache-key input is deprecated. Instead, it's generated and includes a precise deb package version which is obtained by parsing repo content manually:

http_get("https://download.tarantool.org/tarantool/release/2.6" +
  "/ubuntu/dists/focal/main/binary-amd64/Packages"
)

It doesn't waste too much time and allows us to reinstall tarantool from apt-get when the new version is out.

The resulting cache-key looks like tarantool-setup-focal-2.8.0.0.gefc30ccf8-1.

@Totktonada
Copy link
Member

As I see, the 'Setup from cache' step in CI has more or less same timing as before. It was 2-4 seconds and here we see 2-4 seconds. That's nice!

Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

The logic looks good. (I didn't test it, just glanced over the changed code.)

No objections from me.

@rosik rosik force-pushed the 9-keep-updating branch 6 times, most recently from 732abb6 to b9fa7f1 Compare February 8, 2021 13:48
@rosik
Copy link
Contributor Author

rosik commented Feb 8, 2021

I've reorganized the code. It was necessary for adding a test. Re-approve please

@rosik rosik requested a review from Totktonada February 8, 2021 13:56
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

No objections from my side.

Once a version is installed it's cached. A user could drop the cache
manually (by updating cache-key), but it should be automated.

This patch changes the caching logics. The 'cache-key' input is
deprecated. Instead, it includes precise deb package version which is
obtained by parsing repo content manually:

```js
http_get("https://download.tarantool.org/tarantool/release/2.6" +
  "/ubuntu/dists/focal/main/binary-amd64/Packages"
)
```

It doesn't waste too much time and allows us to reinstall tarantool from
apt-get when the new verison is out.

Resulting key looks like

```txt
tarantool-setup-focal-2.8.0.0.gefc30ccf8-1
```
@rosik rosik merged commit 69a66d3 into master Feb 10, 2021
@rosik rosik deleted the 9-keep-updating branch February 10, 2021 11:19
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