no pass version when new grpc client
This commit is contained in:
parent
9a0d46fa66
commit
5d4e8cb73d
3 changed files with 1 additions and 7 deletions
internal
|
@ -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)
|
||||
|
|
|
@ -297,7 +297,6 @@ func doRegister(cfg *config.Config, inputs *registerInputs) error {
|
|||
cfg.Runner.Insecure,
|
||||
"",
|
||||
"",
|
||||
ver.Version(),
|
||||
)
|
||||
|
||||
for {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue