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

Fixed error when universal profiling is activated #783

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

3kt
Copy link
Contributor

@3kt 3kt commented Feb 19, 2024

The profiling and symbols endpoints were not being read from the response payload, causing an error.

Description

When activating universal profiling in Kibana (/app/profiling in Kibana), several new endpoints are added to the deployment:

image

These were not recognized by the provider, leading to a deadlock situation where the deployment cannot be administered through terraform anymore. This PR fixes this problem. This PR adds the ability to correctly parse the endpoints in the response.

Related Issues

Fixes #781
The related issue is fixed in 0.6+.

Motivation and Context

See the above description.

How Has This Been Tested?

Unit tested.
AFAICT there's no acceptance test covering this, it might make sense to write one though?
I've also ran the setup described in the issue linked above, and was able to complete the workflow without error.

Types of Changes

  • [] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improves code quality but has no user-facing effect)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Readiness Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Regarding the acceptance tests, I tried to run them per the contributing guidelines, but faced quite some failures with cryptic error messages. A second pass will be very welcome, as I'm not sure I ran them properly.

edit: modified PR definition to reflect that this is a new feature rather than a bug fix

The `profiling` and `symbols` endpoints were not being read from the
response payload, causing an error.
@3kt 3kt requested a review from a team as a code owner February 19, 2024 22:31
@tobio
Copy link
Member

tobio commented Feb 20, 2024

@3kt are you able to add a file to the changelog for this. You can probably use this one as an example.

@tobio
Copy link
Member

tobio commented Feb 20, 2024

The profiling and symbols endpoints were not being read from the response payload, causing an error.

Firstly, this PR is awesome, and it's great to include these endpoints in the resource. That said, this PR does not fix the linked issue, that issue is not present in 0.6 and higher.

@3kt
Copy link
Contributor Author

3kt commented Feb 20, 2024

@3kt are you able to add a file to the changelog for this. You can probably use this one as an example.

I added the corresponding 783.txt file @tobio :)
Is there anything else I should edit?

Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

LGTM

@tobio
Copy link
Member

tobio commented Feb 29, 2024

@3kt thanks for adding these in 🎉

@tobio tobio merged commit 0f02f8d into elastic:master Feb 29, 2024
2 of 3 checks passed
@3kt 3kt deleted the universal_profiling_endpoints branch March 3, 2024 21:42
tobio added a commit to tobio/terraform-provider-ec that referenced this pull request Mar 11, 2024
…ployment-id-with-self

* upstream/master:
  Persist snapshot source in the read response (elastic#788)
  Stateless resources require kibana (elastic#792)
  Fixed error when universal profiling is activated (elastic#783)
  fix(deps): update module github.com/hashicorp/terraform-plugin-framework to v1.6.0 (elastic#790)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants