-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add basic serverless support for elasticsearch, beats index management #36587
Add basic serverless support for elasticsearch, beats index management #36587
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
This pull request is now in conflicts. Could you fix it? 🙏
|
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.
Looks good as far as the code here (thank you for adding more docs!)... I don't have the context to say much about inter-repo order of operations for this feature but it looks to me like merging this one wouldn't break anything, so it's probably a reasonable incremental step?
if versionData.Version.BuildFlavor == "serverless" { | ||
conn.isServerless = true | ||
} else if versionData.Version.BuildFlavor == "default" { | ||
conn.isServerless = false |
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.
Can this ever actually change, or is this just defensive programming? If the latter can you add a comment saying something like "this should already be false but let's be extra careful"?
libbeat/idxmgmt/std.go
Outdated
} | ||
err = selCfg.SetChild("indices", -1, sub) | ||
if err != nil { | ||
return nil, fmt.Errorf("error setting child 'indicies': %w", err) |
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.
typo (indicies)
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.
A few suggestions to improve error text to use official names, otherwise looks good.
Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Craig MacKenzie <[email protected]>
elastic#36587) * make serverless integration tests run * update deps * linter, error handling * still fixing error handling * fixing old formatting verbs * still finding format verbs * add docs, fix typos * Update libbeat/cmd/instance/beat.go Co-authored-by: Craig MacKenzie <[email protected]> * Update libbeat/dashboards/kibana_loader.go Co-authored-by: Craig MacKenzie <[email protected]> * Update libbeat/dashboards/kibana_loader.go Co-authored-by: Craig MacKenzie <[email protected]> --------- Co-authored-by: Craig MacKenzie <[email protected]>
Proposed commit message
The tests that are a part of elastic/elastic-agent#3258 will pass with this PR.
There's a few parts to this PR:
IsServerless()
method to the ES clientPing()
method in the ES clientIsServerless()
methodIf there's anything weird in this PR, it's probably because I spent a day just sorting through ancient ILM code.
So, I'm not sure if we want to merge this without DSL support, or add DSL support in a follow-up PR, or merge elastic/elastic-agent#3258 before or after this PR. Currently open to suggestions.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.