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

feat: nightly updater #1175

Merged
merged 8 commits into from
Sep 10, 2024
Merged

feat: nightly updater #1175

merged 8 commits into from
Sep 10, 2024

Conversation

vansangpfiev
Copy link
Contributor

@vansangpfiev vansangpfiev commented Sep 9, 2024

Describe Your Changes

Support nightly updater. The binary is built with flag -DCORTEX_VARIANT="nightly"
Syntax

cortex update -v <cortex_version>

default is the latest nightly

Update logic:

  • Download nightly binary, it is in tar format
  • Extract binary file
  • Stop the server if it is running
  • Rename the current binary cortex -> /temp/cortex_temp
  • Copy new binary to be the current binary
  • Clean resources: remove all downloaded data
  • Restore binary if encounter any issue

Fixes Issues

@vansangpfiev vansangpfiev marked this pull request as ready for review September 10, 2024 00:41
Copy link
Collaborator

@namchuai namchuai left a comment

Choose a reason for hiding this comment

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

✅ looks good to me! Thank you!

engine/commands/cortex_upd_cmd.cc Show resolved Hide resolved
engine/commands/cortex_upd_cmd.cc Outdated Show resolved Hide resolved
engine/commands/cortex_upd_cmd.cc Outdated Show resolved Hide resolved
engine/commands/cortex_upd_cmd.cc Outdated Show resolved Hide resolved
engine/commands/cortex_upd_cmd.h Show resolved Hide resolved
engine/commands/cortex_upd_cmd.h Show resolved Hide resolved
engine/commands/cortex_upd_cmd.h Show resolved Hide resolved
engine/test/components/test_cortex_upd_cmd.cc Show resolved Hide resolved
@dan-menlo
Copy link
Contributor

@vansangpfiev Thanks for the Updater PR:

  • We need more test coverage for logic covering Nightly, Beta update download origin
  • I think this is the most likely failure point a year from now

@vansangpfiev
Copy link
Contributor Author

@vansangpfiev Thanks for the Updater PR:

  • We need more test coverage for logic covering Nightly, Beta update download origin
  • I think this is the most likely failure point a year from now

As I mentioned above, the logic for variants should be added in CIs, not unit tests

@dan-menlo
Copy link
Contributor

@vansangpfiev Thanks for the Updater PR:

  • We need more test coverage for logic covering Nightly, Beta update download origin
  • I think this is the most likely failure point a year from now

As I mentioned above, the logic for variants should be added in CIs, not unit tests

I see - as long as it's covered, I agree. Lgtm

Copy link
Contributor

@dan-menlo dan-menlo left a comment

Choose a reason for hiding this comment

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

Lgtm - pending Version tests in CI

@vansangpfiev vansangpfiev merged commit 8c5fe88 into dev Sep 10, 2024
4 checks passed
@vansangpfiev vansangpfiev deleted the feat/nightly-updater branch September 10, 2024 04:40
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.

ci: Updater for nightly release
5 participants