Files
zeekay 187be9e719 proto, settings: fix stale argoproj.argo_cd.v3 package path and hanzocd part-of drift
repository.proto and 11 sibling hand-written .proto files referenced
generated.proto's application/v1alpha1 types under the pre-fork package
path (github.com.argoproj.argo_cd.v3...); protoc silently kept compiling
because generated.proto still carried that same stale package too. Point
both at the real, mechanically-derived path
(github.com.hanzoai.cd.pkg.apis.application.v1alpha1, no v3 segment) and
regenerate everything protoc/go-to-protobuf own: generated.proto/pb.go,
every pkg/apiclient and reposerver/cmpserver/commitserver *.pb.go,
assets/swagger.json, and the CRD manifests.

That regeneration surfaced a second, unrelated bug: hack/gen-crd-spec
stamped app.kubernetes.io/part-of: cd on the CRDs, but
util/settings.isSettingsObject (and the ConfigMap informer built on it)
only ever recognizes part-of=hanzocd. The same wrong "cd" value was
baked into cmd/cd/commands/admin/settings.go's setSettingsMeta and the
shared test/testdata.go fixtures ~30 files import — util/settings' own
test suite was panicking on an empty slice because its fixture was
invisible to the informer it was supposedly seeding. Fixed the label
everywhere it's produced or asserted in the settings path; left the
~90 unrelated part-of:"cd" literals in other packages' local test
fixtures alone since they never touch this selector.

Also dropped 25 "TODO: Remove deprecated <dead upstream issue link>"
comments that duplicated the real explanation already sitting one line
away (a proper `Deprecated:` godoc, a cobra Deprecated field, or a
nolint:staticcheck marker) — kept the explanation, dropped the link, per
the standing rule for these citations.

And repointed the two Grafana dashboards' job selector from
argocd-server-metrics, a Service the manifests never create, to
hanzocd-server-metrics, the one they do.
2026-09-05 14:58:20 -07:00

125 lines
4.1 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/hanzoai/cd/pkg/apiclient/applicationset";
// ApplicationSet Service
//
// ApplicationSet Service API performs CRUD actions against applicationset resources
package applicationset;
import "google/api/annotations.proto";
import "github.com/hanzoai/cd/pkg/apis/application/v1alpha1/generated.proto";
import "github.com/hanzoai/cd/server/events/events.proto";
// ApplicationSetGetQuery is a query for applicationset resources
message ApplicationSetGetQuery {
// the applicationsets's name
string name = 1;
// The application set namespace. Default empty is the CD control plane namespace
string appsetNamespace = 2;
}
message ApplicationSetListQuery {
// the project names to restrict returned list applicationsets
repeated string projects = 1;
// the selector to restrict returned list to applications only with matched labels
string selector = 2;
// The application set namespace. Default empty is the CD control plane namespace
string appsetNamespace = 3;
}
message ApplicationSetWatchQuery {
string name = 1;
repeated string projects = 2;
string selector = 3;
string appSetNamespace = 4;
// when specified with a watch call, shows changes that occur after that particular version of a resource.
string resourceVersion = 5;
}
message ApplicationSetResponse {
string project = 1;
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSet applicationset = 2;
}
message ApplicationSetCreateRequest {
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSet applicationset = 1;
bool upsert = 2;
bool dryRun = 3;
}
message ApplicationSetDeleteRequest {
string name = 1;
// The application set namespace. Default empty is the CD control plane namespace
string appsetNamespace = 2;
}
message ApplicationSetTreeQuery {
string name = 1;
// The application set namespace. Default empty is the CD control plane namespace
string appsetNamespace = 2;
}
// ApplicationSetGetQuery is a query for applicationset resources
message ApplicationSetGenerateRequest {
// the applicationsets
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSet applicationSet = 1;
}
// ApplicationSetGenerateResponse is a response for applicationset generate request
message ApplicationSetGenerateResponse {
repeated github.com.hanzoai.cd.pkg.apis.application.v1alpha1.Application applications = 1;
}
// ApplicationSetService
service ApplicationSetService {
// Get returns an applicationset by name
rpc Get (ApplicationSetGetQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSet) {
option (google.api.http).get = "/v1/applicationsets/{name}";
}
// Generate generates
rpc Generate (ApplicationSetGenerateRequest) returns (ApplicationSetGenerateResponse) {
option (google.api.http) = {
post: "/v1/applicationsets/generate"
body: "*"
};
}
//List returns list of applicationset
rpc List (ApplicationSetListQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSetList) {
option (google.api.http).get = "/v1/applicationsets";
}
//Create creates an applicationset
rpc Create (ApplicationSetCreateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSet) {
option (google.api.http) = {
post: "/v1/applicationsets"
body: "applicationset"
};
}
// Delete deletes an application set
rpc Delete(ApplicationSetDeleteRequest) returns (ApplicationSetResponse) {
option (google.api.http).delete = "/v1/applicationsets/{name}";
}
// ResourceTree returns resource tree
rpc ResourceTree(ApplicationSetTreeQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSetTree) {
option (google.api.http).get = "/v1/applicationsets/{name}/resource-tree";
}
// ListResourceEvents returns a list of event resources
rpc ListResourceEvents(ApplicationSetGetQuery) returns (events.EventList) {
option (google.api.http).get = "/v1/applicationsets/{name}/events";
}
rpc Watch (ApplicationSetWatchQuery) returns (stream github.com.hanzoai.cd.pkg.apis.application.v1alpha1.ApplicationSetWatchEvent) {
option (google.api.http).get = "/v1/stream/applicationsets";
}
}