-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Do not remove server side fields for datasources #1802
Conversation
Hi and thanks for contributing this. The change looks good, I think this is a useful improvement. However, did you actually run the test on your side? My suggestion would be to base the test for this on a Deployment or something that exposes a status. As soon as we have a working test, I think this is good to go. Thanks! |
Yes, indeed, I'm making the change to test properly. |
I'm not able to run the tests in the
Did not find documentation on how to run the tests in the As a workaround I tried to create a new test in the
Not sure why, I believe the |
@alexsomesan can you look into this one? Issue #1699 blocks alot of users to actually use |
I have tried to verify the patch to maybe solve a problem I face. @alexsomesan funnily enough the proposed change does not return the I have cloned the sourcecode and applied @St0rmingBr4in code changes, built the binaries and used them locally. I have used the following:
Output:
When I change
An error is returned:
To further debug I have added a check that appends an error when
And - surprise - I can see the error when running
Edit: I have also omitted the |
@St0rmingBr4in @alexsomesan so after a lengthy debugging session I have found the problem - or rather the solution. The patch to fix (including changes by @St0rmingBr4in)
As you can see, the func call @alexsomesan how can we proceed with the PR? |
Great I'll try applying the changes to test this on my part. If I'm not mistaken my patch worked without having to change the arguments to TFTypeFromOpenAPI. I'll dig a bit into that. For the test I'll try to give it another shot. |
Included @balpert89 changes and added a test using a kubernetes deployment as test data. |
Sorry, this fell of my radar. I'm having a look at the updates in the next couple of days. |
ce10246
to
b56fb23
Compare
@alexsomesan well if you could approve the workflows that would be great! ^^ |
@alexsomesan Hey, have you found a bit of time to take a look at this ? |
@BBBmau Could you please approve the running workflows so that the CI runs on this change ? Thanks. |
It does not make sense to delete server side fields for datasources, the user should be responsible for not creating loops which would cause a perpetual diff. This allows reading the status field for the generic `kubernetes_resource` datasource. Thus this PR Fixes this issue : hashicorp#1699 Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Nice, all green! Only the review is missing now 😊 |
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.
LGTM. Thanks a lot for this and sorry for the dragged out review.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Server side fields for datasources should not be deleted.
This allows reading the status field for the generic
kubernetes_resource
datasource. Thus this PR Fixes #1699