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.
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
Replace the usage of tianon/true images with docker compose up --wait #1720
Replace the usage of tianon/true images with docker compose up --wait #1720
Changes from all commits
1e37a2f
537ce34
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing in main branch without using detach mode (
-d
), ifelastic-agent
container fails... it is being re-tried the docker-compose upWith this change, it looks like
elastic-package
does not get the error (elastic-agent failed to start) and it cannot retry thedocker-compose up
. Leaving the scenario with the elastic agent with exited status. It looks likeis_ready
containers help in this case, not sure howThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrodm this is weird as the e2e-test in the CI have caught one case that this happens. Can you help with an example that hopefully reproduces what you see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Steps in CI use detached mode (
-d
):elastic-package/scripts/test-check-packages.sh
Line 72 in caf7758
Sure ! Here I was referring to the case where that flag is not used:
Not all runs of this command fail with this, so it needs to be repeated until it is hit that error.
After some retries running the above command,
elastic-agent-1
container could not start andelastic-package
did not try to re-start the container as it would happen :And the status of the cluster:
With the same options running with the latest published version, it does the retry:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's odd 🥲 hmmm I see, I think this is what happens; with the *_is_ready services in place we have dependencies on the actual services, so when elastic-agent fails the respective _is_ready service can't start because it's dependency failed completely and thus docker compose up return an error in the sense sorry I couldn't bring up all the services. However when we remove the *_is_ready services then this isn't triggering as nothing depends on elastic-agent and thus up considers that everything had been brought up and the user will deal with any errors visible in the logs... I don't have an immediate fix for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is not needed to support docker-compose V1 and it can be removed all the
_is_ready
containers.It looks like that
readyServicesSuffix
constant could be deleted.If that is the case, the code of
Status
function ininternal/stack/status.go
could also be simplified.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/elastic/elastic-package/blob/main/test/packages/parallel/sql_input/_dev/deploy/docker/docker-compose.yml#L10 hmmm not sure about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those container definitions are part of the services required for testing (system tests).
Related to the
status
command, it should not affect since that command is intended to show just information about the containers related to the Stack (Kibana, Package Registry, Elasticsearch, etc.). It uses the docker-compose project from the profile:elastic-package/internal/stack/compose.go
Line 189 in 62fe1c9
About the test packages, not sure what it would be the best option.
Currently, the
servicedeployer
run in detached mode, using-d
docker-compose flag:elastic-package/internal/servicedeployer/compose.go
Line 109 in 62fe1c9
elastic-package/internal/servicedeployer/custom_agent.go
Line 132 in 62fe1c9
elastic-package/internal/servicedeployer/terraform.go
Line 145 in 62fe1c9
About the test packages, if
servicedeployer
is not updated with the new flags, those new flags those container should be kept. And it is also run a explicit method to wait for the containers being ready/healthy:elastic-package/internal/servicedeployer/terraform.go
Line 152 in 62fe1c9
elastic-package/internal/servicedeployer/custom_agent.go
Line 150 in 62fe1c9
@jsoriano Should
servicedeployer
be updated too (Up options) with these new flags? Or keep the current implementation ? As they are running with-d
, it looks safe.About the test package , it could be removed... but in the integrations repository they would keep using that container. Probably, it could be kept the
tianon/true
container to be sure that it is tested also with that. WDYT ?