fix: whitespace linter warnings
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
023652d76d
commit
b3854eaf18
12 changed files with 0 additions and 13 deletions
|
|
@ -78,7 +78,6 @@ func (a *Authenticator) GetJWTToken(ctx context.Context) (string, error) {
|
|||
// GetJWTMetricsToken returns a JWT token that can be used to read metrics.
|
||||
// This token is not tied to a user, no user is stored in the db.
|
||||
func (a *Authenticator) GetJWTMetricsToken(ctx context.Context) (string, error) {
|
||||
|
||||
if !IsAdmin(ctx) {
|
||||
return "", runnerErrors.ErrUnauthorized
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ func NewMetricsMiddleware(cfg config.JWTAuth) (*MetricsMiddleware, error) {
|
|||
|
||||
func (m *MetricsMiddleware) Middleware(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ctx := r.Context()
|
||||
authorizationHeader := r.Header.Get("authorization")
|
||||
if authorizationHeader == "" {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ var enterpriseUpdateCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
|
||||
enterpriseAddCmd.Flags().StringVar(&enterpriseName, "name", "", "The name of the enterprise")
|
||||
enterpriseAddCmd.Flags().StringVar(&enterpriseWebhookSecret, "webhook-secret", "", "The webhook secret for this enterprise")
|
||||
enterpriseAddCmd.Flags().StringVar(&enterpriseCreds, "credentials", "", "Credentials name. See credentials list.")
|
||||
|
|
|
|||
|
|
@ -300,7 +300,6 @@ var orgDeleteCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
|
||||
orgAddCmd.Flags().StringVar(&orgName, "name", "", "The name of the organization")
|
||||
orgAddCmd.Flags().StringVar(&orgWebhookSecret, "webhook-secret", "", "The webhook secret for this organization")
|
||||
orgAddCmd.Flags().StringVar(&orgCreds, "credentials", "", "Credentials name. See credentials list.")
|
||||
|
|
|
|||
|
|
@ -303,7 +303,6 @@ var repoDeleteCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
|
||||
repoAddCmd.Flags().StringVar(&repoOwner, "owner", "", "The owner of this repository")
|
||||
repoAddCmd.Flags().StringVar(&repoName, "name", "", "The name of the repository")
|
||||
repoAddCmd.Flags().StringVar(&repoWebhookSecret, "webhook-secret", "", "The webhook secret for this repository")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
|
||||
// CollectOrganizationMetric collects the metrics for the enterprise objects
|
||||
func CollectEnterpriseMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.EnterpriseInfo.Reset()
|
||||
metrics.EnterprisePoolManagerStatus.Reset()
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
// CollectInstanceMetric collects the metrics for the runner instances
|
||||
// reflecting the statuses and the pool they belong to.
|
||||
func CollectInstanceMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.InstanceStatus.Reset()
|
||||
|
||||
|
|
@ -54,7 +53,6 @@ func CollectInstanceMetric(ctx context.Context, r *runner.Runner) error {
|
|||
}
|
||||
|
||||
for _, instance := range instances {
|
||||
|
||||
metrics.InstanceStatus.WithLabelValues(
|
||||
instance.Name, // label: name
|
||||
string(instance.Status), // label: status
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
|
||||
// CollectOrganizationMetric collects the metrics for the organization objects
|
||||
func CollectOrganizationMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.OrganizationInfo.Reset()
|
||||
metrics.OrganizationPoolManagerStatus.Reset()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
// CollectPoolMetric collects the metrics for the pool objects
|
||||
func CollectPoolMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.PoolInfo.Reset()
|
||||
metrics.PoolStatus.Reset()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
)
|
||||
|
||||
func CollectProviderMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.ProviderInfo.Reset()
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import (
|
|||
)
|
||||
|
||||
func CollectRepositoryMetric(ctx context.Context, r *runner.Runner) error {
|
||||
|
||||
// reset metrics
|
||||
metrics.EnterpriseInfo.Reset()
|
||||
metrics.EnterprisePoolManagerStatus.Reset()
|
||||
|
|
|
|||
1
runner/providers/external/external.go
vendored
1
runner/providers/external/external.go
vendored
|
|
@ -145,7 +145,6 @@ func (e *external) DeleteInstance(ctx context.Context, instance string) error {
|
|||
).Inc()
|
||||
return garmErrors.NewProviderError("provider binary %s returned error: %s", e.execPath, err)
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue