Skip to content

Commit

Permalink
load auto-generated resources and data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchy committed Jan 2, 2025
1 parent e11d99a commit c5e56ff
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
13 changes: 13 additions & 0 deletions internal/providers/pluginfw/auto_generation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 23 additions & 17 deletions internal/providers/pluginfw/pluginfw_rollout_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,32 @@ var migratedDataSources = []func() datasource.DataSource{

// List of resources that have been onboarded to the plugin framework - not migrated from sdkv2.
// Keep this list sorted.
var pluginFwOnlyResources = []func() resource.Resource{
app.ResourceApp,
sharing.ResourceShare,
}
var pluginFwOnlyResources = append(
[]func() resource.Resource{
app.ResourceApp,
sharing.ResourceShare,
},
autoGeneratedResources...,
)

// List of data sources that have been onboarded to the plugin framework - not migrated from sdkv2.
// Keep this list sorted.
var pluginFwOnlyDataSources = []func() datasource.DataSource{
app.DataSourceApp,
app.DataSourceApps,
catalog.DataSourceFunctions,
notificationdestinations.DataSourceNotificationDestinations,
registered_model.DataSourceRegisteredModel,
registered_model.DataSourceRegisteredModelVersions,
serving.DataSourceServingEndpoints,
// TODO: Add DataSourceCluster into migratedDataSources after fixing unit tests.
cluster.DataSourceCluster, // Using the staging name (with pluginframework suffix)
sharing.DataSourceShare, // Using the staging name (with pluginframework suffix)
sharing.DataSourceShares, // Using the staging name (with pluginframework suffix)
}
var pluginFwOnlyDataSources = append(
[]func() datasource.DataSource{
app.DataSourceApp,
app.DataSourceApps,
catalog.DataSourceFunctions,
notificationdestinations.DataSourceNotificationDestinations,
registered_model.DataSourceRegisteredModel,
registered_model.DataSourceRegisteredModelVersions,
serving.DataSourceServingEndpoints,
// TODO: Add DataSourceCluster into migratedDataSources after fixing unit tests.
cluster.DataSourceCluster, // Using the staging name (with pluginframework suffix)
sharing.DataSourceShare, // Using the staging name (with pluginframework suffix)
sharing.DataSourceShares, // Using the staging name (with pluginframework suffix)
},
autoGeneratedDataSources...,
)

type sdkV2FallbackOptions struct {
resourceFallbacks []string
Expand Down

0 comments on commit c5e56ff

Please sign in to comment.