Skip to content

Use distribution lite instead of production#146809

Merged
nchaulet merged 2 commits intoelastic:mainfrom
mrodm:change_epr_image_to_lite
Dec 6, 2022
Merged

Use distribution lite instead of production#146809
nchaulet merged 2 commits intoelastic:mainfrom
mrodm:change_epr_image_to_lite

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Dec 1, 2022

Summary

To avoid download every time the production tag of the distribution docker image, this PR changes to use distribution lite that it contains a small number of packages:

docker.elastic.co/package-registry/distribution          lite                         f7081c6de7bc   5 hours ago     282MB
docker.elastic.co/package-registry/distribution          production                   3f1fd6bb6cb8   32 hours ago    2.58GB

@mrodm
Copy link
Contributor Author

mrodm commented Dec 1, 2022

According to the logs of the failed tests, it looks like it would be needed the apache package available in the lite distribution.
@elastic/ecosystem what about adding that package to the list of packages in the lite distribution ?

@jsoriano
Copy link
Member

jsoriano commented Dec 5, 2022

/test

@jsoriano
Copy link
Member

jsoriano commented Dec 5, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 443 449 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 520 526 +6
total +21

History

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

@jsoriano jsoriano marked this pull request as ready for review December 5, 2022 16:08
@jsoriano jsoriano requested a review from a team as a code owner December 5, 2022 16:08
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team labels Dec 5, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Looks good to me, we should probably update kibana-buildkite too

kpollich added a commit that referenced this pull request Dec 5, 2022
…#147040)

## Summary

Closes #147028

## Testing instructions

See steps to reproduce in linked issue. Verify AWS credential variables
appear on this branch.


