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] Archive logs from yarn es docker runs #189231

Merged
merged 20 commits into from
Sep 16, 2024

Conversation

delanni
Copy link
Contributor

@delanni delanni commented Jul 25, 2024

Summary

The problem we're trying to solve here is to get access to elasticsearch-serverless logs when they're started in docker containers in the background (and elasticsearch, although currently we don't test against that in docker for now).

Solution

In essence:

  • we needed to remove the --rm flag, this would allow for the containers to stay present after they're done.
  • after this, we can run docker logs ... on FTR post-hooks, save these, then archive these files to buildkite
  • because the containers are not removed upon finishing, we need to clean up dangling containers before starting up

Backporting is probably not necessary, because this is only applicable for serverless - and serverless is only supposed to run on main.

Solves: #191505

You can find the logs archived in the Artifacts tab of the buildkite step:
Screenshot 2024-09-17 at 16 50 40

…rt up - this still misses the last occasion when a run finishes
@delanni delanni marked this pull request as ready for review August 8, 2024 13:56
@delanni delanni requested a review from a team as a code owner August 8, 2024 13:56
@delanni delanni marked this pull request as draft August 8, 2024 13:56
@delanni delanni marked this pull request as ready for review September 5, 2024 08:39
@delanni delanni marked this pull request as draft September 5, 2024 08:39
@delanni delanni added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Sep 12, 2024
@delanni delanni marked this pull request as ready for review September 12, 2024 09:53
@delanni delanni requested a review from a team as a code owner September 12, 2024 09:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

'--format',
'{{.Names}}',
]);
nodeNames = nodeNamesString.split('\n').filter(Boolean);
Copy link
Member

Choose a reason for hiding this comment

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

Nice point free usage 😉

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

CR only, LGTM

@delanni delanni added backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development and removed backport:skip This commit does not require backporting labels Sep 13, 2024
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@delanni delanni merged commit bce4a17 into elastic:main Sep 16, 2024
17 of 18 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 16, 2024
## Summary
The problem we're trying to solve here is to get access to
`elasticsearch-serverless` logs when they're started in docker
containers in the background (and `elasticsearch`, although currently we
don't test against that in docker for now).
## Solution
In essence:
- we needed to remove the `--rm` flag, this would allow for the
containers to stay present after they're done.
- after this, we can run `docker logs ...` on FTR post-hooks, save
these, then archive these files to buildkite
- because the containers are not removed upon finishing, we need to
clean up dangling containers before starting up

Backporting is probably not necessary, because this is only applicable
for serverless - and serverless is only supposed to run on main.

Solves: elastic#191505
(cherry picked from commit bce4a17)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 16, 2024
## Summary
The problem we're trying to solve here is to get access to
`elasticsearch-serverless` logs when they're started in docker
containers in the background (and `elasticsearch`, although currently we
don't test against that in docker for now).
## Solution
In essence:
- we needed to remove the `--rm` flag, this would allow for the
containers to stay present after they're done.
- after this, we can run `docker logs ...` on FTR post-hooks, save
these, then archive these files to buildkite
- because the containers are not removed upon finishing, we need to
clean up dangling containers before starting up

Backporting is probably not necessary, because this is only applicable
for serverless - and serverless is only supposed to run on main.

Solves: elastic#191505
(cherry picked from commit bce4a17)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 16, 2024
#192973)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[CI] Archive logs from `yarn es` docker runs
(#189231)](#189231)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-16T08:43:12Z","message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-major"],"title":"[CI]
Archive logs from `yarn es` docker
runs","number":189231,"url":"https://github.com/elastic/kibana/pull/189231","mergeCommit":{"message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189231","number":189231,"mergeCommit":{"message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <[email protected]>
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 30, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

2 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@delanni delanni deleted the archive-es-error-logs-from-ftr branch October 4, 2024 12:53
kibanamachine added a commit that referenced this pull request Oct 4, 2024
… (#192972)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[CI] Archive logs from &#x60;yarn es&#x60; docker runs
(#189231)](#189231)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-16T08:43:12Z","message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-major"],"title":"[CI]
Archive logs from `yarn es` docker
runs","number":189231,"url":"https://github.com/elastic/kibana/pull/189231","mergeCommit":{"message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189231","number":189231,"mergeCommit":{"message":"[CI]
Archive logs from `yarn es` docker runs (#189231)\n\n## Summary\r\nThe
problem we're trying to solve here is to get access
to\r\n`elasticsearch-serverless` logs when they're started in
docker\r\ncontainers in the background (and `elasticsearch`, although
currently we\r\ndon't test against that in docker for now).\r\n##
Solution\r\nIn essence:\r\n- we needed to remove the `--rm` flag, this
would allow for the\r\ncontainers to stay present after they're
done.\r\n- after this, we can run `docker logs ...` on FTR post-hooks,
save\r\nthese, then archive these files to buildkite\r\n- because the
containers are not removed upon finishing, we need to\r\nclean up
dangling containers before starting up\r\n\r\nBackporting is probably
not necessary, because this is only applicable\r\nfor serverless - and
serverless is only supposed to run on main.\r\n\r\nSolves:
https://github.com/elastic/kibana/issues/191505","sha":"bce4a17f088969621ade141a8d19ff3fcde833b0"}}]}]
BACKPORT-->

---------

Co-authored-by: Alex Szabo <[email protected]>
Co-authored-by: Brad White <[email protected]>
@kibanamachine kibanamachine added v8.15.3 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.15.3 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants