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

[8.12][Fleet] fix API not allowing to upgrade to a newer version when version differs only in patch #175765

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Jan 29, 2024

Fixes #175766

[8.12][Fleet] Partial backport of #175198

To verify:

  • add a fleet-server version 8.12.0
  • enroll an agent version 8.12.0-SNAPSHOT
  • take the agent id and in console run this API request
POST kbn:/api/fleet/agents/6a56f865-a611-4921-9f24-87757259223e/upgrade
  {
    "version": "8.12.1-SNAPSHOT"
  }
  • verify that the API returns 200

Relates #168502

Closes elastic#175186

Fixed UI error in the custom upgrade version input.
To verify:
- enroll an agent with version 8.13-snapshot
- click upgrade agent
- type anything and then clear the input
- the UI should not move to error state

Fixed another bug when I tested to upgrade to a newer build version
(newer patch), and got an API error saying can't upgrade to a newer
version than kibana version.
To verify:
- click upgrade agent, type `8.13.1+build123456789`, submit
- verify that the API returns 200

https://github.com/elastic/kibana/assets/90178898/80b4e12e-3aad-41b7-b39d-8d28d6253772

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@juliaElastic juliaElastic self-assigned this Jan 29, 2024
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@juliaElastic juliaElastic requested a review from a team January 29, 2024 09:01
@juliaElastic juliaElastic marked this pull request as draft January 29, 2024 09:31
@juliaElastic juliaElastic marked this pull request as ready for review January 29, 2024 10:00
@juliaElastic
Copy link
Contributor Author

/ci

juliaElastic added a commit that referenced this pull request Jan 29, 2024
…175775)

## Summary

Adding the fix in #175765 to main
too.

To verify:
- add a fleet-server version 8.12.0
- enroll an agent version 8.12.0-SNAPSHOT
- take the agent id and in console run this API request
```
POST kbn:/api/fleet/agents/6a56f865-a611-4921-9f24-87757259223e/upgrade
  {
    "version": "8.12.1-SNAPSHOT"
  }
```
- verify that the API returns 200 

Relates #168502
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.2MB 1.2MB +1.0B

Page load bundle

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

id before after diff
fleet 157.4KB 157.4KB -20.0B

History

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

cc @juliaElastic

@juliaElastic juliaElastic requested a review from criamico January 29, 2024 14:46
@juliaElastic juliaElastic merged commit 92960c4 into elastic:8.12 Jan 29, 2024
31 checks passed
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…lastic#175775)

## Summary

Adding the fix in elastic#175765 to main
too.

To verify:
- add a fleet-server version 8.12.0
- enroll an agent version 8.12.0-SNAPSHOT
- take the agent id and in console run this API request
```
POST kbn:/api/fleet/agents/6a56f865-a611-4921-9f24-87757259223e/upgrade
  {
    "version": "8.12.1-SNAPSHOT"
  }
```
- verify that the API returns 200 

Relates elastic#168502
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…lastic#175775)

## Summary

Adding the fix in elastic#175765 to main
too.

To verify:
- add a fleet-server version 8.12.0
- enroll an agent version 8.12.0-SNAPSHOT
- take the agent id and in console run this API request
```
POST kbn:/api/fleet/agents/6a56f865-a611-4921-9f24-87757259223e/upgrade
  {
    "version": "8.12.1-SNAPSHOT"
  }
```
- verify that the API returns 200 

Relates elastic#168502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Fleet Team label for Observability Data Collection Fleet team v8.12.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet]: Unable to uprade the elastic-agent from v8.12.0 to patch v8.12.1
5 participants