Skip to content

fix: ensure image oci config is included when building actor oci spec#301

Open
J.M. Huibonhoa (jmhbh) wants to merge 3 commits into
agent-substrate:mainfrom
jmhbh:fix/image-oci-config-dropped-when-building-runtime-spec
Open

fix: ensure image oci config is included when building actor oci spec#301
J.M. Huibonhoa (jmhbh) wants to merge 3 commits into
agent-substrate:mainfrom
jmhbh:fix/image-oci-config-dropped-when-building-runtime-spec

Conversation

@jmhbh

@jmhbh J.M. Huibonhoa (jmhbh) commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Fixes a bug where image oci config is not included when building the actor oci spec by ensuring that we extract the image supplied env from the config manifest and propagate it to the buildActorOCISpec function.

Testing

Fixes #300

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
@google-cla

google-cla Bot commented Jun 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread cmd/atelet/oci.go Outdated
}
}

add("PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we drop this now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah realistically speaking the path will be supplied in the image env.

Comment thread cmd/atelet/oci.go
}

add("PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
add(templateEnv...)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The precedence here seems flipped, templates envs should override image envs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed.

}

var imageEnv []string
if cfg, cfgErr := img.ConfigFile(); cfgErr != nil {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Isn't the config manifest mandatory? Why continue and not returning and error and hard-failing?

@jmhbh J.M. Huibonhoa (jmhbh) Jun 25, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

its currently only consumed on this code path which is why I added a warn log and opted not to hard fail. However, I think there is merit in your suggestion since if the resulting image needs the env vars it would be broken anyways particularly given that I've made the other change to remove the default path.

Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
@jmhbh J.M. Huibonhoa (jmhbh) marked this pull request as ready for review June 25, 2026 22:31
@jmhbh J.M. Huibonhoa (jmhbh) changed the title [wip] fix: ensure image oci config is included when building actor oci spec fix: ensure image oci config is included when building actor oci spec Jun 25, 2026
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
@jmhbh

Copy link
Copy Markdown
Author

Julian Gutierrez Oschmann (@juli4n) thanks for your initial review, do you mind taking another pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image OCI config is dropped when building actor runtime spec

2 participants