Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Conversation

@vansangpfiev
Copy link
Contributor

@vansangpfiev vansangpfiev commented Sep 12, 2024

Describe Your Changes

  • bugfix for nightly updater. We can not delete executable file after cortex update, we rename it to cortex_temp then need to delete at the next start.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

}
std::filesystem::path temp = std::filesystem::temp_directory_path() / "cortex_temp";
std::filesystem::path temp =
file_manager_utils::GetExecutableFolderContainerPath() / "cortex_temp";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should rename in the same folder


// Delete temporary file if it exists
auto temp =
file_manager_utils::GetExecutableFolderContainerPath() / "cortex_temp";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After cortex update, we can only remove temporary file at the next start

container_folder_path = current_path;
} else if (type == "Cortex") {
container_folder_path = current_path / "cortex";
container_folder_path = std::filesystem::temp_directory_path() / "cortex";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Download binary to temp folder

// Replace binay file
auto executable_path = file_manager_utils::GetExecutableFolderContainerPath();
auto src = executable_path / "cortex" / GetCortexBinary();
auto src = std::filesystem::temp_directory_path() / "cortex" / kCortexBinary /
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change accordingly to s3 structure

@vansangpfiev vansangpfiev marked this pull request as ready for review September 12, 2024 10:27
Copy link
Contributor

@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

@vansangpfiev vansangpfiev merged commit 89979b3 into dev Sep 13, 2024
@vansangpfiev vansangpfiev deleted the fix/nightly-updater branch September 13, 2024 02:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants