no pass version when new grpc client

This commit is contained in:
sillyguodong 2023-05-22 12:20:54 +08:00
parent 9a0d46fa66
commit 5d4e8cb73d
No known key found for this signature in database
GPG key ID: 4A0646FA86256DF4
3 changed files with 1 additions and 7 deletions
internal

View file

@ -18,7 +18,6 @@ import (
"gitea.com/gitea/act_runner/internal/pkg/config"
"gitea.com/gitea/act_runner/internal/pkg/envcheck"
"gitea.com/gitea/act_runner/internal/pkg/labels"
"gitea.com/gitea/act_runner/internal/pkg/ver"
)
func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command, args []string) error {
@ -72,7 +71,6 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command,
cfg.Runner.Insecure,
reg.UUID,
reg.Token,
ver.Version(),
)
runner := run.NewRunner(cfg, reg, cli)

View file

@ -297,7 +297,6 @@ func doRegister(cfg *config.Config, inputs *registerInputs) error {
cfg.Runner.Insecure,
"",
"",
ver.Version(),
)
for {

View file

@ -28,7 +28,7 @@ func getHttpClient(endpoint string, insecure bool) *http.Client {
}
// New returns a new runner client.
func New(endpoint string, insecure bool, uuid, token, version string, opts ...connect.ClientOption) *HTTPClient {
func New(endpoint string, insecure bool, uuid, token string, opts ...connect.ClientOption) *HTTPClient {
baseURL := strings.TrimRight(endpoint, "/") + "/api/actions"
opts = append(opts, connect.WithInterceptors(connect.UnaryInterceptorFunc(func(next connect.UnaryFunc) connect.UnaryFunc {
@ -39,9 +39,6 @@ func New(endpoint string, insecure bool, uuid, token, version string, opts ...co
if token != "" {
req.Header().Set(TokenHeader, token)
}
// if version != "" {
// req.Header().Set(VersionHeader, version)
// }
return next(ctx, req)
}
})))