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

[Cloud Security] fix agent version on cloudformation template in Cloud Security integrations #166485

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

maxcold
Copy link
Contributor

@maxcold maxcold commented Sep 14, 2023

Summary

fixes

using the new useAgentVersion hook to get the agent version to prefill in the Cloudformation template

There is already a PR with the same fix #166198 but as it also changes the logic of useAgentVersion itself, it might take some time to align. This PR only fixes the immediate issue we have in Serverless

@maxcold maxcold added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Cloud Security Cloud Security team related labels Sep 14, 2023
@maxcold maxcold requested a review from a team September 14, 2023 16:32
@maxcold maxcold marked this pull request as ready for review September 14, 2023 16:33
@maxcold maxcold requested a review from a team as a code owner September 14, 2023 16:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

cloudFormationUrl = templateURL
.replace('FLEET_ENROLLMENT_TOKEN', enrollmentToken)
.replace('FLEET_URL', fleetUrl)
.replace('KIBANA_VERSION', kibanaVersion);
.replace('KIBANA_VERSION', agentVersion);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a bit confusing that we chose KIBANA_VERSION for tempating here, but I guess we will need to live with it. The alternative would be to rename the templating varible to AGENT_VERSION and then replace both KIBANA_VERSION and AGENT_VERSION for backwards compatibility which might be even more confusing. Leaving a comment to give the context for this naming mismatch

Copy link
Contributor

@JordanSh JordanSh Sep 18, 2023

Choose a reason for hiding this comment

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

So just to get it straight, what we actually wanted to pass was the agent version but instead we passed a kibana version only because they used to be the same? in this case this fix was needed regardless. and yes i completely agree the naming here is confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, it was always the agent version really, it just used to match the Kibana version before serverless

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Sep 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

cloudFormationUrl = templateURL
.replace('FLEET_ENROLLMENT_TOKEN', enrollmentToken)
.replace('FLEET_URL', fleetUrl)
.replace('KIBANA_VERSION', kibanaVersion);
.replace('KIBANA_VERSION', agentVersion);
Copy link
Contributor

@JordanSh JordanSh Sep 18, 2023

Choose a reason for hiding this comment

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

So just to get it straight, what we actually wanted to pass was the agent version but instead we passed a kibana version only because they used to be the same? in this case this fix was needed regardless. and yes i completely agree the naming here is confusing

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 18, 2023

💚 Build Succeeded

  • Buildkite Build
  • Commit: c4d5859
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-166485-c4d585914646

Metrics [docs]

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5598 +5598
total size - 6.0MB +6.0MB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 143.0KB 143.0KB +4.0B

History

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

@maxcold maxcold merged commit fb2533e into main Sep 18, 2023
@maxcold maxcold deleted the 7557-fix-cloudformation branch September 18, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:build-serverless-image release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related Team:Fleet Team label for Observability Data Collection Fleet team v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants