feat(clp-package): Use full UUID for sbin container names to prevent collisions.#1870
Merged
Merged
Conversation
Contributor
WalkthroughThe container name generation logic has been updated to use the complete UUID instead of only the final four characters, increasing the entropy and uniqueness of generated container identifiers. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
sitaowang1998
approved these changes
Jan 28, 2026
junhaoliao
added a commit
to junhaoliao/clp
that referenced
this pull request
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR changes the container name generation for Docker-based sbin scripts to use the full UUID
instead of only the last 4 characters.
Before:
clp-compression-a1b2(last 4 chars of UUID, ~65,536 unique values)After:
clp-compression-989c2953-3111-41d2-a068-22d2dbf29c41(full UUID, virtually unlimited)Motivation
The previous implementation used only the last 4 hex characters of a UUID, providing only 65,536 (16^4) unique values. This could lead to container name collisions in:
Impact Assessment
Affected Scripts
The following Docker-based sbin scripts use
generate_container_name():compress.shcompressionclp-compression-<full-uuid>compress-from-s3.shcompressionclp-compression-<full-uuid>decompress.shfile-extraction/ir-extractionclp-file-extraction-<full-uuid>search.shsearchclp-search-<full-uuid>admin-tools/dataset-manager.shdataset-managerclp-dataset-manager-<full-uuid>admin-tools/archive-manager.sharchive-managerclp-archive-manager-<full-uuid>Affected Config Files
Each script also calls
dump_container_config()withget_container_config_filename(container_name)to create a temporary config file in
var/log/:.clp-compression-a1b2-config.yaml.clp-compression-<full-uuid>-config.yaml.clp-search-a1b2-config.yaml.clp-search-<full-uuid>-config.yaml.clp-file-extraction-a1b2-config.yaml.clp-file-extraction-<full-uuid>-config.yaml.clp-ir-extraction-a1b2-config.yaml.clp-ir-extraction-<full-uuid>-config.yaml.clp-dataset-manager-a1b2-config.yaml.clp-dataset-manager-<full-uuid>-config.yaml.clp-archive-manager-a1b2-config.yaml.clp-archive-manager-<full-uuid>-config.yamlThese files are created before native container execution and used to pass configuration into the
native container.
Checklist
breaking change.
Validation performed
Build and start CLP:
task cd build/clp-package ./sbin/start-clp.shTest
compress.sh- verify container name and config file both use full UUID:Output:
Both the container name and config file use the same full UUID.
Test
search.sh:Output:
Test
admin-tools/archive-manager.sh:Output:
Test
admin-tools/dataset-manager.sh:Output:
Stop CLP:
Output:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.