![image](https://user-images.githubusercontent.com/6766512/205719634-98bc4db8-25c4-4362-afba-5246fb5fb326.png)

I took a pass at adding tests for our `parseAndVeryArchive` method but
it's sort of a recursive chain of mocked `Buffer` -> `yaml.safeLoad`
operations and got pretty involved to set up from scratch. The other
option would be to add an FTR API test that catches this case, but we'd
need a package with top-level variables loaded into the test registry,
which we may not have readily available if
#146809 lands.

I would love some alternative ideas on adding test coverage for this
fix, but if it's going to involved I don't want to block this fix from
landing in 8.6 on tests.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 5, 2022
…elastic#147040)

## Summary

Closes elastic#147028

## Testing instructions

See steps to reproduce in linked issue. Verify AWS credential variables
appear on this branch.

![image](https://user-images.githubusercontent.com/6766512/205719634-98bc4db8-25c4-4362-afba-5246fb5fb326.png)

I took a pass at adding tests for our `parseAndVeryArchive` method but
it's sort of a recursive chain of mocked `Buffer` -> `yaml.safeLoad`
operations and got pretty involved to set up from scratch. The other
option would be to add an FTR API test that catches this case, but we'd
need a package with top-level variables loaded into the test registry,
which we may not have readily available if
elastic#146809 lands.

I would love some alternative ideas on adding test coverage for this
fix, but if it's going to involved I don't want to block this fix from
landing in 8.6 on tests.

(cherry picked from commit b6696ef)
kibanamachine added a commit that referenced this pull request Dec 5, 2022
…rchive (#147040) (#147051)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Fleet] Ensure top-level package vars are parsed when reading archive
(#147040)](#147040)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"kyle.pollich@elastic.co"},"sourceCommit":{"committedDate":"2022-12-05T20:13:19Z","message":"[Fleet]
Ensure top-level package vars are parsed when reading archive
(#147040)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147028\r\n\r\n## Testing
instructions\r\n\r\nSee steps to reproduce in linked issue. Verify AWS
credential variables\r\nappear on this
branch.\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/205719634-98bc4db8-25c4-4362-afba-5246fb5fb326.png)\r\n\r\nI
took a pass at adding tests for our `parseAndVeryArchive` method
but\r\nit's sort of a recursive chain of mocked `Buffer` ->
`yaml.safeLoad`\r\noperations and got pretty involved to set up from
scratch. The other\r\noption would be to add an FTR API test that
catches this case, but we'd\r\nneed a package with top-level variables
loaded into the test registry,\r\nwhich we may not have readily
available if\r\nhttps://github.com//pull/146809
lands.\r\n\r\nI would love some alternative ideas on adding test
coverage for this\r\nfix, but if it's going to involved I don't want to
block this fix from\r\nlanding in 8.6 on
tests.","sha":"b6696ef6c7da83c0ef396d24f471cb6589e5413a","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.7.0"],"number":147040,"url":"https://github.com/elastic/kibana/pull/147040","mergeCommit":{"message":"[Fleet]
Ensure top-level package vars are parsed when reading archive
(#147040)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147028\r\n\r\n## Testing
instructions\r\n\r\nSee steps to reproduce in linked issue. Verify AWS
credential variables\r\nappear on this
branch.\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/205719634-98bc4db8-25c4-4362-afba-5246fb5fb326.png)\r\n\r\nI
took a pass at adding tests for our `parseAndVeryArchive` method
but\r\nit's sort of a recursive chain of mocked `Buffer` ->
`yaml.safeLoad`\r\noperations and got pretty involved to set up from
scratch. The other\r\noption would be to add an FTR API test that
catches this case, but we'd\r\nneed a package with top-level variables
loaded into the test registry,\r\nwhich we may not have readily
available if\r\nhttps://github.com//pull/146809
lands.\r\n\r\nI would love some alternative ideas on adding test
coverage for this\r\nfix, but if it's going to involved I don't want to
block this fix from\r\nlanding in 8.6 on
tests.","sha":"b6696ef6c7da83c0ef396d24f471cb6589e5413a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147040","number":147040,"mergeCommit":{"message":"[Fleet]
Ensure top-level package vars are parsed when reading archive
(#147040)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147028\r\n\r\n## Testing
instructions\r\n\r\nSee steps to reproduce in linked issue. Verify AWS
credential variables\r\nappear on this
branch.\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/205719634-98bc4db8-25c4-4362-afba-5246fb5fb326.png)\r\n\r\nI
took a pass at adding tests for our `parseAndVeryArchive` method
but\r\nit's sort of a recursive chain of mocked `Buffer` ->
`yaml.safeLoad`\r\noperations and got pretty involved to set up from
scratch. The other\r\noption would be to add an FTR API test that
catches this case, but we'd\r\nneed a package with top-level variables
loaded into the test registry,\r\nwhich we may not have readily
available if\r\nhttps://github.com//pull/146809
lands.\r\n\r\nI would love some alternative ideas on adding test
coverage for this\r\nfix, but if it's going to involved I don't want to
block this fix from\r\nlanding in 8.6 on
tests.","sha":"b6696ef6c7da83c0ef396d24f471cb6589e5413a"}}]}]
BACKPORT-->

Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2022

Looks good to me, we should probably update kibana-buildkite too

PR Created for this: https://github.com/elastic/kibana-buildkite/pull/65

Can we merge this change then?

@nchaulet
Copy link
Member

nchaulet commented Dec 6, 2022

Can we merge this change then?

Yes this should be merged

@nchaulet nchaulet merged commit 0bf250a into elastic:main Dec 6, 2022
@kibanamachine kibanamachine added v8.7.0 backport:skip This PR does not require backporting labels Dec 6, 2022
jbudz added a commit that referenced this pull request Dec 6, 2022
@jbudz
Copy link
Contributor

jbudz commented Dec 6, 2022

@jbudz jbudz added the reverted label Dec 6, 2022
@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2022

This was reverted with e25dece.

https://buildkite.com/elastic/kibana-on-merge/builds/24629#0184e8da-c325-463b-956c-70a3e463ec49/207-1840

Was this failing test not executed on this PR? Or this is a different build?

@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2022

Trying again in #147139.

@jbudz
Copy link
Contributor

jbudz commented Dec 6, 2022

This was reverted with e25dece.
https://buildkite.com/elastic/kibana-on-merge/builds/24629#0184e8da-c325-463b-956c-70a3e463ec49/207-1840

Was this failing test not executed on this PR? Or this is a different build?

It was tested and passed on this PR 24 hours ago, so most likely image or source changes in between then and now.

@mrodm mrodm deleted the change_epr_image_to_lite branch December 12, 2022 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes reverted Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants