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

Send upgrade details to Fleet Server in check-in API requests #3528

Merged
merged 21 commits into from
Nov 16, 2023

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Oct 5, 2023

What does this PR do?

This PR sends the current upgrade details to Fleet Server as part of the check-in API's request body.

Why is it important?

To give Fleet users more visibility into the Agent upgrade process.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

  1. Spin up a stack deployment with the latest SNAPSHOT version. As of this writing, that would be version 8.12.0-SNAPSHOT.
  2. Build Elastic Agent from this PR's branch but deliberately giving it a version older than the latest SNAPSHOT version.
    AGENT_PACKAGE_VERSION=8.3.0 EXTERNAL=true SNAPSHOT=true PLATFORMS=darwin/arm64 PACKAGES=targz mage package
    
  3. Enroll the built Agent with Fleet.
  4. Once the Agent shows up in the Fleet UI, upgrade it to the latest SNAPSHOT version available. For this, you will have to manually enter the version in the "Upgrade version" text box in the popup, e.g. 8.12.0-SNAPSHOT.
  5. Observe that the Fleet UI shows upgrade details, for example:
    Screenshot 2023-11-08 at 14 18 10

Related issues

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2023

This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 5, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-11-14T16:29:50.834+0000

  • Duration: 14 min 15 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b send-upgrade-details-to-fleet upstream/send-upgrade-details-to-fleet
git merge upstream/main
git push upstream send-upgrade-details-to-fleet

@ycombinator ycombinator added Team:Elastic-Agent Label for the Agent team enhancement New feature or request labels Nov 3, 2023
@ycombinator
Copy link
Contributor Author

Waiting on the next 8.12.0-SNAPSHOT release so we can test this PR here with the fix from elastic/fleet-server#3084.

Copy link
Contributor

mergify bot commented Nov 8, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b send-upgrade-details-to-fleet upstream/send-upgrade-details-to-fleet
git merge upstream/main
git push upstream send-upgrade-details-to-fleet

go.mod Outdated Show resolved Hide resolved
@ycombinator ycombinator force-pushed the send-upgrade-details-to-fleet branch 2 times, most recently from c416abd to 5d55b7d Compare November 9, 2023 11:51
@ycombinator ycombinator marked this pull request as ready for review November 9, 2023 12:49
@ycombinator ycombinator requested a review from a team as a code owner November 9, 2023 12:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@ycombinator ycombinator merged commit 38bee24 into elastic:main Nov 16, 2023
12 checks passed
@ycombinator ycombinator deleted the send-upgrade-details-to-fleet branch November 16, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip enhancement New feature or request Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants