-
Notifications
You must be signed in to change notification settings - Fork 83
feat(clp-package): Replace package execution container with clp-package; Change default taskfile task to docker-images:package.
#1357
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
Changes from 1 commit
fdc113f
2959d60
a1c2cb1
99c919c
b3a6b3e
16741ed
1789641
68dbc59
27e133e
572de87
e6fddbc
b4a8976
f0767a2
9fb998e
876f925
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,14 +83,13 @@ | |
| COMPRESSION_JOBS_TABLE_NAME = "compression_jobs" | ||
| COMPRESSION_TASKS_TABLE_NAME = "compression_tasks" | ||
|
|
||
| OS_RELEASE_FILE_PATH = pathlib.Path("etc") / "os-release" | ||
|
|
||
| CLP_DEFAULT_CREDENTIALS_FILE_PATH = pathlib.Path("etc") / "credentials.yml" | ||
| CLP_DEFAULT_DATA_DIRECTORY_PATH = pathlib.Path("var") / "data" | ||
| CLP_DEFAULT_DATASET_NAME = "default" | ||
| CLP_METADATA_TABLE_PREFIX = "clp_" | ||
| CLP_PACKAGE_IMAGE_ID_PATH = pathlib.Path("clp-package-image.id") | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| CLP_SHARED_CONFIG_FILENAME = ".clp-config.yml" | ||
|
|
||
| CLP_VERSION_FILE_PATH = pathlib.Path("VERSION") | ||
|
|
||
| # Environment variable names | ||
| CLP_DB_USER_ENV_VAR_NAME = "CLP_DB_USER" | ||
|
|
@@ -902,7 +901,8 @@ class CLPConfig(BaseModel): | |
| logs_directory: pathlib.Path = pathlib.Path("var") / "log" | ||
| aws_config_directory: Optional[pathlib.Path] = None | ||
|
|
||
| _os_release_file_path: pathlib.Path = PrivateAttr(default=OS_RELEASE_FILE_PATH) | ||
| _image_id_path: pathlib.Path = PrivateAttr(default=CLP_PACKAGE_IMAGE_ID_PATH) | ||
| _version_file_path: pathlib.Path = PrivateAttr(default=CLP_VERSION_FILE_PATH) | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| @field_validator("aws_config_directory") | ||
| @classmethod | ||
|
|
@@ -919,7 +919,8 @@ def make_config_paths_absolute(self, clp_home: pathlib.Path): | |
| self.stream_output.storage.make_config_paths_absolute(clp_home) | ||
| self.data_directory = make_config_path_absolute(clp_home, self.data_directory) | ||
| self.logs_directory = make_config_path_absolute(clp_home, self.logs_directory) | ||
| self._os_release_file_path = make_config_path_absolute(clp_home, self._os_release_file_path) | ||
| self._image_id_path = make_config_path_absolute(clp_home, self._image_id_path) | ||
| self._version_file_path = make_config_path_absolute(clp_home, self._version_file_path) | ||
|
|
||
| def validate_logs_input_config(self): | ||
| logs_input_type = self.logs_input.type | ||
|
|
@@ -1012,17 +1013,14 @@ def load_execution_container_name(self): | |
| # Accept configured value for debug purposes | ||
| return | ||
|
|
||
| os_release = dotenv_values(self._os_release_file_path) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have removed the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 1741 🏁 Script executed: Length of output: 85 🏁 Script executed: Length of output: 42 @junhaoliao, I've filed issue #1443 to track the removal of the unused Summary:
The issue has been assigned to you with the tasks and context needed for the cleanup. 🧬 Code Graph Analysis Resultscomponents/clp-py-utils/clp_py_utils/clp_config.py [Snippet 1]
|
||
| if "ubuntu" == os_release["ID"]: | ||
| self.execution_container = ( | ||
| f"clp-execution-x86-{os_release['ID']}-{os_release['VERSION_CODENAME']}:main" | ||
| ) | ||
| else: | ||
| raise NotImplementedError( | ||
| f"Unsupported OS {os_release['ID']} in {OS_RELEASE_FILE_PATH}" | ||
| ) | ||
| if self._image_id_path.exists(): | ||
| with open(self._image_id_path) as image_id_file: | ||
| self.execution_container = image_id_file.read().strip() | ||
|
||
|
|
||
| self.execution_container = "ghcr.io/y-scope/clp/" + self.execution_container | ||
| if self.execution_container == "": | ||
|
||
| with open(self._version_file_path) as version_file: | ||
| clp_package_version = version_file.read().strip() | ||
| self.execution_container = f"ghcr.io/y-scope/clp/clp-package:{clp_package_version}" | ||
|
|
||
| def get_shared_config_file_path(self) -> pathlib.Path: | ||
| return self.logs_directory / CLP_SHARED_CONFIG_FILENAME | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ vars: | |
|
|
||
| tasks: | ||
| default: | ||
| deps: ["package"] | ||
| deps: ["docker-images:package"] | ||
|
|
||
| clean: | ||
| cmds: | ||
|
|
||
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.
How about
CLP_PACKAGE_CONTAINER_IMAGE_ID_PATH? Similarly, how about_container_image_id_path?