Skip to content
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

Add deprecated field to curated plugins config and upload #3421

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ func createCuratedPluginRequest(
LicenseUrl: pluginConfig.LicenseURL,
Visibility: visibility,
IntegrationGuideUrl: pluginConfig.IntegrationGuideURL,
Deprecated: pluginConfig.Deprecated,
}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ type Config struct {
// IntegrationGuideURL is an optional attribute used to specify where
// the plugin integration guide can be found.
IntegrationGuideURL string
// Deprecated specifies whether the plugin is deprecated.
Deprecated bool
}

// RegistryConfig is the configuration for the registry of a plugin.
Expand Down Expand Up @@ -407,6 +409,7 @@ type ExternalConfig struct {
SPDXLicenseID string `json:"spdx_license_id,omitempty" yaml:"spdx_license_id,omitempty"`
LicenseURL string `json:"license_url,omitempty" yaml:"license_url,omitempty"`
IntegrationGuideURL string `json:"integration_guide_url,omitempty" yaml:"integration_guide_url,omitempty"`
Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"`
}

// ExternalDependency represents a dependency on another plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestGetConfigForBucket(t *testing.T) {
SPDXLicenseID: "Apache-2.0",
LicenseURL: "https://github.com/grpc/grpc-go/blob/master/LICENSE",
IntegrationGuideURL: "https://grpc.io/docs/languages/go/quickstart",
Deprecated: true,
},
pluginConfig,
)
Expand Down Expand Up @@ -109,6 +110,7 @@ func TestParsePluginConfigGoYAML(t *testing.T) {
SPDXLicenseID: "Apache-2.0",
LicenseURL: "https://github.com/grpc/grpc-go/blob/master/LICENSE",
IntegrationGuideURL: "https://grpc.io/docs/languages/go/quickstart",
Deprecated: true,
},
pluginConfig,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func newConfig(externalConfig ExternalConfig, options []ConfigOption) (*Config,
SPDXLicenseID: spdxLicenseID,
LicenseURL: externalConfig.LicenseURL,
IntegrationGuideURL: externalConfig.IntegrationGuideURL,
Deprecated: externalConfig.Deprecated,
}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ registry:
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc-go/blob/master/LICENSE
integration_guide_url: https://grpc.io/docs/languages/go/quickstart
deprecated: true

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

2 changes: 2 additions & 0 deletions proto/buf/alpha/registry/v1alpha1/plugin_curation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ message CreateCuratedPluginRequest {
CuratedPluginVisibility visibility = 17;
// The URL leading to the integration guide of the plugin, if available.
string integration_guide_url = 18;
// The deprecation status of the plugin.
bool deprecated = 19;
}

message CreateCuratedPluginResponse {
Expand Down