-
Notifications
You must be signed in to change notification settings - Fork 50
Fix PF WriteOnly attributes skip #3043
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
Fix PF WriteOnly attributes skip #3043
Conversation
d9ecf28 to
bda2305
Compare
|
This change is part of the following stack: Change managed by git-spice. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3043 +/- ##
==========================================
- Coverage 68.54% 68.54% -0.01%
==========================================
Files 334 334
Lines 43376 43373 -3
==========================================
- Hits 29734 29731 -3
- Misses 11961 11963 +2
+ Partials 1681 1679 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| func (s *attrSchema) WriteOnly() bool { | ||
| schema, ok := s.attr.(pfutils.AttrLikeWithWriteOnly) |
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.
This is the source of the bug - the type assert here is wrong as attr never implemented that interface.
|
❤️ tests: |
t0yv0
left a comment
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.
Is there prod exposure e.g. in AWS or we caught this early?
guineveresaenger
left a comment
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.
This looks much better, thank you!
|
We caught this early - there are no PF write-only attributes in AWS. |
This is a pure refactor. It removes a redundant internal interface from the PF bridge.This started as a refactor but is actually a bug fix. Looks like we did not implement the PF portion of #2933 correctly. We also had a test which asserted on the wrong behaviour.
This PR fixes skipping PF WriteOnly attributes during tfgen. It also simplifies the PF code by removing a redundant interface.
AttrLikeis a copy of the PFfwschema..Attributewhich hasWriteOnlyimplemented. This makes the method non-optional and adding it to an internal interface is not a breaking change.