Skip to content

[8.6] [Fleet] Ensure top-level package vars are parsed when reading archive (#147040)#147051

Merged
kibanamachine merged 1 commit intoelastic:8.6from
kibanamachine:backport/8.6/pr-147040
Dec 5, 2022
Merged

[8.6] [Fleet] Ensure top-level package vars are parsed when reading archive (#147040)#147051
kibanamachine merged 1 commit intoelastic:8.6from
kibanamachine:backport/8.6/pr-147040

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.6:

Questions ?

Please refer to the Backport tool documentation

…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 kibanamachine added the backport This PR is a backport of another PR label Dec 5, 2022
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 5, 2022
@kibanamachine kibanamachine enabled auto-merge (squash) December 5, 2022 20:17
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibana-ci
Copy link
Copy Markdown

💚 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 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

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

cc @kpollich

@kibanamachine kibanamachine merged commit 1c39519 into elastic:8.6 Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants