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

[Upgrade Details] When state is set to something other than StateFailed, clear related metadata fields #3690

Merged

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Nov 2, 2023

What does this PR do?

This PR fixes the Upgrade Details struct such that setting its State field to anything other than StateFailed clears associated fields, Metadata.FailedState and Metadata.ErrorMsg.

Why is it important?

The Metadata.FailedState and Metadata.ErrorMsg should only be set when State is set to StateFailed.

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

@ycombinator ycombinator requested a review from a team as a code owner November 2, 2023 04:56
Copy link
Contributor

mergify bot commented Nov 2, 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.

@mergify mergify bot added the backport-skip label Nov 2, 2023
@ycombinator ycombinator changed the title When state is set to something other than StateFailed, clear related metadata fields [Upgrade Details] When state is set to something other than StateFailed, clear related metadata fields Nov 2, 2023
@ycombinator ycombinator added Team:Elastic-Agent Label for the Agent team skip-changelog labels Nov 2, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 2, 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-03T02:47:47.194+0000

  • Duration: 14 min 36 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!)

@ycombinator
Copy link
Contributor Author

/test

@ycombinator ycombinator force-pushed the upgrade-details-clear-failed-state branch from 45bc7f0 to 7a2a144 Compare November 3, 2023 02:47
Copy link

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good.

@ycombinator ycombinator merged commit e9be070 into elastic:main Nov 6, 2023
7 checks passed
@ycombinator ycombinator deleted the upgrade-details-clear-failed-state branch November 6, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants