Add a CI step for checking app SDK codegen status (#111528)
* Add a CI step for checking app SDK codegen status What This commit adds a CI step for checking the status of code generated with Grafana App SDK. The step fails if there is a git diff as a result of the codegen step. It also updates generated code to make sure we're starting from a correct state. Why This ensures that when the schemas or the SDK version are updated, the codegen mismatch is caught early at the PR stage. Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com> * Format generated code Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com> --------- Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
This commit is contained in:
@@ -76,7 +76,7 @@ func (c *FolderClient) Patch(ctx context.Context, identifier resource.Identifier
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *FolderClient) UpdateStatus(ctx context.Context, newStatus FolderStatus, opts resource.UpdateOptions) (*Folder, error) {
|
||||
func (c *FolderClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus FolderStatus, opts resource.UpdateOptions) (*Folder, error) {
|
||||
return c.client.Update(ctx, &Folder{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: FolderKind().Kind(),
|
||||
@@ -84,6 +84,8 @@ func (c *FolderClient) UpdateStatus(ctx context.Context, newStatus FolderStatus,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
|
||||
Reference in New Issue
Block a user