-
Notifications
You must be signed in to change notification settings - Fork 113
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
Include elastic-api-version header in Kibana requests #1526
Conversation
test integrations |
b55f0d6
to
689e77a
Compare
💚 Build Succeeded
cc @jsoriano |
Latest comment to test integrations didn't trigger the build because of this error:
Running this again |
test integrations |
Created or updated PR in integrations repostiory to test this vesrion. Check elastic/integrations#8328 |
@@ -41,6 +41,7 @@ func (c *Client) InstallZipPackage(zipFile string) ([]packages.Asset, error) { | |||
return nil, err | |||
} | |||
req.Header.Set("Content-Type", "application/zip") | |||
req.Header.Add("elastic-api-version", "2023-10-31") |
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.
Should this header be added for all other requests performed by elastic-package (dashboards, status...)?
Maybe, it can be added (or moved?) here for all of them:
elastic-package/internal/kibana/client.go
Line 153 in 689e77a
req.Header.Add("kbn-xsrf", install.DefaultStackVersion) |
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.
Not sure, it only seems to be required here, maybe this API has been GA'ed on this version?
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.
Ok. I guess we could keep it here, and move it to the newRequest()
function if there are new other API requests failing with the same error.
@@ -41,6 +41,7 @@ func (c *Client) InstallZipPackage(zipFile string) ([]packages.Asset, error) { | |||
return nil, err | |||
} | |||
req.Header.Set("Content-Type", "application/zip") | |||
req.Header.Add("elastic-api-version", "2023-10-31") |
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.
Ok. I guess we could keep it here, and move it to the newRequest()
function if there are new other API requests failing with the same error.
Installing zips seems to require elastic-api-version header starting on Kibana 8.12.