⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@jirimoravcik
Copy link

This PR fixes an issue caused by generating the container name using only the image name. Instead, we now include the contextName as well. This is useful when creating multiple containers from the same image, for example a Redis cluster with several shards.

Copilot AI review requested due to automatic review settings January 11, 2026 18:07
@jirimoravcik jirimoravcik requested review from a team and nikola-jokic as code owners January 11, 2026 18:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes container name generation to prevent collisions when creating multiple containers from the same image. The implementation now incorporates both the contextName and image name when generating container names, which is particularly useful for scenarios like Redis clusters with multiple shards.

Changes:

  • Updated generateContainerName function to accept ServiceContainerInfo object instead of just an image string
  • Modified container name format to combine contextName and image name
  • Updated all call sites and tests to reflect the new API

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
packages/k8s/src/k8s/utils.ts Modified generateContainerName to accept service object and generate names using both contextName and image name
packages/k8s/src/hooks/prepare-job.ts Updated all call sites to pass the full service object instead of just the image string
packages/k8s/tests/k8s-utils-test.ts Updated test cases to use service objects and validate the new naming format
packages/k8s/tests/prepare-job-test.ts Updated test call site to pass service object to generateContainerName

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant