Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI flakes with "Renaming a container with the same name as its current name" #1294

Closed
chadwhitacre opened this issue Feb 3, 2022 · 20 comments

Comments

@chadwhitacre
Copy link
Member

Reticketing from #1290 (comment). Log link

Happens at:

Possibly docker/compose#6704? But why? And how to avoid? 🤔

@chadwhitacre
Copy link
Member Author

From #1365 (comment) ...

multiple versions in same docker instance

@glensc Do you understand what's going on here and how to fix it?

@glensc
Copy link
Contributor

glensc commented Mar 14, 2022

From #1365 (comment) ...

multiple versions in same docker instance

@glensc Do you understand what's going on here and how to fix it?

Currently there is:

COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}

perhaps the job-index is always "0" (the value is not shown unless there's an error), maybe use ${{ matrix.compose_version }} instead? or new key specifically for this purpose.

@chadwhitacre
Copy link
Member Author

@BYK Confirming ... did you intend to fix this ticket by setting COMPOSE_PROJECT_NAME in CI?

@BYK
Copy link
Member

BYK commented Mar 14, 2022

@BYK Confirming ... did you intend to fix this ticket by setting COMPOSE_PROJECT_NAME in CI?

No I did not. I intended to fix another one with "container has the same name" or something like that and that one seems to be fixed.

@BYK
Copy link
Member

BYK commented Mar 14, 2022

Possibly docker/compose#6704? But why? And how to avoid? 🤔

@chadwhitacre adding --no-recreate to that command should fix it. Also adding --wait may make the waiting for Sentry to be up step redundant.

aminvakil added a commit to aminvakil/self-hosted that referenced this issue Mar 21, 2022
@aminvakil
Copy link
Collaborator

This has been fixed since docker-compose 2.2.4, what do you think about changing docker-compose versions in our CI to something greater than 2.2.4 and using --no-recreate ?

As this does not only affect CI, it will break users using docker-compose < 2.2.4 .

I don't think we can set docker-compose minimum version to 2.2.4 for users, but we can check for docker-compose version less than 2.2.4 and do not use --no-recreate though, and use no-recreate for docker-compose >= 2.2.4 .

Otherwise we keep getting hit this issue from time to time and won't be fixed.

@aminvakil
Copy link
Collaborator

@emmatyping
Copy link
Contributor

what do you think about changing docker-compose versions in our CI to something greater than 2.2.4 and using --no-recreate

That would be great! Flaky CI is always rather annoying :/

I don't think we can set docker-compose minimum version to 2.2.4 for users, but we can check for docker-compose version less than 2.2.4 and do not use --no-recreate though, and use no-recreate for docker-compose >= 2.2.4 .

I think this seems reasonable, we might even want to give a warning about the potential issue?

@aminvakil
Copy link
Collaborator

Yeah, I think we can print something for users using >= 2.2.4 which we're changing their workflow that --no-recreate is getting added to their command and if they face a problem, report in this issue?

I will come up with a PR in the next days for this.

Reminder to my future self: Add/Replace a >=2.2.4 version of docker-compose to CI .

aminvakil added a commit to aminvakil/self-hosted that referenced this issue Sep 28, 2022
@chadwhitacre
Copy link
Member Author

Seems we're not seeing this anymore closing, we can reopen if it occurs again.

@chadwhitacre chadwhitacre reopened this Mar 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
6 participants