Skip to content

Avoid container name conflicts after image rebuilds - #1958

Merged
rohanKanojia merged 1 commit into
fabric8io:masterfrom
Marukome0743:pr1958
Jul 29, 2026
Merged

rohanKanojia merged 1 commit into
fabric8io:masterfrom
Marukome0743:pr1958

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • consider all existing container names when resolving %i
  • avoid reusing an occupied name after rebuilding an image
  • add a regression test for selecting the next available index

Root cause

Container name selection only queried containers created from the current image. Rebuilding the image changed its image ID, so containers created from the previous image were omitted even though Docker container names are globally unique.

Testing

  • mise exec java@temurin-11.0.31+11 -- ./mvnw -DskipITs -Dtest=RunServiceTest test
  • mise exec java@temurin-11.0.31+11 -- ./mvnw -DskipITs test (977 tests, 6 skipped)

Closes #1896

Signed-off-by: Marukome0743 jambalaya.pyoncafe@gmail.com

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
@rohanKanojia
rohanKanojia merged commit 0cbecdd into fabric8io:master Jul 29, 2026
17 checks passed
@Marukome0743
Marukome0743 deleted the pr1958 branch July 29, 2026 16:25
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.

Changing image build properties resets the container name index

2 participants