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

93 lines
3.4 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/hanzoai/cd/pkg/apiclient/repocreds";
// Repository Service
//
// Repository Service API performs CRUD actions against repository resources
package repocreds;
import "google/api/annotations.proto";
import "github.com/hanzoai/cd/pkg/apis/application/v1alpha1/generated.proto";
// RepoCredsQuery is a query for RepoCreds resources
message RepoCredsQuery {
// Repo URL for query
string url = 1;
}
message RepoCredsDeleteRequest {
string url = 1;
}
// RepoCredsResponse is a response to most repository credentials requests
message RepoCredsResponse {}
// RepoCreateRequest is a request for creating repository credentials config
message RepoCredsCreateRequest {
// Repository definition
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds creds = 1;
// Whether to create in upsert mode
bool upsert = 2;
}
// RepoCredsUpdateRequest is a request for updating existing repository credentials config
message RepoCredsUpdateRequest {
github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds creds = 1;
}
// RepoCredsService implements CRUD actions for managing repository credentials config
service RepoCredsService {
// ListRepositoryCredentials gets a list of all configured repository credential sets
rpc ListRepositoryCredentials(RepoCredsQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCredsList) {
option (google.api.http).get = "/v1/repocreds";
}
//ListWriteRepositoryCredentials gets a list of all configured repository credential sets that have write access
rpc ListWriteRepositoryCredentials(RepoCredsQuery) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCredsList) {
option (google.api.http).get = "/v1/write-repocreds";
}
// CreateRepositoryCredentials creates a new repository credential set
rpc CreateRepositoryCredentials(RepoCredsCreateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds) {
option (google.api.http) = {
post: "/v1/repocreds"
body: "creds"
};
}
// CreateWriteRepositoryCredentials creates a new repository credential set with write access
rpc CreateWriteRepositoryCredentials(RepoCredsCreateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds) {
option (google.api.http) = {
post: "/v1/write-repocreds"
body: "creds"
};
}
// UpdateRepositoryCredentials updates a repository credential set
rpc UpdateRepositoryCredentials(RepoCredsUpdateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds) {
option (google.api.http) = {
put: "/v1/repocreds/{creds.url}"
body: "creds"
};
}
// UpdateWriteRepositoryCredentials updates a repository credential set with write access
rpc UpdateWriteRepositoryCredentials(RepoCredsUpdateRequest) returns (github.com.hanzoai.cd.pkg.apis.application.v1alpha1.RepoCreds) {
option (google.api.http) = {
put: "/v1/write-repocreds/{creds.url}"
body: "creds"
};
}
// DeleteRepositoryCredentials deletes a repository credential set from the configuration
rpc DeleteRepositoryCredentials(RepoCredsDeleteRequest) returns (RepoCredsResponse) {
option (google.api.http).delete = "/v1/repocreds/{url}";
}
// DeleteWriteRepositoryCredentials deletes a repository credential set with write access from the configuration
rpc DeleteWriteRepositoryCredentials(RepoCredsDeleteRequest) returns (RepoCredsResponse) {
option (google.api.http).delete = "/v1/write-repocreds/{url}";
}
}