[action] [PR:3917] [sonic-package-manager] Save tag that was used to install the application#3975
Merged
mssonicbld merged 1 commit intosonic-net:202505from Jul 16, 2025
Merged
Conversation
…tion
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->
#### What I did
- Added functionality to save and track the Docker image tag used during package installation
- Modified the service creator to include the tag information in container configuration
- This change will improve visibility in `docker ps` output by showing the actual tag used for each container
#### How I did it
- Added a new `tag` field to the `Package` class to store the image tag
- Modified the `PackageSource` class to save the tag from the installed image
- Updated the `ServiceCreator` to include the tag information in the container configuration
- The tag is extracted from the first tag in the image's tags list during installation
#### How to verify it
1. Install a package using sonic-package-manager
2. Run `docker ps` to verify that the container is running with the correct tag
3. Check the container configuration to ensure the tag is properly saved
#### Previous command output (if the output of a command-line utility has changed)
#### New command output (if the output of a command-line utility has changed)
Collaborator
Author
|
Original PR: #3917 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kktheballer
pushed a commit
to kktheballer/sonic-utilities
that referenced
this pull request
Jan 14, 2026
```<br>* 42b28bb - (HEAD -> 202506, origin/202505) `vnet_route_check.py` should not report VNET routes in APP DB but not in STATE DB and ASIC DB as mismatches (sonic-net#3991) (2025-07-22) [mssonicbld] * f36ac95 - [show][config][plugin] add processing of ModuleNotFoundError with log_warning (sonic-net#3992) (2025-07-22) [mssonicbld] * 6a4a8ff - [sonic-package-manager] Save tag that was used to install the application (sonic-net#3975) (2025-07-16) [mssonicbld] * 54a961f - [SPM] Add support for configuring systemd service Type in package manifests (sonic-net#3974) (2025-07-15) [mssonicbld] * 0b977d1 - [trim]: Add Packet Trimming Asym DSCP CLI (sonic-net#3971) (2025-07-14) [mssonicbld] * b51e117 - Add GCU Support for SKU Mellanox-SN4280-C48/O8C40/O8V40 (sonic-net#3965) (2025-07-10) [mssonicbld] * dbc5be9 - [Arista] Add support for LodogaPrime platform (sonic-net#3966) (2025-07-10) [mssonicbld]<br>```
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.
What I did
docker psoutput by showing the actual tag used for each containerHow I did it
tagfield to thePackageclass to store the image tagPackageSourceclass to save the tag from the installed imageServiceCreatorto include the tag information in the container configurationHow to verify it
docker psto verify that the container is running with the correct tagPrevious command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)