Fix KeyError crash with Docker 29.x due to absent image config fields#255
Closed
Copilot wants to merge 3 commits into
Closed
Fix KeyError crash with Docker 29.x due to absent image config fields#255Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
…g fields Agent-Logs-Url: https://github.com/gramineproject/gsc/sessions/bfbaf1a8-13a4-4a82-9d30-b072b467f9eb Co-authored-by: donporter <7039633+donporter@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review and suggest fix for issue 253
Fix KeyError crash with Docker 29.x due to absent image config fields
Mar 30, 2026
Agent-Logs-Url: https://github.com/gramineproject/gsc/sessions/243754df-fc40-475b-b520-d9d820a5139e Co-authored-by: donporter <7039633+donporter@users.noreply.github.com>
|
I can confirm this fixes issue I reported in #253 |
kailun-qin
requested changes
Apr 17, 2026
kailun-qin
left a comment
Contributor
There was a problem hiding this comment.
@kailun-qin reviewed 1 file and made 1 comment.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on copilot[bot] and donporter).
a discussion (no related file):
Closing in favor of #244.
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.
Docker 29.x changed
docker image inspectto omit empty/nil fields (Entrypoint,Cmd,Env,User,WorkingDir) instead of returning them asnull, causinggsc buildto crash with aKeyErroron images that lack an explicit entrypoint.Changes
gsc.py: Replace directconfig['key']access withconfig.get('key')for all five affected fields acrossextract_binary_info_from_image_config,extract_environment_from_image_config, andextract_user_from_image_configtest/test_image_config.py: 20 unit tests covering both the Docker 28.x (field present,nullvalue) and Docker 29.x (field absent) behaviors for all three affected functionsThis change is