-
Notifications
You must be signed in to change notification settings - Fork 29
feat(r/flexible_board): allow panel positions to be autogenerated #716
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
Conversation
f4e3522
to
8c7044f
Compare
44900ce
to
83f0874
Compare
@@ -0,0 +1,103 @@ | |||
package validation |
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.
FWIW: I've learned that resource-specific ValidiateConfig
methods are a bit nicer to reason about, but there is already some "one resource only" examples of validators here in the project.
cc01b33
to
6f7405d
Compare
@@ -289,6 +302,301 @@ func (r *flexibleBoardResource) ImportState(ctx context.Context, req resource.Im | |||
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp) | |||
} | |||
|
|||
func (*flexibleBoardResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader { | |||
// upgrade state as position is not an object and |
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.
great job on this! A first in our codebase ✨
3bb45f1
to
24ec006
Compare
24ec006
to
10143be
Compare
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.
Looking good!
Before merging please change the PR title to feat(r/flexible_board): allow panel positions to be autogenerated
with the appropriate github label change.
), | ||
}, | ||
// now add an SLO panel, remove chart settings from the query panel, remove tags | ||
// now add an SLO panel, remove chart settings from the query panel, remove tags and update from generated positions to provided positions |
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.
as discussed: there is a non-blocking bug here where switching panels from provided positions to unprovided positions isn't detected (manual -> auto). This can be fixed in followup as a bugfix.
10143be
to
2438ddb
Compare
Which problem is this PR solving?
How to verify that this has the expected result
fixes #692