From 0d67d1fb38b8cd01e5b761782f5080c89a598bb8 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 24 Mar 2025 12:27:07 +0000 Subject: [PATCH 01/79] Updated release-notes files --- beta-releasenotes.md | 4 ++++ manifests/release.txt | 2 +- releasenotes.md | 20 -------------------- 3 files changed, 5 insertions(+), 21 deletions(-) create mode 100644 beta-releasenotes.md diff --git a/beta-releasenotes.md b/beta-releasenotes.md new file mode 100644 index 0000000000..f08e98da25 --- /dev/null +++ b/beta-releasenotes.md @@ -0,0 +1,4 @@ +## Bugs +## Enhancements +## Documentation +## Others diff --git a/manifests/release.txt b/manifests/release.txt index 51ee350e8f..0a8666161e 100644 --- a/manifests/release.txt +++ b/manifests/release.txt @@ -1 +1 @@ -stable -1 v1.4.0 +beta -1 v1.4.0 diff --git a/releasenotes.md b/releasenotes.md index bec1d0c5e4..e69de29bb2 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,20 +0,0 @@ -## v1.4.0 - -## Enhancements -- feat: Made ng labels env driven (#6438) -- feat: Link helm release (#6454) -- feat: access manager (#6377) -- feat: migrate external argo cd application (#6303) -- feat: Dark Mode v1 (#2348) -- feat: Dark Mode v2 (#2367) -- feat: Dark Mode v3 (#2484) -## Bugs -- fix: cluster update issue (#6465) -- fix: in CreateGrafanaDataSource (#6463) -- fix: onboard acd app (#6457) -- fix: prom client in chart-sync (#6442) -- fix: incorrect gitops metrics (#6444) -- fix: envId check in EventBuilder.go (#6436) -- fix: createDockerRepoIfNeeded error handling (#6433) - - From 751c9ffbbec537dbda59d576cb4a653e0753fa74 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 25 Mar 2025 09:19:29 +0000 Subject: [PATCH 02/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index f08e98da25..8ccf284c48 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements ## Documentation ## Others From a8034c38f0c09050fdf8e96b1cf48e20d77b6751 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 25 Mar 2025 13:32:00 +0000 Subject: [PATCH 03/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 8ccf284c48..17c8229361 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements ## Documentation From 472a4c5e412b685621d218749b9947e5801f6edb Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 27 Mar 2025 10:01:40 +0000 Subject: [PATCH 04/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 17c8229361..1ebfda6e32 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -4,3 +4,4 @@ ## Enhancements ## Documentation ## Others +- sync: Release candidate v0.32.0 (#6479) From cf5901f9ffa503293889dccc17479b2d9298cd54 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 27 Mar 2025 10:21:53 +0000 Subject: [PATCH 05/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 1ebfda6e32..c8542568e0 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -4,4 +4,5 @@ ## Enhancements ## Documentation ## Others +- sync: vendor update (#6480) - sync: Release candidate v0.32.0 (#6479) From d5fa71f549180d5d15ea9e4d0c4a9fa0b40b47ef Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 27 Mar 2025 11:59:01 +0000 Subject: [PATCH 06/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index c8542568e0..75f1bb75fc 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: force abort for pre/post cd (#6475) - fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements From 631e9cde3eb89b2a2d1c707ddabddc27b4e93520 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Fri, 28 Mar 2025 05:51:40 +0000 Subject: [PATCH 07/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 75f1bb75fc..2c352694d9 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -5,5 +5,6 @@ ## Enhancements ## Documentation ## Others +- sync: Main sync develop 27mar (#6483) - sync: vendor update (#6480) - sync: Release candidate v0.32.0 (#6479) From 6c8e4a41e4d91ff6ed92a8613c94f3ef2ee1991c Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 1 Apr 2025 06:16:38 +0000 Subject: [PATCH 08/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 2c352694d9..d74bdbc02b 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: hpa permission denied error (#6485) - fix: force abort for pre/post cd (#6475) - fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) From 2a20009c3782e78167146032d464e81a2f5205e0 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 1 Apr 2025 10:29:05 +0000 Subject: [PATCH 09/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index d74bdbc02b..ffa880dadc 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -4,6 +4,7 @@ - fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements +- feat: licensing changes (#6474) ## Documentation ## Others - sync: Main sync develop 27mar (#6483) From d9ff0a3befb2515b98d2d69aa7e22f6718fbbb5d Mon Sep 17 00:00:00 2001 From: systemsdt Date: Wed, 2 Apr 2025 11:11:32 +0000 Subject: [PATCH 10/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index ffa880dadc..164d8e3b7e 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -7,6 +7,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: main changes synced into develop (#6492) - sync: Main sync develop 27mar (#6483) - sync: vendor update (#6480) - sync: Release candidate v0.32.0 (#6479) From 05815882e8fa09f6d6c51ba77a58f381969d23ab Mon Sep 17 00:00:00 2001 From: systemsdt Date: Wed, 2 Apr 2025 15:51:24 +0000 Subject: [PATCH 11/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 164d8e3b7e..f203dc3c4a 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: made triggeredBy for CI & CD uniform (#6489) - fix: hpa permission denied error (#6485) - fix: force abort for pre/post cd (#6475) - fix: optimisation in workflow status api (#6473) From 352272a57772008fd57009cf80261780cfbef851 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 3 Apr 2025 09:13:42 +0000 Subject: [PATCH 12/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index f203dc3c4a..85e8f94ee6 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -8,6 +8,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- chore: code restructuring (#6476) - sync: main changes synced into develop (#6492) - sync: Main sync develop 27mar (#6483) - sync: vendor update (#6480) From 477b6dac34cfd5f90b1d6cf3855eb0a207f409d7 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Fri, 4 Apr 2025 14:48:16 +0000 Subject: [PATCH 13/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 85e8f94ee6..9ac16b2a35 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: Grafana revert patch (#6498) - fix: made triggeredBy for CI & CD uniform (#6489) - fix: hpa permission denied error (#6485) - fix: force abort for pre/post cd (#6475) From d4848c404cea078e948b04a68043b0e591584169 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Fri, 4 Apr 2025 17:32:50 +0000 Subject: [PATCH 14/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 9ac16b2a35..4134c7fc86 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -9,6 +9,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- chore: nil implementations fixed for user attribute in telemetry (#6497) - chore: code restructuring (#6476) - sync: main changes synced into develop (#6492) - sync: Main sync develop 27mar (#6483) From ece1ef81e6a5d79ceb37c3aa914beb9f11215689 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:24:07 +0530 Subject: [PATCH 15/79] misc: merged main in release-bot (#6500) * ci pipeline get change * ci pipeline get change * GetCiPipelineByIdWithDefaultTag change * deployment template get response * cd pipeline get response change * oss etn change * oss ent change * prom client in chart-sync * fix in yaml * APP_SYNC_SHUTDOWN_WAIT_DURATION env * APP_SYNC_SHUTDOWN_WAIT_DURATION env * vendor update in develop * fix: incorrect gitops metrics (#6444) * wip: fix gitops metrics * fix pull metrics * github create repo function * wip: metrics changed from defer function * fix metrics publish * self review changes * oss ent change * code cleaning * name suggestion util * added supoort for preserve mode in update repo api * fix in CreateGrafanaDataSource * fix in CreateGrafanaDataSource * feat: Made ng labels env driven (#6438) * feat: Adds karpenter ng to list of ng constants * feat: made nodelabels env driven * feat: Updates env get as per repo standards * prom client in chart-sync * fix in yaml * chore: resolve merge conflict * APP_SYNC_SHUTDOWN_WAIT_DURATION env * code cleaning --------- Co-authored-by: prakhar katiyar * updated timeout for git material save/update * fix: compile issue * updated protos version * added sql scripts * sql no update * wip: optimisation (#6473) * vendor update * feat: licensing changes (#6474) * modules handling * example * sql files * common lib update * release: Compatibility Modifications for Enterprise and OSS Chart (#6486) * added devtronEnterprise check conditions * added devtron-operator-cm in inception * added eneterprise flag in devtron-cm * updated dashboard cm * added random alpha for ent-job * added DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES in devtro-cm * updated installer for enterprise * bom * fix: for grafana URL * fix: for grafana URL --------- Co-authored-by: kartik-579 Co-authored-by: prakhar katiyar Co-authored-by: Vikram Singh Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com> Co-authored-by: iamayushm <32041961+iamayushm@users.noreply.github.com> Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com> Co-authored-by: Ash-exp Co-authored-by: Abhibhaw Asthana <39991296+abhibhaw@users.noreply.github.com> Co-authored-by: kartik-579 <84493919+kartik-579@users.noreply.github.com> Co-authored-by: Shivam Nagar <124123645+Shivam-nagar23@users.noreply.github.com> --- .../configure/BuildPipelineRestHandler.go | 12 +- .../DeploymentPipelineRestHandler.go | 132 +- .../configure/PipelineConfigRestHandler.go | 4 +- .../app/workflow/AppWorkflowRestHandler.go | 40 +- charts/devtron/Chart.yaml | 2 +- .../devtron/templates/configmap-secret.yaml | 12 +- charts/devtron/templates/dashboard.yaml | 3 + .../devtron/templates/devtron-installer.yaml | 4 + charts/devtron/templates/devtron.yaml | 9 +- charts/devtron/templates/install.yaml | 2 + charts/devtron/templates/migrator.yaml | 4 +- charts/devtron/templates/workflow.yaml | 23 + .../argocdServer/ArgoClientWrapperService.go | 2 +- client/gitSensor/GitSensorGrpcClient.go | 2 + client/gitSensor/GitSensorRestClient.go | 1 + client/telemetry/TelemetryEventClient.go | 7 +- cmd/external-app/wire.go | 1 - cmd/external-app/wire_gen.go | 6 +- env_gen.json | 2 +- env_gen.md | 4 + go.mod | 21 +- go.sum | 89 +- .../pipelineConfig/CiWorkflowRepository.go | 3 +- pkg/appWorkflow/AppWorkflowService.go | 33 + pkg/appWorkflow/bean/bean.go | 7 + pkg/bean/app.go | 1 + pkg/chart/ChartService.go | 139 +- pkg/chartRepo/ChartRepositoryService.go | 2 +- pkg/chartRepo/ManualAppSyncYaml.go | 35 +- pkg/cluster/ClusterServiceExtended.go | 5 +- pkg/commonService/CommonBaseService.go | 1 + pkg/commonService/bean_ent.go | 1 + .../DeploymentConfigurationService.go | 12 +- .../gitOps/git/GitOperationService.go | 10 +- pkg/deployment/gitOps/git/GitOpsClient.go | 2 +- pkg/deployment/gitOps/git/GitOpsHelper.go | 14 +- pkg/deployment/gitOps/git/GitServiceAzure.go | 30 +- .../gitOps/git/GitServiceBitbucket.go | 34 +- pkg/deployment/gitOps/git/GitServiceGithub.go | 37 +- pkg/deployment/gitOps/git/GitServiceGitlab.go | 28 +- .../git/commandManager/GitCliManager.go | 19 +- .../commandManager/GitCommandBaseManager.go | 9 +- .../gitOps/git/commandManager/utils.go | 8 + pkg/k8s/capacity/bean/bean.go | 44 +- pkg/module/ModuleService.go | 127 +- pkg/module/bean/bean.go | 3 +- pkg/pipeline/BuildPipelineConfigService.go | 25 + pkg/pipeline/CiCdPipelineOrchestrator.go | 25 +- pkg/pipeline/CiHandler.go | 10 +- .../DeploymentPipelineConfigService.go | 19 +- pkg/pipeline/PropertiesConfig.go | 42 +- pkg/server/config/ServerEnvConfig.go | 1 + .../sql/32403200_resource_template.down.sql | 0 scripts/sql/32403200_resource_template.up.sql | 0 .../sql/32503200_license_attributes.down.sql | 8 + .../sql/32503200_license_attributes.up.sql | 18 + util/GlobalConfig.go | 1 + util/beHelper/nameSuggestionUtil.go | 23 + util/helper.go | 7 +- util/retryFunc/RetryFunction.go | 4 +- .../devtron-labs/authenticator/oidc/oidc.go | 36 +- .../common-lib/constants/InternalErrorCode.go | 16 + .../common-lib/utils/ErrorUtil.go | 10 +- .../common-lib/utils/http/HttpUtil.go | 28 + .../protos/gitSensor/service.pb.go | 984 +-- .../protos/gitSensor/service.proto | 1 + .../go-playground/locales/README.md | 4 +- .../universal-translator/README.md | 4 +- .../universal-translator/import_export.go | 6 +- vendor/github.com/juju/errors/Makefile | 2 +- .../github.com/juju/errors/dependencies.tsv | 5 - vendor/github.com/juju/errors/error.go | 77 +- vendor/github.com/juju/errors/errortypes.go | 542 +- vendor/github.com/juju/errors/functions.go | 140 +- vendor/github.com/juju/errors/path.go | 32 - vendor/github.com/leodido/go-urn/.gitignore | 4 +- vendor/github.com/leodido/go-urn/.travis.yml | 18 - vendor/github.com/leodido/go-urn/README.md | 152 +- vendor/github.com/leodido/go-urn/kind.go | 10 + vendor/github.com/leodido/go-urn/machine.go | 6193 +++++++++++++---- .../github.com/leodido/go-urn/machine.go.rl | 283 +- vendor/github.com/leodido/go-urn/makefile | 52 +- vendor/github.com/leodido/go-urn/options.go | 9 + .../github.com/leodido/go-urn/parsing_mode.go | 12 + vendor/github.com/leodido/go-urn/scim.go | 48 + .../leodido/go-urn/scim/schema/type.go | 36 + vendor/github.com/leodido/go-urn/urn.go | 94 +- vendor/github.com/leodido/go-urn/urn8141.go | 30 + .../github.com/posthog/posthog-go/.gitignore | 1 + .../posthog/posthog-go/CHANGELOG.md | 128 + .../github.com/posthog/posthog-go/README.md | 53 +- vendor/github.com/posthog/posthog-go/backo.go | 9 +- .../github.com/posthog/posthog-go/capture.go | 27 +- .../github.com/posthog/posthog-go/config.go | 59 +- .../posthog/posthog-go/feature_flag_config.go | 84 + .../posthog/posthog-go/featureflags.go | 981 ++- .../posthog/posthog-go/group_identify.go | 69 + .../github.com/posthog/posthog-go/groups.go | 17 + .../github.com/posthog/posthog-go/message.go | 7 +- .../github.com/posthog/posthog-go/posthog.go | 398 +- .../posthog/posthog-go/properties.go | 15 +- .../posthog/posthog-go/timeout_15.go | 1 + .../posthog/posthog-go/timeout_16.go | 1 + vendor/github.com/posthog/posthog-go/util.go | 44 + .../github.com/posthog/posthog-go/version.go | 2 +- vendor/github.com/xtgo/uuid/AUTHORS | 5 - vendor/github.com/xtgo/uuid/LICENSE | 27 - vendor/github.com/xtgo/uuid/uuid.go | 204 - .../go-playground/validator.v9/README.md | 4 +- .../go-playground/validator.v9/baked_in.go | 50 +- .../go-playground/validator.v9/doc.go | 46 +- .../go-playground/validator.v9/field_level.go | 46 +- .../go-playground/validator.v9/regexes.go | 2 + .../go-playground/validator.v9/util.go | 7 +- .../go-playground/validator.v9/validator.go | 2 +- vendor/modules.txt | 40 +- wire_gen.go | 8 +- 117 files changed, 9109 insertions(+), 3225 deletions(-) create mode 100644 scripts/sql/32403200_resource_template.down.sql create mode 100644 scripts/sql/32403200_resource_template.up.sql create mode 100644 scripts/sql/32503200_license_attributes.down.sql create mode 100644 scripts/sql/32503200_license_attributes.up.sql create mode 100644 util/beHelper/nameSuggestionUtil.go create mode 100644 vendor/github.com/devtron-labs/common-lib/constants/InternalErrorCode.go delete mode 100644 vendor/github.com/juju/errors/dependencies.tsv delete mode 100644 vendor/github.com/juju/errors/path.go delete mode 100644 vendor/github.com/leodido/go-urn/.travis.yml create mode 100644 vendor/github.com/leodido/go-urn/kind.go create mode 100644 vendor/github.com/leodido/go-urn/options.go create mode 100644 vendor/github.com/leodido/go-urn/parsing_mode.go create mode 100644 vendor/github.com/leodido/go-urn/scim.go create mode 100644 vendor/github.com/leodido/go-urn/scim/schema/type.go create mode 100644 vendor/github.com/leodido/go-urn/urn8141.go create mode 100644 vendor/github.com/posthog/posthog-go/CHANGELOG.md create mode 100644 vendor/github.com/posthog/posthog-go/feature_flag_config.go create mode 100644 vendor/github.com/posthog/posthog-go/group_identify.go create mode 100644 vendor/github.com/posthog/posthog-go/groups.go create mode 100644 vendor/github.com/posthog/posthog-go/util.go delete mode 100644 vendor/github.com/xtgo/uuid/AUTHORS delete mode 100644 vendor/github.com/xtgo/uuid/LICENSE delete mode 100644 vendor/github.com/xtgo/uuid/uuid.go diff --git a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go index 1a1ec93c2b..32448e0abf 100644 --- a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go +++ b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go @@ -565,15 +565,12 @@ func (handler *PipelineConfigRestHandlerImpl) GetCiPipeline(w http.ResponseWrite common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) return } - ciConf, err := handler.pipelineBuilder.GetCiPipeline(appId) + ciConf, err := handler.pipelineBuilder.GetCiPipelineRespResolved(appId) if err != nil { - handler.Logger.Errorw("service err, GetCiPipeline", "err", err, "appId", appId) + handler.Logger.Errorw("service err, GetCiPipelineRespResolved", "appId", appId, "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) return } - if ciConf == nil || ciConf.Id == 0 { - err = &util.ApiError{Code: "404", HttpStatusCode: 200, UserMessage: "no data found"} - } common.WriteJsonResp(w, err, ciConf, http.StatusOK) } @@ -1286,13 +1283,12 @@ func (handler *PipelineConfigRestHandlerImpl) GetCIPipelineById(w http.ResponseW } } - ciPipeline, err := handler.pipelineBuilder.GetCiPipelineById(pipelineId) + ciPipeline, err := handler.pipelineBuilder.GetCiPipelineByIdWithDefaultTag(pipelineId) if err != nil { - handler.Logger.Infow("service error, GetCIPipelineById", "err", err, "appId", appId, "pipelineId", pipelineId) + handler.Logger.Infow("service error, GetCiPipelineByIdWithDefaultTag", "err", err, "appId", appId, "pipelineId", pipelineId) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) return } - ciPipeline.DefaultTag = []string{"{git_hash}", "{ci_pipeline_id}", "{global_counter}"} common.WriteJsonResp(w, err, ciPipeline, http.StatusOK) } diff --git a/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go b/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go index 21793673aa..52728940d5 100644 --- a/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go +++ b/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go @@ -41,7 +41,6 @@ import ( "github.com/devtron-labs/devtron/pkg/auth/authorisation/casbin" "github.com/devtron-labs/devtron/pkg/bean" "github.com/devtron-labs/devtron/pkg/generateManifest" - "github.com/devtron-labs/devtron/pkg/pipeline" pipelineBean "github.com/devtron-labs/devtron/pkg/pipeline/bean" resourceGroup2 "github.com/devtron-labs/devtron/pkg/resourceGroup" "github.com/devtron-labs/devtron/pkg/resourceQualifiers" @@ -718,48 +717,22 @@ func (handler *PipelineConfigRestHandlerImpl) EnvConfigOverrideCreate(w http.Res return } - createResp, err := handler.propertiesConfigService.CreateEnvironmentProperties(appId, &envConfigProperties) - if err != nil { - if err.Error() == bean4.NOCHARTEXIST { - ctx, cancel := context.WithCancel(r.Context()) - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } - appMetrics := false - if envConfigProperties.AppMetrics != nil { - appMetrics = *envConfigProperties.AppMetrics - } - templateRequest := bean3.TemplateRequest{ - AppId: appId, - ChartRefId: envConfigProperties.ChartRefId, - ValuesOverride: []byte("{}"), - UserId: userId, - IsAppMetricsEnabled: appMetrics, + ctx, cancel := context.WithCancel(r.Context()) + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() } + }(ctx.Done(), cn.CloseNotify()) + } - _, err = handler.chartService.CreateChartFromEnvOverride(templateRequest, ctx) - if err != nil { - handler.Logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", envConfigProperties) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - createResp, err = handler.propertiesConfigService.CreateEnvironmentProperties(appId, &envConfigProperties) - if err != nil { - handler.Logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", envConfigProperties) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - } else { - handler.Logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", envConfigProperties) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } + createResp, err := handler.propertiesConfigService.CreateEnvironmentPropertiesAndBaseIfNeeded(ctx, appId, &envConfigProperties) + if err != nil { + handler.Logger.Errorw("service err, CreateEnvironmentPropertiesAndBaseIfNeeded", "payload", envConfigProperties, "err", err) + common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) + return } common.WriteJsonResp(w, err, createResp, http.StatusOK) } @@ -1037,77 +1010,12 @@ func (handler *PipelineConfigRestHandlerImpl) GetDeploymentTemplate(w http.Respo common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) return } - - appConfigResponse := make(map[string]interface{}) - appConfigResponse["globalConfig"] = nil - - err = handler.chartRefService.CheckChartExists(chartRefId) + appConfigResponse, err := handler.chartService.GetDeploymentTemplateDataByAppIdAndCharRefId(appId, chartRefId) if err != nil { handler.Logger.Errorw("refChartDir Not Found err, JsonSchemaExtractFromFile", err) common.WriteJsonResp(w, err, nil, http.StatusForbidden) return } - - schema, readme, err := handler.chartRefService.GetSchemaAndReadmeForTemplateByChartRefId(chartRefId) - if err != nil { - handler.Logger.Errorw("err in getting schema and readme, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - } - - template, err := handler.chartReadService.FindLatestChartForAppByAppId(appId) - if err != nil && pg.ErrNoRows != err { - handler.Logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - - if pg.ErrNoRows == err { - appOverride, _, err := handler.chartRefService.GetAppOverrideForDefaultTemplate(chartRefId) - if err != nil { - handler.Logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - appOverride["schema"] = json.RawMessage(schema) - appOverride["readme"] = string(readme) - mapB, err := json.Marshal(appOverride) - if err != nil { - handler.Logger.Errorw("marshal err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - return - } - appConfigResponse["globalConfig"] = json.RawMessage(mapB) - } else { - if template.ChartRefId != chartRefId { - templateRequested, err := handler.chartService.GetByAppIdAndChartRefId(appId, chartRefId) - if err != nil && err != pg.ErrNoRows { - handler.Logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - - if pg.ErrNoRows == err { - template.ChartRefId = chartRefId - template.Id = 0 - template.Latest = false - } else { - template.ChartRefId = templateRequested.ChartRefId - template.Id = templateRequested.Id - template.ChartRepositoryId = templateRequested.ChartRepositoryId - template.RefChartTemplate = templateRequested.RefChartTemplate - template.RefChartTemplateVersion = templateRequested.RefChartTemplateVersion - template.Latest = templateRequested.Latest - } - } - template.Schema = schema - template.Readme = string(readme) - bytes, err := json.Marshal(template) - if err != nil { - handler.Logger.Errorw("marshal err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) - return - } - appOverride := json.RawMessage(bytes) - appConfigResponse["globalConfig"] = appOverride - } - common.WriteJsonResp(w, nil, appConfigResponse, http.StatusOK) } @@ -1992,15 +1900,9 @@ func (handler *PipelineConfigRestHandlerImpl) GetCdPipelineById(w http.ResponseW return } - cdPipeline, err := handler.pipelineBuilder.GetCdPipelineById(pipelineId) - if err != nil { - handler.Logger.Errorw("service err, GetCdPipelineById", "err", err, "appId", appId, "pipelineId", pipelineId) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return - } - cdResp, err := pipeline.CreatePreAndPostStageResponse(cdPipeline, version) + cdResp, err := handler.pipelineBuilder.GetCdPipelineByIdResolved(pipelineId, version) if err != nil { - handler.Logger.Errorw("service err, CheckForVersionAndCreatePreAndPostStagePayload", "err", err, "appId", appId, "pipelineId", pipelineId) + handler.Logger.Errorw("service err, GetCdPipelineByIdResolved", "appId", appId, "pipelineId", pipelineId, "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) return } diff --git a/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go b/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go index 10f899556c..5e3e81defd 100644 --- a/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go +++ b/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go @@ -35,6 +35,7 @@ import ( security2 "github.com/devtron-labs/devtron/pkg/policyGovernance/security/imageScanning" "github.com/devtron-labs/devtron/pkg/policyGovernance/security/imageScanning/read" read3 "github.com/devtron-labs/devtron/pkg/team/read" + "github.com/devtron-labs/devtron/util/beHelper" "io" "net/http" "strconv" @@ -60,7 +61,6 @@ import ( "github.com/devtron-labs/devtron/pkg/bean" "github.com/devtron-labs/devtron/pkg/pipeline" "github.com/devtron-labs/devtron/pkg/team" - util2 "github.com/devtron-labs/devtron/util" "github.com/devtron-labs/devtron/util/rbac" "github.com/gorilla/mux" "go.uber.org/zap" @@ -663,7 +663,7 @@ func (handler *PipelineConfigRestHandlerImpl) PipelineNameSuggestion(w http.Resp common.WriteJsonResp(w, err, nil, http.StatusBadRequest) return } - suggestedName := fmt.Sprintf("%s-%d-%s", pType, appId, util2.Generate(4)) + suggestedName := beHelper.GetPipelineNameByPipelineType(pType, appId) resourceName := handler.enforcerUtil.GetAppRBACName(app.AppName) ok := handler.enforcerUtil.CheckAppRbacForAppOrJob(token, resourceName, casbin.ActionGet) if !ok { diff --git a/api/restHandler/app/workflow/AppWorkflowRestHandler.go b/api/restHandler/app/workflow/AppWorkflowRestHandler.go index 79c62e025a..b4251d2630 100644 --- a/api/restHandler/app/workflow/AppWorkflowRestHandler.go +++ b/api/restHandler/app/workflow/AppWorkflowRestHandler.go @@ -188,13 +188,6 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r return } token := r.Header.Get("token") - app, err := impl.pipelineBuilder.GetApp(appId) - if err != nil { - impl.Logger.Errorw("bad request", "err", err) - common.WriteJsonResp(w, err, nil, http.StatusBadRequest) - return - } - v := r.URL.Query() envIdsString := v.Get("envIds") envIds := make([]int, 0) @@ -207,16 +200,15 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r } // RBAC enforcer applying - object := impl.enforcerUtil.GetAppRBACName(app.AppName) + object := impl.enforcerUtil.GetAppRBACNameByAppId(appId) impl.Logger.Debugw("rbac object for other environment list", "object", object) ok := impl.enforcerUtil.CheckAppRbacForAppOrJob(token, object, casbin.ActionGet) if !ok { common.WriteJsonResp(w, err, "unauthorized user", http.StatusForbidden) return } - // RBAC enforcer Ends - workflows := make(map[string]interface{}) - workflowsList, err := impl.appWorkflowService.FindAppWorkflows(appId) + //RBAC enforcer Ends + workflowsListResp, appType, err := impl.appWorkflowService.FindAppWorkflowsListResolvedResp(appId) if err != nil { impl.Logger.Errorw("error in fetching workflows for app", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) @@ -231,7 +223,7 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r return } triggerViewPayload := &bean2.TriggerViewWorkflowConfig{ - Workflows: workflowsList, + Workflows: workflowsListResp.Workflows, CdPipelines: cdPipelineWfData, } queryParam := bean2.NewWorkflowsFilterQuery().WithEnvIds(envIds) @@ -242,12 +234,10 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) return } - workflowsList = response.Workflows + workflowsListResp.Workflows = response.Workflows } - workflows["appId"] = app.Id - workflows["appName"] = app.AppName - if len(workflowsList) > 0 && app.AppType == helper.Job { + if len(workflowsListResp.Workflows) > 0 && appType == helper.Job { // RBAC var workflowNames []string @@ -256,7 +246,7 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r var rbacObjects []string workNameObjectMap := make(map[string]bean2.AppWorkflowDto) - for _, workflow := range workflowsList { + for _, workflow := range workflowsListResp.Workflows { workflowNames = append(workflowNames, workflow.Name) workflowIds = append(workflowIds, workflow.Id) } @@ -264,7 +254,7 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r itr := 0 for _, val := range workflowIdToObjectMap { rbacObjects = append(rbacObjects, val) - workNameObjectMap[val] = workflowsList[itr] + workNameObjectMap[val] = workflowsListResp.Workflows[itr] itr++ } @@ -277,20 +267,8 @@ func (impl AppWorkflowRestHandlerImpl) FindAppWorkflow(w http.ResponseWriter, r if len(updatedWorkflowList) == 0 { updatedWorkflowList = []bean2.AppWorkflowDto{} } - workflows[bean3.Workflows] = updatedWorkflowList - } else if len(workflowsList) > 0 { - workflows[bean3.Workflows] = workflowsList - } else { - workflows[bean3.Workflows] = []bean2.AppWorkflowDto{} - } - isAppLevelGitOpsConfigured, err := impl.chartService.IsGitOpsRepoConfiguredForDevtronApp(appId) - if err != nil && !util.IsErrNoRows(err) { - impl.Logger.Errorw("service err, IsGitOpsRepoConfiguredForDevtronApp", "appId", appId, "envIds", envIds, "err", err) - common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) - return } - workflows["isGitOpsRepoNotConfigured"] = !isAppLevelGitOpsConfigured - common.WriteJsonResp(w, nil, workflows, http.StatusOK) + common.WriteJsonResp(w, nil, workflowsListResp, http.StatusOK) } func (impl AppWorkflowRestHandlerImpl) FindAllWorkflows(w http.ResponseWriter, r *http.Request) { diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index af6fd63925..118ab2e31e 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -11,7 +11,7 @@ keywords: - argocd - Hyperion engine: gotpl -version: 0.22.87 +version: 0.22.88 sources: - https://github.com/devtron-labs/charts dependencies: diff --git a/charts/devtron/templates/configmap-secret.yaml b/charts/devtron/templates/configmap-secret.yaml index 62f7b3d568..efe2d36e9f 100644 --- a/charts/devtron/templates/configmap-secret.yaml +++ b/charts/devtron/templates/configmap-secret.yaml @@ -29,9 +29,13 @@ metadata: data: {{- if $.Values.configs }} {{ toYaml $.Values.configs | indent 2 }} +{{- end }} +{{- if $.Values.devtronEnterprise.enabled }} + DEVTRON_INSTALLATION_TYPE: "enterprise" {{- end }} INSTALLATION_THROUGH_HELM: "True" DEVTRON_HELM_RELEASE_NAME: {{ $.Release.Name }} + DEVTRON_HELM_RELEASE_NAMESPACE: {{ $.Release.Namespace }} {{- if and ($.Values.minio.enabled) (not $.Values.configs.BLOB_STORAGE_PROVIDER) }} BLOB_STORAGE_PROVIDER: "S3" BLOB_STORAGE_S3_ENDPOINT: "http://devtron-minio.devtroncd:9000" @@ -302,7 +306,8 @@ metadata: data: {{- if $.Values.global.configs }} {{- toYaml $.Values.global.configs | nindent 2 }} -{{- end }} +{{- end }} +{{- if not $.Values.devtronEnterprise.enabled }} --- apiVersion: v1 kind: ConfigMap @@ -317,7 +322,7 @@ data: {{- if $.Values.global.configs }} {{- toYaml $.Values.global.configs | nindent 2 }} {{- end }} - +{{- end }} {{- if $.Values.imagePullSecret }} {{- if $.Values.imagePullSecret.create }} --- @@ -356,7 +361,7 @@ metadata: type: kubernetes.io/dockerconfigjson data: .dockerconfigjson: {{ include "imagePullSecret" . }} - +{{- if not $.Values.devtronEnterprise.enabled }} --- apiVersion: v1 kind: Secret @@ -371,3 +376,4 @@ data: {{- end }} {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/devtron/templates/dashboard.yaml b/charts/devtron/templates/dashboard.yaml index c2c9961fb9..be35e89487 100644 --- a/charts/devtron/templates/dashboard.yaml +++ b/charts/devtron/templates/dashboard.yaml @@ -18,6 +18,9 @@ metadata: annotations: "helm.sh/resource-policy": keep data: +{{- if $.Values.devtronEnterprise.enabled }} + GATEKEEPER_URL: "https://license.devtron.ai/dashboard" +{{- end }} {{- if .config }} GA_ENABLED: {{ .config.analytics | default "false" | quote }} HOTJAR_ENABLED: {{ .config.hotjar | default "false" | quote }} diff --git a/charts/devtron/templates/devtron-installer.yaml b/charts/devtron/templates/devtron-installer.yaml index 89795b115a..9b28bc8914 100644 --- a/charts/devtron/templates/devtron-installer.yaml +++ b/charts/devtron/templates/devtron-installer.yaml @@ -8,11 +8,15 @@ metadata: name: installer-devtron namespace: devtroncd spec: + {{- if $.Values.devtronEnterprise.enabled }} + url: https://raw.githubusercontent.com/{{ $.Values.installer.repo }}/refs/tags/devtron-enterprise-{{ $.Values.installer.release }}/charts/devtron-enterprise/installation-script + {{- else }} {{- if or (eq $.Values.installer.source "gitee") (eq $.Values.installer.source "Gitee")}} url: https://gitee.com/{{ $.Values.installer.repo }}/raw/{{ $.Values.installer.release }}/manifests/installation-script {{- else }} url: https://raw.githubusercontent.com/{{ $.Values.installer.repo }}/{{ $.Values.installer.release }}/manifests/installation-script {{- end }} + {{- end }} reSync: true {{- end }} {{- end }} diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index 05d328545e..3cfa96570e 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -14,7 +14,9 @@ data: DEVTRON_HELM_RELEASE_NAMESPACE: {{ $.Release.Namespace }} FEATURE_MIGRATE_ARGOCD_APPLICATION_ENABLE: "true" PG_USER: postgres + {{- if not $.Values.devtronEnterprise.enabled }} PG_ADDR: postgresql-postgresql.devtroncd + {{- end }} PG_PORT: "5432" HELM_CLIENT_URL: kubelink-service:50051 DASHBOARD_PORT: "80" @@ -28,6 +30,11 @@ data: {{- end }} {{- if $.Values.devtronEnterprise.enabled }} CASBIN_CLIENT_URL: casbin-service.devtroncd:9000 + CD_WORKFLOW_EXECUTOR_TYPE: SYSTEM + CI_WORKFLOW_EXECUTOR_TYPE: SYSTEM + DEVTRON_INSTALLATION_TYPE: enterprise + DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES: "devtron.installer.release" + DEVTRON_BOM_URL: https://raw.githubusercontent.com/devtron-labs/charts/refs/tags/devtron-enterprise-%s/charts/devtron-enterprise/devtron-bom.yaml {{- end }} {{- if $.Values.installer.modules }} {{- if has "cicd" $.Values.installer.modules }} @@ -324,4 +331,4 @@ spec: matchLabels: app: devtron {{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/devtron/templates/install.yaml b/charts/devtron/templates/install.yaml index eee44da372..6ce7b3b975 100644 --- a/charts/devtron/templates/install.yaml +++ b/charts/devtron/templates/install.yaml @@ -101,6 +101,8 @@ spec: envFrom: - configMapRef: name: devtron-common-cm + - configMapRef: + name: devtron-operator-cm {{- if $.Values.installer.resources }} resources: {{- toYaml $.Values.installer.resources | nindent 12 }} diff --git a/charts/devtron/templates/migrator.yaml b/charts/devtron/templates/migrator.yaml index 3aec175a2f..e3af542602 100644 --- a/charts/devtron/templates/migrator.yaml +++ b/charts/devtron/templates/migrator.yaml @@ -320,10 +320,10 @@ apiVersion: batch/v1beta1 kind: Job metadata: namespace: devtroncd - name: postgresql-migrate-enterprise + name: postgresql-migrate-enterprise-{{ randAlphaNum 5 | lower }} spec: activeDeadlineSeconds: 1500 - ttlSecondsAfterFinished: 600 + ttlSecondsAfterFinished: 1000 backoffLimit: 20 completions: 1 parallelism: 1 diff --git a/charts/devtron/templates/workflow.yaml b/charts/devtron/templates/workflow.yaml index 38a299546e..1c63a85473 100644 --- a/charts/devtron/templates/workflow.yaml +++ b/charts/devtron/templates/workflow.yaml @@ -1,3 +1,4 @@ +{{- if not $.Values.devtronEnterprise.enabled }} apiVersion: v1 kind: Namespace metadata: @@ -7,6 +8,7 @@ metadata: annotations: "helm.sh/hook": pre-install "helm.sh/resource-policy": keep +{{- end }} --- apiVersion: v1 kind: Namespace @@ -62,6 +64,7 @@ metadata: release: devtron {{- if $.Values.installer.modules }} {{- if has "cicd" $.Values.installer.modules }} +{{- if not $.Values.devtronEnterprise.enabled }} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -951,6 +954,7 @@ kind: ServiceAccount metadata: name: argo namespace: argo +{{- end }} --- apiVersion: v1 kind: ServiceAccount @@ -981,6 +985,7 @@ imagePullSecrets: imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | indent 2 }} {{- end }} +{{- if not $.Values.devtronEnterprise.enabled }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -1184,12 +1189,28 @@ rules: - create - get - delete +{{- end }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: workflow-cluster-role rules: +- apiGroups: + - '*' + resources: + - deployments + - pods + - pods/exec + verbs: + - watch + - patch + - delete + - create + - list + - get + - update + - exec - apiGroups: - "" resources: @@ -1236,6 +1257,7 @@ subjects: - kind: ServiceAccount name: devtron namespace: devtroncd +{{- if not $.Values.devtronEnterprise.enabled }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -1332,3 +1354,4 @@ spec: serviceAccountName: argo {{- end }} {{- end }} +{{- end }} diff --git a/client/argocdServer/ArgoClientWrapperService.go b/client/argocdServer/ArgoClientWrapperService.go index 4b028eede5..4e3b634a13 100644 --- a/client/argocdServer/ArgoClientWrapperService.go +++ b/client/argocdServer/ArgoClientWrapperService.go @@ -348,7 +348,7 @@ func (impl *ArgoClientWrapperServiceImpl) RegisterGitOpsRepoInArgoWithRetry(ctx return nil } - callback := func() error { + callback := func(int) error { return impl.createRepoInArgoCd(ctx, grpcConfig, gitOpsRepoUrl) } argoCdErr := retryFunc.Retry(callback, diff --git a/client/gitSensor/GitSensorGrpcClient.go b/client/gitSensor/GitSensorGrpcClient.go index b1f7190d9e..0988b47abf 100644 --- a/client/gitSensor/GitSensorGrpcClient.go +++ b/client/gitSensor/GitSensorGrpcClient.go @@ -160,6 +160,7 @@ func (client *GrpcApiClientImpl) AddRepo(ctx context.Context, materials []*GitMa Deleted: item.Deleted, FilterPattern: item.FilterPattern, CloningMode: item.CloningMode, + CreateBackup: item.CreateBackup, }) } } @@ -191,6 +192,7 @@ func (client *GrpcApiClientImpl) UpdateRepo(ctx context.Context, material *GitMa Deleted: material.Deleted, FilterPattern: material.FilterPattern, CloningMode: material.CloningMode, + CreateBackup: material.CreateBackup, } _, err = serviceClient.UpdateRepo(ctx, mappedMaterial) diff --git a/client/gitSensor/GitSensorRestClient.go b/client/gitSensor/GitSensorRestClient.go index f648e1d78a..1c12f43efa 100644 --- a/client/gitSensor/GitSensorRestClient.go +++ b/client/gitSensor/GitSensorRestClient.go @@ -88,6 +88,7 @@ type GitMaterial struct { FetchSubmodules bool FilterPattern []string CloningMode string + CreateBackup bool } type GitProvider struct { Id int diff --git a/client/telemetry/TelemetryEventClient.go b/client/telemetry/TelemetryEventClient.go index 4d60e778c9..f32382a06b 100644 --- a/client/telemetry/TelemetryEventClient.go +++ b/client/telemetry/TelemetryEventClient.go @@ -78,6 +78,7 @@ type TelemetryEventClientImpl struct { userAttributesRepository repository.UserAttributesRepository cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService telemetryConfig TelemetryConfig + globalEnvVariables *util.GlobalEnvVariables } type TelemetryEventClient interface { @@ -96,7 +97,8 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client, serverDataStore *serverDataStore.ServerDataStore, userAuditService user2.UserAuditService, helmAppClient gRPC.HelmAppClient, cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService, cronLogger *cron3.CronLoggerImpl, - installedAppReadService installedAppReader.InstalledAppReadServiceEA) (*TelemetryEventClientImpl, error) { + installedAppReadService installedAppReader.InstalledAppReadServiceEA, + envVariables *util.EnvironmentVariables) (*TelemetryEventClientImpl, error) { cron := cron.New( cron.WithChain(cron.Recover(cronLogger))) cron.Start() @@ -118,6 +120,7 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client, installedAppReadService: installedAppReadService, cloudProviderIdentifierService: cloudProviderIdentifierService, telemetryConfig: TelemetryConfig{}, + globalEnvVariables: envVariables.GlobalEnvVariables, } watcher.HeartbeatEventForTelemetry() @@ -423,7 +426,7 @@ func (impl *TelemetryEventClientImpl) EnqueueGenericPostHogEvent(ucid string, ev impl.PosthogClient.Client = client } } - if impl.PosthogClient.Client != nil { + if impl.PosthogClient.Client != nil && !impl.globalEnvVariables.IsAirGapEnvironment { err := impl.PosthogClient.Client.Enqueue(posthog.Capture{ DistinctId: ucid, Event: eventType, diff --git a/cmd/external-app/wire.go b/cmd/external-app/wire.go index 15b1aeae72..4d05bdbbda 100644 --- a/cmd/external-app/wire.go +++ b/cmd/external-app/wire.go @@ -97,7 +97,6 @@ import ( func InitializeApp() (*App, error) { wire.Build( user.SelfRegistrationWireSet, - sql.PgSqlWireSet, user.UserWireSet, sso.SsoConfigWireSet, diff --git a/cmd/external-app/wire_gen.go b/cmd/external-app/wire_gen.go index e827637c0a..b0a26de083 100644 --- a/cmd/external-app/wire_gen.go +++ b/cmd/external-app/wire_gen.go @@ -1,6 +1,6 @@ // Code generated by Wire. DO NOT EDIT. -//go:generate go run -mod=mod github.com/google/wire/cmd/wire +//go:generate go run github.com/google/wire/cmd/wire //go:build !wireinject // +build !wireinject @@ -389,7 +389,7 @@ func InitializeApp() (*App, error) { return nil, err } providerIdentifierServiceImpl := providerIdentifier.NewProviderIdentifierServiceImpl(sugaredLogger) - telemetryEventClientImpl, err := telemetry.NewTelemetryEventClientImpl(sugaredLogger, httpClient, clusterServiceImpl, k8sServiceImpl, acdAuthConfig, userServiceImpl, attributesRepositoryImpl, ssoLoginServiceImpl, posthogClient, moduleRepositoryImpl, serverDataStoreServerDataStore, userAuditServiceImpl, helmAppClientImpl, providerIdentifierServiceImpl, cronLoggerImpl, installedAppReadServiceEAImpl) + telemetryEventClientImpl, err := telemetry.NewTelemetryEventClientImpl(sugaredLogger, httpClient, clusterServiceImpl, k8sServiceImpl, acdAuthConfig, userServiceImpl, attributesRepositoryImpl, ssoLoginServiceImpl, posthogClient, moduleRepositoryImpl, serverDataStoreServerDataStore, userAuditServiceImpl, helmAppClientImpl, providerIdentifierServiceImpl, cronLoggerImpl, installedAppReadServiceEAImpl, environmentVariables) if err != nil { return nil, err } @@ -425,7 +425,7 @@ func InitializeApp() (*App, error) { } scanToolMetadataRepositoryImpl := repository11.NewScanToolMetadataRepositoryImpl(db, sugaredLogger) scanToolMetadataServiceImpl := scanTool.NewScanToolMetadataServiceImpl(sugaredLogger, scanToolMetadataRepositoryImpl) - moduleServiceImpl := module.NewModuleServiceImpl(sugaredLogger, serverEnvConfigServerEnvConfig, moduleRepositoryImpl, moduleActionAuditLogRepositoryImpl, helmAppServiceImpl, serverDataStoreServerDataStore, serverCacheServiceImpl, moduleCacheServiceImpl, moduleCronServiceImpl, moduleServiceHelperImpl, moduleResourceStatusRepositoryImpl, scanToolMetadataServiceImpl) + moduleServiceImpl := module.NewModuleServiceImpl(sugaredLogger, serverEnvConfigServerEnvConfig, moduleRepositoryImpl, moduleActionAuditLogRepositoryImpl, helmAppServiceImpl, serverDataStoreServerDataStore, serverCacheServiceImpl, moduleCacheServiceImpl, moduleCronServiceImpl, moduleServiceHelperImpl, moduleResourceStatusRepositoryImpl, scanToolMetadataServiceImpl, environmentVariables, moduleEnvConfig) moduleRestHandlerImpl := module2.NewModuleRestHandlerImpl(sugaredLogger, moduleServiceImpl, userServiceImpl, enforcerImpl, validate) moduleRouterImpl := module2.NewModuleRouterImpl(moduleRestHandlerImpl) serverActionAuditLogRepositoryImpl := server.NewServerActionAuditLogRepositoryImpl(db) diff --git a/env_gen.json b/env_gen.json index fae546c5dc..b4b889fc79 100644 --- a/env_gen.json +++ b/env_gen.json @@ -1 +1 @@ -[{"Category":"CD","Fields":[{"Env":"ARGO_APP_MANUAL_SYNC_TIME","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_HELM_PIPELINE_STATUS_CRON_TIME","EnvType":"string","EnvValue":"*/2 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PIPELINE_STATUS_CRON_TIME","EnvType":"string","EnvValue":"*/2 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PIPELINE_STATUS_TIMEOUT_DURATION","EnvType":"string","EnvValue":"20","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEPLOY_STATUS_CRON_GET_PIPELINE_DEPLOYED_WITHIN_HOURS","EnvType":"int","EnvValue":"12","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_CHART_ARGO_CD_INSTALL_REQUEST_TIMEOUT","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_CHART_INSTALL_REQUEST_TIMEOUT","EnvType":"int","EnvValue":"6","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXPOSE_CD_METRICS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_MIGRATE_ARGOCD_APPLICATION_ENABLE","EnvType":"bool","EnvValue":"false","EnvDescription":"enable migration of external argocd application to devtron pipeline","Example":"","Deprecated":"false"},{"Env":"HELM_PIPELINE_STATUS_CHECK_ELIGIBLE_TIME","EnvType":"string","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IS_INTERNAL_USE","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MIGRATE_DEPLOYMENT_CONFIG_DATA","EnvType":"bool","EnvValue":"false","EnvDescription":"migrate deployment config data from charts table to deployment_config table","Example":"","Deprecated":"false"},{"Env":"PIPELINE_DEGRADED_TIME","EnvType":"string","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_DEVTRON_APP","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_EXTERNAL_HELM_APP","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_HELM_APP","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_LINKED_HELM_APP","EnvType":"int","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RUN_HELM_INSTALL_IN_ASYNC_MODE_HELM_APPS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SHOULD_CHECK_NAMESPACE_ON_CLONE","EnvType":"bool","EnvValue":"false","EnvDescription":"should we check if namespace exists or not while cloning app","Example":"","Deprecated":"false"},{"Env":"USE_DEPLOYMENT_CONFIG_DATA","EnvType":"bool","EnvValue":"false","EnvDescription":"use deployment config data from deployment_config table","Example":"","Deprecated":"true"}]},{"Category":"CI_RUNNER","Fields":[{"Env":"AZURE_ACCOUNT_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_ACCOUNT_NAME","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_BLOB_CONTAINER_CI_CACHE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_BLOB_CONTAINER_CI_LOG","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_GATEWAY_CONNECTION_INSECURE","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_GATEWAY_URL","EnvType":"string","EnvValue":"http://devtron-minio.devtroncd:9000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BASE_LOG_LOCATION_PATH","EnvType":"string","EnvValue":"/home/devtron/","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_GCP_CREDENTIALS_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_PROVIDER","EnvType":"","EnvValue":"S3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ACCESS_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_BUCKET_VERSIONED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ENDPOINT","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ENDPOINT_INSECURE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_SECRET_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_CACHE_PATH","EnvType":"string","EnvValue":"/var/lib/devtron/buildx","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_K8S_DRIVER_OPTIONS","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_PROVENANCE_MODE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILD_LOG_TTL_VALUE_IN_SECS","EnvType":"int","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CACHE_LIMIT","EnvType":"int64","EnvValue":"5000000000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_DEFAULT_ADDRESS_POOL_BASE_CIDR","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_DEFAULT_ADDRESS_POOL_SIZE","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_LIMIT_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_LIMIT_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"dedicated","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_REQ_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_REQ_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_WORKFLOW_EXECUTOR_TYPE","EnvType":"","EnvValue":"AWF","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_WORKFLOW_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"cd-runner","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_DEFAULT_ADDRESS_POOL_BASE_CIDR","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_DEFAULT_ADDRESS_POOL_SIZE","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_IGNORE_DOCKER_CACHE","EnvType":"bool","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_LOGS_KEY_PREFIX","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_RUNNER_DOCKER_MTU_VALUE","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_SUCCESS_AUTO_TRIGGER_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_VOLUME_MOUNTS_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_WORKFLOW_EXECUTOR_TYPE","EnvType":"","EnvValue":"AWF","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_ARTIFACT_KEY_LOCATION","EnvType":"string","EnvValue":"arsenal-v1/ci-artifacts","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_BUILD_LOGS_BUCKET","EnvType":"string","EnvValue":"devtron-pro-ci-logs","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_BUILD_LOGS_KEY_PREFIX","EnvType":"string","EnvValue":"arsenal-v1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CACHE_BUCKET","EnvType":"string","EnvValue":"ci-caching","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CACHE_BUCKET_REGION","EnvType":"string","EnvValue":"us-east-2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_ARTIFACT_KEY_LOCATION","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_LOGS_BUCKET_REGION","EnvType":"string","EnvValue":"us-east-2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_NAMESPACE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_TIMEOUT","EnvType":"int64","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CI_IMAGE","EnvType":"string","EnvValue":"686244538589.dkr.ecr.us-east-2.amazonaws.com/cirunner:47","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"devtron-ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_TARGET_PLATFORM","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DOCKER_BUILD_CACHE_PATH","EnvType":"string","EnvValue":"/var/lib/docker","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_BUILD_CONTEXT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_WORKFLOW_EXECUTION_STAGE","EnvType":"bool","EnvValue":"true","EnvDescription":"if enabled then we will display build stages separately for CI/Job/Pre-Post CD","Example":"true","Deprecated":"false"},{"Env":"EXTERNAL_BLOB_STORAGE_CM_NAME","EnvType":"string","EnvValue":"blob-storage-cm","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_BLOB_STORAGE_SECRET_NAME","EnvType":"string","EnvValue":"blob-storage-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"dedicated","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_API_SECRET","EnvType":"string","EnvValue":"devtroncd-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_PAYLOAD","EnvType":"string","EnvValue":"{\"ciProjectDetails\":[{\"gitRepository\":\"https://github.com/vikram1601/getting-started-nodejs.git\",\"checkoutPath\":\"./abc\",\"commitHash\":\"239077135f8cdeeccb7857e2851348f558cb53d3\",\"commitTime\":\"2022-10-30T20:00:00\",\"branch\":\"master\",\"message\":\"Update README.md\",\"author\":\"User Name \"}],\"dockerImage\":\"445808685819.dkr.ecr.us-east-2.amazonaws.com/orch:23907713-2\"}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_WEB_HOOK_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IGNORE_CM_CS_IN_CI_JOB","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_RETRY_COUNT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_RETRY_INTERVAL","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCANNER_ENDPOINT","EnvType":"string","EnvValue":"http://image-scanner-new-demo-devtroncd-service.devtroncd:80","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCAN_MAX_RETRIES","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCAN_RETRY_DELAY","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IN_APP_LOGGING_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_CD_WORKFLOW_RUNNER_RETRIES","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_CI_WORKFLOW_RETRIES","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODE","EnvType":"string","EnvValue":"DEV","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_SERVER_HOST","EnvType":"string","EnvValue":"localhost:4222","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ORCH_HOST","EnvType":"string","EnvValue":"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ORCH_TOKEN","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PRE_CI_CACHE_PATH","EnvType":"string","EnvValue":"/devtroncd-cache","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SHOW_DOCKER_BUILD_ARGS","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SKIP_CI_JOB_BUILD_CACHE_PUSH_PULL","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SKIP_CREATING_ECR_REPO","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINATION_GRACE_PERIOD_SECS","EnvType":"int","EnvValue":"180","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_ARTIFACT_LISTING_QUERY_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BLOB_STORAGE_CONFIG_IN_CD_WORKFLOW","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BLOB_STORAGE_CONFIG_IN_CI_WORKFLOW","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BUILDX","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_DOCKER_API_TO_GET_DIGEST","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_EXTERNAL_NODE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WF_CONTROLLER_INSTANCE_ID","EnvType":"string","EnvValue":"devtron-runner","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WORKFLOW_CACHE_CONFIG","EnvType":"string","EnvValue":"{}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WORKFLOW_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"ci-runner","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"DEVTRON","Fields":[{"Env":"-","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_IMAGE","EnvType":"string","EnvValue":"quay.io/devtron/chart-sync:1227622d-132-3775","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_JOB_RESOURCES_OBJ","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"chart-sync","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_AUTO_SYNC_ENABLED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_GIT_COMMIT_RETRY_COUNT_ON_CONFLICT","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_GIT_COMMIT_RETRY_DELAY_ON_CONFLICT","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_REPO_REGISTER_RETRY_COUNT","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_REPO_REGISTER_RETRY_DELAY","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ASYNC_BUILDX_CACHE_EXPORT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BATCH_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_CACHE_MODE_MIN","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PORT","EnvType":"string","EnvValue":"8000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CExpirationTime","EnvType":"int","EnvValue":"600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_TRIGGER_CRON_TIME","EnvType":"int","EnvValue":"2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_WORKFLOW_STATUS_UPDATE_CRON","EnvType":"string","EnvValue":"*/5 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CLI_CMD_TIMEOUT_GLOBAL_SECONDS","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CLUSTER_STATUS_CRON_TIME","EnvType":"int","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CONSUMER_CONFIG_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_LOG_TIME_LIMIT","EnvType":"int64","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_TIMEOUT","EnvType":"float64","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_BOM_URL","EnvType":"string","EnvValue":"https://raw.githubusercontent.com/devtron-labs/devtron/%s/charts/devtron/devtron-bom.yaml","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_DEX_SECRET_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_CHART_NAME","EnvType":"string","EnvValue":"devtron-operator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_NAME","EnvType":"string","EnvValue":"devtron","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_REPO_NAME","EnvType":"string","EnvValue":"devtron","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_REPO_URL","EnvType":"string","EnvValue":"https://helm.devtron.ai","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_INSTALLATION_TYPE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_MODULES_IDENTIFIER_IN_HELM_VALUES","EnvType":"string","EnvValue":"installer.modules","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_SECRET_NAME","EnvType":"string","EnvValue":"devtron-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES","EnvType":"string","EnvValue":"installer.release","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CID","EnvType":"string","EnvValue":"example-app","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CLIENT_ID","EnvType":"string","EnvValue":"argo-cd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CSTOREKEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_JWTKEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_RURL","EnvType":"string","EnvValue":"http://127.0.0.1:8080/callback","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_SECRET","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ECR_REPO_NAME_PREFIX","EnvType":"string","EnvValue":"test/","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_ASYNC_ARGO_CD_INSTALL_DEVTRON_CHART","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_ASYNC_INSTALL_DEVTRON_CHART","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EPHEMERAL_SERVER_VERSION_REGEX","EnvType":"string","EnvValue":"v[1-9]\\.\\b(2[3-9]\\|[3-9][0-9])\\b.*","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EVENT_URL","EnvType":"string","EnvValue":"http://localhost:3000/notify","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXECUTE_WIRE_NIL_CHECKER","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXPOSE_CI_METRICS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_RESTART_WORKLOAD_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_RESTART_WORKLOAD_WORKER_POOL_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FORCE_SECURITY_SCANNING","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GITOPS_REPO_PREFIX","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GO_RUNTIME_ENV","EnvType":"string","EnvValue":"production","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_ORG_ID","EnvType":"int","EnvValue":"2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_PASSWORD","EnvType":"string","EnvValue":"prom-operator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_PORT","EnvType":"string","EnvValue":"8090","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_USERNAME","EnvType":"string","EnvValue":"admin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"HIDE_IMAGE_TAGGING_HARD_DELETE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IGNORE_AUTOCOMPLETE_AUTH_CHECK","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_GROUP_NAME","EnvType":"string","EnvValue":"installer.devtron.ai","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_RESOURCE","EnvType":"string","EnvValue":"installers","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_VERSION","EnvType":"string","EnvValue":"v1alpha1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"JwtExpirationTime","EnvType":"int","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_CLIENT_MAX_IDLE_CONNS_PER_HOST","EnvType":"int","EnvValue":"25","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_IDLE_CONN_TIMEOUT","EnvType":"int","EnvValue":"300","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_KEEPALIVE","EnvType":"int","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_TIMEOUT","EnvType":"int","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TLS_HANDSHAKE_TIMEOUT","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"KUBELINK_GRPC_MAX_RECEIVE_MSG_SIZE","EnvType":"int","EnvValue":"20","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"KUBELINK_GRPC_MAX_SEND_MSG_SIZE","EnvType":"int","EnvValue":"4","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LENS_TIMEOUT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LENS_URL","EnvType":"string","EnvValue":"http://lens-milandevtron-service:80","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LIMIT_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LIMIT_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LOGGER_DEV_MODE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LOG_LEVEL","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_SESSION_PER_USER","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODULE_METADATA_API_URL","EnvType":"string","EnvValue":"https://api.devtron.ai/module?name=%s","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODULE_STATUS_HANDLING_CRON_DURATION_MIN","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_ACK_WAIT_IN_SECS","EnvType":"int","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_BUFFER_SIZE","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_MAX_AGE","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_PROCESSING_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_REPLICAS","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NOTIFICATION_MEDIUM","EnvType":"NotificationMedium","EnvValue":"rest","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"OTEL_COLLECTOR_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PARALLELISM_LIMIT_FOR_TAG_PROCESSING","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_EXPORT_PROM_METRICS","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_ALL_FAILURE_QUERIES","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_ALL_QUERY","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_SLOW_QUERY","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_QUERY_DUR_THRESHOLD","EnvType":"int64","EnvValue":"5000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PLUGIN_NAME","EnvType":"string","EnvValue":"Pull images from container repository","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PROPAGATE_EXTRA_LABELS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PROXY_SERVICE_CONFIG","EnvType":"string","EnvValue":"{}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REQ_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REQ_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESTRICT_TERMINAL_ACCESS_FOR_NON_SUPER_USER","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RUNTIME_CONFIG_LOCAL_DEV","EnvType":"LocalDevMode","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_FORMAT","EnvType":"string","EnvValue":"@{{%s}}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_HANDLE_PRIMITIVES","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_NAME_REGEX","EnvType":"string","EnvValue":"^[a-zA-Z][a-zA-Z0-9_-]{0,62}[a-zA-Z0-9]$","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SOCKET_DISCONNECT_DELAY_SECONDS","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SOCKET_HEARTBEAT_SECONDS","EnvType":"int","EnvValue":"25","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"STREAM_CONFIG_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SYSTEM_VAR_PREFIX","EnvType":"string","EnvValue":"DEVTRON_","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"default","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_INACTIVE_DURATION_IN_MINS","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_STATUS_SYNC_In_SECS","EnvType":"int","EnvValue":"600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_APP","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_ADDR","EnvType":"string","EnvValue":"127.0.0.1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_DATABASE","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_LOG_QUERY","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_PASSWORD","EnvType":"string","EnvValue":"postgrespw","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_PORT","EnvType":"string","EnvValue":"55000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_USER","EnvType":"string","EnvValue":"postgres","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TIMEOUT_FOR_FAILED_CI_BUILD","EnvType":"string","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TIMEOUT_IN_SECONDS","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USER_SESSION_DURATION_SECONDS","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_ARTIFACT_LISTING_API_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_CUSTOM_HTTP_TRANSPORT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_GIT_CLI","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_RBAC_CREATION_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"VARIABLE_CACHE_ENABLED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"VARIABLE_EXPRESSION_REGEX","EnvType":"string","EnvValue":"@{{([^}]+)}}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WEBHOOK_TOKEN","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"GITOPS","Fields":[{"Env":"ACD_CM","EnvType":"string","EnvValue":"argocd-cm","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_PASSWORD","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_USERNAME","EnvType":"string","EnvValue":"admin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GITOPS_SECRET_NAME","EnvType":"string","EnvValue":"devtron-gitops-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESOURCE_LIST_FOR_REPLICAS","EnvType":"string","EnvValue":"Deployment,Rollout,StatefulSet,ReplicaSet","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESOURCE_LIST_FOR_REPLICAS_BATCH_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"INFRA_SETUP","Fields":[{"Env":"DASHBOARD_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DASHBOARD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DASHBOARD_PORT","EnvType":"string","EnvValue":"3000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_HOST","EnvType":"string","EnvValue":"http://localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_PORT","EnvType":"string","EnvValue":"5556","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_PROTOCOL","EnvType":"string","EnvValue":"REST","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_TIMEOUT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_URL","EnvType":"string","EnvValue":"127.0.0.1:7070","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"HELM_CLIENT_URL","EnvType":"string","EnvValue":"127.0.0.1:50051","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"POSTGRES","Fields":[{"Env":"APP","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"Application name","Example":"","Deprecated":"false"},{"Env":"CASBIN_DATABASE","EnvType":"string","EnvValue":"casbin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_ADDR","EnvType":"string","EnvValue":"127.0.0.1","EnvDescription":"address of postgres service","Example":"postgresql-postgresql.devtroncd","Deprecated":"false"},{"Env":"PG_DATABASE","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"postgres database to be made connection with","Example":"orchestrator, casbin, git_sensor, lens","Deprecated":"false"},{"Env":"PG_PASSWORD","EnvType":"string","EnvValue":"{password}","EnvDescription":"password for postgres, associated with PG_USER","Example":"confidential ;)","Deprecated":"false"},{"Env":"PG_PORT","EnvType":"string","EnvValue":"5432","EnvDescription":"port of postgresql service","Example":"5432","Deprecated":"false"},{"Env":"PG_READ_TIMEOUT","EnvType":"int64","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_USER","EnvType":"string","EnvValue":"postgres","EnvDescription":"user for postgres","Example":"postgres","Deprecated":"false"},{"Env":"PG_WRITE_TIMEOUT","EnvType":"int64","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"RBAC","Fields":[{"Env":"ENFORCER_CACHE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENFORCER_CACHE_EXPIRATION_IN_SEC","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENFORCER_MAX_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_CASBIN_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"}]}] \ No newline at end of file +[{"Category":"CD","Fields":[{"Env":"ARGO_APP_MANUAL_SYNC_TIME","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_HELM_PIPELINE_STATUS_CRON_TIME","EnvType":"string","EnvValue":"*/2 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PIPELINE_STATUS_CRON_TIME","EnvType":"string","EnvValue":"*/2 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PIPELINE_STATUS_TIMEOUT_DURATION","EnvType":"string","EnvValue":"20","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEPLOY_STATUS_CRON_GET_PIPELINE_DEPLOYED_WITHIN_HOURS","EnvType":"int","EnvValue":"12","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_CHART_ARGO_CD_INSTALL_REQUEST_TIMEOUT","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_CHART_INSTALL_REQUEST_TIMEOUT","EnvType":"int","EnvValue":"6","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXPOSE_CD_METRICS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_MIGRATE_ARGOCD_APPLICATION_ENABLE","EnvType":"bool","EnvValue":"false","EnvDescription":"enable migration of external argocd application to devtron pipeline","Example":"","Deprecated":"false"},{"Env":"HELM_PIPELINE_STATUS_CHECK_ELIGIBLE_TIME","EnvType":"string","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IS_INTERNAL_USE","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MIGRATE_DEPLOYMENT_CONFIG_DATA","EnvType":"bool","EnvValue":"false","EnvDescription":"migrate deployment config data from charts table to deployment_config table","Example":"","Deprecated":"false"},{"Env":"PIPELINE_DEGRADED_TIME","EnvType":"string","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_DEVTRON_APP","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_EXTERNAL_HELM_APP","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_HELM_APP","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REVISION_HISTORY_LIMIT_LINKED_HELM_APP","EnvType":"int","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RUN_HELM_INSTALL_IN_ASYNC_MODE_HELM_APPS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SHOULD_CHECK_NAMESPACE_ON_CLONE","EnvType":"bool","EnvValue":"false","EnvDescription":"should we check if namespace exists or not while cloning app","Example":"","Deprecated":"false"},{"Env":"USE_DEPLOYMENT_CONFIG_DATA","EnvType":"bool","EnvValue":"false","EnvDescription":"use deployment config data from deployment_config table","Example":"","Deprecated":"true"}]},{"Category":"CI_RUNNER","Fields":[{"Env":"AZURE_ACCOUNT_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_ACCOUNT_NAME","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_BLOB_CONTAINER_CI_CACHE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_BLOB_CONTAINER_CI_LOG","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_GATEWAY_CONNECTION_INSECURE","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"AZURE_GATEWAY_URL","EnvType":"string","EnvValue":"http://devtron-minio.devtroncd:9000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BASE_LOG_LOCATION_PATH","EnvType":"string","EnvValue":"/home/devtron/","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_GCP_CREDENTIALS_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_PROVIDER","EnvType":"","EnvValue":"S3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ACCESS_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_BUCKET_VERSIONED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ENDPOINT","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_ENDPOINT_INSECURE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_S3_SECRET_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_CACHE_PATH","EnvType":"string","EnvValue":"/var/lib/devtron/buildx","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_K8S_DRIVER_OPTIONS","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_PROVENANCE_MODE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILD_LOG_TTL_VALUE_IN_SECS","EnvType":"int","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CACHE_LIMIT","EnvType":"int64","EnvValue":"5000000000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_DEFAULT_ADDRESS_POOL_BASE_CIDR","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_DEFAULT_ADDRESS_POOL_SIZE","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_LIMIT_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_LIMIT_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"dedicated","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_REQ_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_REQ_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_WORKFLOW_EXECUTOR_TYPE","EnvType":"","EnvValue":"AWF","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_WORKFLOW_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"cd-runner","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_DEFAULT_ADDRESS_POOL_BASE_CIDR","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_DEFAULT_ADDRESS_POOL_SIZE","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_IGNORE_DOCKER_CACHE","EnvType":"bool","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_LOGS_KEY_PREFIX","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_RUNNER_DOCKER_MTU_VALUE","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_SUCCESS_AUTO_TRIGGER_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_VOLUME_MOUNTS_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_WORKFLOW_EXECUTOR_TYPE","EnvType":"","EnvValue":"AWF","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_ARTIFACT_KEY_LOCATION","EnvType":"string","EnvValue":"arsenal-v1/ci-artifacts","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_BUILD_LOGS_BUCKET","EnvType":"string","EnvValue":"devtron-pro-ci-logs","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_BUILD_LOGS_KEY_PREFIX","EnvType":"string","EnvValue":"arsenal-v1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CACHE_BUCKET","EnvType":"string","EnvValue":"ci-caching","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CACHE_BUCKET_REGION","EnvType":"string","EnvValue":"us-east-2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_ARTIFACT_KEY_LOCATION","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_LOGS_BUCKET_REGION","EnvType":"string","EnvValue":"us-east-2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_NAMESPACE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CD_TIMEOUT","EnvType":"int64","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_CI_IMAGE","EnvType":"string","EnvValue":"686244538589.dkr.ecr.us-east-2.amazonaws.com/cirunner:47","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"devtron-ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_TARGET_PLATFORM","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DOCKER_BUILD_CACHE_PATH","EnvType":"string","EnvValue":"/var/lib/docker","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_BUILD_CONTEXT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_WORKFLOW_EXECUTION_STAGE","EnvType":"bool","EnvValue":"true","EnvDescription":"if enabled then we will display build stages separately for CI/Job/Pre-Post CD","Example":"true","Deprecated":"false"},{"Env":"EXTERNAL_BLOB_STORAGE_CM_NAME","EnvType":"string","EnvValue":"blob-storage-cm","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_BLOB_STORAGE_SECRET_NAME","EnvType":"string","EnvValue":"blob-storage-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_LABEL_SELECTOR","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_TAINTS_KEY","EnvType":"string","EnvValue":"dedicated","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CD_NODE_TAINTS_VALUE","EnvType":"string","EnvValue":"ci","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_API_SECRET","EnvType":"string","EnvValue":"devtroncd-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_PAYLOAD","EnvType":"string","EnvValue":"{\"ciProjectDetails\":[{\"gitRepository\":\"https://github.com/vikram1601/getting-started-nodejs.git\",\"checkoutPath\":\"./abc\",\"commitHash\":\"239077135f8cdeeccb7857e2851348f558cb53d3\",\"commitTime\":\"2022-10-30T20:00:00\",\"branch\":\"master\",\"message\":\"Update README.md\",\"author\":\"User Name \"}],\"dockerImage\":\"445808685819.dkr.ecr.us-east-2.amazonaws.com/orch:23907713-2\"}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXTERNAL_CI_WEB_HOOK_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IGNORE_CM_CS_IN_CI_JOB","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_RETRY_COUNT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_RETRY_INTERVAL","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCANNER_ENDPOINT","EnvType":"string","EnvValue":"http://image-scanner-new-demo-devtroncd-service.devtroncd:80","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCAN_MAX_RETRIES","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IMAGE_SCAN_RETRY_DELAY","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IN_APP_LOGGING_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_CD_WORKFLOW_RUNNER_RETRIES","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_CI_WORKFLOW_RETRIES","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODE","EnvType":"string","EnvValue":"DEV","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_SERVER_HOST","EnvType":"string","EnvValue":"localhost:4222","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ORCH_HOST","EnvType":"string","EnvValue":"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ORCH_TOKEN","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PRE_CI_CACHE_PATH","EnvType":"string","EnvValue":"/devtroncd-cache","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SHOW_DOCKER_BUILD_ARGS","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SKIP_CI_JOB_BUILD_CACHE_PUSH_PULL","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SKIP_CREATING_ECR_REPO","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINATION_GRACE_PERIOD_SECS","EnvType":"int","EnvValue":"180","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_ARTIFACT_LISTING_QUERY_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BLOB_STORAGE_CONFIG_IN_CD_WORKFLOW","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BLOB_STORAGE_CONFIG_IN_CI_WORKFLOW","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_BUILDX","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_DOCKER_API_TO_GET_DIGEST","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_EXTERNAL_NODE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WF_CONTROLLER_INSTANCE_ID","EnvType":"string","EnvValue":"devtron-runner","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WORKFLOW_CACHE_CONFIG","EnvType":"string","EnvValue":"{}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WORKFLOW_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"ci-runner","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"DEVTRON","Fields":[{"Env":"-","EnvType":"","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ADDITIONAL_NODE_GROUP_LABELS","EnvType":"","EnvValue":"","EnvDescription":"Add comma separated list of additional node group labels to default labels","Example":"karpenter.sh/nodepool,cloud.google.com/gke-nodepool","Deprecated":"false"},{"Env":"APP_SYNC_IMAGE","EnvType":"string","EnvValue":"quay.io/devtron/chart-sync:1227622d-132-3775","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_JOB_RESOURCES_OBJ","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_SERVICE_ACCOUNT","EnvType":"string","EnvValue":"chart-sync","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"APP_SYNC_SHUTDOWN_WAIT_DURATION","EnvType":"int","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_AUTO_SYNC_ENABLED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_GIT_COMMIT_RETRY_COUNT_ON_CONFLICT","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_GIT_COMMIT_RETRY_DELAY_ON_CONFLICT","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_REPO_REGISTER_RETRY_COUNT","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ARGO_REPO_REGISTER_RETRY_DELAY","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ASYNC_BUILDX_CACHE_EXPORT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BATCH_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BLOB_STORAGE_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"BUILDX_CACHE_MODE_MIN","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CD_PORT","EnvType":"string","EnvValue":"8000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CExpirationTime","EnvType":"int","EnvValue":"600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_TRIGGER_CRON_TIME","EnvType":"int","EnvValue":"2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CI_WORKFLOW_STATUS_UPDATE_CRON","EnvType":"string","EnvValue":"*/5 * * * *","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CLI_CMD_TIMEOUT_GLOBAL_SECONDS","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CLUSTER_STATUS_CRON_TIME","EnvType":"int","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"CONSUMER_CONFIG_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_LOG_TIME_LIMIT","EnvType":"int64","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEFAULT_TIMEOUT","EnvType":"float64","EnvValue":"3600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_BOM_URL","EnvType":"string","EnvValue":"https://raw.githubusercontent.com/devtron-labs/devtron/%s/charts/devtron/devtron-bom.yaml","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_DEX_SECRET_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_CHART_NAME","EnvType":"string","EnvValue":"devtron-operator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_NAME","EnvType":"string","EnvValue":"devtron","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_RELEASE_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_REPO_NAME","EnvType":"string","EnvValue":"devtron","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_HELM_REPO_URL","EnvType":"string","EnvValue":"https://helm.devtron.ai","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_INSTALLATION_TYPE","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_MODULES_IDENTIFIER_IN_HELM_VALUES","EnvType":"string","EnvValue":"installer.modules","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_SECRET_NAME","EnvType":"string","EnvValue":"devtron-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES","EnvType":"string","EnvValue":"installer.release","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CID","EnvType":"string","EnvValue":"example-app","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CLIENT_ID","EnvType":"string","EnvValue":"argo-cd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CSTOREKEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_JWTKEY","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_RURL","EnvType":"string","EnvValue":"http://127.0.0.1:8080/callback","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_SECRET","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ECR_REPO_NAME_PREFIX","EnvType":"string","EnvValue":"test/","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_ASYNC_ARGO_CD_INSTALL_DEVTRON_CHART","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENABLE_ASYNC_INSTALL_DEVTRON_CHART","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EPHEMERAL_SERVER_VERSION_REGEX","EnvType":"string","EnvValue":"v[1-9]\\.\\b(2[3-9]\\|[3-9][0-9])\\b.*","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EVENT_URL","EnvType":"string","EnvValue":"http://localhost:3000/notify","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXECUTE_WIRE_NIL_CHECKER","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"EXPOSE_CI_METRICS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_RESTART_WORKLOAD_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FEATURE_RESTART_WORKLOAD_WORKER_POOL_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"FORCE_SECURITY_SCANNING","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GITOPS_REPO_PREFIX","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GO_RUNTIME_ENV","EnvType":"string","EnvValue":"production","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_ORG_ID","EnvType":"int","EnvValue":"2","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_PASSWORD","EnvType":"string","EnvValue":"prom-operator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_PORT","EnvType":"string","EnvValue":"8090","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GRAFANA_USERNAME","EnvType":"string","EnvValue":"admin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"HIDE_IMAGE_TAGGING_HARD_DELETE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IGNORE_AUTOCOMPLETE_AUTH_CHECK","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLED_MODULES","EnvType":"","EnvValue":"","EnvDescription":"List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given","Example":"security.trivy,security.clair","Deprecated":"false"},{"Env":"INSTALLER_CRD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_GROUP_NAME","EnvType":"string","EnvValue":"installer.devtron.ai","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_RESOURCE","EnvType":"string","EnvValue":"installers","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"INSTALLER_CRD_OBJECT_VERSION","EnvType":"string","EnvValue":"v1alpha1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"IS_AIR_GAP_ENVIRONMENT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"JwtExpirationTime","EnvType":"int","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_CLIENT_MAX_IDLE_CONNS_PER_HOST","EnvType":"int","EnvValue":"25","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_IDLE_CONN_TIMEOUT","EnvType":"int","EnvValue":"300","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_KEEPALIVE","EnvType":"int","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TCP_TIMEOUT","EnvType":"int","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"K8s_TLS_HANDSHAKE_TIMEOUT","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"KUBELINK_GRPC_MAX_RECEIVE_MSG_SIZE","EnvType":"int","EnvValue":"20","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"KUBELINK_GRPC_MAX_SEND_MSG_SIZE","EnvType":"int","EnvValue":"4","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LENS_TIMEOUT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LENS_URL","EnvType":"string","EnvValue":"http://lens-milandevtron-service:80","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LIMIT_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LIMIT_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LOGGER_DEV_MODE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"LOG_LEVEL","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MAX_SESSION_PER_USER","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODULE_METADATA_API_URL","EnvType":"string","EnvValue":"https://api.devtron.ai/module?name=%s","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"MODULE_STATUS_HANDLING_CRON_DURATION_MIN","EnvType":"int","EnvValue":"3","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_ACK_WAIT_IN_SECS","EnvType":"int","EnvValue":"120","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_BUFFER_SIZE","EnvType":"int","EnvValue":"-1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_MAX_AGE","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_PROCESSING_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NATS_MSG_REPLICAS","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"NOTIFICATION_MEDIUM","EnvType":"NotificationMedium","EnvValue":"rest","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"OTEL_COLLECTOR_URL","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PARALLELISM_LIMIT_FOR_TAG_PROCESSING","EnvType":"int","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_EXPORT_PROM_METRICS","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_ALL_FAILURE_QUERIES","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_ALL_QUERY","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_LOG_SLOW_QUERY","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_QUERY_DUR_THRESHOLD","EnvType":"int64","EnvValue":"5000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PLUGIN_NAME","EnvType":"string","EnvValue":"Pull images from container repository","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PROPAGATE_EXTRA_LABELS","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PROXY_SERVICE_CONFIG","EnvType":"string","EnvValue":"{}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REQ_CI_CPU","EnvType":"string","EnvValue":"0.5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"REQ_CI_MEM","EnvType":"string","EnvValue":"3G","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESTRICT_TERMINAL_ACCESS_FOR_NON_SUPER_USER","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RUNTIME_CONFIG_LOCAL_DEV","EnvType":"LocalDevMode","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_ENABLED","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_FORMAT","EnvType":"string","EnvValue":"@{{%s}}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_HANDLE_PRIMITIVES","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SCOPED_VARIABLE_NAME_REGEX","EnvType":"string","EnvValue":"^[a-zA-Z][a-zA-Z0-9_-]{0,62}[a-zA-Z0-9]$","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SOCKET_DISCONNECT_DELAY_SECONDS","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SOCKET_HEARTBEAT_SECONDS","EnvType":"int","EnvValue":"25","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"STREAM_CONFIG_JSON","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"SYSTEM_VAR_PREFIX","EnvType":"string","EnvValue":"DEVTRON_","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"default","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_INACTIVE_DURATION_IN_MINS","EnvType":"int","EnvValue":"10","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TERMINAL_POD_STATUS_SYNC_In_SECS","EnvType":"int","EnvValue":"600","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_APP","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_ADDR","EnvType":"string","EnvValue":"127.0.0.1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_DATABASE","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_LOG_QUERY","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_PASSWORD","EnvType":"string","EnvValue":"postgrespw","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_PORT","EnvType":"string","EnvValue":"55000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TEST_PG_USER","EnvType":"string","EnvValue":"postgres","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TIMEOUT_FOR_FAILED_CI_BUILD","EnvType":"string","EnvValue":"15","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"TIMEOUT_IN_SECONDS","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USER_SESSION_DURATION_SECONDS","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_ARTIFACT_LISTING_API_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_CUSTOM_HTTP_TRANSPORT","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_GIT_CLI","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_RBAC_CREATION_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"VARIABLE_CACHE_ENABLED","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"VARIABLE_EXPRESSION_REGEX","EnvType":"string","EnvValue":"@{{([^}]+)}}","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"WEBHOOK_TOKEN","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"GITOPS","Fields":[{"Env":"ACD_CM","EnvType":"string","EnvValue":"argocd-cm","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_PASSWORD","EnvType":"string","EnvValue":"","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ACD_USERNAME","EnvType":"string","EnvValue":"admin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GITOPS_SECRET_NAME","EnvType":"string","EnvValue":"devtron-gitops-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESOURCE_LIST_FOR_REPLICAS","EnvType":"string","EnvValue":"Deployment,Rollout,StatefulSet,ReplicaSet","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RESOURCE_LIST_FOR_REPLICAS_BATCH_SIZE","EnvType":"int","EnvValue":"5","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"INFRA_SETUP","Fields":[{"Env":"DASHBOARD_HOST","EnvType":"string","EnvValue":"localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DASHBOARD_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DASHBOARD_PORT","EnvType":"string","EnvValue":"3000","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_HOST","EnvType":"string","EnvValue":"http://localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_PORT","EnvType":"string","EnvValue":"5556","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_PROTOCOL","EnvType":"string","EnvValue":"REST","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_TIMEOUT","EnvType":"int","EnvValue":"0","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"GIT_SENSOR_URL","EnvType":"string","EnvValue":"127.0.0.1:7070","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"HELM_CLIENT_URL","EnvType":"string","EnvValue":"127.0.0.1:50051","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"POSTGRES","Fields":[{"Env":"APP","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"Application name","Example":"","Deprecated":"false"},{"Env":"CASBIN_DATABASE","EnvType":"string","EnvValue":"casbin","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_ADDR","EnvType":"string","EnvValue":"127.0.0.1","EnvDescription":"address of postgres service","Example":"postgresql-postgresql.devtroncd","Deprecated":"false"},{"Env":"PG_DATABASE","EnvType":"string","EnvValue":"orchestrator","EnvDescription":"postgres database to be made connection with","Example":"orchestrator, casbin, git_sensor, lens","Deprecated":"false"},{"Env":"PG_PASSWORD","EnvType":"string","EnvValue":"{password}","EnvDescription":"password for postgres, associated with PG_USER","Example":"confidential ;)","Deprecated":"false"},{"Env":"PG_PORT","EnvType":"string","EnvValue":"5432","EnvDescription":"port of postgresql service","Example":"5432","Deprecated":"false"},{"Env":"PG_READ_TIMEOUT","EnvType":"int64","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"PG_USER","EnvType":"string","EnvValue":"postgres","EnvDescription":"user for postgres","Example":"postgres","Deprecated":"false"},{"Env":"PG_WRITE_TIMEOUT","EnvType":"int64","EnvValue":"30","EnvDescription":"","Example":"","Deprecated":"false"}]},{"Category":"RBAC","Fields":[{"Env":"ENFORCER_CACHE","EnvType":"bool","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENFORCER_CACHE_EXPIRATION_IN_SEC","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"ENFORCER_MAX_BATCH_SIZE","EnvType":"int","EnvValue":"1","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USE_CASBIN_V2","EnvType":"bool","EnvValue":"true","EnvDescription":"","Example":"","Deprecated":"false"}]}] \ No newline at end of file diff --git a/env_gen.md b/env_gen.md index d649f3aa76..f247bf8a1f 100644 --- a/env_gen.md +++ b/env_gen.md @@ -126,9 +126,11 @@ | Key | Type | Default Value | Description | Example | Deprecated | |-------|----------|-------------------|-------------------|-----------------------|------------------| | - | | | | | false | + | ADDITIONAL_NODE_GROUP_LABELS | | | Add comma separated list of additional node group labels to default labels | karpenter.sh/nodepool,cloud.google.com/gke-nodepool | false | | APP_SYNC_IMAGE | string |quay.io/devtron/chart-sync:1227622d-132-3775 | | | false | | APP_SYNC_JOB_RESOURCES_OBJ | string | | | | false | | APP_SYNC_SERVICE_ACCOUNT | string |chart-sync | | | false | + | APP_SYNC_SHUTDOWN_WAIT_DURATION | int |120 | | | false | | ARGO_AUTO_SYNC_ENABLED | bool |true | | | false | | ARGO_GIT_COMMIT_RETRY_COUNT_ON_CONFLICT | int |3 | | | false | | ARGO_GIT_COMMIT_RETRY_DELAY_ON_CONFLICT | int |1 | | | false | @@ -189,10 +191,12 @@ | GRAFANA_USERNAME | string |admin | | | false | | HIDE_IMAGE_TAGGING_HARD_DELETE | bool |false | | | false | | IGNORE_AUTOCOMPLETE_AUTH_CHECK | bool |false | | | false | + | INSTALLED_MODULES | | | List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given | security.trivy,security.clair | false | | INSTALLER_CRD_NAMESPACE | string |devtroncd | | | false | | INSTALLER_CRD_OBJECT_GROUP_NAME | string |installer.devtron.ai | | | false | | INSTALLER_CRD_OBJECT_RESOURCE | string |installers | | | false | | INSTALLER_CRD_OBJECT_VERSION | string |v1alpha1 | | | false | + | IS_AIR_GAP_ENVIRONMENT | bool |false | | | false | | JwtExpirationTime | int |120 | | | false | | K8s_CLIENT_MAX_IDLE_CONNS_PER_HOST | int |25 | | | false | | K8s_TCP_IDLE_CONN_TIMEOUT | int |300 | | | false | diff --git a/go.mod b/go.mod index c30a3cd547..562a4d800a 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e github.com/devtron-labs/go-bitbucket v0.9.60-beta - github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80 + github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e github.com/evanphx/json-patch v5.9.0+incompatible github.com/gammazero/workerpool v1.1.3 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 @@ -49,13 +49,13 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/hcl2 v0.0.0-20191002203319-fb75b3253c80 github.com/invopop/jsonschema v0.7.0 - github.com/juju/errors v0.0.0-20200330140219-3fe23663418f + github.com/juju/errors v1.0.0 github.com/lib/pq v1.10.9 github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5 github.com/otiai10/copy v1.0.2 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 - github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a + github.com/posthog/posthog-go v1.4.1 github.com/prometheus/client_golang v1.18.0 github.com/robfig/cron/v3 v3.0.1 github.com/satori/go.uuid v1.2.0 @@ -81,7 +81,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.33.0 - gopkg.in/go-playground/validator.v9 v9.30.0 + gopkg.in/go-playground/validator.v9 v9.31.0 gopkg.in/igm/sockjs-go.v3 v3.0.0 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.14.3 @@ -151,8 +151,8 @@ require ( github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/swag v0.22.6 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-redis/cache/v9 v9.0.0 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/go-xorm/xorm v0.7.9 // indirect @@ -187,11 +187,10 @@ require ( github.com/jonboulle/clockwork v0.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.16.7 // indirect - github.com/leodido/go-urn v1.2.0 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-ieproxy v0.0.1 // indirect @@ -238,7 +237,6 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xlab/treeprint v1.2.0 // indirect - github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel/metric v1.21.0 // indirect @@ -258,7 +256,6 @@ require ( google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -291,8 +288,8 @@ require ( replace ( github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13 - github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250313102545-75df8a5bec13 - github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250313102545-75df8a5bec13 + github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43 + github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 k8s.io/api => k8s.io/api v0.29.7 diff --git a/go.sum b/go.sum index b55b5525b2..fff2376d02 100644 --- a/go.sum +++ b/go.sum @@ -773,7 +773,6 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coreos/go-oidc/v3 v3.11.0 h1:Ia3MxdwpSw702YW0xgfmP1GVCMA9aEFWu12XUZ3/OtI= github.com/coreos/go-oidc/v3 v3.11.0/go.mod h1:gE3LgjOgFoHi9a4ce4/tJczr0Ai2/BoDhf0r5lltWI0= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -792,14 +791,14 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU= github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250313102545-75df8a5bec13 h1:lXA7TfjkWmExAEyk631Ajuo3+jduEGnufe0wmzbT+hc= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250313102545-75df8a5bec13/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250313102545-75df8a5bec13 h1:oL8v0vMVzRouQAUDx+LlhfDgy8K1PbGKV8L4yOqyvGI= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250313102545-75df8a5bec13/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43 h1:sNxDziQuDDVTch6wPI9/d6lCkIml/2RvyLK7S//Zj9c= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43 h1:yGHHNhpaGPpOlj5O+bT4hJrNxr1J3opRZCPWk84NGms= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43/go.mod h1:eJxpq4uIG1fww604WrQAlf1Gkr66b59LHaOOod6t6FA= github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU= github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y= -github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80 h1:xwbTeijNTf4/j1v+tSfwVqwLVnReas/NqEKeQHvSTys= -github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80/go.mod h1:ypUknVph8Ph4dxSlrFoouf7wLedQxHku2LQwgRrdgS4= +github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs= +github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e/go.mod h1:1TqULGlTey+VNhAu/ag7NJuUvByJemkqodsc9L5PHJk= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= @@ -925,10 +924,10 @@ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pg/pg v6.15.1+incompatible h1:vO4P9WoCi+i4qomgcBXWlKgDk4GcHAqDAOIfkEpi7B4= github.com/go-pg/pg v6.15.1+incompatible/go.mod h1:a2oXow+aFOrvwcKs3eIA0lNFmMilrxK2sOkB5NWe0vA= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-redis/cache/v9 v9.0.0 h1:0thdtFo0xJi0/WXbRVu8B066z8OvVymXTJGaXrVWnN0= github.com/go-redis/cache/v9 v9.0.0/go.mod h1:cMwi1N8ASBOufbIvk7cdXe2PbPjK/WMRL95FFHWsSgI= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= @@ -1188,34 +1187,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/juju/ansiterm v0.0.0-20160907234532-b99631de12cf/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= -github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c/go.mod h1:nD0vlnrUjcjJhqN5WuCWZyzfd5AHZAC9/ajvbSx69xA= -github.com/juju/cmd v0.0.0-20171107070456-e74f39857ca0/go.mod h1:yWJQHl73rdSX4DHVKGqkAip+huBslxRwS8m9CrOLq18= -github.com/juju/collections v0.0.0-20200605021417-0d0ec82b7271/go.mod h1:5XgO71dV1JClcOJE+4dzdn4HrI5LiyKd7PlVG6eZYhY= -github.com/juju/errors v0.0.0-20150916125642-1b5e39b83d18/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/errors v0.0.0-20200330140219-3fe23663418f h1:MCOvExGLpaSIzLYB4iQXEHP4jYVU6vmzLNQPdMVrxnM= -github.com/juju/errors v0.0.0-20200330140219-3fe23663418f/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/juju/httpprof v0.0.0-20141217160036-14bf14c30767/go.mod h1:+MaLYz4PumRkkyHYeXJ2G5g5cIW0sli2bOfpmbaMV/g= -github.com/juju/loggo v0.0.0-20170605014607-8232ab8918d9/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e h1:FdDd7bdI6cjq5vaoYlK1mfQYfF9sF2VZw8VEZMsl5t8= -github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/mgo/v2 v2.0.0-20210302023703-70d5d206e208 h1:/WiCm+Vpj87e4QWuWwPD/bNE9kDrWCLvPBHOQNcG2+A= -github.com/juju/mgo/v2 v2.0.0-20210302023703-70d5d206e208/go.mod h1:0OChplkvPTZ174D2FYZXg4IB9hbEwyHkD+zT+/eK+Fg= -github.com/juju/mutex v0.0.0-20171110020013-1fe2a4bf0a3a/go.mod h1:Y3oOzHH8CQ0Ppt0oCKJ2JFO81/EsWenH5AEqigLH+yY= -github.com/juju/retry v0.0.0-20151029024821-62c620325291/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4= -github.com/juju/retry v0.0.0-20180821225755-9058e192b216/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4= -github.com/juju/testing v0.0.0-20180402130637-44801989f0f7/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= -github.com/juju/testing v0.0.0-20190723135506-ce30eb24acd2/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= -github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098 h1:yrhek184cGp0IRyHg0uV1khLaorNg6GtDLkry4oNNjE= -github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098/go.mod h1:7lxZW0B50+xdGFkvhAb8bwAGt6IU87JB1H9w4t8MNVM= -github.com/juju/utils v0.0.0-20180424094159-2000ea4ff043/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= -github.com/juju/utils v0.0.0-20200116185830-d40c2fe10647/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= -github.com/juju/utils/v2 v2.0.0-20200923005554-4646bfea2ef1/go.mod h1:fdlDtQlzundleLLz/ggoYinEt/LmnrpNKcNTABQATNI= -github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= -github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= -github.com/juju/version v0.0.0-20191219164919-81c1be00b9a6/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= -github.com/julienschmidt/httprouter v1.1.1-0.20151013225520-77a895ad01eb/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= +github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= @@ -1254,8 +1227,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -1263,25 +1236,18 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/masterzen/azure-sdk-for-go v3.2.0-beta.0.20161014135628-ee4f0065d00c+incompatible/go.mod h1:mf8fjOu33zCqxUjuiU3I8S1lJMyEAlH+0F2+M5xl3hE= -github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= -github.com/masterzen/winrm v0.0.0-20161014151040-7a535cd943fc/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E= -github.com/masterzen/xmlpath v0.0.0-20140218185901-13f4951698ad/go.mod h1:A0zPC53iKKKcXYxr4ROjpQRQ5FgJXtelNdSmHHuq/tY= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.0.6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -1343,7 +1309,6 @@ github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADym github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -1424,8 +1389,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a h1:wm95cDvqeISA1Vs2a56hEtERmzZ3bNrRQSuDbeZr9GU= -github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a/go.mod h1:oa2sAs9tGai3VldabTV0eWejt/O4/OOD7azP8GaikqU= +github.com/posthog/posthog-go v1.4.1 h1:uNGYCKJibU5epw44Rbnr680jRWeuEZ5jXqyUO27aysw= +github.com/posthog/posthog-go v1.4.1/go.mod h1:uYC2l1Yktc8E+9FAHJ9QZG4vQf/NHJPD800Hsm7DzoM= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= @@ -1459,7 +1424,6 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= @@ -1470,7 +1434,6 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -1524,7 +1487,6 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.4 h1:cuiLzLnaMeBhRmEv00Lpk3tkYrcxpmbU81tAY4Dw0tc= github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= -github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI= github.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -1546,8 +1508,6 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c h1:3lbZUMbMiGUW/LMkfsEABsc5zNT9+b1CvsJx47JzJ8g= -github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM= github.com/yannh/kubeconform v0.5.0 h1:jWiG96hVRRj0DV1W+Et0TeXen0BuitDUfubOif1pdNw= github.com/yannh/kubeconform v0.5.0/go.mod h1:5md2J7KvQFj+sICN5Je5ckhUcgPoPISuntVJr4Hnr08= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1614,7 +1574,6 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1624,7 +1583,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1715,7 +1673,6 @@ golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1749,7 +1706,6 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -2406,35 +2362,28 @@ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGm google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v1 v1.0.0-20161222125816-442357a80af5/go.mod h1:u0ALmqvLRxLI95fkdCEWrE6mhWYZW1aMOJHp5YXLHTg= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v9 v9.30.0 h1:Wk0Z37oBmKj9/n+tPyBHZmeL19LaCoK3Qq48VwYENss= -gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= +gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M= +gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/igm/sockjs-go.v3 v3.0.0 h1:8+qYKGEfLE6KsWtVUSo7HIpakcbWneH3ib043MnS4T4= gopkg.in/igm/sockjs-go.v3 v3.0.0/go.mod h1:4aNFiKYpI9DpJHyToiHfcqxGpWqmjTK9A0FkEwjCizw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637/go.mod h1:BHsqpu/nsuzkT5BpiH1EMZPLyqSMM8JbIavyFACoFNk= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2497,8 +2446,6 @@ k8s.io/metrics v0.29.7/go.mod h1:5AiYPn1Crd25wtTh7OxHg9Rm2t9THSXJVp3Lb2k7MB8= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -launchpad.net/xmlpath v0.0.0-20130614043138-000000000004/go.mod h1:vqyExLOM3qBx7mvYRkoxjSCF945s0mbe7YynlKYXtsA= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= mellium.im/sasl v0.3.2 h1:PT6Xp7ccn9XaXAnJ03FcEjmAn7kK1x7aoXV6F+Vmrl0= diff --git a/internal/sql/repository/pipelineConfig/CiWorkflowRepository.go b/internal/sql/repository/pipelineConfig/CiWorkflowRepository.go index f472a6b06c..eca7268854 100644 --- a/internal/sql/repository/pipelineConfig/CiWorkflowRepository.go +++ b/internal/sql/repository/pipelineConfig/CiWorkflowRepository.go @@ -284,8 +284,7 @@ func (impl *CiWorkflowRepositoryImpl) UpdateArtifactUploaded(id int, isUploaded func (impl *CiWorkflowRepositoryImpl) FindLastTriggeredWorkflowByCiIds(pipelineId []int) (ciWorkflow []*CiWorkflow, err error) { err = impl.dbConnection.Model(&ciWorkflow). Column("ci_workflow.*", "CiPipeline"). - Where("ci_workflow.ci_pipeline_id in (?) ", pg.In(pipelineId)). - Order("ci_workflow.started_on Desc"). + Where("ci_workflow.id IN (select MAX(id) from ci_workflow where ci_pipeline_id IN (?) GROUP BY ci_pipeline_id)", pg.In(pipelineId)). Select() return ciWorkflow, err } diff --git a/pkg/appWorkflow/AppWorkflowService.go b/pkg/appWorkflow/AppWorkflowService.go index 5121445a79..9e669b5b21 100644 --- a/pkg/appWorkflow/AppWorkflowService.go +++ b/pkg/appWorkflow/AppWorkflowService.go @@ -19,6 +19,7 @@ package appWorkflow import ( "errors" "fmt" + "github.com/devtron-labs/devtron/internal/sql/repository/helper" bean4 "github.com/devtron-labs/devtron/pkg/appWorkflow/bean" "github.com/devtron-labs/devtron/pkg/deployment/common" util2 "github.com/devtron-labs/devtron/util" @@ -46,6 +47,7 @@ import ( type AppWorkflowService interface { CreateAppWorkflow(req bean4.AppWorkflowDto) (bean4.AppWorkflowDto, error) + FindAppWorkflowsListResolvedResp(appId int) (resp bean4.AppWorkflowListRespDto, appType helper.AppType, err error) FindAppWorkflows(appId int) ([]bean4.AppWorkflowDto, error) FindAppWorkflowById(Id int, appId int) (bean4.AppWorkflowDto, error) DeleteAppWorkflow(appWorkflowId int, userId int32) error @@ -79,6 +81,7 @@ type AppWorkflowServiceImpl struct { userAuthService user.UserAuthService chartService chart.ChartService deploymentConfigService common.DeploymentConfigService + pipelineBuilder pipeline.PipelineBuilder } func NewAppWorkflowServiceImpl(logger *zap.SugaredLogger, appWorkflowRepository appWorkflow.AppWorkflowRepository, @@ -86,6 +89,7 @@ func NewAppWorkflowServiceImpl(logger *zap.SugaredLogger, appWorkflowRepository pipelineRepository pipelineConfig.PipelineRepository, enforcerUtil rbac.EnforcerUtil, resourceGroupService resourceGroup2.ResourceGroupService, appRepository appRepository.AppRepository, userAuthService user.UserAuthService, chartService chart.ChartService, deploymentConfigService common.DeploymentConfigService, + pipelineBuilder pipeline.PipelineBuilder, ) *AppWorkflowServiceImpl { return &AppWorkflowServiceImpl{ Logger: logger, @@ -99,6 +103,7 @@ func NewAppWorkflowServiceImpl(logger *zap.SugaredLogger, appWorkflowRepository userAuthService: userAuthService, chartService: chartService, deploymentConfigService: deploymentConfigService, + pipelineBuilder: pipelineBuilder, } } @@ -153,6 +158,34 @@ func (impl AppWorkflowServiceImpl) CreateAppWorkflow(req bean4.AppWorkflowDto) ( return req, nil } +func (impl AppWorkflowServiceImpl) FindAppWorkflowsListResolvedResp(appId int) (resp bean4.AppWorkflowListRespDto, appType helper.AppType, err error) { + app, err := impl.pipelineBuilder.GetApp(appId) + if err != nil { + impl.Logger.Errorw("error, GetApp", "appId", appId, "err", err) + return resp, appType, err + } + workflowsList, err := impl.FindAppWorkflows(appId) + if err != nil { + impl.Logger.Errorw("error in fetching workflows for app", "appId", appId, "err", err) + return resp, appType, err + } + isAppLevelGitOpsConfigured, err := impl.chartService.IsGitOpsRepoConfiguredForDevtronApp(appId) + if err != nil && !util.IsErrNoRows(err) { + impl.Logger.Errorw("service err, IsGitOpsRepoConfiguredForDevtronApp", "appId", appId, "err", err) + return resp, appType, err + } + resp.AppId = app.Id + resp.AppName = app.AppName + resp.Workflows = workflowsList + resp.IsGitOpsRepoNotConfigured = !isAppLevelGitOpsConfigured + if len(workflowsList) > 0 { + resp.Workflows = workflowsList + } else { + resp.Workflows = []bean4.AppWorkflowDto{} + } + return resp, app.AppType, nil +} + func (impl AppWorkflowServiceImpl) FindAppWorkflows(appId int) ([]bean4.AppWorkflowDto, error) { appWorkflows, err := impl.appWorkflowRepository.FindByAppId(appId) if err != nil && err != pg.ErrNoRows { diff --git a/pkg/appWorkflow/bean/bean.go b/pkg/appWorkflow/bean/bean.go index 9660e50ee8..655d01c9a3 100644 --- a/pkg/appWorkflow/bean/bean.go +++ b/pkg/appWorkflow/bean/bean.go @@ -55,6 +55,13 @@ type WorkflowComponents struct { CdPipelineIds []int } +type AppWorkflowListRespDto struct { + Workflows []AppWorkflowDto `json:"workflows"` + AppId int `json:"appId"` + AppName string `json:"appName"` + IsGitOpsRepoNotConfigured bool `json:"isGitOpsRepoNotConfigured"` +} + type AppWorkflowDto struct { Id int `json:"id,omitempty"` Name string `json:"name"` diff --git a/pkg/bean/app.go b/pkg/bean/app.go index 1cc5b12d5a..96c581b5f6 100644 --- a/pkg/bean/app.go +++ b/pkg/bean/app.go @@ -92,6 +92,7 @@ type GitMaterial struct { FetchSubmodules bool `json:"fetchSubmodules"` IsUsedInCiConfig bool `json:"isUsedInCiConfig"` FilterPattern []string `json:"filterPattern"` + CreateBackup bool `json:"createBackup"` } // UpdateSanitisedGitRepoUrl will remove all trailing slashes , leading and trailing spaces from git repository url diff --git a/pkg/chart/ChartService.go b/pkg/chart/ChartService.go index 006bba7795..452f85dcfd 100644 --- a/pkg/chart/ChartService.go +++ b/pkg/chart/ChartService.go @@ -67,12 +67,15 @@ type ChartService interface { CheckIfChartRefUserUploadedByAppId(id int) (bool, error) PatchEnvOverrides(values json.RawMessage, oldChartType string, newChartType string) (json.RawMessage, error) + ChartRefAutocompleteGlobalData() (*chartRefBean.ChartRefAutocompleteResponse, error) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefBean.ChartRefAutocompleteResponse, error) ConfigureGitOpsRepoUrlForApp(appId int, repoUrl, chartLocation string, isCustomRepo bool, userId int32) (*bean2.DeploymentConfig, error) IsGitOpsRepoConfiguredForDevtronApp(appId int) (bool, error) IsGitOpsRepoAlreadyRegistered(gitOpsRepoUrl string) (bool, error) + + GetDeploymentTemplateDataByAppIdAndCharRefId(appId, chartRefId int) (map[string]interface{}, error) } type ChartServiceImpl struct { @@ -846,22 +849,45 @@ func (impl *ChartServiceImpl) IsReadyToTrigger(appId int, envId int, pipelineId } func (impl *ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefBean.ChartRefAutocompleteResponse, error) { - chartRefResponse := &chartRefBean.ChartRefAutocompleteResponse{} - var chartRefs []chartRefBean.ChartRefAutocompleteDto + chartRefResponse, err := impl.ChartRefAutocompleteGlobalData() + if err != nil { + impl.logger.Errorw("error, ChartRefAutocompleteGlobalData", "err", err) + return nil, err + } + chart, err := impl.chartRepository.FindLatestChartForAppByAppId(appId) + if err != nil && err != pg.ErrNoRows { + impl.logger.Errorw("error in fetching latest chart", "err", err) + return chartRefResponse, err + } + chartRefResponse.LatestAppChartRef = chart.ChartRefId + if envId > 0 { + envOverride, err := impl.envConfigOverrideReadService.FindLatestChartForAppByAppIdAndEnvId(appId, envId) + if err != nil && !errors.IsNotFound(err) { + impl.logger.Errorw("error in fetching latest chart", "err", err) + return chartRefResponse, err + } + if envOverride != nil && envOverride.Chart != nil { + chartRefResponse.LatestEnvChartRef = envOverride.Chart.ChartRefId + } else { + chartRefResponse.LatestEnvChartRef = chart.ChartRefId + } + } + return chartRefResponse, nil +} +func (impl *ChartServiceImpl) ChartRefAutocompleteGlobalData() (*chartRefBean.ChartRefAutocompleteResponse, error) { results, err := impl.chartRefService.GetAll() if err != nil { impl.logger.Errorw("error in fetching chart ref", "err", err) - return chartRefResponse, err + return nil, err } - resultsMetadataMap, err := impl.chartRefService.GetAllChartMetadata() if err != nil { impl.logger.Errorw("error in fetching chart metadata", "err", err) - return chartRefResponse, err + return nil, err } - chartRefResponse.ChartsMetadata = resultsMetadataMap - var LatestAppChartRef int + var latestChartRef int + chartRefs := make([]chartRefBean.ChartRefAutocompleteDto, 0, len(results)) for _, result := range results { chartRefs = append(chartRefs, chartRefBean.ChartRefAutocompleteDto{ Id: result.Id, @@ -872,32 +898,14 @@ func (impl *ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId i IsAppMetricsSupported: result.IsAppMetricsSupported, }) if result.Default == true { - LatestAppChartRef = result.Id - } - } - - chart, err := impl.chartRepository.FindLatestChartForAppByAppId(appId) - if err != nil && err != pg.ErrNoRows { - impl.logger.Errorw("error in fetching latest chart", "err", err) - return chartRefResponse, err - } - - if envId > 0 { - envOverride, err := impl.envConfigOverrideReadService.FindLatestChartForAppByAppIdAndEnvId(appId, envId) - if err != nil && !errors.IsNotFound(err) { - impl.logger.Errorw("error in fetching latest chart", "err", err) - return chartRefResponse, err - } - if envOverride != nil && envOverride.Chart != nil { - chartRefResponse.LatestEnvChartRef = envOverride.Chart.ChartRefId - } else { - chartRefResponse.LatestEnvChartRef = chart.ChartRefId + latestChartRef = result.Id } } - chartRefResponse.LatestAppChartRef = chart.ChartRefId - chartRefResponse.ChartRefs = chartRefs - chartRefResponse.LatestChartRef = LatestAppChartRef - return chartRefResponse, nil + return &chartRefBean.ChartRefAutocompleteResponse{ + ChartsMetadata: resultsMetadataMap, + ChartRefs: chartRefs, + LatestChartRef: latestChartRef, + }, nil } func (impl *ChartServiceImpl) FindPreviousChartByAppId(appId int) (chartTemplate *bean3.TemplateRequest, err error) { @@ -1117,3 +1125,72 @@ func (impl *ChartServiceImpl) IsGitOpsRepoAlreadyRegistered(gitOpsRepoUrl string impl.logger.Errorw("repository is already in use for devtron app", "repoUrl", gitOpsRepoUrl, "appId", chartModel.AppId) return true, nil } + +func (impl *ChartServiceImpl) GetDeploymentTemplateDataByAppIdAndCharRefId(appId, chartRefId int) (map[string]interface{}, error) { + appConfigResponse := make(map[string]interface{}) + appConfigResponse["globalConfig"] = nil + + err := impl.chartRefService.CheckChartExists(chartRefId) + if err != nil { + impl.logger.Errorw("refChartDir Not Found err, JsonSchemaExtractFromFile", err) + return nil, err + } + + schema, readme, err := impl.chartRefService.GetSchemaAndReadmeForTemplateByChartRefId(chartRefId) + if err != nil { + impl.logger.Errorw("err in getting schema and readme, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + } + + template, err := impl.chartReadService.FindLatestChartForAppByAppId(appId) + if err != nil && pg.ErrNoRows != err { + impl.logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + return nil, err + } + + if pg.ErrNoRows == err { + appOverride, _, err := impl.chartRefService.GetAppOverrideForDefaultTemplate(chartRefId) + if err != nil { + impl.logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + return nil, err + } + appOverride["schema"] = json.RawMessage(schema) + appOverride["readme"] = string(readme) + mapB, err := json.Marshal(appOverride) + if err != nil { + impl.logger.Errorw("marshal err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + return nil, err + } + appConfigResponse["globalConfig"] = json.RawMessage(mapB) + } else { + if template.ChartRefId != chartRefId { + templateRequested, err := impl.GetByAppIdAndChartRefId(appId, chartRefId) + if err != nil && err != pg.ErrNoRows { + impl.logger.Errorw("service err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + return nil, err + } + + if pg.ErrNoRows == err { + template.ChartRefId = chartRefId + template.Id = 0 + template.Latest = false + } else { + template.ChartRefId = templateRequested.ChartRefId + template.Id = templateRequested.Id + template.ChartRepositoryId = templateRequested.ChartRepositoryId + template.RefChartTemplate = templateRequested.RefChartTemplate + template.RefChartTemplateVersion = templateRequested.RefChartTemplateVersion + template.Latest = templateRequested.Latest + } + } + template.Schema = schema + template.Readme = string(readme) + bytes, err := json.Marshal(template) + if err != nil { + impl.logger.Errorw("marshal err, GetDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId) + return nil, err + } + appOverride := json.RawMessage(bytes) + appConfigResponse["globalConfig"] = appOverride + } + return appConfigResponse, nil +} diff --git a/pkg/chartRepo/ChartRepositoryService.go b/pkg/chartRepo/ChartRepositoryService.go index deaa4f1127..1df2c48e43 100644 --- a/pkg/chartRepo/ChartRepositoryService.go +++ b/pkg/chartRepo/ChartRepositoryService.go @@ -509,7 +509,7 @@ func (impl *ChartRepositoryServiceImpl) TriggerChartSyncManual(chartProviderConf defaultClusterConfig := defaultClusterBean.GetClusterConfig() - manualAppSyncJobByteArr := manualAppSyncJobByteArr(impl.serverEnvConfig.AppSyncImage, impl.serverEnvConfig.AppSyncJobResourcesObj, impl.serverEnvConfig.AppSyncServiceAccount, chartProviderConfig, impl.serverEnvConfig.ParallelismLimitForTagProcessing) + manualAppSyncJobByteArr := manualAppSyncJobByteArr(impl.serverEnvConfig.AppSyncImage, impl.serverEnvConfig.AppSyncJobResourcesObj, impl.serverEnvConfig.AppSyncServiceAccount, chartProviderConfig, impl.serverEnvConfig.ParallelismLimitForTagProcessing, impl.serverEnvConfig.AppSyncJobShutDownWaitDuration) err = impl.K8sUtil.DeleteAndCreateJob(manualAppSyncJobByteArr, impl.aCDAuthConfig.ACDConfigMapNamespace, defaultClusterConfig) if err != nil { impl.logger.Errorw("DeleteAndCreateJob err, TriggerChartSyncManual", "err", err) diff --git a/pkg/chartRepo/ManualAppSyncYaml.go b/pkg/chartRepo/ManualAppSyncYaml.go index 14fdac4d1a..0b4d66751e 100644 --- a/pkg/chartRepo/ManualAppSyncYaml.go +++ b/pkg/chartRepo/ManualAppSyncYaml.go @@ -23,12 +23,13 @@ import ( ) type AppSyncConfig struct { - DbConfig sql.Config - DockerImage string - AppSyncJobResourcesObj string - ChartProviderConfig *ChartProviderConfig - AppSyncServiceAccount string + DbConfig sql.Config + DockerImage string + AppSyncJobResourcesObj string + ChartProviderConfig *ChartProviderConfig + AppSyncServiceAccount string ParallelismLimitForTagProcessing int + AppSyncJobShutDownWaitDuration int } type ChartProviderConfig struct { @@ -36,15 +37,16 @@ type ChartProviderConfig struct { IsOCIRegistry bool } -func manualAppSyncJobByteArr(dockerImage string, appSyncJobResourcesObj string, appSyncServiceAccount string, chartProviderConfig *ChartProviderConfig, ParallelismLimitForTagProcessing int) []byte { +func manualAppSyncJobByteArr(dockerImage string, appSyncJobResourcesObj string, appSyncServiceAccount string, chartProviderConfig *ChartProviderConfig, ParallelismLimitForTagProcessing, AppSyncJobShutDownWaitDuration int) []byte { cfg, _ := sql.GetConfig() configValues := AppSyncConfig{ - DbConfig: sql.Config{Addr: cfg.Addr, Database: cfg.Database, User: cfg.User, Password: cfg.Password}, - DockerImage: dockerImage, - AppSyncJobResourcesObj: appSyncJobResourcesObj, - ChartProviderConfig: chartProviderConfig, - AppSyncServiceAccount: appSyncServiceAccount, + DbConfig: sql.Config{Addr: cfg.Addr, Database: cfg.Database, User: cfg.User, Password: cfg.Password}, + DockerImage: dockerImage, + AppSyncJobResourcesObj: appSyncJobResourcesObj, + ChartProviderConfig: chartProviderConfig, + AppSyncServiceAccount: appSyncServiceAccount, ParallelismLimitForTagProcessing: ParallelismLimitForTagProcessing, + AppSyncJobShutDownWaitDuration: AppSyncJobShutDownWaitDuration, } temp := template.New("manualAppSyncJobByteArr") temp, _ = temp.Parse(`{"apiVersion": "batch/v1", @@ -71,6 +73,13 @@ func manualAppSyncJobByteArr(dockerImage string, appSyncJobResourcesObj string, { "name": "chart-sync", "image": "{{.DockerImage}}", + "ports": [ + { + "containerPort": 8080, + "name": "metrics", + "protocol": "TCP" + } + ], {{if .AppSyncJobResourcesObj}} "resources": {{.AppSyncJobResourcesObj}}, {{end}} @@ -102,6 +111,10 @@ func manualAppSyncJobByteArr(dockerImage string, appSyncJobResourcesObj string, { "name": "PARALLELISM_LIMIT_FOR_TAG_PROCESSING", "value": "{{.ParallelismLimitForTagProcessing}}" + }, + { + "name": "APP_SYNC_SHUTDOWN_WAIT_DURATION", + "value": "{{.AppSyncJobShutDownWaitDuration}}" } ] } diff --git a/pkg/cluster/ClusterServiceExtended.go b/pkg/cluster/ClusterServiceExtended.go index c785121407..812cd37f91 100644 --- a/pkg/cluster/ClusterServiceExtended.go +++ b/pkg/cluster/ClusterServiceExtended.go @@ -266,8 +266,11 @@ func (impl *ClusterServiceImplExtended) CreateGrafanaDataSource(clusterBean *bea grafanaDatasourceId := env.GrafanaDatasourceId if grafanaDatasourceId == 0 { //starts grafana creation + // appending envId to ensure unique datasource name for each environment (ex- env got deleted and created with same name) + // reverting to old name will be done in next release + DataSourceName := "Prometheus-" + env.Name createDatasourceReq := grafana.CreateDatasourceRequest{ - Name: "Prometheus-" + env.Name, + Name: DataSourceName, Type: "prometheus", Url: clusterBean.PrometheusUrl, Access: "proxy", diff --git a/pkg/commonService/CommonBaseService.go b/pkg/commonService/CommonBaseService.go index e398266d89..664bb4eb61 100644 --- a/pkg/commonService/CommonBaseService.go +++ b/pkg/commonService/CommonBaseService.go @@ -75,6 +75,7 @@ func (impl *CommonBaseServiceImpl) EnvironmentVariableList() (*EnvironmentVariab return environmentVariableList, err } environmentVariableList.FeatureGitOpsFlags = featureGitOpsFlags + environmentVariableList.IsAirGapEnvironment = impl.globalEnvVariables.GlobalEnvVariables.IsAirGapEnvironment return environmentVariableList, nil } diff --git a/pkg/commonService/bean_ent.go b/pkg/commonService/bean_ent.go index c04eaf9c68..ec78ebb4ae 100644 --- a/pkg/commonService/bean_ent.go +++ b/pkg/commonService/bean_ent.go @@ -17,4 +17,5 @@ package commonService type EnvironmentVariableListEnt struct { + IsAirGapEnvironment bool `json:"isAirGapEnvironment"` } diff --git a/pkg/config/configDiff/DeploymentConfigurationService.go b/pkg/config/configDiff/DeploymentConfigurationService.go index b8168bfc60..ebc63c47f3 100644 --- a/pkg/config/configDiff/DeploymentConfigurationService.go +++ b/pkg/config/configDiff/DeploymentConfigurationService.go @@ -149,6 +149,12 @@ func (impl *DeploymentConfigurationServiceImpl) ConfigAutoComplete(appId int, en impl.logger.Errorw("error in fetching CM and CS names at app or env level", "appId", appId, "envId", envId, "err", err) return nil, err } + combinedProperties := GetConfigAutoCompleteCombinedPropertiesDataWithoutDraft(cMCSNamesAppLevel, cMCSNamesEnvLevel, envId) + configDataResp := bean2.NewConfigDataResponse().WithResourceConfig(combinedProperties) + return configDataResp, nil +} + +func GetConfigAutoCompleteCombinedPropertiesDataWithoutDraft(cMCSNamesAppLevel, cMCSNamesEnvLevel []bean.ConfigNameAndType, envId int) (combinedProperties []*bean2.ConfigProperty) { cmcsKeyPropertyAppLevelMap, cmcsKeyPropertyEnvLevelMap := adaptor.GetCmCsAppAndEnvLevelMap(cMCSNamesAppLevel, cMCSNamesEnvLevel) for key, configProperty := range cmcsKeyPropertyAppLevelMap { if _, ok := cmcsKeyPropertyEnvLevelMap[key]; !ok { @@ -166,11 +172,9 @@ func (impl *DeploymentConfigurationServiceImpl) ConfigAutoComplete(appId int, en configProperty.ConfigStage = bean2.Env } } - combinedProperties := helper.GetCombinedPropertiesMap(cmcsKeyPropertyAppLevelMap, cmcsKeyPropertyEnvLevelMap) + combinedProperties = helper.GetCombinedPropertiesMap(cmcsKeyPropertyAppLevelMap, cmcsKeyPropertyEnvLevelMap) combinedProperties = append(combinedProperties, adaptor.GetConfigProperty(0, "", bean.DeploymentTemplate, bean2.PublishedConfigState)) - - configDataResp := bean2.NewConfigDataResponse().WithResourceConfig(combinedProperties) - return configDataResp, nil + return combinedProperties } func (impl *DeploymentConfigurationServiceImpl) GetAllConfigData(ctx context.Context, configDataQueryParams *bean2.ConfigDataQueryParams, userHasAdminAccess bool) (*bean2.DeploymentAndCmCsConfigDto, error) { diff --git a/pkg/deployment/gitOps/git/GitOperationService.go b/pkg/deployment/gitOps/git/GitOperationService.go index 663b81093e..2f96fc0333 100644 --- a/pkg/deployment/gitOps/git/GitOperationService.go +++ b/pkg/deployment/gitOps/git/GitOperationService.go @@ -169,7 +169,7 @@ func (impl *GitOperationServiceImpl) PushChartToGitRepo(ctx context.Context, git commit, err := impl.gitFactory.GitOpsHelper.CommitAndPushAllChanges(newCtx, clonedDir, targetRevision, "first commit", userName, userEmailId) if err != nil { impl.logger.Errorw("error in pushing git", "err", err) - callback := func() error { + callback := func(int) error { commit, err = impl.updateRepoAndPushAllChanges(newCtx, clonedDir, repoUrl, targetRevision, tempReferenceTemplateDir, dir, userName, userEmailId, impl.gitFactory.GitOpsHelper) return err @@ -263,8 +263,12 @@ func (impl *GitOperationServiceImpl) CommitValues(ctx context.Context, chartGitA return commitHash, commitTime, err } gitOpsConfig := &apiBean.GitOpsConfigDto{BitBucketWorkspaceId: bitbucketMetadata.BitBucketWorkspaceId} - callback := func() error { - commitHash, commitTime, err = impl.gitFactory.Client.CommitValues(newCtx, chartGitAttr, gitOpsConfig) + callback := func(retriesLeft int) error { + publishStatusConflictError := false + if retriesLeft <= 0 { + publishStatusConflictError = true + } + commitHash, commitTime, err = impl.gitFactory.Client.CommitValues(newCtx, chartGitAttr, gitOpsConfig, publishStatusConflictError) return err } err = retryFunc.Retry(callback, impl.isRetryableGitCommitError, diff --git a/pkg/deployment/gitOps/git/GitOpsClient.go b/pkg/deployment/gitOps/git/GitOpsClient.go index a08047e525..dc622edd4b 100644 --- a/pkg/deployment/gitOps/git/GitOpsClient.go +++ b/pkg/deployment/gitOps/git/GitOpsClient.go @@ -30,7 +30,7 @@ import ( type GitOpsClient interface { CreateRepository(ctx context.Context, config *gitOps.GitOpsConfigDto) (url string, isNew bool, isEmpty bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) - CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *gitOps.GitOpsConfigDto) (commitHash string, commitTime time.Time, err error) + CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *gitOps.GitOpsConfigDto, publishStatusConflictError bool) (commitHash string, commitTime time.Time, err error) GetRepoUrl(config *gitOps.GitOpsConfigDto) (repoUrl string, isRepoEmpty bool, err error) DeleteRepository(config *gitOps.GitOpsConfigDto) error CreateReadme(ctx context.Context, config *gitOps.GitOpsConfigDto) (string, error) diff --git a/pkg/deployment/gitOps/git/GitOpsHelper.go b/pkg/deployment/gitOps/git/GitOpsHelper.go index 9c5d02c7d4..2c9b51b8d6 100644 --- a/pkg/deployment/gitOps/git/GitOpsHelper.go +++ b/pkg/deployment/gitOps/git/GitOpsHelper.go @@ -97,12 +97,15 @@ func (impl *GitOpsHelper) Clone(url, targetDir, targetRevision string) (clonedDi func (impl *GitOpsHelper) Pull(repoRoot, targetRevision string) (err error) { start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("Pull", "GitService", start, err) - }() ctx := git.BuildGitContext(context.Background()).WithCredentials(impl.Auth). WithTLSData(impl.tlsConfig.CaData, impl.tlsConfig.TLSKeyData, impl.tlsConfig.TLSCertData, impl.isTlsEnabled) - return impl.gitCommandManager.Pull(ctx, targetRevision, repoRoot) + err = impl.gitCommandManager.Pull(ctx, targetRevision, repoRoot) + if err != nil { + util.TriggerGitOpsMetrics("Pull", "GitService", start, err) + return err + } + util.TriggerGitOpsMetrics("Pull", "GitService", start, nil) + return nil } const PushErrorMessage = "failed to push some refs" @@ -129,11 +132,14 @@ func (impl *GitOpsHelper) pullFromBranch(ctx git.GitContext, rootDir, targetRevi impl.logger.Warnw("no branch found in git repo", "rootDir", rootDir) return "", "", err } + start := time.Now() response, errMsg, err := impl.gitCommandManager.PullCli(ctx, rootDir, branch) if err != nil { + util.TriggerGitOpsMetrics("Pull", "GitCli", start, err) impl.logger.Errorw("error on git pull", "branch", branch, "err", err) return response, errMsg, err } + util.TriggerGitOpsMetrics("Pull", "GitCli", start, nil) return response, errMsg, err } diff --git a/pkg/deployment/gitOps/git/GitServiceAzure.go b/pkg/deployment/gitOps/git/GitServiceAzure.go index ff5a6d5dbd..323196e220 100644 --- a/pkg/deployment/gitOps/git/GitServiceAzure.go +++ b/pkg/deployment/gitOps/git/GitServiceAzure.go @@ -107,19 +107,18 @@ func (impl GitAzureClient) CreateRepository(ctx context.Context, config *bean2.G repoExists bool ) start := time.Now() - defer func() { - globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) - }() detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error) url, repoExists, isEmpty, err = impl.repoExists(config.GitRepoName, impl.project) if err != nil { impl.logger.Errorw("error in communication with azure", "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[GetRepoUrlStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return "", false, isEmpty, detailedErrorGitOpsConfigActions } if repoExists { detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, GetRepoUrlStage) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, nil) return url, false, isEmpty, detailedErrorGitOpsConfigActions } gitRepositoryCreateOptions := git.GitRepositoryCreateOptions{ @@ -138,6 +137,7 @@ func (impl GitAzureClient) CreateRepository(ctx context.Context, config *bean2.G impl.logger.Errorw("error in communication with azure", "err", err) } if err != nil || !repoExists { + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } } @@ -146,11 +146,14 @@ func (impl GitAzureClient) CreateRepository(ctx context.Context, config *bean2.G validated, err := impl.ensureProjectAvailabilityOnHttp(config.GitRepoName) if err != nil { impl.logger.Errorw("error in ensuring project availability azure", "project", config.GitRepoName, "err", err) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err return *operationReference.WebUrl, true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage) @@ -159,6 +162,7 @@ func (impl GitAzureClient) CreateRepository(ctx context.Context, config *bean2.G if err != nil { impl.logger.Errorw("error in creating readme azure", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return *operationReference.WebUrl, true, isEmpty, detailedErrorGitOpsConfigActions } isEmpty = false //As we have created readme, repo is no longer empty @@ -167,13 +171,17 @@ func (impl GitAzureClient) CreateRepository(ctx context.Context, config *bean2.G if err != nil { impl.logger.Errorw("error in ensuring project availability azure", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return *operationReference.WebUrl, true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneSshStage) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitAzureClient", start, nil) return *operationReference.WebUrl, true, isEmpty, detailedErrorGitOpsConfigActions } @@ -196,14 +204,15 @@ func (impl GitAzureClient) CreateReadme(ctx context.Context, config *bean2.GitOp UserName: config.Username, UserEmailId: config.UserEmailId, } - hash, _, err := impl.CommitValues(ctx, cfg, config) + hash, _, err := impl.CommitValues(ctx, cfg, config, true) if err != nil { impl.logger.Errorw("error in creating readme azure", "repo", config.GitRepoName, "err", err) } return hash, err } -func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto) (commitHash string, commitTime time.Time, err error) { +func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto, publishStatusConflictError bool) (commitHash string, commitTime time.Time, err error) { + start := time.Now() branch := config.TargetRevision if len(branch) == 0 { branch = globalUtil.GetDefaultTargetRevision() @@ -229,6 +238,7 @@ func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig if err != nil { if e, ok := err.(azuredevops.WrappedError); !ok || *e.StatusCode >= 500 { impl.logger.Errorw("error in fetching branch from azure devops", "err", err) + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitAzureClient", start, err) return "", time.Time{}, err } } else if branchStat != nil { @@ -236,6 +246,7 @@ func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig } } else { impl.logger.Errorw("error in fetching file from azure devops", "err", err) + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitAzureClient", start, err) return "", time.Time{}, err } } else { @@ -292,9 +303,13 @@ func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig }) if e := (azuredevops.WrappedError{}); errors.As(err, &e) && e.StatusCode != nil && *e.StatusCode == http2.StatusConflict { impl.logger.Warn("conflict found in commit azure", "err", err, "config", config) + if publishStatusConflictError { + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitAzureClient", start, err) + } return "", time.Time{}, retryFunc.NewRetryableError(err) } else if err != nil { impl.logger.Errorw("error in commit azure", "err", err) + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitAzureClient", start, err) return "", time.Time{}, err } //gitPush.Commits @@ -305,6 +320,7 @@ func (impl GitAzureClient) CommitValues(ctx context.Context, config *ChartConfig commitAuthorTime = (*push.Commits)[0].Author.Date.Time } // push.Commits[0].CommitId + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitAzureClient", start, nil) return commitId, commitAuthorTime, nil } diff --git a/pkg/deployment/gitOps/git/GitServiceBitbucket.go b/pkg/deployment/gitOps/git/GitServiceBitbucket.go index 243f399e11..4d3adc58f8 100644 --- a/pkg/deployment/gitOps/git/GitServiceBitbucket.go +++ b/pkg/deployment/gitOps/git/GitServiceBitbucket.go @@ -106,9 +106,6 @@ func (impl GitBitbucketClient) GetRepoUrl(config *bean2.GitOpsConfigDto) (repoUr func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bean2.GitOpsConfigDto) (url string, isNew bool, isEmpty bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) { var err error start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) - }() detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error) @@ -127,10 +124,12 @@ func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bea if err != nil { impl.logger.Errorw("error in communication with bitbucket", "repoOptions", repoOptions, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[GetRepoUrlStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", false, isEmpty, detailedErrorGitOpsConfigActions } if repoExists { detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, GetRepoUrlStage) + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, nil) return repoUrl, false, isEmpty, detailedErrorGitOpsConfigActions } _, err = impl.client.Repositories.Repository.Create(repoOptions) @@ -142,6 +141,7 @@ func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bea impl.logger.Errorw("error in creating repo bitbucket", "repoOptions", repoOptions, "err", err) } if err != nil || !repoExists { + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } } @@ -153,10 +153,13 @@ func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bea if err != nil { impl.logger.Errorw("error in ensuring project availability bitbucket", "repoName", repoOptions.RepoSlug, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage) @@ -165,6 +168,7 @@ func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bea if err != nil { impl.logger.Errorw("error in creating readme bitbucket", "repoName", repoOptions.RepoSlug, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CreateReadmeStage) @@ -173,13 +177,17 @@ func (impl GitBitbucketClient) CreateRepository(ctx context.Context, config *bea if err != nil { impl.logger.Errorw("error in ensuring project availability bitbucket", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneSshStage) + util.TriggerGitOpsMetrics("CreateRepository", "GitBitbucketClient", start, nil) return repoUrl, true, isEmpty, detailedErrorGitOpsConfigActions } @@ -242,7 +250,7 @@ func (impl GitBitbucketClient) CreateReadme(ctx context.Context, config *bean2.G UserEmailId: config.UserEmailId, } cfg.SetBitBucketBaseDir(getDir()) - hash, _, err := impl.CommitValues(ctx, cfg, config) + hash, _, err := impl.CommitValues(ctx, cfg, config, true) if err != nil { impl.logger.Errorw("error in creating readme bitbucket", "repo", config.GitRepoName, "err", err) } @@ -270,16 +278,14 @@ func (impl GitBitbucketClient) cleanUp(cloneDir string) { } } -func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto) (commitHash string, commitTime time.Time, err error) { +func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto, publishStatusConflictError bool) (commitHash string, commitTime time.Time, err error) { start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) - }() homeDir, err := os.UserHomeDir() if err != nil { impl.logger.Errorw("error in getting home dir", "err", err) + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) return "", time.Time{}, err } bitbucketGitOpsDirPath := path.Join(homeDir, BITBUCKET_GITOPS_DIR, config.GetBitBucketBaseDir()) @@ -294,6 +300,7 @@ func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartCo err = ioutil.WriteFile(bitbucketCommitFilePath, []byte(config.FileContent), 0666) if err != nil { + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) impl.logger.Errorw("error in writing bitbucket commit file", "bitbucketCommitFilePath", bitbucketCommitFilePath, "err", err) return "", time.Time{}, err } @@ -319,8 +326,12 @@ func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartCo if err != nil { impl.logger.Errorw("error in committing file to bitbucket", "repoWriteOptions", repoWriteOptions, "err", err) if e := (&bitbucket.UnexpectedResponseStatusError{}); errors.As(err, &e) && strings.Contains(e.Error(), "500 Internal Server Error") { + if publishStatusConflictError { + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) + } return "", time.Time{}, retryFunc.NewRetryableError(err) } + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) return "", time.Time{}, err } commitOptions := &bitbucket.CommitsOptions{ @@ -330,6 +341,7 @@ func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartCo } commits, err := impl.client.Repositories.Commits.GetCommits(commitOptions) if err != nil { + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) impl.logger.Errorw("error in getting commits from bitbucket", "commitOptions", commitOptions, "err", err) return "", time.Time{}, err } @@ -339,8 +351,10 @@ func (impl GitBitbucketClient) CommitValues(ctx context.Context, config *ChartCo commitTimeString := commits.(map[string]interface{})["values"].([]interface{})[0].(map[string]interface{})["date"].(string) commitTime, err = time.Parse(time.RFC3339, commitTimeString) if err != nil { + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, err) impl.logger.Errorw("error in getting commitTime", "err", err) return "", time.Time{}, err } + util.TriggerGitOpsMetrics("CommitValues", "GitBitbucketClient", start, nil) return commitHash, commitTime, nil } diff --git a/pkg/deployment/gitOps/git/GitServiceGithub.go b/pkg/deployment/gitOps/git/GitServiceGithub.go index 2ddb364e07..7589b13a02 100644 --- a/pkg/deployment/gitOps/git/GitServiceGithub.go +++ b/pkg/deployment/gitOps/git/GitServiceGithub.go @@ -103,11 +103,10 @@ func IsRepoNotFound(err error) bool { } func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.GitOpsConfigDto) (url string, isNew bool, isEmpty bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) { + var err error + start := time.Now() - defer func() { - globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) - }() detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error) repoExists := true @@ -118,11 +117,13 @@ func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.Git } else { impl.logger.Errorw("error in creating github repo", "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[GetRepoUrlStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return "", false, isEmpty, detailedErrorGitOpsConfigActions } } if repoExists { detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, GetRepoUrlStage) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, nil) return url, false, isEmpty, detailedErrorGitOpsConfigActions } private := true @@ -134,15 +135,16 @@ func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.Git // Visibility: &visibility, }) if err1 != nil { - impl.logger.Errorw("error in creating github repo, ", "repo", config.GitRepoName, "err", err) - + impl.logger.Errorw("error in creating github repo, ", "repo", config.GitRepoName, "err", err1) url, isEmpty, err = impl.GetRepoUrl(config) if err != nil { impl.logger.Errorw("error in getting github repo", "repo", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CreateRepoStage] = err1 + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err1) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, GetRepoUrlStage) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, nil) return url, false, isEmpty, detailedErrorGitOpsConfigActions } impl.logger.Infow("github repo created ", "r", r.CloneURL) @@ -152,10 +154,13 @@ func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in ensuring project availability github", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return *r.CloneURL, true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage) @@ -164,6 +169,7 @@ func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in creating readme github", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return *r.CloneURL, true, isEmpty, detailedErrorGitOpsConfigActions } isEmpty = false //As we have created readme, repo is no longer empty @@ -173,14 +179,18 @@ func (impl GitHubClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in ensuring project availability github", "project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return *r.CloneURL, true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneSshStage) //_, err = impl.createReadme(name) + globalUtil.TriggerGitOpsMetrics("CreateRepository", "GitHubClient", start, nil) return *r.CloneURL, true, isEmpty, detailedErrorGitOpsConfigActions } @@ -202,19 +212,16 @@ func (impl GitHubClient) CreateReadme(ctx context.Context, config *bean2.GitOpsC UserName: config.Username, UserEmailId: config.UserEmailId, } - hash, _, err := impl.CommitValues(ctx, cfg, config) + hash, _, err := impl.CommitValues(ctx, cfg, config, true) if err != nil { impl.logger.Errorw("error in creating readme github", "repo", config.GitRepoName, "err", err) } return hash, err } -func (impl GitHubClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto) (commitHash string, commitTime time.Time, err error) { +func (impl GitHubClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto, publishStatusConflictErrorMetrics bool) (commitHash string, commitTime time.Time, err error) { start := time.Now() - defer func() { - globalUtil.TriggerGitOpsMetrics("CommitValues", "GitHubClient", start, err) - }() branch := config.TargetRevision if len(branch) == 0 { @@ -227,6 +234,7 @@ func (impl GitHubClient) CommitValues(ctx context.Context, config *ChartConfig, responseErr, ok := err.(*github.ErrorResponse) if !ok || responseErr.Response.StatusCode != 404 { impl.logger.Errorw("error in creating repo github", "err", err, "config", config) + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitHubClient", start, err) return "", time.Time{}, err } else { newFile = true @@ -256,15 +264,20 @@ func (impl GitHubClient) CommitValues(ctx context.Context, config *ChartConfig, c, httpRes, err := impl.client.Repositories.CreateFile(ctx, impl.org, config.ChartRepoName, path, options) if err != nil && httpRes != nil && httpRes.StatusCode == http2.StatusConflict { impl.logger.Warn("conflict found in commit github", "err", err, "config", config) + if publishStatusConflictErrorMetrics { + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitHubClient", start, err) + } return "", time.Time{}, retryFunc.NewRetryableError(err) } else if err != nil { impl.logger.Errorw("error in commit github", "err", err, "config", config) + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitHubClient", start, err) return "", time.Time{}, err } commitTime = time.Now() // default is current time, if found then will get updated accordingly if c != nil && c.Commit.Author != nil { commitTime = *c.Commit.Author.Date } + globalUtil.TriggerGitOpsMetrics("CommitValues", "GitHubClient", start, nil) return *c.SHA, commitTime, nil } diff --git a/pkg/deployment/gitOps/git/GitServiceGitlab.go b/pkg/deployment/gitOps/git/GitServiceGitlab.go index bcabae1d5b..0f0225f6cf 100644 --- a/pkg/deployment/gitOps/git/GitServiceGitlab.go +++ b/pkg/deployment/gitOps/git/GitServiceGitlab.go @@ -135,9 +135,6 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git repoUrl string ) start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) - }() detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error) impl.logger.Debugw("gitlab app create request ", "name", config.GitRepoName, "description", config.Description) @@ -145,10 +142,12 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in getting repo url ", "gitlab project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[GetRepoUrlStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", false, isEmpty, detailedErrorGitOpsConfigActions } if len(repoUrl) > 0 { detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, GetRepoUrlStage) + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, nil) return repoUrl, false, isEmpty, detailedErrorGitOpsConfigActions } else { url, err = impl.createProject(config.GitRepoName, config.Description) @@ -159,6 +158,7 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git impl.logger.Errorw("error in getting repo url ", "gitlab project", config.GitRepoName, "err", err) } if err != nil || len(repoUrl) == 0 { + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } } @@ -169,10 +169,13 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in ensuring project availability ", "gitlab project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneHttpStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage) @@ -180,6 +183,7 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in creating readme ", "gitlab project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } isEmpty = false //As we have created readme, repo is no longer empty @@ -188,13 +192,17 @@ func (impl GitLabClient) CreateRepository(ctx context.Context, config *bean2.Git if err != nil { impl.logger.Errorw("error in ensuring project availability ", "gitlab project", config.GitRepoName, "err", err) detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } if !validated { - detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + err = fmt.Errorf("unable to validate project:%s in given time", config.GitRepoName) + detailedErrorGitOpsConfigActions.StageErrorMap[CloneSshStage] = err + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, err) return "", true, isEmpty, detailedErrorGitOpsConfigActions } detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneSshStage) + util.TriggerGitOpsMetrics("CreateRepository", "GitLabClient", start, nil) return url, true, isEmpty, detailedErrorGitOpsConfigActions } @@ -344,12 +352,9 @@ func (impl GitLabClient) checkIfFileExists(projectName, ref, file string) (exist return err == nil, err } -func (impl GitLabClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto) (commitHash string, commitTime time.Time, err error) { +func (impl GitLabClient) CommitValues(ctx context.Context, config *ChartConfig, gitOpsConfig *bean2.GitOpsConfigDto, publishStatusConflictError bool) (commitHash string, commitTime time.Time, err error) { start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("CommitValues", "GitLabClient", start, err) - }() branch := config.TargetRevision if len(branch) == 0 { @@ -374,13 +379,18 @@ func (impl GitLabClient) CommitValues(ctx context.Context, config *ChartConfig, config.ChartRepoName), actions, gitlab.WithContext(ctx)) if err != nil && httpRes != nil && httpRes.StatusCode == http.StatusBadRequest { impl.logger.Warn("conflict found in commit gitlab", "err", err, "config", config) + if publishStatusConflictError { + util.TriggerGitOpsMetrics("CommitValues", "GitLabClient", start, err) + } return "", time.Time{}, retryFunc.NewRetryableError(err) } else if err != nil { + util.TriggerGitOpsMetrics("CommitValues", "GitLabClient", start, err) return "", time.Time{}, err } commitTime = time.Now() //default is current time, if found then will get updated accordingly if c != nil { commitTime = *c.AuthoredDate } + util.TriggerGitOpsMetrics("CommitValues", "GitLabClient", start, nil) return c.ID, commitTime, err } diff --git a/pkg/deployment/gitOps/git/commandManager/GitCliManager.go b/pkg/deployment/gitOps/git/commandManager/GitCliManager.go index b7ca057492..d8ff2ba33f 100644 --- a/pkg/deployment/gitOps/git/commandManager/GitCliManager.go +++ b/pkg/deployment/gitOps/git/commandManager/GitCliManager.go @@ -21,7 +21,6 @@ import ( git_manager "github.com/devtron-labs/common-lib/git-manager" "github.com/devtron-labs/devtron/util" "os/exec" - "strings" "time" ) @@ -67,24 +66,26 @@ func (impl *GitCliManagerImpl) CommitAndPush(ctx GitContext, repoRoot, targetRev } func (impl *GitCliManagerImpl) Pull(ctx GitContext, targetRevision string, repoRoot string) (err error) { + start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("Pull", "GitService", start, err) - }() err = LocateGitRepo(repoRoot) if err != nil { + util.TriggerGitOpsMetrics("Pull", "GitService", start, err) return err } + response, errMsg, err := impl.PullCli(ctx, repoRoot, targetRevision) if err != nil { + if IsAlreadyUpToDateError(response, errMsg) { + err = nil + return nil + } else { + util.TriggerGitOpsMetrics("Pull", "GitService", start, err) + } impl.logger.Errorw("error in git pull from cli", "errMsg", errMsg, "err", err) } - - if strings.Contains(response, "already up-to-date") || strings.Contains(errMsg, "already up-to-date") { - err = nil - return nil - } + util.TriggerGitOpsMetrics("Pull", "GitService", start, nil) return err } diff --git a/pkg/deployment/gitOps/git/commandManager/GitCommandBaseManager.go b/pkg/deployment/gitOps/git/commandManager/GitCommandBaseManager.go index f10894d1d1..c18586466b 100644 --- a/pkg/deployment/gitOps/git/commandManager/GitCommandBaseManager.go +++ b/pkg/deployment/gitOps/git/commandManager/GitCommandBaseManager.go @@ -79,9 +79,6 @@ func (impl *GitManagerBaseImpl) ListBranch(ctx GitContext, rootDir string) (resp func (impl *GitManagerBaseImpl) PullCli(ctx GitContext, rootDir string, branch string) (response, errMsg string, err error) { start := time.Now() - defer func() { - util.TriggerGitOpsMetrics("Pull", "GitCli", start, err) - }() impl.logger.Debugw("git pull ", "location", rootDir) cmd, cancel := impl.createCmdWithContext(ctx, "git", "-C", rootDir, "pull", "origin", branch, "--force") defer cancel() @@ -92,6 +89,12 @@ func (impl *GitManagerBaseImpl) PullCli(ctx GitContext, rootDir string, branch s } defer git_manager.DeleteTlsFiles(tlsPathInfo) output, errMsg, err := impl.runCommandWithCred(cmd, ctx.auth, tlsPathInfo) + if err != nil { + if !IsAlreadyUpToDateError(response, errMsg) { + util.TriggerGitOpsMetrics("Pull", "GitCli", start, err) + } + } + util.TriggerGitOpsMetrics("Pull", "GitCli", start, nil) impl.logger.Debugw("pull output", "root", rootDir, "opt", output, "errMsg", errMsg, "error", err) return output, errMsg, err } diff --git a/pkg/deployment/gitOps/git/commandManager/utils.go b/pkg/deployment/gitOps/git/commandManager/utils.go index a58a5c9741..fd47d61b8a 100644 --- a/pkg/deployment/gitOps/git/commandManager/utils.go +++ b/pkg/deployment/gitOps/git/commandManager/utils.go @@ -20,6 +20,7 @@ import ( "github.com/go-git/go-billy/v5/osfs" "os" "path/filepath" + "strings" ) func LocateGitRepo(path string) error { @@ -34,3 +35,10 @@ func LocateGitRepo(path string) error { } return nil } + +func IsAlreadyUpToDateError(response, errMsg string) bool { + if strings.Contains(response, "already up-to-date") || strings.Contains(errMsg, "already up-to-date") { + return true + } + return false +} diff --git a/pkg/k8s/capacity/bean/bean.go b/pkg/k8s/capacity/bean/bean.go index 5d2146142e..a159857f02 100644 --- a/pkg/k8s/capacity/bean/bean.go +++ b/pkg/k8s/capacity/bean/bean.go @@ -19,13 +19,15 @@ package bean import ( "context" "fmt" + "strings" + "time" + + "github.com/caarlos0/env" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/kubernetes" - "strings" - "time" ) const ( @@ -43,21 +45,33 @@ const NamespaceAll string = "" // below const set is used for pod filters const ( - daemonSetFatal = "DaemonSet-managed Pods (use --ignore-daemonsets to ignore)" - daemonSetWarning = "ignoring DaemonSet-managed Pods" - localStorageFatal = "Pods with local storage (use --delete-emptydir-data to override)" - localStorageWarning = "deleting Pods with local storage" - unmanagedFatal = "Pods declare no controller (use --force to override)" - unmanagedWarning = "deleting Pods that declare no controller" - AWSNodeGroupLabel = "alpha.eksctl.io/nodegroup-name" - AzureNodeGroupLabel = "kubernetes.azure.com/agentpool" - GcpNodeGroupLabel = "cloud.google.com/gke-nodepool" - KopsNodeGroupLabel = "kops.k8s.io/instancegroup" - AWSEKSNodeGroupLabel = "eks.amazonaws.com/nodegroup" + daemonSetFatal = "DaemonSet-managed Pods (use --ignore-daemonsets to ignore)" + daemonSetWarning = "ignoring DaemonSet-managed Pods" + localStorageFatal = "Pods with local storage (use --delete-emptydir-data to override)" + localStorageWarning = "deleting Pods with local storage" + unmanagedFatal = "Pods declare no controller (use --force to override)" + unmanagedWarning = "deleting Pods that declare no controller" + AWSNodeGroupLabel = "alpha.eksctl.io/nodegroup-name" + AzureNodeGroupLabel = "kubernetes.azure.com/agentpool" + GcpNodeGroupLabel = "cloud.google.com/gke-nodepool" + KopsNodeGroupLabel = "kops.k8s.io/instancegroup" + AWSEKSNodeGroupLabel = "eks.amazonaws.com/nodegroup" + KarpenterNodeGroupLabel = "karpenter.sh/nodepool" ) -// TODO: add any new nodeGrouplabel in this array -var NodeGroupLabels = [5]string{AWSNodeGroupLabel, AzureNodeGroupLabel, GcpNodeGroupLabel, KopsNodeGroupLabel, AWSEKSNodeGroupLabel} +type NodeGroupConfig struct { + AdditionalLabels []string `env:"ADDITIONAL_NODE_GROUP_LABELS" envSeparator:"," description:"Add comma separated list of additional node group labels to default labels" example:"karpenter.sh/nodepool,cloud.google.com/gke-nodepool"` +} + +var NodeGroupLabels = []string{AWSNodeGroupLabel, AzureNodeGroupLabel, GcpNodeGroupLabel, KopsNodeGroupLabel, AWSEKSNodeGroupLabel, KarpenterNodeGroupLabel} + +func init() { + cfg := &NodeGroupConfig{} + if err := env.Parse(cfg); err == nil && len(cfg.AdditionalLabels) > 0 { + // Append additional labels from environment to default labels + NodeGroupLabels = append(NodeGroupLabels, cfg.AdditionalLabels...) + } +} // below const set is used for pod delete status const ( diff --git a/pkg/module/ModuleService.go b/pkg/module/ModuleService.go index e750dc2f60..fd9c50dff5 100644 --- a/pkg/module/ModuleService.go +++ b/pkg/module/ModuleService.go @@ -63,12 +63,19 @@ type ModuleServiceImpl struct { moduleServiceHelper ModuleServiceHelper moduleResourceStatusRepository moduleRepo.ModuleResourceStatusRepository scanToolMetadataService scanTool.ScanToolMetadataService + globalEnvVariables *util2.GlobalEnvVariables + moduleEnvConfig *bean.ModuleEnvConfig + installedModulesMap map[string]bool } func NewModuleServiceImpl(logger *zap.SugaredLogger, serverEnvConfig *serverEnvConfig.ServerEnvConfig, moduleRepository moduleRepo.ModuleRepository, moduleActionAuditLogRepository ModuleActionAuditLogRepository, helmAppService client.HelmAppService, serverDataStore *serverDataStore.ServerDataStore, serverCacheService server.ServerCacheService, moduleCacheService ModuleCacheService, moduleCronService ModuleCronService, moduleServiceHelper ModuleServiceHelper, moduleResourceStatusRepository moduleRepo.ModuleResourceStatusRepository, - scanToolMetadataService scanTool.ScanToolMetadataService) *ModuleServiceImpl { + scanToolMetadataService scanTool.ScanToolMetadataService, envVariables *util2.EnvironmentVariables, moduleEnvConfig *bean.ModuleEnvConfig) *ModuleServiceImpl { + installedModulesMap := make(map[string]bool) + for _, module := range moduleEnvConfig.InstalledModules { + installedModulesMap[module] = true + } return &ModuleServiceImpl{ logger: logger, serverEnvConfig: serverEnvConfig, @@ -82,6 +89,9 @@ func NewModuleServiceImpl(logger *zap.SugaredLogger, serverEnvConfig *serverEnvC moduleServiceHelper: moduleServiceHelper, moduleResourceStatusRepository: moduleResourceStatusRepository, scanToolMetadataService: scanToolMetadataService, + globalEnvVariables: envVariables.GlobalEnvVariables, + moduleEnvConfig: moduleEnvConfig, + installedModulesMap: installedModulesMap, } } @@ -180,26 +190,39 @@ func (impl ModuleServiceImpl) GetModuleConfig(name string) (*bean.ModuleConfigDt return moduleConfig, nil } +func (impl ModuleServiceImpl) extractModuleTypeFromModule(moduleName string) (string, error) { + var moduleType string + if len(impl.installedModulesMap) > 0 { + if strings.Contains(moduleName, bean.MODULE_TYPE_SECURITY) { + moduleType = bean.MODULE_TYPE_SECURITY + } + } else { + // central-api call + moduleMetaData, err := impl.moduleServiceHelper.GetModuleMetadata(moduleName) + if err != nil { + impl.logger.Errorw("Error in getting module metadata", "moduleName", moduleName, "err", err) + return "", err + } + moduleType = gjson.Get(string(moduleMetaData), "result.moduleType").String() + } + return moduleType, nil +} + func (impl ModuleServiceImpl) handleModuleNotFoundStatus(moduleName string) (bean.ModuleStatus, string, bool, error) { // if entry is not found in database, then check if that module is legacy or not // if enterprise user -> if legacy -> then mark as installed in db and return as installed, if not legacy -> return as not installed // if non-enterprise user-> fetch helm release enable Key. if true -> then mark as installed in db and return as installed. if false -> //// (continuation of above line) if legacy -> check if cicd is installed with <= 0.5.3 from DB and moduleName != argo-cd -> then mark as installed in db and return as installed. otherwise return as not installed - - // central-api call - moduleMetaData, err := impl.moduleServiceHelper.GetModuleMetadata(moduleName) + moduleType, err := impl.extractModuleTypeFromModule(moduleName) if err != nil { - impl.logger.Errorw("Error in getting module metadata", "moduleName", moduleName, "err", err) + impl.logger.Errorw("error in handleModuleNotFoundStatus", "moduleName", moduleName, "err", err) return bean.ModuleStatusNotInstalled, "", false, err } - moduleMetaDataStr := string(moduleMetaData) - isLegacyModule := gjson.Get(moduleMetaDataStr, "result.isIncludedInLegacyFullPackage").Bool() - moduleType := gjson.Get(moduleMetaDataStr, "result.moduleType").String() flagForEnablingState := false flagForActiveTool := false if moduleType == bean.MODULE_TYPE_SECURITY { - err = impl.moduleRepository.FindByModuleTypeAndStatus(moduleType, bean.ModuleStatusInstalled) + err := impl.moduleRepository.FindByModuleTypeAndStatus(moduleType, bean.ModuleStatusInstalled) if err != nil { if err == pg.ErrNoRows { flagForEnablingState = true @@ -213,52 +236,56 @@ func (impl ModuleServiceImpl) handleModuleNotFoundStatus(moduleName string) (bea flagForEnablingState = true } - // for enterprise user - if impl.serverEnvConfig.DevtronInstallationType == serverBean.DevtronInstallationTypeEnterprise { - if isLegacyModule { - status, err := impl.saveModuleAsInstalled(moduleName, moduleType, flagForEnablingState) - return status, moduleType, flagForActiveTool, err - } - return bean.ModuleStatusNotInstalled, moduleType, false, nil - } - // for non-enterprise user - devtronHelmAppIdentifier := impl.helmAppService.GetDevtronHelmAppIdentifier() - releaseInfo, err := impl.helmAppService.GetValuesYaml(context.Background(), devtronHelmAppIdentifier) - if err != nil { - impl.logger.Errorw("Error in getting values yaml for devtron operator helm release", "moduleName", moduleName, "err", err) - apiError := clientErrors.ConvertToApiError(err) - if apiError != nil { - err = apiError - } - return bean.ModuleStatusNotInstalled, moduleType, false, err - } - releaseValues := releaseInfo.MergedValues - - // if check non-cicd module status - if moduleName != bean.ModuleNameCiCd { - isEnabled := gjson.Get(releaseValues, moduleUtil.BuildModuleEnableKey(moduleName)).Bool() - if isEnabled { - status, err := impl.saveModuleAsInstalled(moduleName, moduleType, flagForEnablingState) - return status, moduleType, flagForActiveTool, err + if len(impl.installedModulesMap) == 0 { + devtronHelmAppIdentifier := impl.helmAppService.GetDevtronHelmAppIdentifier() + releaseInfo, err := impl.helmAppService.GetValuesYaml(context.Background(), devtronHelmAppIdentifier) + if err != nil { + impl.logger.Errorw("Error in getting values yaml for devtron operator helm release", "moduleName", moduleName, "err", err) + apiError := clientErrors.ConvertToApiError(err) + if apiError != nil { + err = apiError + } + return bean.ModuleStatusNotInstalled, moduleType, false, err } - } else if util2.IsBaseStack() { - // check if cicd is in installing state - // if devtron is installed with cicd module, then cicd module should be shown as installing - installerModulesIface := gjson.Get(releaseValues, bean.INSTALLER_MODULES_HELM_KEY).Value() - if installerModulesIface != nil { - installerModulesIfaceKind := reflect.TypeOf(installerModulesIface).Kind() - if installerModulesIfaceKind == reflect.Slice { - installerModules := installerModulesIface.([]interface{}) - for _, installerModule := range installerModules { - if installerModule == moduleName { - status, err := impl.saveModule(moduleName, bean.ModuleStatusInstalling, moduleType, flagForEnablingState) - return status, moduleType, false, err + releaseValues := releaseInfo.MergedValues + + // if check non-cicd module status + if moduleName != bean.ModuleNameCiCd { + isEnabled := gjson.Get(releaseValues, moduleUtil.BuildModuleEnableKey(moduleName)).Bool() + if isEnabled { + status, err := impl.saveModuleAsInstalled(moduleName, moduleType, flagForEnablingState) + return status, moduleType, flagForActiveTool, err + } + } else if util2.IsBaseStack() { + // check if cicd is in installing state + // if devtron is installed with cicd module, then cicd module should be shown as installing + installerModulesIface := gjson.Get(releaseValues, bean.INSTALLER_MODULES_HELM_KEY).Value() + if installerModulesIface != nil { + installerModulesIfaceKind := reflect.TypeOf(installerModulesIface).Kind() + if installerModulesIfaceKind == reflect.Slice { + installerModules := installerModulesIface.([]interface{}) + for _, installerModule := range installerModules { + if installerModule == moduleName { + status, err := impl.saveModule(moduleName, bean.ModuleStatusInstalling, moduleType, flagForEnablingState) + return status, moduleType, false, err + } } + } else { + impl.logger.Warnw("Invalid installerModulesIfaceKind expected slice", "installerModulesIfaceKind", installerModulesIfaceKind, "val", installerModulesIface) } - } else { - impl.logger.Warnw("Invalid installerModulesIfaceKind expected slice", "installerModulesIfaceKind", installerModulesIfaceKind, "val", installerModulesIface) } } + } else { + if _, ok := impl.installedModulesMap[moduleName]; !ok { + return bean.ModuleStatusNotInstalled, moduleType, false, nil + } + if moduleName != bean.ModuleNameCiCd { + status, err := impl.saveModuleAsInstalled(moduleName, moduleType, flagForEnablingState) + return status, moduleType, flagForActiveTool, err + } else if util2.IsBaseStack() { + status, err := impl.saveModule(moduleName, bean.ModuleStatusInstalling, moduleType, flagForEnablingState) + return status, moduleType, false, err + } } return bean.ModuleStatusNotInstalled, moduleType, false, nil diff --git a/pkg/module/bean/bean.go b/pkg/module/bean/bean.go index 2cd5a95ff4..a808ea07ee 100644 --- a/pkg/module/bean/bean.go +++ b/pkg/module/bean/bean.go @@ -52,7 +52,8 @@ type ActionResponse struct { } type ModuleEnvConfig struct { - ModuleStatusHandlingCronDurationInMin int `env:"MODULE_STATUS_HANDLING_CRON_DURATION_MIN" envDefault:"3"` // default 3 minutes + ModuleStatusHandlingCronDurationInMin int `env:"MODULE_STATUS_HANDLING_CRON_DURATION_MIN" envDefault:"3"` // default 3 minutes + InstalledModules []string `env:"INSTALLED_MODULES" envDefault:"" envSeparator:"," description:"List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given" example:"security.trivy,security.clair"` } type ModuleResourceStatusDto struct { diff --git a/pkg/pipeline/BuildPipelineConfigService.go b/pkg/pipeline/BuildPipelineConfigService.go index 2c56acfc47..fca115326e 100644 --- a/pkg/pipeline/BuildPipelineConfigService.go +++ b/pkg/pipeline/BuildPipelineConfigService.go @@ -55,12 +55,16 @@ import ( ) type CiPipelineConfigService interface { + // GetCiPipelineRespResolved : gets the ci pipeline get response after resolving empty data response as expected by FE + GetCiPipelineRespResolved(appId int) (*bean.CiConfigRequest, error) //GetCiPipeline : retrieves CI pipeline configuration (CiConfigRequest) for a specific application (appId). // It fetches CI pipeline data, including pipeline materials, scripts, and associated configurations. // It returns a detailed CiConfigRequest. //If any errors occur during the retrieval process CI pipeline configuration remains nil. //If you want less detail of ciPipeline ,Please refer GetCiPipelineMin GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error) + // GetCiPipelineByIdWithDefaultTag : Retrieve ciPipeline for given ciPipelineId with defaultTagData + GetCiPipelineByIdWithDefaultTag(pipelineId int) (ciPipeline *bean.CiPipeline, err error) //GetCiPipelineById : Retrieve ciPipeline for given ciPipelineId GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error) //GetTriggerViewCiPipeline : retrieves a detailed view of the CI pipelines configured for a specific application (appId). @@ -511,6 +515,17 @@ func (impl *CiPipelineConfigServiceImpl) getCiTemplateVariables(appId int) (ciCo return ciConfig, err } +func (impl *CiPipelineConfigServiceImpl) GetCiPipelineRespResolved(appId int) (*bean.CiConfigRequest, error) { + ciConf, err := impl.GetCiPipeline(appId) + if err != nil { + return nil, err + } + if ciConf == nil || ciConf.Id == 0 { + err = &util.ApiError{Code: "404", HttpStatusCode: 200, UserMessage: "no data found"} + } + return ciConf, err +} + func (impl *CiPipelineConfigServiceImpl) GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error) { ciConfig, err = impl.getCiTemplateVariables(appId) if err != nil { @@ -675,6 +690,16 @@ func (impl *CiPipelineConfigServiceImpl) GetCiPipeline(appId int) (ciConfig *bea return ciConfig, err } +func (impl *CiPipelineConfigServiceImpl) GetCiPipelineByIdWithDefaultTag(pipelineId int) (ciPipeline *bean.CiPipeline, err error) { + ciPipeline, err = impl.GetCiPipelineById(pipelineId) + if err != nil { + impl.logger.Infow("service error, GetCIPipelineById", "pipelineId", pipelineId, "err", err) + return nil, err + } + ciPipeline.DefaultTag = []string{"{git_hash}", "{ci_pipeline_id}", "{global_counter}"} + return ciPipeline, nil +} + func (impl *CiPipelineConfigServiceImpl) GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error) { pipeline, err := impl.ciPipelineRepository.FindById(pipelineId) if err != nil && !util.IsErrNoRows(err) { diff --git a/pkg/pipeline/CiCdPipelineOrchestrator.go b/pkg/pipeline/CiCdPipelineOrchestrator.go index c5a0ec8b31..6be1e14ab0 100644 --- a/pkg/pipeline/CiCdPipelineOrchestrator.go +++ b/pkg/pipeline/CiCdPipelineOrchestrator.go @@ -40,6 +40,7 @@ import ( constants3 "github.com/devtron-labs/devtron/pkg/pipeline/constants" util4 "github.com/devtron-labs/devtron/pkg/pipeline/util" "github.com/devtron-labs/devtron/pkg/plugin" + "github.com/devtron-labs/devtron/util/beHelper" "github.com/devtron-labs/devtron/util/sliceUtil" "golang.org/x/exp/slices" "net/http" @@ -1351,7 +1352,7 @@ func (impl CiCdPipelineOrchestratorImpl) DeleteApp(appId int, userId int32) erro impl.logger.Debug("deleting materials in git_sensor") for _, m := range materials { - err = impl.updateRepositoryToGitSensor(m, "") + err = impl.updateRepositoryToGitSensor(m, "", false) if err != nil { impl.logger.Errorw("error in updating to git-sensor", "err", err) return err @@ -1467,7 +1468,8 @@ func (impl CiCdPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean. return nil, err } - err = impl.updateRepositoryToGitSensor(updatedMaterial, "") + err = impl.updateRepositoryToGitSensor(updatedMaterial, "", + updateMaterialDTO.Material.CreateBackup) if err != nil { impl.logger.Errorw("error in updating to git-sensor", "err", err) return nil, err @@ -1480,7 +1482,8 @@ func (impl CiCdPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean. return updateMaterialDTO, nil } -func (impl CiCdPipelineOrchestratorImpl) updateRepositoryToGitSensor(material *repository6.GitMaterial, cloningMode string) error { +func (impl CiCdPipelineOrchestratorImpl) updateRepositoryToGitSensor(material *repository6.GitMaterial, + cloningMode string, createBackup bool) error { sensorMaterial := &gitSensor.GitMaterial{ Name: material.Name, Url: material.Url, @@ -1491,8 +1494,16 @@ func (impl CiCdPipelineOrchestratorImpl) updateRepositoryToGitSensor(material *r FetchSubmodules: material.FetchSubmodules, FilterPattern: material.FilterPattern, CloningMode: cloningMode, + CreateBackup: createBackup, } - return impl.GitSensorClient.UpdateRepo(context.Background(), sensorMaterial) + timeout := 10 * time.Minute + if createBackup { + // additional time may be required for dir snapshot + timeout = 15 * time.Minute + } + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + return impl.GitSensorClient.UpdateRepo(ctx, sensorMaterial) } func (impl CiCdPipelineOrchestratorImpl) addRepositoryToGitSensor(materials []*bean.GitMaterial, cloningMode string) error { @@ -1510,7 +1521,9 @@ func (impl CiCdPipelineOrchestratorImpl) addRepositoryToGitSensor(materials []*b } sensorMaterials = append(sensorMaterials, sensorMaterial) } - return impl.GitSensorClient.AddRepo(context.Background(), sensorMaterials) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) + defer cancel() + return impl.GitSensorClient.AddRepo(ctx, sensorMaterials) } // FIXME: not thread safe @@ -2276,7 +2289,7 @@ func (impl CiCdPipelineOrchestratorImpl) AddPipelineToTemplate(createRequest *be if createRequest.AppWorkflowId == 0 { // create workflow wf := &appWorkflow.AppWorkflow{ - Name: fmt.Sprintf("wf-%d-%s", createRequest.AppId, util2.Generate(4)), + Name: beHelper.GetAppWorkflowName(createRequest.AppId), AppId: createRequest.AppId, Active: true, AuditLog: sql.AuditLog{ diff --git a/pkg/pipeline/CiHandler.go b/pkg/pipeline/CiHandler.go index 2b37436c8b..7cd3503bfa 100644 --- a/pkg/pipeline/CiHandler.go +++ b/pkg/pipeline/CiHandler.go @@ -1818,20 +1818,14 @@ func (impl *CiHandlerImpl) FetchCiStatusForTriggerViewForEnvironment(request res if len(ciPipelineIds) == 0 { return ciWorkflowStatuses, nil } - ciWorkflows, err := impl.ciWorkflowRepository.FindLastTriggeredWorkflowByCiIds(ciPipelineIds) + latestCiWorkflows, err := impl.ciWorkflowRepository.FindLastTriggeredWorkflowByCiIds(ciPipelineIds) if err != nil && !util.IsErrNoRows(err) { impl.Logger.Errorw("err", "ciPipelineIds", ciPipelineIds, "err", err) return ciWorkflowStatuses, err } notTriggeredWorkflows := make(map[int]bool) - latestCiWorkflows := make(map[int]*pipelineConfig.CiWorkflow) - for _, ciWorkflow := range ciWorkflows { - //adding only latest status in the list - if _, ok := latestCiWorkflows[ciWorkflow.CiPipelineId]; !ok { - latestCiWorkflows[ciWorkflow.CiPipelineId] = ciWorkflow - } - } + for _, ciWorkflow := range latestCiWorkflows { ciWorkflowStatus := &pipelineConfig.CiWorkflowStatus{} ciWorkflowStatus.CiPipelineId = ciWorkflow.CiPipelineId diff --git a/pkg/pipeline/DeploymentPipelineConfigService.go b/pkg/pipeline/DeploymentPipelineConfigService.go index 3de2179b22..82347de4fc 100644 --- a/pkg/pipeline/DeploymentPipelineConfigService.go +++ b/pkg/pipeline/DeploymentPipelineConfigService.go @@ -81,6 +81,7 @@ import ( "github.com/devtron-labs/devtron/pkg/variables" repository3 "github.com/devtron-labs/devtron/pkg/variables/repository" globalUtil "github.com/devtron-labs/devtron/util" + "github.com/devtron-labs/devtron/util/beHelper" "github.com/devtron-labs/devtron/util/rbac" "github.com/go-pg/pg" errors2 "github.com/juju/errors" @@ -97,6 +98,8 @@ import ( ) type CdPipelineConfigService interface { + // GetCdPipelineByIdResolved : Retrieve cdPipeline for given cdPipelineId and update response as per version(change of pre/post stage data) + GetCdPipelineByIdResolved(pipelineId int, version string) (cdPipeline *bean.CDPipelineConfigObject, err error) // GetCdPipelineById : Retrieve cdPipeline for given cdPipelineId. // getting cdPipeline,environment and strategies ,preDeployStage, postDeployStage,appWorkflowMapping from respective repository and service layer // converting above data in proper bean object and then assigning to CDPipelineConfigObject @@ -274,6 +277,20 @@ func NewCdPipelineConfigServiceImpl(logger *zap.SugaredLogger, pipelineRepositor } } +func (impl *CdPipelineConfigServiceImpl) GetCdPipelineByIdResolved(pipelineId int, version string) (cdPipeline *bean.CDPipelineConfigObject, err error) { + cdPipeline, err = impl.GetCdPipelineById(pipelineId) + if err != nil { + impl.logger.Errorw("service err, GetCdPipelineById", "pipelineId", pipelineId, "err", err) + return + } + cdResp, err := CreatePreAndPostStageResponse(cdPipeline, version) + if err != nil { + impl.logger.Errorw("service err, CheckForVersionAndCreatePreAndPostStagePayload", "pipelineId", pipelineId, "err", err) + return + } + return cdResp, nil +} + func (impl *CdPipelineConfigServiceImpl) GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error) { dbPipeline, err := impl.pipelineRepository.FindById(pipelineId) if err != nil && errors.IsNotFound(err) { @@ -2228,7 +2245,7 @@ func (impl *CdPipelineConfigServiceImpl) createCdPipeline(ctx context.Context, a if (pipeline.AppWorkflowId == 0 || pipeline.IsSwitchCiPipelineRequest()) && pipeline.ParentPipelineType == "WEBHOOK" { if pipeline.AppWorkflowId == 0 { wf := &appWorkflow.AppWorkflow{ - Name: fmt.Sprintf("wf-%d-%s", app.Id, globalUtil.Generate(4)), + Name: beHelper.GetAppWorkflowName(app.Id), AppId: app.Id, Active: true, AuditLog: sql.AuditLog{CreatedBy: userId, CreatedOn: time.Now(), UpdatedOn: time.Now(), UpdatedBy: userId}, diff --git a/pkg/pipeline/PropertiesConfig.go b/pkg/pipeline/PropertiesConfig.go index 4d37024830..ec3dc93945 100644 --- a/pkg/pipeline/PropertiesConfig.go +++ b/pkg/pipeline/PropertiesConfig.go @@ -22,6 +22,9 @@ import ( errors2 "errors" "fmt" "github.com/devtron-labs/devtron/internal/util" + bean5 "github.com/devtron-labs/devtron/pkg/auth/user/bean" + chartService "github.com/devtron-labs/devtron/pkg/chart" + bean3 "github.com/devtron-labs/devtron/pkg/chart/bean" "github.com/devtron-labs/devtron/pkg/cluster/environment/repository" "github.com/devtron-labs/devtron/pkg/deployment/common" "github.com/devtron-labs/devtron/pkg/deployment/manifest/deployedAppMetrics" @@ -47,6 +50,7 @@ import ( ) type PropertiesConfigService interface { + CreateEnvironmentPropertiesAndBaseIfNeeded(ctx context.Context, appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) CreateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) UpdateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties, userId int32) (*bean.EnvironmentProperties, error) //create environment entry for each new environment @@ -71,6 +75,7 @@ type PropertiesConfigServiceImpl struct { deployedAppMetricsService deployedAppMetrics.DeployedAppMetricsService envConfigOverrideReadService read.EnvConfigOverrideService deploymentConfigService common.DeploymentConfigService + chartService chartService.ChartService } func NewPropertiesConfigServiceImpl(logger *zap.SugaredLogger, @@ -81,7 +86,8 @@ func NewPropertiesConfigServiceImpl(logger *zap.SugaredLogger, scopedVariableManager variables.ScopedVariableManager, deployedAppMetricsService deployedAppMetrics.DeployedAppMetricsService, envConfigOverrideReadService read.EnvConfigOverrideService, - deploymentConfigService common.DeploymentConfigService) *PropertiesConfigServiceImpl { + deploymentConfigService common.DeploymentConfigService, + chartService chartService.ChartService) *PropertiesConfigServiceImpl { return &PropertiesConfigServiceImpl{ logger: logger, envConfigRepo: envConfigRepo, @@ -92,6 +98,7 @@ func NewPropertiesConfigServiceImpl(logger *zap.SugaredLogger, deployedAppMetricsService: deployedAppMetricsService, envConfigOverrideReadService: envConfigOverrideReadService, deploymentConfigService: deploymentConfigService, + chartService: chartService, } } @@ -214,6 +221,39 @@ func (impl PropertiesConfigServiceImpl) FetchEnvProperties(appId, envId, chartRe return impl.envConfigOverrideReadService.GetByAppIdEnvIdAndChartRefId(appId, envId, chartRefId) } +func (impl PropertiesConfigServiceImpl) CreateEnvironmentPropertiesAndBaseIfNeeded(ctx context.Context, appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) { + createResp, err := impl.CreateEnvironmentProperties(appId, environmentProperties) + if err != nil { + if err.Error() == bean5.NOCHARTEXIST { + appMetrics := false + if environmentProperties.AppMetrics != nil { + appMetrics = *environmentProperties.AppMetrics + } + templateRequest := bean3.TemplateRequest{ + AppId: appId, + ChartRefId: environmentProperties.ChartRefId, + ValuesOverride: []byte("{}"), + UserId: environmentProperties.UserId, + IsAppMetricsEnabled: appMetrics, + } + _, err = impl.chartService.CreateChartFromEnvOverride(templateRequest, ctx) + if err != nil { + impl.logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", environmentProperties) + return nil, err + } + createResp, err = impl.CreateEnvironmentProperties(appId, environmentProperties) + if err != nil { + impl.logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", environmentProperties) + return nil, err + } + } else { + impl.logger.Errorw("service err, EnvConfigOverrideCreate", "err", err, "payload", environmentProperties) + return nil, err + } + } + return createResp, nil +} + func (impl PropertiesConfigServiceImpl) CreateEnvironmentProperties(appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) { chart, err := impl.chartRepo.FindChartByAppIdAndRefId(appId, environmentProperties.ChartRefId) if err != nil && !errors2.Is(err, pg.ErrNoRows) { diff --git a/pkg/server/config/ServerEnvConfig.go b/pkg/server/config/ServerEnvConfig.go index 4b4b908365..87de843bc0 100644 --- a/pkg/server/config/ServerEnvConfig.go +++ b/pkg/server/config/ServerEnvConfig.go @@ -40,6 +40,7 @@ type ServerEnvConfig struct { AppSyncJobResourcesObj string `env:"APP_SYNC_JOB_RESOURCES_OBJ"` ModuleMetaDataApiUrl string `env:"MODULE_METADATA_API_URL" envDefault:"https://api.devtron.ai/module?name=%s"` ParallelismLimitForTagProcessing int `env:"PARALLELISM_LIMIT_FOR_TAG_PROCESSING"` + AppSyncJobShutDownWaitDuration int `env:"APP_SYNC_SHUTDOWN_WAIT_DURATION" envDefault:"120"` ErrorEncounteredOnGettingDevtronHelmRelease error } diff --git a/scripts/sql/32403200_resource_template.down.sql b/scripts/sql/32403200_resource_template.down.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/sql/32403200_resource_template.up.sql b/scripts/sql/32403200_resource_template.up.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/sql/32503200_license_attributes.down.sql b/scripts/sql/32503200_license_attributes.down.sql new file mode 100644 index 0000000000..982fd3d6a2 --- /dev/null +++ b/scripts/sql/32503200_license_attributes.down.sql @@ -0,0 +1,8 @@ +BEGIN; +-- Drop Table: license_attributes +DROP TABLE IF EXISTS "public"."license_attributes"; + +-- Drop Sequence: id_seq_license_attributes +DROP SEQUENCE IF EXISTS id_seq_license_attributes; + +COMMIT; \ No newline at end of file diff --git a/scripts/sql/32503200_license_attributes.up.sql b/scripts/sql/32503200_license_attributes.up.sql new file mode 100644 index 0000000000..ac82e5c2a4 --- /dev/null +++ b/scripts/sql/32503200_license_attributes.up.sql @@ -0,0 +1,18 @@ +BEGIN; +-- Sequence +CREATE SEQUENCE IF NOT EXISTS id_seq_license_attributes; + +-- Table Definition +CREATE TABLE IF NOT EXISTS "public"."license_attributes" ( + "id" int4 NOT NULL DEFAULT nextval('id_seq_license_attributes'::regclass), + "key" varchar(250) NOT NULL, + "value" TEXT NOT NULL, + "active" bool NOT NULL, + "created_on" timestamptz, + "created_by" integer, + "updated_on" timestamptz, + "updated_by" integer, + PRIMARY KEY ("id") +); + +COMMIT; \ No newline at end of file diff --git a/util/GlobalConfig.go b/util/GlobalConfig.go index 4a58fae1e9..e46a29175a 100644 --- a/util/GlobalConfig.go +++ b/util/GlobalConfig.go @@ -54,6 +54,7 @@ type GlobalEnvVariables struct { ArgoGitCommitRetryDelayOnConflict int `env:"ARGO_GIT_COMMIT_RETRY_DELAY_ON_CONFLICT" envDefault:"1"` ExposeCiMetrics bool `env:"EXPOSE_CI_METRICS" envDefault:"false"` ExecuteWireNilChecker bool `env:"EXECUTE_WIRE_NIL_CHECKER" envDefault:"false"` + IsAirGapEnvironment bool `json:"isAirGapEnvironment" env:"IS_AIR_GAP_ENVIRONMENT" envDefault:"false"` } type GlobalClusterConfig struct { diff --git a/util/beHelper/nameSuggestionUtil.go b/util/beHelper/nameSuggestionUtil.go new file mode 100644 index 0000000000..b4758f5fb1 --- /dev/null +++ b/util/beHelper/nameSuggestionUtil.go @@ -0,0 +1,23 @@ +package beHelper + +import ( + "fmt" + "github.com/devtron-labs/common-lib/git-manager/util" + util2 "github.com/devtron-labs/devtron/util" +) + +func GetCIPipelineName(appId int) string { + return fmt.Sprintf("ci-%d-%s", appId, util2.Generate(4)) +} + +func GetCDPipelineName(appId int) string { + return fmt.Sprintf("cd-%d-%s", appId, util2.Generate(4)) +} + +func GetAppWorkflowName(appId int) string { + return fmt.Sprintf("wf-%d-%s", appId, util2.Generate(4)) +} + +func GetPipelineNameByPipelineType(pipelineType string, appId int) string { + return fmt.Sprintf("%s-%d-%s", pipelineType, appId, util.Generate(4)) +} diff --git a/util/helper.go b/util/helper.go index d2f632fc31..c8d3e00c27 100644 --- a/util/helper.go +++ b/util/helper.go @@ -19,7 +19,9 @@ package util import ( "archive/tar" "compress/gzip" + "context" "encoding/json" + errors2 "errors" "fmt" "github.com/devtron-labs/devtron/internal/middleware" "github.com/juju/errors" @@ -270,7 +272,10 @@ func TriggerCIMetrics(Metrics CIMetrics, exposeCIMetrics bool, PipelineName stri func TriggerGitOpsMetrics(operation string, method string, startTime time.Time, err error) { status := "Success" - if err != nil { + + if err != nil && errors2.Is(err, context.Canceled) { + status = "Failed: context canceled" + } else if err != nil { status = "Failed" } middleware.GitOpsDuration.WithLabelValues(operation, method, status).Observe(time.Since(startTime).Seconds()) diff --git a/util/retryFunc/RetryFunction.go b/util/retryFunc/RetryFunction.go index f59e803104..55f9ca431a 100644 --- a/util/retryFunc/RetryFunction.go +++ b/util/retryFunc/RetryFunction.go @@ -25,7 +25,7 @@ import ( ) // Retry performs a function with retries, delay, and a max number of attempts. -func Retry(fn func() error, shouldRetry func(err error) bool, maxRetries int, delay time.Duration, logger *zap.SugaredLogger) error { +func Retry(fn func(retriesLeft int) error, shouldRetry func(err error) bool, maxRetries int, delay time.Duration, logger *zap.SugaredLogger) error { var err error logger.Debugw("retrying function", "maxRetries", maxRetries, "delay", delay, @@ -33,7 +33,7 @@ func Retry(fn func() error, shouldRetry func(err error) bool, maxRetries int, de "path", fmt.Sprintf("%s:%d", runTime.GetCallerFileName(), runTime.GetCallerLineNumber())) for i := 0; i < maxRetries; i++ { logger.Debugw("function called with retry", "attempt", i+1, "maxRetries", maxRetries, "delay", delay) - err = fn() + err = fn(maxRetries - (i + 1)) if err == nil { return nil } diff --git a/vendor/github.com/devtron-labs/authenticator/oidc/oidc.go b/vendor/github.com/devtron-labs/authenticator/oidc/oidc.go index a44e53c2c4..1bef8c85c4 100644 --- a/vendor/github.com/devtron-labs/authenticator/oidc/oidc.go +++ b/vendor/github.com/devtron-labs/authenticator/oidc/oidc.go @@ -235,11 +235,39 @@ func NewClientApp(settings *Settings, cache OIDCStateStorage, baseHRef string, u return &a, nil } -func (a *ClientApp) oauth2Config(scopes []string) (*oauth2.Config, error) { +func (a *ClientApp) oauth2Config(scopes []string, connectorId string) (*oauth2.Config, error) { endpoint, err := a.provider.Endpoint() if err != nil { return nil, err } + if len(connectorId) > 0 { + errored := false + authUrl, err := url.JoinPath(endpoint.AuthURL, connectorId) + if err != nil { + errored = true + //using default auth url in case error occurred + fmt.Println("error occurred while joining auth url with connectorId", err) + } + + deviceAuthURL, err := url.JoinPath(endpoint.DeviceAuthURL, connectorId) + if err != nil { + errored = true + //using default auth url in case error occurred + fmt.Println("error occurred while joining auth url with connectorId", err) + } + tokenURL, err := url.JoinPath(endpoint.TokenURL, connectorId) + if err != nil { + errored = true + //using default auth url in case error occurred + fmt.Println("error occurred while joining auth url with connectorId", err) + } + if !errored { + endpoint.AuthURL = authUrl + endpoint.DeviceAuthURL = deviceAuthURL + endpoint.TokenURL = tokenURL + } + + } return &oauth2.Config{ ClientID: a.clientID, ClientSecret: a.clientSecret, @@ -371,7 +399,9 @@ func (a *ClientApp) HandleLogin(w http.ResponseWriter, r *http.Request) { var opts []oauth2.AuthCodeOption scopes = a.settings.OIDCConfig.RequestedScopes opts = AppendClaimsAuthenticationRequestParameter(opts, a.settings.OIDCConfig.RequestedIDTokenClaims) - oauth2Config, err := a.oauth2Config(GetScopesOrDefault(scopes)) + v := r.URL.Query() + connectorId := v.Get("connectorId") + oauth2Config, err := a.oauth2Config(GetScopesOrDefault(scopes), connectorId) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return @@ -400,7 +430,7 @@ func (a *ClientApp) HandleLogin(w http.ResponseWriter, r *http.Request) { // HandleCallback is the callback handler for an OAuth2 login flow func (a *ClientApp) HandleCallback(w http.ResponseWriter, r *http.Request) { - oauth2Config, err := a.oauth2Config(nil) + oauth2Config, err := a.oauth2Config(nil, "") if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return diff --git a/vendor/github.com/devtron-labs/common-lib/constants/InternalErrorCode.go b/vendor/github.com/devtron-labs/common-lib/constants/InternalErrorCode.go new file mode 100644 index 0000000000..0e807b971d --- /dev/null +++ b/vendor/github.com/devtron-labs/common-lib/constants/InternalErrorCode.go @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2020-2024. Devtron Inc. + */ + +package constants + +const ( + UserCreateDBFailed string = "6001" + UserCreatePolicyFailed string = "6002" + UserUpdateDBFailed string = "6003" + UserUpdatePolicyFailed string = "6004" + UserNoTokenProvided string = "6005" + UserNotFoundForToken string = "6006" + UserCreateFetchRoleFailed string = "6007" + UserUpdateFetchRoleFailed string = "6008" +) diff --git a/vendor/github.com/devtron-labs/common-lib/utils/ErrorUtil.go b/vendor/github.com/devtron-labs/common-lib/utils/ErrorUtil.go index 17222a7498..2313bd7187 100644 --- a/vendor/github.com/devtron-labs/common-lib/utils/ErrorUtil.go +++ b/vendor/github.com/devtron-labs/common-lib/utils/ErrorUtil.go @@ -16,7 +16,11 @@ package utils -import "fmt" +import ( + "errors" + "fmt" + "github.com/go-pg/pg" +) type ApiError struct { HttpStatusCode int `json:"-"` @@ -39,3 +43,7 @@ func (e *ApiError) ErrorfInternal(format string, a ...interface{}) error { func (e ApiError) ErrorfUser(format string, a ...interface{}) error { return &ApiError{InternalMessage: fmt.Sprintf(format, a...)} } + +func IsErrNoRows(err error) bool { + return errors.Is(err, pg.ErrNoRows) +} diff --git a/vendor/github.com/devtron-labs/common-lib/utils/http/HttpUtil.go b/vendor/github.com/devtron-labs/common-lib/utils/http/HttpUtil.go index 43ba49795d..933b97f4f9 100644 --- a/vendor/github.com/devtron-labs/common-lib/utils/http/HttpUtil.go +++ b/vendor/github.com/devtron-labs/common-lib/utils/http/HttpUtil.go @@ -19,7 +19,9 @@ package http import ( "crypto/tls" "crypto/x509" + "encoding/json" "github.com/pkg/errors" + "io/ioutil" "net/http" "os" ) @@ -80,3 +82,29 @@ func CertPoolFromFile(filename string) (*x509.CertPool, error) { } return cp, nil } + +func HttpRequest(url string) (map[string]interface{}, error) { + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return nil, err + } + //var client *http.Client + client := &http.Client{} + res, err := client.Do(req) + if err != nil { + return nil, err + } + if res.StatusCode >= 200 && res.StatusCode <= 299 { + resBody, err := ioutil.ReadAll(res.Body) + if err != nil { + return nil, err + } + var apiRes map[string]interface{} + err = json.Unmarshal(resBody, &apiRes) + if err != nil { + return nil, err + } + return apiRes, err + } + return nil, err +} diff --git a/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go b/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go index 08463e5db6..db1f547437 100644 --- a/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go +++ b/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go @@ -227,6 +227,7 @@ type GitMaterial struct { Deleted bool `protobuf:"varint,9,opt,name=deleted,proto3" json:"deleted,omitempty"` FilterPattern []string `protobuf:"bytes,10,rep,name=filterPattern,proto3" json:"filterPattern,omitempty"` CloningMode string `protobuf:"bytes,11,opt,name=cloningMode,proto3" json:"cloningMode,omitempty"` + CreateBackup bool `protobuf:"varint,12,opt,name=createBackup,proto3" json:"createBackup,omitempty"` } func (x *GitMaterial) Reset() { @@ -338,6 +339,13 @@ func (x *GitMaterial) GetCloningMode() string { return "" } +func (x *GitMaterial) GetCreateBackup() bool { + if x != nil { + return x.CreateBackup + } + return false +} + type SavePipelineMaterialRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2911,7 +2919,7 @@ var file_gitSensor_service_proto_rawDesc = []byte{ 0x34, 0x0a, 0x15, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf1, 0x02, 0x0a, 0x0b, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x95, 0x03, 0x0a, 0x0b, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, @@ -2934,503 +2942,505 @@ var file_gitSensor_service_proto_rawDesc = []byte{ 0x72, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x6f, 0x0a, 0x1b, 0x53, 0x61, 0x76, - 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x13, 0x63, 0x69, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x13, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x12, 0x43, - 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, - 0x74, 0x53, 0x65, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, - 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, - 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, - 0x9c, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6d, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, - 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x68, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x68, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x22, 0x9f, - 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, - 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, - 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x69, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x22, - 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, - 0x73, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x42, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, - 0x22, 0xaa, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x2e, - 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x09, 0x46, 0x69, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x22, 0x56, 0x0a, - 0x08, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x2f, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, - 0x0a, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x73, - 0x22, 0x67, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, 0x52, 0x09, - 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x94, 0x03, 0x0a, 0x16, 0x43, 0x69, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x42, 0x65, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x47, 0x69, 0x74, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x33, 0x0a, 0x09, - 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x12, 0x7f, 0x0a, 0x19, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, - 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x6f, 0x0a, + 0x1b, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x13, + 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x13, 0x63, 0x69, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x92, + 0x03, 0x0a, 0x12, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, + 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x22, 0x0a, + 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x73, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x73, 0x67, 0x22, 0x9c, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6d, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x68, 0x6f, 0x77, + 0x41, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x68, 0x6f, 0x77, 0x41, + 0x6c, 0x6c, 0x22, 0x9f, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x40, + 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, + 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x42, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, + 0x73, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x0e, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x73, 0x67, 0x22, 0xaa, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, + 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, + 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, + 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x6d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, + 0x61, 0x6e, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x94, 0x03, + 0x0a, 0x16, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x12, 0x33, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x09, 0x47, 0x69, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x7f, 0x0a, 0x19, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x99, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x69, - 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x69, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0a, - 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x19, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, - 0x94, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, - 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x4d, 0x73, 0x67, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, - 0x5e, 0x0a, 0x16, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0f, 0x72, 0x65, 0x6c, - 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x0f, - 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, - 0x52, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, - 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, - 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x52, 0x65, - 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, - 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x30, - 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x68, - 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, - 0x22, 0x30, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x6f, 0x6e, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, - 0x53, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x68, 0x6f, - 0x72, 0x74, 0x22, 0x62, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x65, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2e, 0x0a, - 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x49, 0x0a, - 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x86, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x54, 0x72, 0x65, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x52, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, - 0x54, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x42, 0x6f, 0x64, - 0x79, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, - 0x2c, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x32, 0x0a, - 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, - 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x22, 0x58, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x10, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x79, 0x0a, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x77, - 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, - 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x77, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, 0x2e, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x75, 0x0a, 0x19, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x69, 0x74, - 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xed, 0x02, 0x0a, 0x15, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x10, 0x74, - 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x43, 0x69, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x43, - 0x69, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x78, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x78, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x73, - 0x73, 0x69, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x67, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x67, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x54, + 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, + 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x41, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, + 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, + 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x15, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x16, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, + 0x0f, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x52, 0x0f, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x73, 0x22, 0x52, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x82, 0x01, + 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x22, 0x30, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x6f, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x14, + 0x0a, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, + 0x68, 0x6f, 0x72, 0x74, 0x22, 0x30, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x4c, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x6f, 0x6e, 0x67, + 0x12, 0x14, 0x0a, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x22, 0x62, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x65, 0x0a, 0x09, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, + 0x65, 0x22, 0x49, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x04, + 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, - 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x22, 0xed, 0x02, 0x0a, 0x12, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x43, 0x73, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x43, 0x73, 0x76, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x4f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, - 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x6c, 0x0a, 0x1a, 0x57, - 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x77, 0x65, 0x62, - 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x57, 0x65, - 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xf8, 0x01, 0x0a, 0x0e, 0x57, 0x65, - 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, - 0x12, 0x38, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x1a, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, - 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x79, 0x0a, 0x1f, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x86, 0x02, 0x0a, + 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, + 0x04, 0x54, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x54, + 0x72, 0x65, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, + 0x33, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, + 0x61, 0x67, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x73, 0x12, 0x32, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x09, 0x46, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x22, 0xb8, 0x01, 0x0a, 0x28, 0x57, 0x65, 0x62, 0x68, - 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4a, 0x73, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4a, - 0x73, 0x6f, 0x6e, 0x32, 0xa2, 0x0d, 0x0a, 0x10, 0x47, 0x69, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x53, 0x61, 0x76, 0x65, - 0x47, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, - 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x12, + 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, + 0x96, 0x02, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x69, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x79, 0x0a, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, + 0x69, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x39, 0x0a, 0x0b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x77, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x75, 0x0a, 0x19, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0xed, 0x02, 0x0a, 0x15, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x53, 0x68, 0x6f, + 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x12, + 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x43, 0x69, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x74, 0x6f, 0x53, 0x68, 0x6f, + 0x77, 0x49, 0x6e, 0x43, 0x69, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, + 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x4f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x22, + 0xed, 0x02, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x74, 0x48, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x43, 0x73, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x43, 0x73, 0x76, 0x12, 0x1e, + 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x3f, + 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, + 0x6c, 0x0a, 0x1a, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, + 0x12, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x77, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xad, 0x01, + 0x0a, 0x19, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x63, + 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2e, 0x0a, + 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xf8, 0x01, + 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, + 0x0a, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2e, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x1a, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x36, 0x0a, 0x08, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x79, 0x0a, 0x1f, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x22, 0xb8, 0x01, 0x0a, 0x28, + 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x0d, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x4a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x32, 0xa2, 0x0d, 0x0a, 0x10, 0x47, 0x69, 0x74, 0x53, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x0f, + 0x53, 0x61, 0x76, 0x65, 0x47, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x14, 0x53, - 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x41, + 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x56, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, - 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x53, 0x63, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, - 0x60, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x12, 0x4f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x12, 0x63, 0x0a, 0x12, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x6f, 0x61, - 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x11, 0x2e, 0x67, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x52, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, - 0x20, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x67, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x52, 0x0a, 0x14, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x56, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x1b, 0x47, + 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x12, 0x60, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x12, 0x21, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x63, 0x0a, 0x12, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7b, 0x0a, 0x2a, 0x47, - 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, - 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x30, 0x47, 0x65, 0x74, - 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2b, 0x2e, + 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x11, 0x52, + 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x12, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x4e, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, + 0x1f, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, + 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x7b, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x72, 0x6f, 0x6e, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x69, 0x74, 0x53, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, + 0x30, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, + 0x64, 0x12, 0x2b, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x72, + 0x6f, 0x6e, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/devtron-labs/protos/gitSensor/service.proto b/vendor/github.com/devtron-labs/protos/gitSensor/service.proto index 5b0577fc88..df9564f1a7 100644 --- a/vendor/github.com/devtron-labs/protos/gitSensor/service.proto +++ b/vendor/github.com/devtron-labs/protos/gitSensor/service.proto @@ -38,6 +38,7 @@ message GitMaterial { bool deleted = 9; repeated string filterPattern = 10; string cloningMode = 11; + bool createBackup = 12; } message SavePipelineMaterialRequest { diff --git a/vendor/github.com/go-playground/locales/README.md b/vendor/github.com/go-playground/locales/README.md index 5b0694fd19..7b6be2c647 100644 --- a/vendor/github.com/go-playground/locales/README.md +++ b/vendor/github.com/go-playground/locales/README.md @@ -1,10 +1,8 @@ ## locales -![Project status](https://img.shields.io/badge/version-0.14.0-green.svg) +![Project status](https://img.shields.io/badge/version-0.14.1-green.svg) [![Build Status](https://travis-ci.org/go-playground/locales.svg?branch=master)](https://travis-ci.org/go-playground/locales) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/locales)](https://goreportcard.com/report/github.com/go-playground/locales) [![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales) ![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/locales.svg)](https://gitter.im/go-playground/locales?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Locales is a set of locales generated from the [Unicode CLDR Project](http://cldr.unicode.org/) which can be used independently or within an i18n package; these were built for use with, but not exclusive to, [Universal Translator](https://github.com/go-playground/universal-translator). diff --git a/vendor/github.com/go-playground/universal-translator/README.md b/vendor/github.com/go-playground/universal-translator/README.md index 46dec6d2b2..d9b6654741 100644 --- a/vendor/github.com/go-playground/universal-translator/README.md +++ b/vendor/github.com/go-playground/universal-translator/README.md @@ -1,11 +1,9 @@ ## universal-translator -![Project status](https://img.shields.io/badge/version-0.18.0-green.svg) -[![Build Status](https://travis-ci.org/go-playground/universal-translator.svg?branch=master)](https://travis-ci.org/go-playground/universal-translator) +![Project status](https://img.shields.io/badge/version-0.18.1-green.svg) [![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator) [![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator) ![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/universal-translator.svg)](https://gitter.im/go-playground/universal-translator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules diff --git a/vendor/github.com/go-playground/universal-translator/import_export.go b/vendor/github.com/go-playground/universal-translator/import_export.go index 1216f19237..87a1b465cb 100644 --- a/vendor/github.com/go-playground/universal-translator/import_export.go +++ b/vendor/github.com/go-playground/universal-translator/import_export.go @@ -3,7 +3,6 @@ package ut import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" @@ -41,7 +40,6 @@ const ( func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string) error { _, err := os.Stat(dirname) - fmt.Println(dirname, err, os.IsNotExist(err)) if err != nil { if !os.IsNotExist(err) { @@ -138,7 +136,7 @@ func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string) return err } - err = ioutil.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644) + err = os.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644) if err != nil { return err } @@ -200,7 +198,7 @@ func (t *UniversalTranslator) Import(format ImportExportFormat, dirnameOrFilenam // NOTE: generally used when assets have been embedded into the binary and are already in memory. func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader io.Reader) error { - b, err := ioutil.ReadAll(reader) + b, err := io.ReadAll(reader) if err != nil { return err } diff --git a/vendor/github.com/juju/errors/Makefile b/vendor/github.com/juju/errors/Makefile index 38e7c1c25a..a5bc81e66b 100644 --- a/vendor/github.com/juju/errors/Makefile +++ b/vendor/github.com/juju/errors/Makefile @@ -17,7 +17,7 @@ check-go: echo go fmt is sad: $(GOFMT); \ exit 1; \ fi ) - @(go tool vet -all -composites=false -copylocks=false .) + @(go vet -all -composites=false -copylocks=false .) docs: godoc2md github.com/juju/errors > README.md diff --git a/vendor/github.com/juju/errors/dependencies.tsv b/vendor/github.com/juju/errors/dependencies.tsv deleted file mode 100644 index e324344944..0000000000 --- a/vendor/github.com/juju/errors/dependencies.tsv +++ /dev/null @@ -1,5 +0,0 @@ -github.com/juju/loggo git 8232ab8918d91c72af1a9fb94d3edbe31d88b790 2017-06-05T01:46:07Z -github.com/juju/testing git 72703b1e95eb8ce4737fd8a3d8496c6b0be280a6 2018-05-17T13:41:05Z -gopkg.in/check.v1 git 4f90aeace3a26ad7021961c297b22c42160c7b25 2016-01-05T16:49:36Z -gopkg.in/mgo.v2 git f2b6f6c918c452ad107eec89615f074e3bd80e33 2016-08-18T01:52:18Z -gopkg.in/yaml.v2 git 1be3d31502d6eabc0dd7ce5b0daab022e14a5538 2017-07-12T05:45:46Z diff --git a/vendor/github.com/juju/errors/error.go b/vendor/github.com/juju/errors/error.go index 2796b9f29b..326b917a90 100644 --- a/vendor/github.com/juju/errors/error.go +++ b/vendor/github.com/juju/errors/error.go @@ -6,7 +6,6 @@ package errors import ( "fmt" "reflect" - "runtime" ) // Err holds a description of an error along with information about @@ -25,12 +24,60 @@ type Err struct { // previous holds the previous error in the error stack, if any. previous error - // file and line hold the source code location where the error was - // created. - file string + // function is the package path-qualified function name where the + // error was created. + function string + + // line is the line number the error was created on inside of function + line int +} + +// Locationer is an interface that represents a certain class of errors that +// contain the location information from where they were raised. +type Locationer interface { + // Location returns the path-qualified function name where the error was + // created and the line number + Location() (function string, line int) +} + +// locationError is the internal implementation of the Locationer interface. +type locationError struct { + error + + // function is the package path-qualified function name where the + // error was created. + function string + + // line is the line number the error was created on inside of function line int } +// newLocationError constructs a new Locationer error from the supplied error +// with the location set to callDepth in the stack. If a nill error is provided +// to this function then a new empty error is constructed. +func newLocationError(err error, callDepth int) *locationError { + le := &locationError{error: err} + le.function, le.line = getLocation(callDepth + 1) + return le +} + +// Error implementes the error interface. +func (l *locationError) Error() string { + if l.error == nil { + return "" + } + return l.error.Error() +} + +// *locationError implements Locationer.Location interface +func (l *locationError) Location() (string, int) { + return l.function, l.line +} + +func (l *locationError) Unwrap() error { + return l.error +} + // NewErr is used to return an Err for the purpose of embedding in other // structures. The location is not specified, and needs to be set with a call // to SetLocation. @@ -75,10 +122,10 @@ func NewErrWithCause(other error, format string, args ...interface{}) Err { } } -// Location is the file and line of where the error was most recently -// created or annotated. -func (e *Err) Location() (filename string, line int) { - return e.file, e.line +// Location returns the package path-qualified function name and line of where +// the error was most recently created or annotated. +func (e *Err) Location() (function string, line int) { + return e.function, e.line } // Underlying returns the previous error in the error stack, if any. A client @@ -155,12 +202,10 @@ type unformatter Err func (unformatter) Format() { /* break the fmt.Formatter interface */ } -// SetLocation records the source location of the error at callDepth stack -// frames above the call. +// SetLocation records the package path-qualified function name of the error at +// callDepth stack frames above the call. func (e *Err) SetLocation(callDepth int) { - _, file, line, _ := runtime.Caller(callDepth + 1) - e.file = trimSourcePath(file) - e.line = line + e.function, e.line = getLocation(callDepth + 1) } // StackTrace returns one string for each location recorded in the stack of @@ -174,3 +219,9 @@ func (e *Err) StackTrace() []string { func sameError(e1, e2 error) bool { return reflect.DeepEqual(e1, e2) } + +// Unwrap is a synonym for Underlying, which allows Err to be used with the +// Unwrap, Is and As functions in Go's standard `errors` library. +func (e *Err) Unwrap() error { + return e.previous +} diff --git a/vendor/github.com/juju/errors/errortypes.go b/vendor/github.com/juju/errors/errortypes.go index 119b47c10b..0029f91d12 100644 --- a/vendor/github.com/juju/errors/errortypes.go +++ b/vendor/github.com/juju/errors/errortypes.go @@ -4,354 +4,470 @@ package errors import ( + "errors" + stderror "errors" "fmt" + "strings" ) -// wrap is a helper to construct an *wrapper. -func wrap(err error, format, suffix string, args ...interface{}) Err { - newErr := Err{ - message: fmt.Sprintf(format+suffix, args...), - previous: err, +// a ConstError is a prototype for a certain type of error +type ConstError string + +// ConstError implements error +func (e ConstError) Error() string { + return string(e) +} + +// Different types of errors +const ( + // Timeout represents an error on timeout. + Timeout = ConstError("timeout") + // NotFound represents an error when something has not been found. + NotFound = ConstError("not found") + // UserNotFound represents an error when a non-existent user is looked up. + UserNotFound = ConstError("user not found") + // Unauthorized represents an error when an operation is unauthorized. + Unauthorized = ConstError("unauthorized") + // NotImplemented represents an error when something is not + // implemented. + NotImplemented = ConstError("not implemented") + // AlreadyExists represents and error when something already exists. + AlreadyExists = ConstError("already exists") + // NotSupported represents an error when something is not supported. + NotSupported = ConstError("not supported") + // NotValid represents an error when something is not valid. + NotValid = ConstError("not valid") + // NotProvisioned represents an error when something is not yet provisioned. + NotProvisioned = ConstError("not provisioned") + // NotAssigned represents an error when something is not yet assigned to + // something else. + NotAssigned = ConstError("not assigned") + // BadRequest represents an error when a request has bad parameters. + BadRequest = ConstError("bad request") + // MethodNotAllowed represents an error when an HTTP request + // is made with an inappropriate method. + MethodNotAllowed = ConstError("method not allowed") + // Forbidden represents an error when a request cannot be completed because of + // missing privileges. + Forbidden = ConstError("forbidden") + // QuotaLimitExceeded is emitted when an action failed due to a quota limit check. + QuotaLimitExceeded = ConstError("quota limit exceeded") + // NotYetAvailable is the error returned when a resource is not yet available + // but it might be in the future. + NotYetAvailable = ConstError("not yet available") +) + +// errWithType is an Err bundled with its error type (a ConstError) +type errWithType struct { + error + errType ConstError +} + +// Is compares `target` with e's error type +func (e *errWithType) Is(target error) bool { + if &e.errType == nil { + return false } - newErr.SetLocation(2) - return newErr + return target == e.errType } -// timeout represents an error on timeout. -type timeout struct { - Err +// Unwrap an errWithType gives the underlying Err +func (e *errWithType) Unwrap() error { + return e.error +} + +func wrapErrorWithMsg(err error, msg string) error { + if err == nil { + return stderror.New(msg) + } + if msg == "" { + return err + } + return fmt.Errorf("%s: %w", msg, err) } -// Timeoutf returns an error which satisfies IsTimeout(). +func makeWrappedConstError(err error, format string, args ...interface{}) error { + separator := " " + if err.Error() == "" || errors.Is(err, &fmtNoop{}) { + separator = "" + } + return fmt.Errorf(strings.Join([]string{format, "%w"}, separator), append(args, err)...) +} + +// WithType is responsible for annotating an already existing error so that it +// also satisfies that of a ConstError. The resultant error returned should +// satisfy Is(err, errType). If err is nil then a nil error will also be returned. +// +// Now with Go's Is, As and Unwrap support it no longer makes sense to Wrap() +// 2 errors as both of those errors could be chains of errors in their own right. +// WithType aims to solve some of the usefulness of Wrap with the ability to +// make a pre-existing error also satisfy a ConstError type. +func WithType(err error, errType ConstError) error { + if err == nil { + return nil + } + return &errWithType{ + error: err, + errType: errType, + } +} + +// Timeoutf returns an error which satisfies Is(err, Timeout) and the Locationer +// interface. func Timeoutf(format string, args ...interface{}) error { - return &timeout{wrap(nil, format, " timeout", args...)} + return newLocationError( + makeWrappedConstError(Timeout, format, args...), + 1, + ) } -// NewTimeout returns an error which wraps err that satisfies -// IsTimeout(). +// NewTimeout returns an error which wraps err and satisfies Is(err, Timeout) +// and the Locationer interface. func NewTimeout(err error, msg string) error { - return &timeout{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: Timeout, + } } -// IsTimeout reports whether err was created with Timeoutf() or -// NewTimeout(). +// Deprecated: IsTimeout reports whether err is a Timeout error. Use +// Is(err, Timeout). func IsTimeout(err error) bool { - err = Cause(err) - _, ok := err.(*timeout) - return ok -} - -// notFound represents an error when something has not been found. -type notFound struct { - Err + return Is(err, Timeout) } -// NotFoundf returns an error which satisfies IsNotFound(). +// NotFoundf returns an error which satisfies Is(err, NotFound) and the +// Locationer interface. func NotFoundf(format string, args ...interface{}) error { - return ¬Found{wrap(nil, format, " not found", args...)} + return newLocationError( + makeWrappedConstError(NotFound, format, args...), + 1, + ) } -// NewNotFound returns an error which wraps err that satisfies -// IsNotFound(). +// NewNotFound returns an error which wraps err and satisfies Is(err, NotFound) +// and the Locationer interface. func NewNotFound(err error, msg string) error { - return ¬Found{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotFound, + } } -// IsNotFound reports whether err was created with NotFoundf() or -// NewNotFound(). +// Deprecated: IsNotFound reports whether err is a NotFound error. Use +// Is(err, NotFound). func IsNotFound(err error) bool { - err = Cause(err) - _, ok := err.(*notFound) - return ok -} - -// userNotFound represents an error when an inexistent user is looked up. -type userNotFound struct { - Err + return Is(err, NotFound) } -// UserNotFoundf returns an error which satisfies IsUserNotFound(). +// UserNotFoundf returns an error which satisfies Is(err, UserNotFound) and the +// Locationer interface. func UserNotFoundf(format string, args ...interface{}) error { - return &userNotFound{wrap(nil, format, " user not found", args...)} + return newLocationError( + makeWrappedConstError(UserNotFound, format, args...), + 1, + ) } // NewUserNotFound returns an error which wraps err and satisfies -// IsUserNotFound(). +// Is(err, UserNotFound) and the Locationer interface. func NewUserNotFound(err error, msg string) error { - return &userNotFound{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: UserNotFound, + } } -// IsUserNotFound reports whether err was created with UserNotFoundf() or -// NewUserNotFound(). +// Deprecated: IsUserNotFound reports whether err is a UserNotFound error. Use +// Is(err, UserNotFound). func IsUserNotFound(err error) bool { - err = Cause(err) - _, ok := err.(*userNotFound) - return ok -} - -// unauthorized represents an error when an operation is unauthorized. -type unauthorized struct { - Err + return Is(err, UserNotFound) } -// Unauthorizedf returns an error which satisfies IsUnauthorized(). +// Unauthorizedf returns an error that satisfies Is(err, Unauthorized) and +// the Locationer interface. func Unauthorizedf(format string, args ...interface{}) error { - return &unauthorized{wrap(nil, format, "", args...)} + return newLocationError( + makeWrappedConstError(Hide(Unauthorized), format, args...), + 1, + ) } // NewUnauthorized returns an error which wraps err and satisfies -// IsUnauthorized(). +// Is(err, Unathorized) and the Locationer interface. func NewUnauthorized(err error, msg string) error { - return &unauthorized{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: Unauthorized, + } } -// IsUnauthorized reports whether err was created with Unauthorizedf() or -// NewUnauthorized(). +// Deprecated: IsUnauthorized reports whether err is a Unauthorized error. Use +// Is(err, Unauthorized). func IsUnauthorized(err error) bool { - err = Cause(err) - _, ok := err.(*unauthorized) - return ok + return Is(err, Unauthorized) } -// notImplemented represents an error when something is not -// implemented. -type notImplemented struct { - Err -} - -// NotImplementedf returns an error which satisfies IsNotImplemented(). +// NotImplementedf returns an error which satisfies Is(err, NotImplemented) and +// the Locationer interface. func NotImplementedf(format string, args ...interface{}) error { - return ¬Implemented{wrap(nil, format, " not implemented", args...)} + return newLocationError( + makeWrappedConstError(NotImplemented, format, args...), + 1, + ) } // NewNotImplemented returns an error which wraps err and satisfies -// IsNotImplemented(). +// Is(err, NotImplemented) and the Locationer interface. func NewNotImplemented(err error, msg string) error { - return ¬Implemented{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotImplemented, + } } -// IsNotImplemented reports whether err was created with -// NotImplementedf() or NewNotImplemented(). +// Deprecated: IsNotImplemented reports whether err is a NotImplemented error. +// Use Is(err, NotImplemented). func IsNotImplemented(err error) bool { - err = Cause(err) - _, ok := err.(*notImplemented) - return ok + return Is(err, NotImplemented) } -// alreadyExists represents and error when something already exists. -type alreadyExists struct { - Err -} - -// AlreadyExistsf returns an error which satisfies IsAlreadyExists(). +// AlreadyExistsf returns an error which satisfies Is(err, AlreadyExists) and +// the Locationer interface. func AlreadyExistsf(format string, args ...interface{}) error { - return &alreadyExists{wrap(nil, format, " already exists", args...)} + return newLocationError( + makeWrappedConstError(AlreadyExists, format, args...), + 1, + ) } // NewAlreadyExists returns an error which wraps err and satisfies -// IsAlreadyExists(). +// Is(err, AlreadyExists) and the Locationer interface. func NewAlreadyExists(err error, msg string) error { - return &alreadyExists{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: AlreadyExists, + } } -// IsAlreadyExists reports whether the error was created with -// AlreadyExistsf() or NewAlreadyExists(). +// Deprecated: IsAlreadyExists reports whether the err is a AlreadyExists +// error. Use Is(err, AlreadyExists). func IsAlreadyExists(err error) bool { - err = Cause(err) - _, ok := err.(*alreadyExists) - return ok -} - -// notSupported represents an error when something is not supported. -type notSupported struct { - Err + return Is(err, AlreadyExists) } -// NotSupportedf returns an error which satisfies IsNotSupported(). +// NotSupportedf returns an error which satisfies Is(err, NotSupported) and the +// Locationer interface. func NotSupportedf(format string, args ...interface{}) error { - return ¬Supported{wrap(nil, format, " not supported", args...)} + return newLocationError( + makeWrappedConstError(NotSupported, format, args...), + 1, + ) } -// NewNotSupported returns an error which wraps err and satisfies -// IsNotSupported(). +// NewNotSupported returns an error which satisfies Is(err, NotSupported) and +// the Locationer interface. func NewNotSupported(err error, msg string) error { - return ¬Supported{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotSupported, + } } -// IsNotSupported reports whether the error was created with -// NotSupportedf() or NewNotSupported(). +// Deprecated: IsNotSupported reports whether err is a NotSupported error. Use +// Is(err, NotSupported). func IsNotSupported(err error) bool { - err = Cause(err) - _, ok := err.(*notSupported) - return ok -} - -// notValid represents an error when something is not valid. -type notValid struct { - Err + return Is(err, NotSupported) } -// NotValidf returns an error which satisfies IsNotValid(). +// NotValidf returns an error which satisfies Is(err, NotValid) and the +// Locationer interface. func NotValidf(format string, args ...interface{}) error { - return ¬Valid{wrap(nil, format, " not valid", args...)} + return newLocationError( + makeWrappedConstError(NotValid, format, args...), + 1, + ) } -// NewNotValid returns an error which wraps err and satisfies IsNotValid(). +// NewNotValid returns an error which wraps err and satisfies Is(err, NotValid) +// and the Locationer interface. func NewNotValid(err error, msg string) error { - return ¬Valid{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotValid, + } } -// IsNotValid reports whether the error was created with NotValidf() or -// NewNotValid(). +// Deprecated: IsNotValid reports whether err is a NotValid error. Use +// Is(err, NotValid). func IsNotValid(err error) bool { - err = Cause(err) - _, ok := err.(*notValid) - return ok -} - -// notProvisioned represents an error when something is not yet provisioned. -type notProvisioned struct { - Err + return Is(err, NotValid) } -// NotProvisionedf returns an error which satisfies IsNotProvisioned(). +// NotProvisionedf returns an error which satisfies Is(err, NotProvisioned) and +// the Locationer interface. func NotProvisionedf(format string, args ...interface{}) error { - return ¬Provisioned{wrap(nil, format, " not provisioned", args...)} + return newLocationError( + makeWrappedConstError(NotProvisioned, format, args...), + 1, + ) } -// NewNotProvisioned returns an error which wraps err that satisfies -// IsNotProvisioned(). +// NewNotProvisioned returns an error which wraps err and satisfies +// Is(err, NotProvisioned) and the Locationer interface. func NewNotProvisioned(err error, msg string) error { - return ¬Provisioned{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotProvisioned, + } } -// IsNotProvisioned reports whether err was created with NotProvisionedf() or -// NewNotProvisioned(). +// Deprecated: IsNotProvisioned reports whether err is a NotProvisioned error. +// Use Is(err, NotProvisioned). func IsNotProvisioned(err error) bool { - err = Cause(err) - _, ok := err.(*notProvisioned) - return ok + return Is(err, NotProvisioned) } -// notAssigned represents an error when something is not yet assigned to -// something else. -type notAssigned struct { - Err -} - -// NotAssignedf returns an error which satisfies IsNotAssigned(). +// NotAssignedf returns an error which satisfies Is(err, NotAssigned) and the +// Locationer interface. func NotAssignedf(format string, args ...interface{}) error { - return ¬Assigned{wrap(nil, format, " not assigned", args...)} + return newLocationError( + makeWrappedConstError(NotAssigned, format, args...), + 1, + ) } -// NewNotAssigned returns an error which wraps err that satisfies -// IsNotAssigned(). +// NewNotAssigned returns an error which wraps err and satisfies +// Is(err, NotAssigned) and the Locationer interface. func NewNotAssigned(err error, msg string) error { - return ¬Assigned{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotAssigned, + } } -// IsNotAssigned reports whether err was created with NotAssignedf() or -// NewNotAssigned(). +// Deprecated: IsNotAssigned reports whether err is a NotAssigned error. +// Use Is(err, NotAssigned) func IsNotAssigned(err error) bool { - err = Cause(err) - _, ok := err.(*notAssigned) - return ok + return Is(err, NotAssigned) } -// badRequest represents an error when a request has bad parameters. -type badRequest struct { - Err -} - -// BadRequestf returns an error which satisfies IsBadRequest(). +// BadRequestf returns an error which satisfies Is(err, BadRequest) and the +// Locationer interface. func BadRequestf(format string, args ...interface{}) error { - return &badRequest{wrap(nil, format, "", args...)} + return newLocationError( + makeWrappedConstError(Hide(BadRequest), format, args...), + 1, + ) } -// NewBadRequest returns an error which wraps err that satisfies -// IsBadRequest(). +// NewBadRequest returns an error which wraps err and satisfies +// Is(err, BadRequest) and the Locationer interface. func NewBadRequest(err error, msg string) error { - return &badRequest{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: BadRequest, + } } -// IsBadRequest reports whether err was created with BadRequestf() or -// NewBadRequest(). +// Deprecated: IsBadRequest reports whether err is a BadRequest error. +// Use Is(err, BadRequest) func IsBadRequest(err error) bool { - err = Cause(err) - _, ok := err.(*badRequest) - return ok -} - -// methodNotAllowed represents an error when an HTTP request -// is made with an inappropriate method. -type methodNotAllowed struct { - Err + return Is(err, BadRequest) } -// MethodNotAllowedf returns an error which satisfies IsMethodNotAllowed(). +// MethodNotAllowedf returns an error which satisfies Is(err, MethodNotAllowed) +// and the Locationer interface. func MethodNotAllowedf(format string, args ...interface{}) error { - return &methodNotAllowed{wrap(nil, format, "", args...)} + return newLocationError( + makeWrappedConstError(Hide(MethodNotAllowed), format, args...), + 1, + ) } -// NewMethodNotAllowed returns an error which wraps err that satisfies -// IsMethodNotAllowed(). +// NewMethodNotAllowed returns an error which wraps err and satisfies +// Is(err, MethodNotAllowed) and the Locationer interface. func NewMethodNotAllowed(err error, msg string) error { - return &methodNotAllowed{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: MethodNotAllowed, + } } -// IsMethodNotAllowed reports whether err was created with MethodNotAllowedf() or -// NewMethodNotAllowed(). +// Deprecated: IsMethodNotAllowed reports whether err is a MethodNotAllowed +// error. Use Is(err, MethodNotAllowed) func IsMethodNotAllowed(err error) bool { - err = Cause(err) - _, ok := err.(*methodNotAllowed) - return ok -} - -// forbidden represents an error when a request cannot be completed because of -// missing privileges -type forbidden struct { - Err + return Is(err, MethodNotAllowed) } -// Forbiddenf returns an error which satistifes IsForbidden() +// Forbiddenf returns an error which satistifes Is(err, Forbidden) and the +// Locationer interface. func Forbiddenf(format string, args ...interface{}) error { - return &forbidden{wrap(nil, format, "", args...)} + return newLocationError( + makeWrappedConstError(Hide(Forbidden), format, args...), + 1, + ) } -// NewForbidden returns an error which wraps err that satisfies -// IsForbidden(). +// NewForbidden returns an error which wraps err and satisfies +// Is(err, Forbidden) and the Locationer interface. func NewForbidden(err error, msg string) error { - return &forbidden{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: Forbidden, + } } -// IsForbidden reports whether err was created with Forbiddenf() or -// NewForbidden(). +// Deprecated: IsForbidden reports whether err is a Forbidden error. Use +// Is(err, Forbidden). func IsForbidden(err error) bool { - err = Cause(err) - _, ok := err.(*forbidden) - return ok -} - -// quotaLimitExceeded is emitted when an action failed due to a quota limit check. -type quotaLimitExceeded struct { - Err + return Is(err, Forbidden) } -// QuotaLimitExceededf returns an error which satisfies IsQuotaLimitExceeded. +// QuotaLimitExceededf returns an error which satisfies +// Is(err, QuotaLimitExceeded) and the Locationer interface. func QuotaLimitExceededf(format string, args ...interface{}) error { - return "aLimitExceeded{wrap(nil, format, "", args...)} + return newLocationError( + makeWrappedConstError(Hide(QuotaLimitExceeded), format, args...), + 1, + ) } // NewQuotaLimitExceeded returns an error which wraps err and satisfies -// IsQuotaLimitExceeded. +// Is(err, QuotaLimitExceeded) and the Locationer interface. func NewQuotaLimitExceeded(err error, msg string) error { - return "aLimitExceeded{wrap(err, msg, "")} + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: QuotaLimitExceeded, + } } -// IsQuotaLimitExceeded returns true if the given error represents a -// QuotaLimitExceeded error. +// Deprecated: IsQuotaLimitExceeded reports whether err is a QuoteLimitExceeded +// err. Use Is(err, QuotaLimitExceeded). func IsQuotaLimitExceeded(err error) bool { - err = Cause(err) - _, ok := err.(*quotaLimitExceeded) - return ok + return Is(err, QuotaLimitExceeded) +} + +// NotYetAvailablef returns an error which satisfies Is(err, NotYetAvailable) +// and the Locationer interface. +func NotYetAvailablef(format string, args ...interface{}) error { + return newLocationError( + makeWrappedConstError(Hide(NotYetAvailable), format, args...), + 1, + ) +} + +// NewNotYetAvailable returns an error which wraps err and satisfies +// Is(err, NotYetAvailable) and the Locationer interface. +func NewNotYetAvailable(err error, msg string) error { + return &errWithType{ + error: newLocationError(wrapErrorWithMsg(err, msg), 1), + errType: NotYetAvailable, + } +} + +// Deprecated: IsNotYetAvailable reports whether err is a NotYetAvailable err. +// Use Is(err, NotYetAvailable) +func IsNotYetAvailable(err error) bool { + return Is(err, NotYetAvailable) } diff --git a/vendor/github.com/juju/errors/functions.go b/vendor/github.com/juju/errors/functions.go index 1bf7c9e257..952a6739a4 100644 --- a/vendor/github.com/juju/errors/functions.go +++ b/vendor/github.com/juju/errors/functions.go @@ -4,7 +4,9 @@ package errors import ( + stderrors "errors" "fmt" + "runtime" "strings" ) @@ -32,6 +34,18 @@ func Errorf(format string, args ...interface{}) error { return err } +// getLocation records the package path-qualified function name of the error at +// callDepth stack frames above the call. +func getLocation(callDepth int) (string, int) { + rpc := make([]uintptr, 1) + n := runtime.Callers(callDepth+2, rpc[:]) + if n < 1 { + return "", 0 + } + frame, _ := runtime.CallersFrames(rpc).Next() + return frame.Function, frame.Line +} + // Trace adds the location of the Trace call to the stack. The Cause of the // resulting error is the same as the error parameter. If the other error is // nil, the result will be nil. @@ -42,6 +56,7 @@ func Errorf(format string, args ...interface{}) error { // } // func Trace(other error) error { + //return SetLocation(other, 2) if other == nil { return nil } @@ -211,13 +226,9 @@ type wrapper interface { Underlying() error } -type locationer interface { - Location() (string, int) -} - var ( _ wrapper = (*Err)(nil) - _ locationer = (*Err)(nil) + _ Locationer = (*Err)(nil) _ causer = (*Err)(nil) ) @@ -235,7 +246,7 @@ func Details(err error) string { s = append(s, '[') for { s = append(s, '{') - if err, ok := err.(locationer); ok { + if err, ok := err.(Locationer); ok { file, line := err.Location() if file != "" { s = append(s, fmt.Sprintf("%s:%d", file, line)...) @@ -286,10 +297,9 @@ func errorStack(err error) []string { var lines []string for { var buff []byte - if err, ok := err.(locationer); ok { + if err, ok := err.(Locationer); ok { file, line := err.Location() // Strip off the leading GOPATH/src path elements. - file = trimSourcePath(file) if file != "" { buff = append(buff, fmt.Sprintf("%s:%d", file, line)...) buff = append(buff, ": "...) @@ -328,3 +338,117 @@ func errorStack(err error) []string { } return result } + +// Unwrap is a proxy for the Unwrap function in Go's standard `errors` library +// (pkg.go.dev/errors). +func Unwrap(err error) error { + return stderrors.Unwrap(err) +} + +// Is is a proxy for the Is function in Go's standard `errors` library +// (pkg.go.dev/errors). +func Is(err, target error) bool { + return stderrors.Is(err, target) +} + +// HasType is a function wrapper around AsType dropping the where return value +// from AsType() making a function that can be used like this: +// +// return HasType[*MyError](err) +// +// Or +// +// if HasType[*MyError](err) {} +func HasType[T error](err error) bool { + _, rval := AsType[T](err) + return rval +} + +// As is a proxy for the As function in Go's standard `errors` library +// (pkg.go.dev/errors). +func As(err error, target interface{}) bool { + return stderrors.As(err, target) +} + +// AsType is a convenience method for checking and getting an error from within +// a chain that is of type T. If no error is found of type T in the chain the +// zero value of T is returned with false. If an error in the chain implementes +// As(any) bool then it's As method will be called if it's type is not of type T. + +// AsType finds the first error in err's chain that is assignable to type T, and +// if a match is found, returns that error value and true. Otherwise, it returns +// T's zero value and false. +// +// AsType is equivalent to errors.As, but uses a type parameter and returns +// the target, to avoid having to define a variable before the call. For +// example, callers can replace this: +// +// var pathError *fs.PathError +// if errors.As(err, &pathError) { +// fmt.Println("Failed at path:", pathError.Path) +// } +// +// With: +// +// if pathError, ok := errors.AsType[*fs.PathError](err); ok { +// fmt.Println("Failed at path:", pathError.Path) +// } +func AsType[T error](err error) (T, bool) { + for err != nil { + if e, is := err.(T); is { + return e, true + } + var res T + if x, ok := err.(interface{ As(any) bool }); ok && x.As(&res) { + return res, true + } + err = stderrors.Unwrap(err) + } + var zero T + return zero, false +} + +// SetLocation takes a given error and records where in the stack SetLocation +// was called from and returns the wrapped error with the location information +// set. The returned error implements the Locationer interface. If err is nil +// then a nil error is returned. +func SetLocation(err error, callDepth int) error { + if err == nil { + return nil + } + + return newLocationError(err, callDepth) +} + +// fmtNoop provides an internal type for wrapping errors so they won't be +// printed in fmt type commands. As this type is used by the Hide function it's +// expected that error not be nil. +type fmtNoop struct { + error +} + +// Format implements the fmt.Formatter interface so that the error wrapped by +// fmtNoop will not be printed. +func (*fmtNoop) Format(_ fmt.State, r rune) {} + +// Is implements errors.Is. It useful for us to be able to check if an error +// chain has fmtNoop for formatting purposes. +func (f *fmtNoop) Is(err error) bool { + _, is := err.(*fmtNoop) + return is +} + +// Unwrap implements the errors.Unwrap method returning the error wrapped by +// fmtNoop. +func (f *fmtNoop) Unwrap() error { + return f.error +} + +// Hide takes an error and silences it's error string from appearing in fmt +// like +func Hide(err error) error { + if err == nil { + return nil + } + return &fmtNoop{err} +} diff --git a/vendor/github.com/juju/errors/path.go b/vendor/github.com/juju/errors/path.go deleted file mode 100644 index 48968d9054..0000000000 --- a/vendor/github.com/juju/errors/path.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors - -import ( - "go/build" - "os" - "path/filepath" - "strings" - "sync/atomic" -) - -var trimValue atomic.Value -var trimDefault = filepath.Join(build.Default.GOPATH, "src") + string(os.PathSeparator) - -func trimSourcePath(filename string) string { - prefix := trimDefault - if v := trimValue.Load(); v != nil { - prefix = v.(string) - } - return strings.TrimPrefix(filename, prefix) -} - -func SetSourceTrimPrefix(s string) string { - previous := trimDefault - if v := trimValue.Load(); v != nil { - previous = v.(string) - } - trimValue.Store(s) - return previous -} diff --git a/vendor/github.com/leodido/go-urn/.gitignore b/vendor/github.com/leodido/go-urn/.gitignore index 5bcf4bade0..427454f8f1 100644 --- a/vendor/github.com/leodido/go-urn/.gitignore +++ b/vendor/github.com/leodido/go-urn/.gitignore @@ -8,4 +8,6 @@ *.out *.txt -vendor/ \ No newline at end of file +vendor/ +/removecomments +/snake2camel \ No newline at end of file diff --git a/vendor/github.com/leodido/go-urn/.travis.yml b/vendor/github.com/leodido/go-urn/.travis.yml deleted file mode 100644 index e56cf7cc06..0000000000 --- a/vendor/github.com/leodido/go-urn/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go - -go: - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - tip - -before_install: - - go get -t -v ./... - -script: - - go test -race -coverprofile=coverage.txt -covermode=atomic - -after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/vendor/github.com/leodido/go-urn/README.md b/vendor/github.com/leodido/go-urn/README.md index cc902ec0e3..619475bfbb 100644 --- a/vendor/github.com/leodido/go-urn/README.md +++ b/vendor/github.com/leodido/go-urn/README.md @@ -1,22 +1,35 @@ -[![Build](https://img.shields.io/travis/leodido/go-urn/master.svg?style=for-the-badge)](https://travis-ci.org/leodido/go-urn) [![Coverage](https://img.shields.io/codecov/c/github/leodido/go-urn.svg?style=for-the-badge)](https://codecov.io/gh/leodido/go-urn) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/leodido/go-urn) +[![Build](https://img.shields.io/circleci/build/github/leodido/go-urn?style=for-the-badge)](https://app.circleci.com/pipelines/github/leodido/go-urn) [![Coverage](https://img.shields.io/codecov/c/github/leodido/go-urn.svg?style=for-the-badge)](https://codecov.io/gh/leodido/go-urn) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/leodido/go-urn) **A parser for URNs**. -> As seen on [RFC 2141](https://tools.ietf.org/html/rfc2141#ref-1). +> As seen on [RFC 2141](https://datatracker.ietf.org/doc/html/rfc2141), [RFC 7643](https://datatracker.ietf.org/doc/html/rfc7643#section-10), and on [RFC 8141](https://datatracker.ietf.org/doc/html/rfc8141). [API documentation](https://godoc.org/github.com/leodido/go-urn). +Starting with version 1.3 this library also supports [RFC 7643 SCIM URNs](https://datatracker.ietf.org/doc/html/rfc7643#section-10). + +Starting with version 1.4 this library also supports [RFC 8141 URNs (2017)](https://datatracker.ietf.org/doc/html/rfc8141). + ## Installation ``` go get github.com/leodido/go-urn ``` +## Features + +1. RFC 2141 URNs parsing (default) +2. RFC 8141 URNs parsing (supersedes RFC 2141) +3. RFC 7643 SCIM URNs parsing +4. Normalization as per RFCs +5. Lexical equivalence as per RFCs +6. Precise, fine-grained errors + ## Performances This implementation results to be really fast. -Usually below ½ microsecond on my machine[1](#mymachine). +Usually below 400 ns on my machine[1](#mymachine). Notice it also performs, while parsing: @@ -24,32 +37,117 @@ Notice it also performs, while parsing: 2. specific-string normalization ``` -ok/00/urn:a:b______________________________________/-4 20000000 265 ns/op 182 B/op 6 allocs/op -ok/01/URN:foo:a123,456_____________________________/-4 30000000 296 ns/op 200 B/op 6 allocs/op -ok/02/urn:foo:a123%2c456___________________________/-4 20000000 331 ns/op 208 B/op 6 allocs/op -ok/03/urn:ietf:params:scim:schemas:core:2.0:User___/-4 20000000 430 ns/op 280 B/op 6 allocs/op -ok/04/urn:ietf:params:scim:schemas:extension:enterp/-4 20000000 411 ns/op 312 B/op 6 allocs/op -ok/05/urn:ietf:params:scim:schemas:extension:enterp/-4 20000000 472 ns/op 344 B/op 6 allocs/op -ok/06/urn:burnout:nss______________________________/-4 30000000 257 ns/op 192 B/op 6 allocs/op -ok/07/urn:abcdefghilmnopqrstuvzabcdefghilm:x_______/-4 20000000 375 ns/op 213 B/op 6 allocs/op -ok/08/urn:urnurnurn:urn____________________________/-4 30000000 265 ns/op 197 B/op 6 allocs/op -ok/09/urn:ciao:@!=%2c(xyz)+a,b.*@g=$_'_____________/-4 20000000 307 ns/op 248 B/op 6 allocs/op -ok/10/URN:x:abc%1dz%2f%3az_________________________/-4 30000000 259 ns/op 212 B/op 6 allocs/op -no/11/URN:-xxx:x___________________________________/-4 20000000 445 ns/op 320 B/op 6 allocs/op -no/12/urn::colon:nss_______________________________/-4 20000000 461 ns/op 320 B/op 6 allocs/op -no/13/urn:abcdefghilmnopqrstuvzabcdefghilmn:specifi/-4 10000000 660 ns/op 320 B/op 6 allocs/op -no/14/URN:a!?:x____________________________________/-4 20000000 507 ns/op 320 B/op 6 allocs/op -no/15/urn:urn:NSS__________________________________/-4 20000000 429 ns/op 288 B/op 6 allocs/op -no/16/urn:white_space:NSS__________________________/-4 20000000 482 ns/op 320 B/op 6 allocs/op -no/17/urn:concat:no_spaces_________________________/-4 20000000 539 ns/op 328 B/op 7 allocs/op -no/18/urn:a:/______________________________________/-4 20000000 470 ns/op 320 B/op 7 allocs/op -no/19/urn:UrN:NSS__________________________________/-4 20000000 399 ns/op 288 B/op 6 allocs/op +ok/00/urn:a:b______________________________________/-10 51372006 109.0 ns/op 275 B/op 3 allocs/op +ok/01/URN:foo:a123,456_____________________________/-10 36024072 160.8 ns/op 296 B/op 6 allocs/op +ok/02/urn:foo:a123%2C456___________________________/-10 31901007 188.4 ns/op 320 B/op 7 allocs/op +ok/03/urn:ietf:params:scim:schemas:core:2.0:User___/-10 22736756 266.6 ns/op 376 B/op 6 allocs/op +ok/04/urn:ietf:params:scim:schemas:extension:enterp/-10 18291859 335.2 ns/op 408 B/op 6 allocs/op +ok/05/urn:ietf:params:scim:schemas:extension:enterp/-10 15283087 379.4 ns/op 440 B/op 6 allocs/op +ok/06/urn:burnout:nss______________________________/-10 39407593 155.1 ns/op 288 B/op 6 allocs/op +ok/07/urn:abcdefghilmnopqrstuvzabcdefghilm:x_______/-10 27832718 211.4 ns/op 307 B/op 4 allocs/op +ok/08/urn:urnurnurn:urn____________________________/-10 33269596 168.1 ns/op 293 B/op 6 allocs/op +ok/09/urn:ciao:!!*_________________________________/-10 41100675 148.8 ns/op 288 B/op 6 allocs/op +ok/10/urn:ciao:=@__________________________________/-10 37214253 149.7 ns/op 284 B/op 6 allocs/op +ok/11/urn:ciao:@!=%2C(xyz)+a,b.*@g=$_'_____________/-10 26534240 229.8 ns/op 336 B/op 7 allocs/op +ok/12/URN:x:abc%1Dz%2F%3az_________________________/-10 28166396 211.8 ns/op 336 B/op 7 allocs/op +no/13/URN:---xxx:x_________________________________/-10 23635159 255.6 ns/op 419 B/op 5 allocs/op +no/14/urn::colon:nss_______________________________/-10 23594779 258.4 ns/op 419 B/op 5 allocs/op +no/15/URN:@,:x_____________________________________/-10 23742535 261.5 ns/op 419 B/op 5 allocs/op +no/16/URN:URN:NSS__________________________________/-10 27432714 223.3 ns/op 371 B/op 5 allocs/op +no/17/urn:UrN:NSS__________________________________/-10 26922117 224.9 ns/op 371 B/op 5 allocs/op +no/18/urn:a:%______________________________________/-10 24926733 224.6 ns/op 371 B/op 5 allocs/op +no/19/urn:urn:NSS__________________________________/-10 27652641 220.7 ns/op 371 B/op 5 allocs/op +``` + +* [1]: Apple M1 Pro + + +## Example + +For more examples take a look at the [examples file](examples_test.go). + + +```go +package main + +import ( + "fmt" + "github.com/leodido/go-urn" +) + +func main() { + var uid = "URN:foo:a123,456" + + // Parse the input string as a RFC 2141 URN only + u, e := urn.NewMachine().Parse(uid) + if e != nil { + fmt.Errorf(err) + + return + } + + fmt.Println(u.ID) + fmt.Println(u.SS) + + // Output: + // foo + // a123,456 +} +``` + +```go +package main + +import ( + "fmt" + "github.com/leodido/go-urn" +) + +func main() { + var uid = "URN:foo:a123,456" + + // Parse the input string as a RFC 2141 URN only + u, ok := urn.Parse([]byte(uid)) + if !ok { + panic("error parsing urn") + } + + fmt.Println(u.ID) + fmt.Println(u.SS) + + // Output: + // foo + // a123,456 +} ``` ---- +```go +package main + +import ( + "fmt" + "github.com/leodido/go-urn" +) + +func main() { + input := "urn:ietf:params:scim:api:messages:2.0:ListResponse" -* [1]: Intel Core i7-7600U CPU @ 2.80GHz + // Parsing the input string as a RFC 7643 SCIM URN + u, ok := urn.Parse([]byte(input), urn.WithParsingMode(urn.RFC7643Only)) + if !ok { + panic("error parsing urn") + } ---- + fmt.Println(u.IsSCIM()) + scim := u.SCIM() + fmt.Println(scim.Type.String()) + fmt.Println(scim.Name) + fmt.Println(scim.Other) -[![Analytics](https://ga-beacon.appspot.com/UA-49657176-1/go-urn?flat)](https://github.com/igrigorik/ga-beacon) \ No newline at end of file + // Output: + // true + // api + // messages + // 2.0:ListResponse +} +``` \ No newline at end of file diff --git a/vendor/github.com/leodido/go-urn/kind.go b/vendor/github.com/leodido/go-urn/kind.go new file mode 100644 index 0000000000..f5e140f0a4 --- /dev/null +++ b/vendor/github.com/leodido/go-urn/kind.go @@ -0,0 +1,10 @@ +package urn + +type Kind int + +const ( + NONE Kind = iota + RFC2141 + RFC7643 + RFC8141 +) diff --git a/vendor/github.com/leodido/go-urn/machine.go b/vendor/github.com/leodido/go-urn/machine.go index fe5a0cc861..aec1ba69cb 100644 --- a/vendor/github.com/leodido/go-urn/machine.go +++ b/vendor/github.com/leodido/go-urn/machine.go @@ -2,27 +2,98 @@ package urn import ( "fmt" + + scimschema "github.com/leodido/go-urn/scim/schema" ) var ( - errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" - errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its start) [col %d]" - errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" - errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" - errHex = "expecting the specific string hex chars to be well-formed (%%alnum{2}) [col %d]" - errParse = "parsing error [col %d]" + errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" + errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]" + errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" + errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" + errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]" + errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]" + errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]" + errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]" + errSCIMOther = "expecting a well-formed other SCIM part [col %d]" + errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]" + err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]" + err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]" + err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]" + err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]" + err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]" + err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" + err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" ) +var _toStateActions []byte = []byte{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, +} + +var _eofActions []byte = []byte{ + 0, 1, 1, 1, 1, 4, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 8, 9, + 9, 4, 4, 11, 1, 1, 1, 1, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 14, 14, 14, 14, 16, 18, 20, + 20, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 1, 1, 1, 1, 21, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 23, 24, 24, 25, 25, 0, 26, 28, + 28, 29, 29, 30, 30, 26, 26, 31, + 31, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 21, + 21, 22, 22, 22, 34, 34, 35, 37, + 37, 38, 40, 41, 41, 38, 42, 42, + 42, 44, 42, 48, 48, 48, 50, 44, + 50, 0, +} const start int = 1 -const firstFinal int = 44 +const firstFinal int = 172 -const enFail int = 46 +const enScimOnly int = 44 +const enRfc8141Only int = 83 +const enFail int = 193 const enMain int = 1 // Machine is the interface representing the FSM type Machine interface { Error() error Parse(input []byte) (*URN, error) + WithParsingMode(ParsingMode) } type machine struct { @@ -30,12 +101,24 @@ type machine struct { cs int p, pe, eof, pb int err error - tolower []int + startParsingAt int + parsingMode ParsingMode + parsingModeSet bool } // NewMachine creates a new FSM able to parse RFC 2141 strings. -func NewMachine() Machine { - m := &machine{} +func NewMachine(options ...Option) Machine { + m := &machine{ + parsingModeSet: false, + } + + for _, o := range options { + o(m) + } + // Set default parsing mode + if !m.parsingModeSet { + m.WithParsingMode(DefaultParsingMode) + } return m } @@ -51,7 +134,7 @@ func (m *machine) text() []byte { return m.data[m.pb:m.p] } -// Parse parses the input byte array as a RFC 2141 string. +// Parse parses the input byte array as a RFC 2141 or RFC7643 string. func (m *machine) Parse(input []byte) (*URN, error) { m.data = input m.p = 0 @@ -59,1622 +142,4881 @@ func (m *machine) Parse(input []byte) (*URN, error) { m.pe = len(input) m.eof = len(input) m.err = nil - m.tolower = []int{} - output := &URN{} - - { - m.cs = start + m.cs = m.startParsingAt + output := &URN{ + tolower: []int{}, } - { if (m.p) == (m.pe) { goto _testEof } + if m.cs == 0 { + goto _out + } + _resume: switch m.cs { case 1: - goto stCase1 + switch (m.data)[(m.p)] { + case 85: + goto tr1 + case 117: + goto tr1 + } + goto tr0 case 0: - goto stCase0 + goto _out case 2: - goto stCase2 + switch (m.data)[(m.p)] { + case 82: + goto tr2 + case 114: + goto tr2 + } + goto tr0 case 3: - goto stCase3 + switch (m.data)[(m.p)] { + case 78: + goto tr3 + case 110: + goto tr3 + } + goto tr0 case 4: - goto stCase4 + if (m.data)[(m.p)] == 58 { + goto tr4 + } + goto tr0 case 5: - goto stCase5 + switch (m.data)[(m.p)] { + case 85: + goto tr7 + case 117: + goto tr7 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr6 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr6 + } + default: + goto tr6 + } + goto tr5 case 6: - goto stCase6 + switch (m.data)[(m.p)] { + case 45: + goto tr9 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr9 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr9 + } + default: + goto tr9 + } + goto tr8 case 7: - goto stCase7 + switch (m.data)[(m.p)] { + case 45: + goto tr11 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr11 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr11 + } + default: + goto tr11 + } + goto tr8 case 8: - goto stCase8 + switch (m.data)[(m.p)] { + case 45: + goto tr12 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr12 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr12 + } + default: + goto tr12 + } + goto tr8 case 9: - goto stCase9 + switch (m.data)[(m.p)] { + case 45: + goto tr13 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr13 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr13 + } + default: + goto tr13 + } + goto tr8 case 10: - goto stCase10 + switch (m.data)[(m.p)] { + case 45: + goto tr14 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr14 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr14 + } + default: + goto tr14 + } + goto tr8 case 11: - goto stCase11 + switch (m.data)[(m.p)] { + case 45: + goto tr15 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr15 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr15 + } + default: + goto tr15 + } + goto tr8 case 12: - goto stCase12 + switch (m.data)[(m.p)] { + case 45: + goto tr16 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr16 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr16 + } + default: + goto tr16 + } + goto tr8 case 13: - goto stCase13 + switch (m.data)[(m.p)] { + case 45: + goto tr17 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr17 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr17 + } + default: + goto tr17 + } + goto tr8 case 14: - goto stCase14 + switch (m.data)[(m.p)] { + case 45: + goto tr18 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr18 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr18 + } + default: + goto tr18 + } + goto tr8 case 15: - goto stCase15 + switch (m.data)[(m.p)] { + case 45: + goto tr19 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr19 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr19 + } + default: + goto tr19 + } + goto tr8 case 16: - goto stCase16 + switch (m.data)[(m.p)] { + case 45: + goto tr20 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr20 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr20 + } + default: + goto tr20 + } + goto tr8 case 17: - goto stCase17 + switch (m.data)[(m.p)] { + case 45: + goto tr21 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr21 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr21 + } + default: + goto tr21 + } + goto tr8 case 18: - goto stCase18 + switch (m.data)[(m.p)] { + case 45: + goto tr22 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr22 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr22 + } + default: + goto tr22 + } + goto tr8 case 19: - goto stCase19 + switch (m.data)[(m.p)] { + case 45: + goto tr23 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr23 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr23 + } + default: + goto tr23 + } + goto tr8 case 20: - goto stCase20 + switch (m.data)[(m.p)] { + case 45: + goto tr24 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr24 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr24 + } + default: + goto tr24 + } + goto tr8 case 21: - goto stCase21 + switch (m.data)[(m.p)] { + case 45: + goto tr25 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr25 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr25 + } + default: + goto tr25 + } + goto tr8 case 22: - goto stCase22 + switch (m.data)[(m.p)] { + case 45: + goto tr26 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr26 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr26 + } + default: + goto tr26 + } + goto tr8 case 23: - goto stCase23 + switch (m.data)[(m.p)] { + case 45: + goto tr27 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr27 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr27 + } + default: + goto tr27 + } + goto tr8 case 24: - goto stCase24 + switch (m.data)[(m.p)] { + case 45: + goto tr28 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr28 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr28 + } + default: + goto tr28 + } + goto tr8 case 25: - goto stCase25 + switch (m.data)[(m.p)] { + case 45: + goto tr29 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr29 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr29 + } + default: + goto tr29 + } + goto tr8 case 26: - goto stCase26 + switch (m.data)[(m.p)] { + case 45: + goto tr30 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr30 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr30 + } + default: + goto tr30 + } + goto tr8 case 27: - goto stCase27 + switch (m.data)[(m.p)] { + case 45: + goto tr31 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr31 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr31 + } + default: + goto tr31 + } + goto tr8 case 28: - goto stCase28 + switch (m.data)[(m.p)] { + case 45: + goto tr32 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr32 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr32 + } + default: + goto tr32 + } + goto tr8 case 29: - goto stCase29 + switch (m.data)[(m.p)] { + case 45: + goto tr33 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr33 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr33 + } + default: + goto tr33 + } + goto tr8 case 30: - goto stCase30 + switch (m.data)[(m.p)] { + case 45: + goto tr34 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr34 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr34 + } + default: + goto tr34 + } + goto tr8 case 31: - goto stCase31 + switch (m.data)[(m.p)] { + case 45: + goto tr35 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr35 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr35 + } + default: + goto tr35 + } + goto tr8 case 32: - goto stCase32 + switch (m.data)[(m.p)] { + case 45: + goto tr36 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr36 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr36 + } + default: + goto tr36 + } + goto tr8 case 33: - goto stCase33 + switch (m.data)[(m.p)] { + case 45: + goto tr37 + case 58: + goto tr10 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr37 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr37 + } + default: + goto tr37 + } + goto tr8 case 34: - goto stCase34 - case 35: - goto stCase35 - case 36: - goto stCase36 - case 37: - goto stCase37 - case 38: - goto stCase38 - case 44: - goto stCase44 - case 39: - goto stCase39 - case 40: - goto stCase40 - case 45: - goto stCase45 - case 41: - goto stCase41 - case 42: - goto stCase42 - case 43: - goto stCase43 - case 46: - goto stCase46 - } - goto stOut - stCase1: - switch (m.data)[(m.p)] { - case 85: - goto tr1 - case 117: - goto tr1 - } - goto tr0 - tr0: - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr3: - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr6: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr41: - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr44: - - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr50: - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - tr52: - - m.err = fmt.Errorf(errNoUrnWithinID, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - { - goto st46 - } - - m.err = fmt.Errorf(errParse, m.p) - (m.p)-- - - { - goto st46 - } - - goto st0 - stCase0: - st0: - m.cs = 0 - goto _out - tr1: - - m.pb = m.p - - goto st2 - st2: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof2 - } - stCase2: - switch (m.data)[(m.p)] { - case 82: - goto st3 - case 114: - goto st3 - } - goto tr0 - st3: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof3 - } - stCase3: - switch (m.data)[(m.p)] { - case 78: - goto st4 - case 110: - goto st4 - } - goto tr3 - st4: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof4 - } - stCase4: - if (m.data)[(m.p)] == 58 { - goto tr5 - } - goto tr0 - tr5: - - output.prefix = string(m.text()) - - goto st5 - st5: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof5 - } - stCase5: - switch (m.data)[(m.p)] { - case 85: - goto tr8 - case 117: - goto tr8 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr7 + switch (m.data)[(m.p)] { + case 45: + goto tr38 + case 58: + goto tr10 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr7 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr38 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr38 + } + default: + goto tr38 } - default: - goto tr7 - } - goto tr6 - tr7: - - m.pb = m.p - - goto st6 - st6: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof6 - } - stCase6: - switch (m.data)[(m.p)] { - case 45: - goto st7 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st7 + goto tr8 + case 35: + switch (m.data)[(m.p)] { + case 45: + goto tr39 + case 58: + goto tr10 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st7 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr39 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr39 + } + default: + goto tr39 } - default: - goto st7 - } - goto tr6 - st7: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof7 - } - stCase7: - switch (m.data)[(m.p)] { - case 45: - goto st8 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st8 + goto tr8 + case 36: + switch (m.data)[(m.p)] { + case 45: + goto tr40 + case 58: + goto tr10 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st8 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr40 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr40 + } + default: + goto tr40 } - default: - goto st8 - } - goto tr6 - st8: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof8 - } - stCase8: - switch (m.data)[(m.p)] { - case 45: - goto st9 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st9 + goto tr8 + case 37: + if (m.data)[(m.p)] == 58 { + goto tr10 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st9 + goto tr8 + case 38: + switch (m.data)[(m.p)] { + case 33: + goto tr42 + case 36: + goto tr42 + case 37: + goto tr43 + case 61: + goto tr42 + case 95: + goto tr42 } - default: - goto st9 - } - goto tr6 - st9: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof9 - } - stCase9: - switch (m.data)[(m.p)] { - case 45: - goto st10 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st10 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr42 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr42 + } + case (m.data)[(m.p)] >= 64: + goto tr42 + } + default: + goto tr42 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st10 + goto tr41 + case 172: + switch (m.data)[(m.p)] { + case 33: + goto tr212 + case 36: + goto tr212 + case 37: + goto tr213 + case 61: + goto tr212 + case 95: + goto tr212 } - default: - goto st10 - } - goto tr6 - st10: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof10 - } - stCase10: - switch (m.data)[(m.p)] { - case 45: - goto st11 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st11 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr212 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr212 + } + case (m.data)[(m.p)] >= 64: + goto tr212 + } + default: + goto tr212 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st11 + goto tr41 + case 39: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr45 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr45 + } + default: + goto tr46 } - default: - goto st11 - } - goto tr6 - st11: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof11 - } - stCase11: - switch (m.data)[(m.p)] { - case 45: - goto st12 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st12 + goto tr44 + case 40: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr47 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr47 + } + default: + goto tr48 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st12 + goto tr44 + case 173: + switch (m.data)[(m.p)] { + case 33: + goto tr212 + case 36: + goto tr212 + case 37: + goto tr213 + case 61: + goto tr212 + case 95: + goto tr212 } - default: - goto st12 - } - goto tr6 - st12: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof12 - } - stCase12: - switch (m.data)[(m.p)] { - case 45: - goto st13 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st13 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr212 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr212 + } + case (m.data)[(m.p)] >= 64: + goto tr212 + } + default: + goto tr212 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st13 + goto tr44 + case 41: + switch (m.data)[(m.p)] { + case 45: + goto tr9 + case 58: + goto tr10 + case 82: + goto tr49 + case 114: + goto tr49 } - default: - goto st13 - } - goto tr6 - st13: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof13 - } - stCase13: - switch (m.data)[(m.p)] { - case 45: - goto st14 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st14 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr9 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr9 + } + default: + goto tr9 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st14 + goto tr5 + case 42: + switch (m.data)[(m.p)] { + case 45: + goto tr11 + case 58: + goto tr10 + case 78: + goto tr50 + case 110: + goto tr50 } - default: - goto st14 - } - goto tr6 - st14: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof14 - } - stCase14: - switch (m.data)[(m.p)] { - case 45: - goto st15 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st15 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr11 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr11 + } + default: + goto tr11 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st15 + goto tr5 + case 43: + if (m.data)[(m.p)] == 45 { + goto tr12 } - default: - goto st15 - } - goto tr6 - st15: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof15 - } - stCase15: - switch (m.data)[(m.p)] { - case 45: - goto st16 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st16 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr12 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr12 + } + default: + goto tr12 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st16 + goto tr51 + case 44: + switch (m.data)[(m.p)] { + case 85: + goto tr52 + case 117: + goto tr52 } - default: - goto st16 - } - goto tr6 - st16: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof16 - } - stCase16: - switch (m.data)[(m.p)] { + goto tr0 case 45: - goto st17 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st17 + switch (m.data)[(m.p)] { + case 82: + goto tr53 + case 114: + goto tr53 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st17 + goto tr0 + case 46: + switch (m.data)[(m.p)] { + case 78: + goto tr54 + case 110: + goto tr54 } - default: - goto st17 - } - goto tr6 - st17: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof17 - } - stCase17: - switch (m.data)[(m.p)] { - case 45: - goto st18 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st18 + goto tr0 + case 47: + if (m.data)[(m.p)] == 58 { + goto tr55 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st18 + goto tr0 + case 48: + if (m.data)[(m.p)] == 105 { + goto tr57 } - default: - goto st18 - } - goto tr6 - st18: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof18 - } - stCase18: - switch (m.data)[(m.p)] { - case 45: - goto st19 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st19 + goto tr56 + case 49: + if (m.data)[(m.p)] == 101 { + goto tr58 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st19 + goto tr56 + case 50: + if (m.data)[(m.p)] == 116 { + goto tr59 } - default: - goto st19 - } - goto tr6 - st19: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof19 - } - stCase19: - switch (m.data)[(m.p)] { - case 45: - goto st20 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st20 + goto tr56 + case 51: + if (m.data)[(m.p)] == 102 { + goto tr60 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st20 + goto tr56 + case 52: + if (m.data)[(m.p)] == 58 { + goto tr61 } - default: - goto st20 - } - goto tr6 - st20: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof20 - } - stCase20: - switch (m.data)[(m.p)] { - case 45: - goto st21 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st21 + goto tr56 + case 53: + if (m.data)[(m.p)] == 112 { + goto tr62 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st21 + goto tr56 + case 54: + if (m.data)[(m.p)] == 97 { + goto tr63 } - default: - goto st21 - } - goto tr6 - st21: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof21 - } - stCase21: - switch (m.data)[(m.p)] { - case 45: - goto st22 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st22 + goto tr56 + case 55: + if (m.data)[(m.p)] == 114 { + goto tr64 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st22 + goto tr56 + case 56: + if (m.data)[(m.p)] == 97 { + goto tr65 } - default: - goto st22 - } - goto tr6 - st22: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof22 - } - stCase22: - switch (m.data)[(m.p)] { - case 45: - goto st23 + goto tr56 + case 57: + if (m.data)[(m.p)] == 109 { + goto tr66 + } + goto tr56 case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st23 + if (m.data)[(m.p)] == 115 { + goto tr67 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st23 + goto tr56 + case 59: + if (m.data)[(m.p)] == 58 { + goto tr68 } - default: - goto st23 - } - goto tr6 - st23: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof23 - } - stCase23: - switch (m.data)[(m.p)] { - case 45: - goto st24 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st24 + goto tr56 + case 60: + if (m.data)[(m.p)] == 115 { + goto tr69 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st24 + goto tr56 + case 61: + if (m.data)[(m.p)] == 99 { + goto tr70 } - default: - goto st24 - } - goto tr6 - st24: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof24 - } - stCase24: - switch (m.data)[(m.p)] { - case 45: - goto st25 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st25 + goto tr56 + case 62: + if (m.data)[(m.p)] == 105 { + goto tr71 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st25 + goto tr56 + case 63: + if (m.data)[(m.p)] == 109 { + goto tr72 } - default: - goto st25 - } - goto tr6 - st25: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof25 - } - stCase25: - switch (m.data)[(m.p)] { - case 45: - goto st26 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st26 + goto tr56 + case 64: + if (m.data)[(m.p)] == 58 { + goto tr73 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st26 + goto tr56 + case 65: + switch (m.data)[(m.p)] { + case 97: + goto tr75 + case 112: + goto tr76 + case 115: + goto tr77 } - default: - goto st26 - } - goto tr6 - st26: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof26 - } - stCase26: - switch (m.data)[(m.p)] { - case 45: - goto st27 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st27 + goto tr74 + case 66: + if (m.data)[(m.p)] == 112 { + goto tr78 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st27 + goto tr74 + case 67: + if (m.data)[(m.p)] == 105 { + goto tr79 } - default: - goto st27 - } - goto tr6 - st27: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof27 - } - stCase27: - switch (m.data)[(m.p)] { - case 45: - goto st28 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st28 + goto tr74 + case 68: + if (m.data)[(m.p)] == 58 { + goto tr80 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st28 + goto tr74 + case 69: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr82 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr82 + } + default: + goto tr82 } - default: - goto st28 - } - goto tr6 - st28: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof28 - } - stCase28: - switch (m.data)[(m.p)] { - case 45: - goto st29 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st29 + goto tr81 + case 174: + if (m.data)[(m.p)] == 58 { + goto tr215 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st29 + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr214 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr214 + } + default: + goto tr214 } - default: - goto st29 - } - goto tr6 - st29: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof29 - } - stCase29: - switch (m.data)[(m.p)] { - case 45: - goto st30 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st30 + goto tr81 + case 70: + switch (m.data)[(m.p)] { + case 33: + goto tr84 + case 36: + goto tr84 + case 37: + goto tr85 + case 61: + goto tr84 + case 95: + goto tr84 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st30 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr84 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr84 + } + case (m.data)[(m.p)] >= 64: + goto tr84 + } + default: + goto tr84 } - default: - goto st30 - } - goto tr6 - st30: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof30 - } - stCase30: - switch (m.data)[(m.p)] { - case 45: - goto st31 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st31 + goto tr83 + case 175: + switch (m.data)[(m.p)] { + case 33: + goto tr216 + case 36: + goto tr216 + case 37: + goto tr217 + case 61: + goto tr216 + case 95: + goto tr216 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st31 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr216 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr216 + } + case (m.data)[(m.p)] >= 64: + goto tr216 + } + default: + goto tr216 } - default: - goto st31 - } - goto tr6 - st31: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof31 - } - stCase31: - switch (m.data)[(m.p)] { - case 45: - goto st32 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st32 + goto tr83 + case 71: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr87 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr87 + } + default: + goto tr88 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st32 + goto tr86 + case 72: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr89 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr89 + } + default: + goto tr90 } - default: - goto st32 - } - goto tr6 - st32: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof32 - } - stCase32: - switch (m.data)[(m.p)] { - case 45: - goto st33 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st33 + goto tr86 + case 176: + switch (m.data)[(m.p)] { + case 33: + goto tr216 + case 36: + goto tr216 + case 37: + goto tr217 + case 61: + goto tr216 + case 95: + goto tr216 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st33 + switch { + case (m.data)[(m.p)] < 48: + if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr216 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr216 + } + case (m.data)[(m.p)] >= 64: + goto tr216 + } + default: + goto tr216 } - default: - goto st33 - } - goto tr6 - st33: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof33 - } - stCase33: - switch (m.data)[(m.p)] { - case 45: - goto st34 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st34 + goto tr86 + case 73: + if (m.data)[(m.p)] == 97 { + goto tr91 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st34 + goto tr74 + case 74: + if (m.data)[(m.p)] == 114 { + goto tr92 } - default: - goto st34 - } - goto tr6 - st34: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof34 - } - stCase34: - switch (m.data)[(m.p)] { - case 45: - goto st35 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st35 + goto tr74 + case 75: + if (m.data)[(m.p)] == 97 { + goto tr93 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st35 + goto tr74 + case 76: + if (m.data)[(m.p)] == 109 { + goto tr79 } - default: - goto st35 - } - goto tr6 - st35: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof35 - } - stCase35: - switch (m.data)[(m.p)] { - case 45: - goto st36 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st36 + goto tr74 + case 77: + if (m.data)[(m.p)] == 99 { + goto tr94 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st36 + goto tr74 + case 78: + if (m.data)[(m.p)] == 104 { + goto tr95 } - default: - goto st36 - } - goto tr6 - st36: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof36 - } - stCase36: - switch (m.data)[(m.p)] { - case 45: - goto st37 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st37 + goto tr74 + case 79: + if (m.data)[(m.p)] == 101 { + goto tr96 } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st37 + goto tr74 + case 80: + if (m.data)[(m.p)] == 109 { + goto tr97 } - default: - goto st37 - } - goto tr6 - st37: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof37 - } - stCase37: - if (m.data)[(m.p)] == 58 { - goto tr10 - } - goto tr6 - tr10: - - output.ID = string(m.text()) - - goto st38 - st38: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof38 - } - stCase38: - switch (m.data)[(m.p)] { - case 33: - goto tr42 - case 36: - goto tr42 - case 37: - goto tr43 - case 61: - goto tr42 - case 95: - goto tr42 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr42 + goto tr74 + case 81: + if (m.data)[(m.p)] == 97 { + goto tr98 + } + goto tr74 + case 82: + if (m.data)[(m.p)] == 115 { + goto tr79 + } + goto tr74 + case 83: + switch (m.data)[(m.p)] { + case 85: + goto tr99 + case 117: + goto tr99 + } + goto tr0 + case 84: + switch (m.data)[(m.p)] { + case 82: + goto tr100 + case 114: + goto tr100 + } + goto tr0 + case 85: + switch (m.data)[(m.p)] { + case 78: + goto tr101 + case 110: + goto tr101 + } + goto tr0 + case 86: + if (m.data)[(m.p)] == 58 { + goto tr102 + } + goto tr0 + case 87: + switch (m.data)[(m.p)] { + case 85: + goto tr105 + case 117: + goto tr105 } - case (m.data)[(m.p)] > 59: switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr104 + } case (m.data)[(m.p)] > 90: if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr42 + goto tr104 } - case (m.data)[(m.p)] >= 64: - goto tr42 + default: + goto tr104 } - default: - goto tr42 - } - goto tr41 - tr42: - - m.pb = m.p - - goto st44 - st44: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof44 - } - stCase44: - switch (m.data)[(m.p)] { - case 33: - goto st44 - case 36: - goto st44 - case 37: - goto st39 - case 61: - goto st44 + goto tr103 + case 88: + if (m.data)[(m.p)] == 45 { + goto tr107 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr108 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr108 + } + default: + goto tr108 + } + goto tr106 + case 89: + if (m.data)[(m.p)] == 45 { + goto tr109 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr110 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr110 + } + default: + goto tr110 + } + goto tr106 + case 90: + if (m.data)[(m.p)] == 45 { + goto tr111 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr112 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr112 + } + default: + goto tr112 + } + goto tr106 + case 91: + if (m.data)[(m.p)] == 45 { + goto tr113 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr114 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr114 + } + default: + goto tr114 + } + goto tr106 + case 92: + if (m.data)[(m.p)] == 45 { + goto tr115 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr116 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr116 + } + default: + goto tr116 + } + goto tr106 + case 93: + if (m.data)[(m.p)] == 45 { + goto tr117 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr118 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr118 + } + default: + goto tr118 + } + goto tr106 + case 94: + if (m.data)[(m.p)] == 45 { + goto tr119 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr120 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr120 + } + default: + goto tr120 + } + goto tr106 case 95: - goto st44 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto st44 + if (m.data)[(m.p)] == 45 { + goto tr121 } - case (m.data)[(m.p)] > 59: switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr122 + } case (m.data)[(m.p)] > 90: if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st44 + goto tr122 } - case (m.data)[(m.p)] >= 64: - goto st44 + default: + goto tr122 } - default: - goto st44 - } - goto tr41 - tr43: + goto tr106 + case 96: + if (m.data)[(m.p)] == 45 { + goto tr123 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr124 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr124 + } + default: + goto tr124 + } + goto tr106 + case 97: + if (m.data)[(m.p)] == 45 { + goto tr125 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr126 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr126 + } + default: + goto tr126 + } + goto tr106 + case 98: + if (m.data)[(m.p)] == 45 { + goto tr127 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr128 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr128 + } + default: + goto tr128 + } + goto tr106 + case 99: + if (m.data)[(m.p)] == 45 { + goto tr129 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr130 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr130 + } + default: + goto tr130 + } + goto tr106 + case 100: + if (m.data)[(m.p)] == 45 { + goto tr131 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr132 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr132 + } + default: + goto tr132 + } + goto tr106 + case 101: + if (m.data)[(m.p)] == 45 { + goto tr133 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr134 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr134 + } + default: + goto tr134 + } + goto tr106 + case 102: + if (m.data)[(m.p)] == 45 { + goto tr135 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr136 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr136 + } + default: + goto tr136 + } + goto tr106 + case 103: + if (m.data)[(m.p)] == 45 { + goto tr137 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr138 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr138 + } + default: + goto tr138 + } + goto tr106 + case 104: + if (m.data)[(m.p)] == 45 { + goto tr139 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr140 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr140 + } + default: + goto tr140 + } + goto tr106 + case 105: + if (m.data)[(m.p)] == 45 { + goto tr141 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr142 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr142 + } + default: + goto tr142 + } + goto tr106 + case 106: + if (m.data)[(m.p)] == 45 { + goto tr143 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr144 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr144 + } + default: + goto tr144 + } + goto tr106 + case 107: + if (m.data)[(m.p)] == 45 { + goto tr145 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr146 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr146 + } + default: + goto tr146 + } + goto tr106 + case 108: + if (m.data)[(m.p)] == 45 { + goto tr147 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr148 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr148 + } + default: + goto tr148 + } + goto tr106 + case 109: + if (m.data)[(m.p)] == 45 { + goto tr149 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr150 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr150 + } + default: + goto tr150 + } + goto tr106 + case 110: + if (m.data)[(m.p)] == 45 { + goto tr151 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr152 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr152 + } + default: + goto tr152 + } + goto tr106 + case 111: + if (m.data)[(m.p)] == 45 { + goto tr153 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr154 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr154 + } + default: + goto tr154 + } + goto tr106 + case 112: + if (m.data)[(m.p)] == 45 { + goto tr155 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr156 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr156 + } + default: + goto tr156 + } + goto tr106 + case 113: + if (m.data)[(m.p)] == 45 { + goto tr157 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr158 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr158 + } + default: + goto tr158 + } + goto tr106 + case 114: + if (m.data)[(m.p)] == 45 { + goto tr159 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr160 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr160 + } + default: + goto tr160 + } + goto tr106 + case 115: + if (m.data)[(m.p)] == 45 { + goto tr161 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr162 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr162 + } + default: + goto tr162 + } + goto tr106 + case 116: + if (m.data)[(m.p)] == 45 { + goto tr163 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr164 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr164 + } + default: + goto tr164 + } + goto tr106 + case 117: + if (m.data)[(m.p)] == 45 { + goto tr165 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr166 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr166 + } + default: + goto tr166 + } + goto tr106 + case 118: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr167 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr167 + } + default: + goto tr167 + } + goto tr106 + case 119: + if (m.data)[(m.p)] == 58 { + goto tr168 + } + goto tr106 + case 120: + switch (m.data)[(m.p)] { + case 33: + goto tr170 + case 37: + goto tr171 + case 61: + goto tr170 + case 95: + goto tr170 + case 126: + goto tr170 + } + switch { + case (m.data)[(m.p)] < 48: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr170 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr170 + } + case (m.data)[(m.p)] >= 64: + goto tr170 + } + default: + goto tr170 + } + goto tr169 + case 177: + switch (m.data)[(m.p)] { + case 33: + goto tr218 + case 35: + goto tr219 + case 37: + goto tr220 + case 61: + goto tr218 + case 63: + goto tr221 + case 95: + goto tr218 + case 126: + goto tr218 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr218 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr218 + } + default: + goto tr218 + } + goto tr169 + case 178: + switch (m.data)[(m.p)] { + case 33: + goto tr222 + case 37: + goto tr223 + case 61: + goto tr222 + case 95: + goto tr222 + case 126: + goto tr222 + } + switch { + case (m.data)[(m.p)] < 63: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr222 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr222 + } + default: + goto tr222 + } + goto tr183 + case 179: + switch (m.data)[(m.p)] { + case 33: + goto tr224 + case 37: + goto tr225 + case 61: + goto tr224 + case 95: + goto tr224 + case 126: + goto tr224 + } + switch { + case (m.data)[(m.p)] < 63: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr224 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr224 + } + default: + goto tr224 + } + goto tr183 + case 121: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr173 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr173 + } + default: + goto tr174 + } + goto tr172 + case 122: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr175 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr175 + } + default: + goto tr176 + } + goto tr172 + case 180: + switch (m.data)[(m.p)] { + case 33: + goto tr224 + case 37: + goto tr225 + case 61: + goto tr224 + case 95: + goto tr224 + case 126: + goto tr224 + } + switch { + case (m.data)[(m.p)] < 63: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr224 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr224 + } + default: + goto tr224 + } + goto tr172 + case 123: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr178 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr178 + } + default: + goto tr179 + } + goto tr177 + case 124: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr180 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr180 + } + default: + goto tr181 + } + goto tr177 + case 181: + switch (m.data)[(m.p)] { + case 33: + goto tr218 + case 35: + goto tr219 + case 37: + goto tr220 + case 61: + goto tr218 + case 63: + goto tr221 + case 95: + goto tr218 + case 126: + goto tr218 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr218 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr218 + } + default: + goto tr218 + } + goto tr177 + case 125: + switch (m.data)[(m.p)] { + case 43: + goto tr182 + case 61: + goto tr184 + } + goto tr183 + case 126: + switch (m.data)[(m.p)] { + case 33: + goto tr186 + case 37: + goto tr187 + case 61: + goto tr186 + case 63: + goto tr188 + case 95: + goto tr186 + case 126: + goto tr186 + } + switch { + case (m.data)[(m.p)] < 48: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr186 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr186 + } + case (m.data)[(m.p)] >= 64: + goto tr186 + } + default: + goto tr186 + } + goto tr185 + case 182: + switch (m.data)[(m.p)] { + case 33: + goto tr226 + case 35: + goto tr227 + case 37: + goto tr228 + case 61: + goto tr226 + case 63: + goto tr229 + case 95: + goto tr226 + case 126: + goto tr226 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr226 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr226 + } + default: + goto tr226 + } + goto tr185 + case 127: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr190 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr190 + } + default: + goto tr191 + } + goto tr189 + case 128: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr192 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr192 + } + default: + goto tr193 + } + goto tr189 + case 183: + switch (m.data)[(m.p)] { + case 33: + goto tr226 + case 35: + goto tr227 + case 37: + goto tr228 + case 61: + goto tr226 + case 63: + goto tr229 + case 95: + goto tr226 + case 126: + goto tr226 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr226 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr226 + } + default: + goto tr226 + } + goto tr189 + case 184: + switch (m.data)[(m.p)] { + case 33: + goto tr226 + case 35: + goto tr227 + case 37: + goto tr228 + case 43: + goto tr230 + case 61: + goto tr231 + case 63: + goto tr229 + case 95: + goto tr226 + case 126: + goto tr226 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr226 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr226 + } + default: + goto tr226 + } + goto tr185 + case 185: + switch (m.data)[(m.p)] { + case 33: + goto tr232 + case 35: + goto tr233 + case 37: + goto tr234 + case 47: + goto tr226 + case 61: + goto tr232 + case 63: + goto tr235 + case 95: + goto tr232 + case 126: + goto tr232 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr232 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr232 + } + default: + goto tr232 + } + goto tr185 + case 186: + switch (m.data)[(m.p)] { + case 33: + goto tr204 + case 35: + goto tr227 + case 37: + goto tr237 + case 47: + goto tr226 + case 61: + goto tr204 + case 63: + goto tr229 + case 95: + goto tr204 + case 126: + goto tr204 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr204 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr204 + } + default: + goto tr204 + } + goto tr236 + case 187: + switch (m.data)[(m.p)] { + case 33: + goto tr238 + case 35: + goto tr239 + case 37: + goto tr240 + case 61: + goto tr238 + case 63: + goto tr241 + case 95: + goto tr238 + case 126: + goto tr238 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr238 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr238 + } + default: + goto tr238 + } + goto tr203 + case 129: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr195 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr195 + } + default: + goto tr196 + } + goto tr194 + case 130: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr197 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr197 + } + default: + goto tr198 + } + goto tr194 + case 188: + switch (m.data)[(m.p)] { + case 33: + goto tr238 + case 35: + goto tr239 + case 37: + goto tr240 + case 61: + goto tr238 + case 63: + goto tr241 + case 95: + goto tr238 + case 126: + goto tr238 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr238 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr238 + } + default: + goto tr238 + } + goto tr194 + case 189: + switch (m.data)[(m.p)] { + case 33: + goto tr238 + case 35: + goto tr239 + case 37: + goto tr240 + case 61: + goto tr242 + case 63: + goto tr241 + case 95: + goto tr238 + case 126: + goto tr238 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr238 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr238 + } + default: + goto tr238 + } + goto tr203 + case 190: + switch (m.data)[(m.p)] { + case 33: + goto tr243 + case 35: + goto tr244 + case 37: + goto tr245 + case 47: + goto tr238 + case 61: + goto tr243 + case 63: + goto tr246 + case 95: + goto tr243 + case 126: + goto tr243 + } + switch { + case (m.data)[(m.p)] < 64: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { + goto tr243 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr243 + } + default: + goto tr243 + } + goto tr203 + case 131: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr200 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr200 + } + default: + goto tr201 + } + goto tr199 + case 132: + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr197 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr197 + } + default: + goto tr198 + } + goto tr199 + case 133: + if (m.data)[(m.p)] == 43 { + goto tr202 + } + goto tr185 + case 191: + switch (m.data)[(m.p)] { + case 33: + goto tr232 + case 35: + goto tr233 + case 37: + goto tr234 + case 61: + goto tr232 + case 63: + goto tr247 + case 95: + goto tr232 + case 126: + goto tr232 + } + switch { + case (m.data)[(m.p)] < 48: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr232 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr232 + } + case (m.data)[(m.p)] >= 64: + goto tr232 + } + default: + goto tr232 + } + goto tr185 + case 134: + switch (m.data)[(m.p)] { + case 43: + goto tr202 + case 61: + goto tr184 + } + goto tr185 + case 135: + switch (m.data)[(m.p)] { + case 33: + goto tr204 + case 37: + goto tr205 + case 61: + goto tr204 + case 63: + goto tr206 + case 95: + goto tr204 + case 126: + goto tr204 + } + switch { + case (m.data)[(m.p)] < 48: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr204 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr204 + } + case (m.data)[(m.p)] >= 64: + goto tr204 + } + default: + goto tr204 + } + goto tr203 + case 136: + if (m.data)[(m.p)] == 61 { + goto tr207 + } + goto tr203 + case 192: + switch (m.data)[(m.p)] { + case 33: + goto tr243 + case 35: + goto tr244 + case 37: + goto tr245 + case 61: + goto tr243 + case 63: + goto tr248 + case 95: + goto tr243 + case 126: + goto tr243 + } + switch { + case (m.data)[(m.p)] < 48: + if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { + goto tr243 + } + case (m.data)[(m.p)] > 59: + switch { + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr243 + } + case (m.data)[(m.p)] >= 64: + goto tr243 + } + default: + goto tr243 + } + goto tr203 + case 137: + if (m.data)[(m.p)] == 58 { + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr167 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr167 + } + default: + goto tr167 + } + goto tr106 + case 138: + switch (m.data)[(m.p)] { + case 45: + goto tr165 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr166 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr166 + } + default: + goto tr166 + } + goto tr106 + case 139: + switch (m.data)[(m.p)] { + case 45: + goto tr163 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr164 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr164 + } + default: + goto tr164 + } + goto tr106 + case 140: + switch (m.data)[(m.p)] { + case 45: + goto tr161 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr162 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr162 + } + default: + goto tr162 + } + goto tr106 + case 141: + switch (m.data)[(m.p)] { + case 45: + goto tr159 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr160 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr160 + } + default: + goto tr160 + } + goto tr106 + case 142: + switch (m.data)[(m.p)] { + case 45: + goto tr157 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr158 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr158 + } + default: + goto tr158 + } + goto tr106 + case 143: + switch (m.data)[(m.p)] { + case 45: + goto tr155 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr156 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr156 + } + default: + goto tr156 + } + goto tr106 + case 144: + switch (m.data)[(m.p)] { + case 45: + goto tr153 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr154 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr154 + } + default: + goto tr154 + } + goto tr106 + case 145: + switch (m.data)[(m.p)] { + case 45: + goto tr151 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr152 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr152 + } + default: + goto tr152 + } + goto tr106 + case 146: + switch (m.data)[(m.p)] { + case 45: + goto tr149 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr150 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr150 + } + default: + goto tr150 + } + goto tr106 + case 147: + switch (m.data)[(m.p)] { + case 45: + goto tr147 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr148 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr148 + } + default: + goto tr148 + } + goto tr106 + case 148: + switch (m.data)[(m.p)] { + case 45: + goto tr145 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr146 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr146 + } + default: + goto tr146 + } + goto tr106 + case 149: + switch (m.data)[(m.p)] { + case 45: + goto tr143 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr144 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr144 + } + default: + goto tr144 + } + goto tr106 + case 150: + switch (m.data)[(m.p)] { + case 45: + goto tr141 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr142 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr142 + } + default: + goto tr142 + } + goto tr106 + case 151: + switch (m.data)[(m.p)] { + case 45: + goto tr139 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr140 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr140 + } + default: + goto tr140 + } + goto tr106 + case 152: + switch (m.data)[(m.p)] { + case 45: + goto tr137 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr138 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr138 + } + default: + goto tr138 + } + goto tr106 + case 153: + switch (m.data)[(m.p)] { + case 45: + goto tr135 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr136 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr136 + } + default: + goto tr136 + } + goto tr106 + case 154: + switch (m.data)[(m.p)] { + case 45: + goto tr133 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr134 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr134 + } + default: + goto tr134 + } + goto tr106 + case 155: + switch (m.data)[(m.p)] { + case 45: + goto tr131 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr132 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr132 + } + default: + goto tr132 + } + goto tr106 + case 156: + switch (m.data)[(m.p)] { + case 45: + goto tr129 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr130 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr130 + } + default: + goto tr130 + } + goto tr106 + case 157: + switch (m.data)[(m.p)] { + case 45: + goto tr127 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr128 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr128 + } + default: + goto tr128 + } + goto tr106 + case 158: + switch (m.data)[(m.p)] { + case 45: + goto tr125 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr126 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr126 + } + default: + goto tr126 + } + goto tr106 + case 159: + switch (m.data)[(m.p)] { + case 45: + goto tr123 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr124 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr124 + } + default: + goto tr124 + } + goto tr106 + case 160: + switch (m.data)[(m.p)] { + case 45: + goto tr121 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr122 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr122 + } + default: + goto tr122 + } + goto tr106 + case 161: + switch (m.data)[(m.p)] { + case 45: + goto tr119 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr120 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr120 + } + default: + goto tr120 + } + goto tr106 + case 162: + switch (m.data)[(m.p)] { + case 45: + goto tr117 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr118 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr118 + } + default: + goto tr118 + } + goto tr106 + case 163: + switch (m.data)[(m.p)] { + case 45: + goto tr115 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr116 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr116 + } + default: + goto tr116 + } + goto tr106 + case 164: + switch (m.data)[(m.p)] { + case 45: + goto tr113 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr114 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr114 + } + default: + goto tr114 + } + goto tr106 + case 165: + switch (m.data)[(m.p)] { + case 45: + goto tr111 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr112 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr112 + } + default: + goto tr112 + } + goto tr106 + case 166: + switch (m.data)[(m.p)] { + case 45: + goto tr109 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr110 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr110 + } + default: + goto tr110 + } + goto tr106 + case 167: + switch (m.data)[(m.p)] { + case 45: + goto tr107 + case 82: + goto tr208 + case 114: + goto tr208 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr108 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr108 + } + default: + goto tr108 + } + goto tr103 + case 168: + switch (m.data)[(m.p)] { + case 45: + goto tr109 + case 58: + goto tr168 + case 78: + goto tr209 + case 110: + goto tr209 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr110 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr110 + } + default: + goto tr110 + } + goto tr103 + case 169: + switch (m.data)[(m.p)] { + case 45: + goto tr210 + case 58: + goto tr168 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr112 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr112 + } + default: + goto tr112 + } + goto tr106 + case 170: + switch (m.data)[(m.p)] { + case 45: + goto tr113 + case 48: + goto tr211 + } + switch { + case (m.data)[(m.p)] < 65: + if 49 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr114 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr211 + } + default: + goto tr211 + } + goto tr106 + case 171: + if (m.data)[(m.p)] == 45 { + goto tr115 + } + switch { + case (m.data)[(m.p)] < 65: + if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { + goto tr116 + } + case (m.data)[(m.p)] > 90: + if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { + goto tr116 + } + default: + goto tr116 + } + goto tr106 + case 193: + switch (m.data)[(m.p)] { + case 10: + goto tr183 + case 13: + goto tr183 + } + goto tr249 + } + + tr183: + m.cs = 0 + goto _again + tr0: + m.cs = 0 + goto f0 + tr5: + m.cs = 0 + goto f3 + tr8: + m.cs = 0 + goto f5 + tr41: + m.cs = 0 + goto f7 + tr44: + m.cs = 0 + goto f8 + tr51: + m.cs = 0 + goto f10 + tr56: + m.cs = 0 + goto f11 + tr74: + m.cs = 0 + goto f13 + tr81: + m.cs = 0 + goto f15 + tr83: + m.cs = 0 + goto f17 + tr86: + m.cs = 0 + goto f19 + tr103: + m.cs = 0 + goto f20 + tr106: + m.cs = 0 + goto f21 + tr169: + m.cs = 0 + goto f22 + tr172: + m.cs = 0 + goto f23 + tr177: + m.cs = 0 + goto f24 + tr185: + m.cs = 0 + goto f25 + tr189: + m.cs = 0 + goto f27 + tr194: + m.cs = 0 + goto f28 + tr199: + m.cs = 0 + goto f29 + tr203: + m.cs = 0 + goto f30 + tr236: + m.cs = 0 + goto f46 + tr1: + m.cs = 2 + goto f1 + tr2: + m.cs = 3 + goto _again + tr3: + m.cs = 4 + goto _again + tr4: + m.cs = 5 + goto f2 + tr6: + m.cs = 6 + goto f4 + tr9: + m.cs = 7 + goto _again + tr11: + m.cs = 8 + goto _again + tr12: + m.cs = 9 + goto _again + tr13: + m.cs = 10 + goto _again + tr14: + m.cs = 11 + goto _again + tr15: + m.cs = 12 + goto _again + tr16: + m.cs = 13 + goto _again + tr17: + m.cs = 14 + goto _again + tr18: + m.cs = 15 + goto _again + tr19: + m.cs = 16 + goto _again + tr20: + m.cs = 17 + goto _again + tr21: + m.cs = 18 + goto _again + tr22: + m.cs = 19 + goto _again + tr23: + m.cs = 20 + goto _again + tr24: + m.cs = 21 + goto _again + tr25: + m.cs = 22 + goto _again + tr26: + m.cs = 23 + goto _again + tr27: + m.cs = 24 + goto _again + tr28: + m.cs = 25 + goto _again + tr29: + m.cs = 26 + goto _again + tr30: + m.cs = 27 + goto _again + tr31: + m.cs = 28 + goto _again + tr32: + m.cs = 29 + goto _again + tr33: + m.cs = 30 + goto _again + tr34: + m.cs = 31 + goto _again + tr35: + m.cs = 32 + goto _again + tr36: + m.cs = 33 + goto _again + tr37: + m.cs = 34 + goto _again + tr38: + m.cs = 35 + goto _again + tr39: + m.cs = 36 + goto _again + tr40: + m.cs = 37 + goto _again + tr10: + m.cs = 38 + goto f6 + tr213: + m.cs = 39 + goto _again + tr43: + m.cs = 39 + goto f4 + tr45: + m.cs = 40 + goto _again + tr46: + m.cs = 40 + goto f9 + tr7: + m.cs = 41 + goto f1 + tr49: + m.cs = 42 + goto _again + tr50: + m.cs = 43 + goto _again + tr52: + m.cs = 45 + goto f1 + tr53: + m.cs = 46 + goto _again + tr54: + m.cs = 47 + goto _again + tr55: + m.cs = 48 + goto f2 + tr57: + m.cs = 49 + goto f4 + tr58: + m.cs = 50 + goto _again + tr59: + m.cs = 51 + goto _again + tr60: + m.cs = 52 + goto _again + tr61: + m.cs = 53 + goto _again + tr62: + m.cs = 54 + goto _again + tr63: + m.cs = 55 + goto _again + tr64: + m.cs = 56 + goto _again + tr65: + m.cs = 57 + goto _again + tr66: + m.cs = 58 + goto _again + tr67: + m.cs = 59 + goto _again + tr68: + m.cs = 60 + goto _again + tr69: + m.cs = 61 + goto _again + tr70: + m.cs = 62 + goto _again + tr71: + m.cs = 63 + goto _again + tr72: + m.cs = 64 + goto _again + tr73: + m.cs = 65 + goto f12 + tr75: + m.cs = 66 + goto f4 + tr78: + m.cs = 67 + goto _again + tr79: + m.cs = 68 + goto _again + tr80: + m.cs = 69 + goto f14 + tr215: + m.cs = 70 + goto f35 + tr217: + m.cs = 71 + goto _again + tr85: + m.cs = 71 + goto f18 + tr87: + m.cs = 72 + goto _again + tr88: + m.cs = 72 + goto f9 + tr76: + m.cs = 73 + goto f4 + tr91: + m.cs = 74 + goto _again + tr92: + m.cs = 75 + goto _again + tr93: + m.cs = 76 + goto _again + tr77: + m.cs = 77 + goto f4 + tr94: + m.cs = 78 + goto _again + tr95: + m.cs = 79 + goto _again + tr96: + m.cs = 80 + goto _again + tr97: + m.cs = 81 + goto _again + tr98: + m.cs = 82 + goto _again + tr99: + m.cs = 84 + goto f1 + tr100: + m.cs = 85 + goto _again + tr101: + m.cs = 86 + goto _again + tr102: + m.cs = 87 + goto f2 + tr104: + m.cs = 88 + goto f4 + tr107: + m.cs = 89 + goto _again + tr109: + m.cs = 90 + goto _again + tr111: + m.cs = 91 + goto _again + tr113: + m.cs = 92 + goto _again + tr115: + m.cs = 93 + goto _again + tr117: + m.cs = 94 + goto _again + tr119: + m.cs = 95 + goto _again + tr121: + m.cs = 96 + goto _again + tr123: + m.cs = 97 + goto _again + tr125: + m.cs = 98 + goto _again + tr127: + m.cs = 99 + goto _again + tr129: + m.cs = 100 + goto _again + tr131: + m.cs = 101 + goto _again + tr133: + m.cs = 102 + goto _again + tr135: + m.cs = 103 + goto _again + tr137: + m.cs = 104 + goto _again + tr139: + m.cs = 105 + goto _again + tr141: + m.cs = 106 + goto _again + tr143: + m.cs = 107 + goto _again + tr145: + m.cs = 108 + goto _again + tr147: + m.cs = 109 + goto _again + tr149: + m.cs = 110 + goto _again + tr151: + m.cs = 111 + goto _again + tr153: + m.cs = 112 + goto _again + tr155: + m.cs = 113 + goto _again + tr157: + m.cs = 114 + goto _again + tr159: + m.cs = 115 + goto _again + tr161: + m.cs = 116 + goto _again + tr163: + m.cs = 117 + goto _again + tr165: + m.cs = 118 + goto _again + tr167: + m.cs = 119 + goto _again + tr168: + m.cs = 120 + goto f6 + tr225: + m.cs = 121 + goto _again + tr223: + m.cs = 121 + goto f4 + tr173: + m.cs = 122 + goto _again + tr174: + m.cs = 122 + goto f9 + tr220: + m.cs = 123 + goto _again + tr171: + m.cs = 123 + goto f4 + tr178: + m.cs = 124 + goto _again + tr179: + m.cs = 124 + goto f9 + tr221: + m.cs = 125 + goto f38 + tr182: + m.cs = 126 + goto _again + tr228: + m.cs = 127 + goto _again + tr187: + m.cs = 127 + goto f26 + tr234: + m.cs = 127 + goto f44 + tr190: + m.cs = 128 + goto _again + tr191: + m.cs = 128 + goto f9 + tr240: + m.cs = 129 + goto _again + tr205: + m.cs = 129 + goto f31 + tr245: + m.cs = 129 + goto f50 + tr195: + m.cs = 130 + goto _again + tr196: + m.cs = 130 + goto f9 + tr237: + m.cs = 131 + goto f31 + tr200: + m.cs = 132 + goto _again + tr201: + m.cs = 132 + goto f9 + tr188: + m.cs = 133 + goto f26 + tr247: + m.cs = 134 + goto f45 + tr184: + m.cs = 135 + goto _again + tr206: + m.cs = 136 + goto f31 + tr248: + m.cs = 136 + goto f50 + tr166: + m.cs = 137 + goto _again + tr164: + m.cs = 138 + goto _again + tr162: + m.cs = 139 + goto _again + tr160: + m.cs = 140 + goto _again + tr158: + m.cs = 141 + goto _again + tr156: + m.cs = 142 + goto _again + tr154: + m.cs = 143 + goto _again + tr152: + m.cs = 144 + goto _again + tr150: + m.cs = 145 + goto _again + tr148: + m.cs = 146 + goto _again + tr146: + m.cs = 147 + goto _again + tr144: + m.cs = 148 + goto _again + tr142: + m.cs = 149 + goto _again + tr140: + m.cs = 150 + goto _again + tr138: + m.cs = 151 + goto _again + tr136: + m.cs = 152 + goto _again + tr134: + m.cs = 153 + goto _again + tr132: + m.cs = 154 + goto _again + tr130: + m.cs = 155 + goto _again + tr128: + m.cs = 156 + goto _again + tr126: + m.cs = 157 + goto _again + tr124: + m.cs = 158 + goto _again + tr122: + m.cs = 159 + goto _again + tr120: + m.cs = 160 + goto _again + tr118: + m.cs = 161 + goto _again + tr116: + m.cs = 162 + goto _again + tr114: + m.cs = 163 + goto _again + tr112: + m.cs = 164 + goto _again + tr110: + m.cs = 165 + goto _again + tr108: + m.cs = 166 + goto _again + tr105: + m.cs = 167 + goto f1 + tr208: + m.cs = 168 + goto _again + tr209: + m.cs = 169 + goto _again + tr210: + m.cs = 170 + goto f2 + tr211: + m.cs = 171 + goto _again + tr212: + m.cs = 172 + goto _again + tr42: + m.cs = 172 + goto f4 + tr47: + m.cs = 173 + goto _again + tr48: + m.cs = 173 + goto f9 + tr214: + m.cs = 174 + goto _again + tr82: + m.cs = 174 + goto f16 + tr216: + m.cs = 175 + goto _again + tr84: + m.cs = 175 + goto f18 + tr89: + m.cs = 176 + goto _again + tr90: + m.cs = 176 + goto f9 + tr218: + m.cs = 177 + goto _again + tr170: + m.cs = 177 + goto f4 + tr219: + m.cs = 178 + goto f38 + tr227: + m.cs = 178 + goto f42 + tr233: + m.cs = 178 + goto f45 + tr239: + m.cs = 178 + goto f48 + tr244: + m.cs = 178 + goto f51 + tr224: + m.cs = 179 + goto _again + tr222: + m.cs = 179 + goto f4 + tr175: + m.cs = 180 + goto _again + tr176: + m.cs = 180 + goto f9 + tr180: + m.cs = 181 + goto _again + tr181: + m.cs = 181 + goto f9 + tr226: + m.cs = 182 + goto _again + tr186: + m.cs = 182 + goto f26 + tr232: + m.cs = 182 + goto f44 + tr192: + m.cs = 183 + goto _again + tr193: + m.cs = 183 + goto f9 + tr229: + m.cs = 184 + goto f42 + tr235: + m.cs = 184 + goto f45 + tr230: + m.cs = 185 + goto _again + tr231: + m.cs = 186 + goto _again + tr238: + m.cs = 187 + goto _again + tr204: + m.cs = 187 + goto f31 + tr243: + m.cs = 187 + goto f50 + tr197: + m.cs = 188 + goto _again + tr198: + m.cs = 188 + goto f9 + tr241: + m.cs = 189 + goto _again + tr246: + m.cs = 189 + goto f50 + tr242: + m.cs = 190 + goto _again + tr202: + m.cs = 191 + goto _again + tr207: + m.cs = 192 + goto _again + tr249: + m.cs = 193 + goto _again + + f4: + + m.pb = m.p + + goto _again + f9: + + // List of positions in the buffer to later lowercase + output.tolower = append(output.tolower, m.p-m.pb) + + goto _again + f2: + + output.prefix = string(m.text()) + + goto _again + f6: + + output.ID = string(m.text()) + + goto _again + f38: + + output.SS = string(m.text()) + // Iterate upper letters lowering them + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 + } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 + } + + goto _again + f0: + + m.err = fmt.Errorf(errPrefix, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f5: + + m.err = fmt.Errorf(errIdentifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f7: + + m.err = fmt.Errorf(errSpecificString, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f23: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + goto _again + f11: + + m.err = fmt.Errorf(errSCIMNamespace, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f13: + + m.err = fmt.Errorf(errSCIMType, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f15: + + m.err = fmt.Errorf(errSCIMName, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f17: + + if m.p == m.pe { + m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) + } else { + m.err = fmt.Errorf(errSCIMOther, m.p) + } + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f14: + + output.scim.Type = scimschema.TypeFromString(string(m.text())) + + goto _again + f16: + + output.scim.pos = m.p + + goto _again + f35: + + output.scim.Name = string(m.data[output.scim.pos:m.p]) + + goto _again + f18: + + output.scim.pos = m.p + + goto _again + f22: + + m.err = fmt.Errorf(err8141SpecificString, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f21: + + m.err = fmt.Errorf(err8141Identifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f42: + + output.rComponent = string(m.text()) + + goto _again + f48: + + output.qComponent = string(m.text()) + + goto _again + f44: + + if output.rStart { + m.err = fmt.Errorf(err8141RComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + output.rStart = true + + goto _again + f50: + + if output.qStart { + m.err = fmt.Errorf(err8141QComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + output.qStart = true + + goto _again + f25: + + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f30: + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f1: + + m.pb = m.p + + if m.parsingMode != RFC8141Only { + // Throw an error when: + // - we are entering here matching the the prefix in the namespace identifier part + // - looking ahead (3 chars) we find a colon + if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" { + m.err = fmt.Errorf(errNoUrnWithinID, pos) + (m.p)-- + + m.cs = 193 + goto _again + + } + } + + goto _again + f12: + + output.ID = string(m.text()) + + output.scim = &SCIM{} + + goto _again + f3: + + m.err = fmt.Errorf(errIdentifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(errPrefix, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f10: + + m.err = fmt.Errorf(errIdentifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(errNoUrnWithinID, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f8: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + m.err = fmt.Errorf(errSpecificString, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f19: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + if m.p == m.pe { + m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) + } else { + m.err = fmt.Errorf(errSCIMOther, m.p) + } + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f24: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + m.err = fmt.Errorf(err8141SpecificString, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f27: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f28: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f20: + + m.err = fmt.Errorf(err8141Identifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(errPrefix, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f26: + + if output.rStart { + m.err = fmt.Errorf(err8141RComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + output.rStart = true m.pb = m.p - goto st39 - st39: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof39 - } - stCase39: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st40 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st40 - } - default: - goto tr46 - } - goto tr44 - tr46: + goto _again + f45: - m.tolower = append(m.tolower, m.p-m.pb) + if output.rStart { + m.err = fmt.Errorf(err8141RComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again - goto st40 - st40: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof40 - } - stCase40: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st45 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st45 - } - default: - goto tr48 } - goto tr44 - tr48: + output.rStart = true - m.tolower = append(m.tolower, m.p-m.pb) + output.rComponent = string(m.text()) + + goto _again + f31: + + if output.qStart { + m.err = fmt.Errorf(err8141QComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again - goto st45 - st45: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof45 - } - stCase45: - switch (m.data)[(m.p)] { - case 33: - goto st44 - case 36: - goto st44 - case 37: - goto st39 - case 61: - goto st44 - case 95: - goto st44 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto st44 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st44 - } - case (m.data)[(m.p)] >= 64: - goto st44 - } - default: - goto st44 } - goto tr44 - tr8: + output.qStart = true m.pb = m.p - goto st41 - st41: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof41 - } - stCase41: - switch (m.data)[(m.p)] { - case 45: - goto st7 - case 58: - goto tr10 - case 82: - goto st42 - case 114: - goto st42 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st7 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st7 - } - default: - goto st7 - } - goto tr6 - st42: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof42 - } - stCase42: - switch (m.data)[(m.p)] { - case 45: - goto st8 - case 58: - goto tr10 - case 78: - goto st43 - case 110: - goto st43 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st8 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st8 - } - default: - goto st8 - } - goto tr50 - st43: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof43 + goto _again + f51: + + if output.qStart { + m.err = fmt.Errorf(err8141QComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - stCase43: - if (m.data)[(m.p)] == 45 { - goto st9 + output.qStart = true + + output.qComponent = string(m.text()) + + goto _again + f46: + + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + f29: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto st9 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto st9 - } - default: - goto st9 + + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + goto _again + + _again: + switch _toStateActions[m.cs] { + case 33: + + (m.p)-- + + m.err = fmt.Errorf(err8141InformalID, m.p) + m.cs = 193 + goto _again } - goto tr52 - st46: - if (m.p)++; (m.p) == (m.pe) { - goto _testEof46 + + if m.cs == 0 { + goto _out } - stCase46: - switch (m.data)[(m.p)] { - case 10: - goto st0 - case 13: - goto st0 + if (m.p)++; (m.p) != (m.pe) { + goto _resume } - goto st46 - stOut: - _testEof2: - m.cs = 2 - goto _testEof - _testEof3: - m.cs = 3 - goto _testEof - _testEof4: - m.cs = 4 - goto _testEof - _testEof5: - m.cs = 5 - goto _testEof - _testEof6: - m.cs = 6 - goto _testEof - _testEof7: - m.cs = 7 - goto _testEof - _testEof8: - m.cs = 8 - goto _testEof - _testEof9: - m.cs = 9 - goto _testEof - _testEof10: - m.cs = 10 - goto _testEof - _testEof11: - m.cs = 11 - goto _testEof - _testEof12: - m.cs = 12 - goto _testEof - _testEof13: - m.cs = 13 - goto _testEof - _testEof14: - m.cs = 14 - goto _testEof - _testEof15: - m.cs = 15 - goto _testEof - _testEof16: - m.cs = 16 - goto _testEof - _testEof17: - m.cs = 17 - goto _testEof - _testEof18: - m.cs = 18 - goto _testEof - _testEof19: - m.cs = 19 - goto _testEof - _testEof20: - m.cs = 20 - goto _testEof - _testEof21: - m.cs = 21 - goto _testEof - _testEof22: - m.cs = 22 - goto _testEof - _testEof23: - m.cs = 23 - goto _testEof - _testEof24: - m.cs = 24 - goto _testEof - _testEof25: - m.cs = 25 - goto _testEof - _testEof26: - m.cs = 26 - goto _testEof - _testEof27: - m.cs = 27 - goto _testEof - _testEof28: - m.cs = 28 - goto _testEof - _testEof29: - m.cs = 29 - goto _testEof - _testEof30: - m.cs = 30 - goto _testEof - _testEof31: - m.cs = 31 - goto _testEof - _testEof32: - m.cs = 32 - goto _testEof - _testEof33: - m.cs = 33 - goto _testEof - _testEof34: - m.cs = 34 - goto _testEof - _testEof35: - m.cs = 35 - goto _testEof - _testEof36: - m.cs = 36 - goto _testEof - _testEof37: - m.cs = 37 - goto _testEof - _testEof38: - m.cs = 38 - goto _testEof - _testEof44: - m.cs = 44 - goto _testEof - _testEof39: - m.cs = 39 - goto _testEof - _testEof40: - m.cs = 40 - goto _testEof - _testEof45: - m.cs = 45 - goto _testEof - _testEof41: - m.cs = 41 - goto _testEof - _testEof42: - m.cs = 42 - goto _testEof - _testEof43: - m.cs = 43 - goto _testEof - _testEof46: - m.cs = 46 - goto _testEof - _testEof: { } if (m.p) == (m.eof) { - switch m.cs { - case 44, 45: + switch _eofActions[m.cs] { + case 1: - raw := m.text() - output.SS = string(raw) - // Iterate upper letters lowering them - for _, i := range m.tolower { - raw[i] = raw[i] + 32 - } - output.norm = string(raw) + m.err = fmt.Errorf(errPrefix, m.p) + (m.p)-- + + m.cs = 193 + goto _again - case 1, 2, 4: + case 6: - m.err = fmt.Errorf(errParse, m.p) + m.err = fmt.Errorf(errIdentifier, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - case 3: + case 8: - m.err = fmt.Errorf(errPrefix, m.p) + m.err = fmt.Errorf(errSpecificString, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 24: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - m.err = fmt.Errorf(errParse, m.p) + case 12: + + m.err = fmt.Errorf(errSCIMNamespace, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - case 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41: + case 14: - m.err = fmt.Errorf(errIdentifier, m.p) + m.err = fmt.Errorf(errSCIMType, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - m.err = fmt.Errorf(errParse, m.p) + case 16: + + m.err = fmt.Errorf(errSCIMName, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 18: + + if m.p == m.pe { + m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) + } else { + m.err = fmt.Errorf(errSCIMOther, m.p) } + (m.p)-- - case 38: + m.cs = 193 + goto _again - m.err = fmt.Errorf(errSpecificString, m.p) + case 23: + + m.err = fmt.Errorf(err8141SpecificString, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - m.err = fmt.Errorf(errParse, m.p) + case 22: + + m.err = fmt.Errorf(err8141Identifier, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - case 42: + case 26: - m.err = fmt.Errorf(errPrefix, m.p) + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + case 31: + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 34: + + output.SS = string(m.text()) + // Iterate upper letters lowering them + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 + } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 + } + + output.kind = RFC2141 + + case 38: + + output.SS = string(m.text()) + // Iterate upper letters lowering them + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 + } + + output.kind = RFC8141 + + case 4: m.err = fmt.Errorf(errIdentifier, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - m.err = fmt.Errorf(errParse, m.p) + m.err = fmt.Errorf(errPrefix, m.p) (m.p)-- - { - goto st46 - } + m.cs = 193 + goto _again - case 43: + case 11: + + m.err = fmt.Errorf(errIdentifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again m.err = fmt.Errorf(errNoUrnWithinID, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 9: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - m.err = fmt.Errorf(errIdentifier, m.p) + m.err = fmt.Errorf(errSpecificString, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 20: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - m.err = fmt.Errorf(errParse, m.p) + if m.p == m.pe { + m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) + } else { + m.err = fmt.Errorf(errSCIMOther, m.p) + } (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 25: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - case 39, 40: + m.err = fmt.Errorf(err8141SpecificString, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + case 28: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } - m.err = fmt.Errorf(errHex, m.p) + m.err = fmt.Errorf(err8141MalformedRComp, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 29: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - m.err = fmt.Errorf(errSpecificString, m.p) + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + case 21: + + m.err = fmt.Errorf(err8141Identifier, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + m.err = fmt.Errorf(errPrefix, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + case 42: + + output.rComponent = string(m.text()) + + output.kind = RFC8141 + + case 48: + + output.qComponent = string(m.text()) + + output.kind = RFC8141 + + case 41: + + output.fComponent = string(m.text()) + + output.kind = RFC8141 + + case 40: + + m.pb = m.p + + output.fComponent = string(m.text()) + + output.kind = RFC8141 + + case 30: + + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } - m.err = fmt.Errorf(errParse, m.p) + m.err = fmt.Errorf(err8141MalformedRComp, m.p) (m.p)-- - { - goto st46 + m.cs = 193 + goto _again + + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + case 35: + + output.scim.Name = string(m.data[output.scim.pos:m.p]) + + output.SS = string(m.text()) + // Iterate upper letters lowering them + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 + } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 + } + + output.kind = RFC7643 + + case 37: + + output.scim.Other = string(m.data[output.scim.pos:m.p]) + + output.SS = string(m.text()) + // Iterate upper letters lowering them + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 + } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 + } + + output.kind = RFC7643 + + case 44: + + if output.rStart { + m.err = fmt.Errorf(err8141RComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + + } + output.rStart = true + + output.rComponent = string(m.text()) + + output.kind = RFC8141 + + case 50: + + if output.qStart { + m.err = fmt.Errorf(err8141QComponentStart, m.p) + (m.p)-- + + m.cs = 193 + goto _again + } + output.qStart = true + output.qComponent = string(m.text()) + + output.kind = RFC8141 } } @@ -1689,3 +5031,16 @@ func (m *machine) Parse(input []byte) (*URN, error) { return output, nil } + +func (m *machine) WithParsingMode(x ParsingMode) { + m.parsingMode = x + switch m.parsingMode { + case RFC2141Only: + m.startParsingAt = enMain + case RFC8141Only: + m.startParsingAt = enRfc8141Only + case RFC7643Only: + m.startParsingAt = enScimOnly + } + m.parsingModeSet = true +} diff --git a/vendor/github.com/leodido/go-urn/machine.go.rl b/vendor/github.com/leodido/go-urn/machine.go.rl index 3bc05a651a..0a17421998 100644 --- a/vendor/github.com/leodido/go-urn/machine.go.rl +++ b/vendor/github.com/leodido/go-urn/machine.go.rl @@ -2,15 +2,28 @@ package urn import ( "fmt" + + scimschema "github.com/leodido/go-urn/scim/schema" ) var ( - errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" - errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its start) [col %d]" - errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" - errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" - errHex = "expecting the specific string hex chars to be well-formed (%%alnum{2}) [col %d]" - errParse = "parsing error [col %d]" + errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" + errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]" + errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" + errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" + errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]" + errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]" + errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]" + errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]" + errSCIMOther = "expecting a well-formed other SCIM part [col %d]" + errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]" + err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]" + err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]" + err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]" + err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]" + err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]" + err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" + err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" ) %%{ @@ -24,25 +37,42 @@ action mark { } action tolower { - m.tolower = append(m.tolower, m.p - m.pb) + // List of positions in the buffer to later lowercase + output.tolower = append(output.tolower, m.p - m.pb) } action set_pre { output.prefix = string(m.text()) } +action throw_pre_urn_err { + if m.parsingMode != RFC8141Only { + // Throw an error when: + // - we are entering here matching the the prefix in the namespace identifier part + // - looking ahead (3 chars) we find a colon + if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" { + m.err = fmt.Errorf(errNoUrnWithinID, pos) + fhold; + fgoto fail; + } + } +} + action set_nid { output.ID = string(m.text()) } action set_nss { - raw := m.text() - output.SS = string(raw) + output.SS = string(m.text()) // Iterate upper letters lowering them - for _, i := range m.tolower { - raw[i] = raw[i] + 32 + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] + 32 + } + output.norm = string(m.text()) + // Revert the buffer to the original + for _, i := range output.tolower { + m.data[m.pb+i] = m.data[m.pb+i] - 32 } - output.norm = string(raw) } action err_pre { @@ -70,30 +100,200 @@ action err_urn { } action err_hex { - m.err = fmt.Errorf(errHex, m.p) + if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { + m.err = fmt.Errorf(errHex, m.p) + fhold; + fgoto fail; + } +} + +action base_type { + output.kind = RFC2141; +} + +pre = ([uU] @err(err_pre) [rR] @err(err_pre) [nN] @err(err_pre)) >mark >throw_pre_urn_err %set_pre; + +nid = (alnum >mark (alnum | '-'){0,31}) $err(err_nid) %set_nid; + +hex = '%' (digit | lower | upper >tolower){2} $err(err_hex); + +sss = (alnum | [()+,\-.:=@;$_!*']); + +nss = (sss | hex)+ $err(err_nss); + +nid_not_urn = (nid - pre %err(err_urn)); + +urn = pre ':' @err(err_pre) (nid_not_urn ':' nss >mark %set_nss) %eof(base_type); + +### SCIM BEG + +action err_scim_nid { + m.err = fmt.Errorf(errSCIMNamespace, m.p) fhold; fgoto fail; } -action err_parse { - m.err = fmt.Errorf(errParse, m.p) +action err_scim_type { + m.err = fmt.Errorf(errSCIMType, m.p) fhold; fgoto fail; } -pre = ([uU][rR][nN] @err(err_pre)) >mark %set_pre; +action err_scim_name { + m.err = fmt.Errorf(errSCIMName, m.p) + fhold; + fgoto fail; +} -nid = (alnum >mark (alnum | '-'){0,31}) %set_nid; +action err_scim_other { + if m.p == m.pe { + m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) + } else { + m.err = fmt.Errorf(errSCIMOther, m.p) + } + fhold; + fgoto fail; +} -hex = '%' (digit | lower | upper >tolower){2} $err(err_hex); +action scim_type { + output.kind = RFC7643; +} -sss = (alnum | [()+,\-.:=@;$_!*']); +action create_scim { + output.scim = &SCIM{}; +} -nss = (sss | hex)+ $err(err_nss); +action set_scim_type { + output.scim.Type = scimschema.TypeFromString(string(m.text())) +} + +action mark_scim_name { + output.scim.pos = m.p +} + +action set_scim_name { + output.scim.Name = string(m.data[output.scim.pos:m.p]) +} + +action mark_scim_other { + output.scim.pos = m.p +} + +action set_scim_other { + output.scim.Other = string(m.data[output.scim.pos:m.p]) +} + +scim_nid = 'ietf:params:scim' >mark %set_nid %create_scim $err(err_scim_nid); + +scim_other = ':' (sss | hex)+ >mark_scim_other %set_scim_other $err(err_scim_other); + +scim_name = (alnum)+ >mark_scim_name %set_scim_name $err(err_scim_name); + +scim_type = ('schemas' | 'api' | 'param') >mark %set_scim_type $err(err_scim_type); + +scim_only := pre ':' @err(err_pre) (scim_nid ':' scim_type ':' scim_name scim_other? %set_nss) %eof(scim_type); + +### SCIM END + +### 8141 BEG + +action err_nss_8141 { + m.err = fmt.Errorf(err8141SpecificString, m.p) + fhold; + fgoto fail; +} + +action err_nid_8141 { + m.err = fmt.Errorf(err8141Identifier, m.p) + fhold; + fgoto fail; +} + +action rfc8141_type { + output.kind = RFC8141; +} + +action set_r_component { + output.rComponent = string(m.text()) +} + +action set_q_component { + output.qComponent = string(m.text()) +} + +action set_f_component { + output.fComponent = string(m.text()) +} + +action informal_nid_match { + fhold; + m.err = fmt.Errorf(err8141InformalID, m.p); + fgoto fail; +} + +action mark_r_start { + if output.rStart { + m.err = fmt.Errorf(err8141RComponentStart, m.p) + fhold; + fgoto fail; + } + output.rStart = true +} + +action mark_q_start { + if output.qStart { + m.err = fmt.Errorf(err8141QComponentStart, m.p) + fhold; + fgoto fail; + } + output.qStart = true +} + +action err_malformed_r_component { + m.err = fmt.Errorf(err8141MalformedRComp, m.p) + fhold; + fgoto fail; +} + +action err_malformed_q_component { + m.err = fmt.Errorf(err8141MalformedQComp, m.p) + fhold; + fgoto fail; +} + +pchar = (sss | '~' | '&' | hex); + +component = pchar (pchar | '/' | '?')*; + +r_start = ('?+') %mark_r_start; + +r_component = r_start <: (r_start | component)+ $err(err_malformed_r_component) >mark %set_r_component; + +q_start = ('?=') %mark_q_start; + +q_component = q_start <: (q_start | component)+ $err(err_malformed_q_component) >mark %set_q_component; + +rq_components = (r_component :>> q_component? | q_component); + +fragment = (pchar | '/' | '?')*; + +f_component = '#' fragment >mark %set_f_component; + +nss_rfc8141 = (pchar >mark (pchar | '/')*) $err(err_nss_8141) %set_nss; + +nid_rfc8141 = (alnum >mark (alnum | '-'){0,30} alnum) $err(err_nid_8141) %set_nid; + +informal_id = pre ('-' [a-zA-z0] %to(informal_nid_match)); + +nid_rfc8141_not_urn = (nid_rfc8141 - informal_id?); + +rfc8141_only := pre ':' @err(err_pre) nid_rfc8141_not_urn ':' nss_rfc8141 rq_components? f_component? %eof(rfc8141_type); + +### 8141 END fail := (any - [\n\r])* @err{ fgoto main; }; -main := (pre ':' (nid - pre %err(err_urn)) $err(err_nid) ':' nss >mark %set_nss) $err(err_parse); +main := urn; }%% @@ -103,6 +303,7 @@ main := (pre ':' (nid - pre %err(err_urn)) $err(err_nid) ':' nss >mark %set_nss) type Machine interface { Error() error Parse(input []byte) (*URN, error) + WithParsingMode(ParsingMode) } type machine struct { @@ -110,12 +311,24 @@ type machine struct { cs int p, pe, eof, pb int err error - tolower []int + startParsingAt int + parsingMode ParsingMode + parsingModeSet bool } // NewMachine creates a new FSM able to parse RFC 2141 strings. -func NewMachine() Machine { - m := &machine{} +func NewMachine(options ...Option) Machine { + m := &machine{ + parsingModeSet: false, + } + + for _, o := range options { + o(m) + } + // Set default parsing mode + if !m.parsingModeSet { + m.WithParsingMode(DefaultParsingMode) + } %% access m.; %% variable p m.p; @@ -137,7 +350,7 @@ func (m *machine) text() []byte { return m.data[m.pb:m.p] } -// Parse parses the input byte array as a RFC 2141 string. +// Parse parses the input byte array as a RFC 2141 or RFC7643 string. func (m *machine) Parse(input []byte) (*URN, error) { m.data = input m.p = 0 @@ -145,10 +358,11 @@ func (m *machine) Parse(input []byte) (*URN, error) { m.pe = len(input) m.eof = len(input) m.err = nil - m.tolower = []int{} - output := &URN{} + m.cs = m.startParsingAt + output := &URN{ + tolower: []int{}, + } - %% write init; %% write exec; if m.cs < first_final || m.cs == en_fail { @@ -157,3 +371,16 @@ func (m *machine) Parse(input []byte) (*URN, error) { return output, nil } + +func (m *machine) WithParsingMode(x ParsingMode) { + m.parsingMode = x + switch m.parsingMode { + case RFC2141Only: + m.startParsingAt = en_main + case RFC8141Only: + m.startParsingAt = en_rfc8141_only + case RFC7643Only: + m.startParsingAt = en_scim_only + } + m.parsingModeSet = true +} \ No newline at end of file diff --git a/vendor/github.com/leodido/go-urn/makefile b/vendor/github.com/leodido/go-urn/makefile index 47026d5099..68d5dd0f1b 100644 --- a/vendor/github.com/leodido/go-urn/makefile +++ b/vendor/github.com/leodido/go-urn/makefile @@ -1,18 +1,43 @@ SHELL := /bin/bash +RAGEL := ragel +GOFMT := go fmt +export GO_TEST=env GOTRACEBACK=all go test $(GO_ARGS) + +.PHONY: build build: machine.go +.PHONY: clean +clean: + @rm -rf docs + @rm -f machine.go + +.PHONY: images images: docs/urn.png +.PHONY: snake2camel +snake2camel: + @cd ./tools/snake2camel; go build -o ../../snake2camel . + +.PHONY: removecomments +removecomments: + @cd ./tools/removecomments; go build -o ../../removecomments . + machine.go: machine.go.rl - ragel -Z -G2 -e -o $@ $< - @sed -i '/^\/\/line/d' $@ - @$(MAKE) -s file=$@ snake2camel - @gofmt -w -s $@ + +machine.go: snake2camel + +machine.go: removecomments + +machine.go: + $(RAGEL) -Z -G1 -e -o $@ $< + @./removecomments $@ + @./snake2camel $@ + $(GOFMT) $@ docs/urn.dot: machine.go.rl @mkdir -p docs - ragel -Z -e -Vp $< -o $@ + $(RAGEL) -Z -e -Vp $< -o $@ docs/urn.png: docs/urn.dot dot $< -Tpng -o $@ @@ -22,18 +47,5 @@ bench: *_test.go machine.go go test -bench=. -benchmem -benchtime=5s ./... .PHONY: tests -tests: *_test.go machine.go - go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./... - -.PHONY: clean -clean: - @rm -rf docs - @rm -f machine.go - -.PHONY: snake2camel -snake2camel: - @awk -i inplace '{ \ - while ( match($$0, /(.*)([a-z]+[0-9]*)_([a-zA-Z0-9])(.*)/, cap) ) \ - $$0 = cap[1] cap[2] toupper(cap[3]) cap[4]; \ - print \ - }' $(file) \ No newline at end of file +tests: *_test.go + $(GO_TEST) ./... diff --git a/vendor/github.com/leodido/go-urn/options.go b/vendor/github.com/leodido/go-urn/options.go new file mode 100644 index 0000000000..c543835a28 --- /dev/null +++ b/vendor/github.com/leodido/go-urn/options.go @@ -0,0 +1,9 @@ +package urn + +type Option func(Machine) + +func WithParsingMode(mode ParsingMode) Option { + return func(m Machine) { + m.WithParsingMode(mode) + } +} diff --git a/vendor/github.com/leodido/go-urn/parsing_mode.go b/vendor/github.com/leodido/go-urn/parsing_mode.go new file mode 100644 index 0000000000..fce5aadc3c --- /dev/null +++ b/vendor/github.com/leodido/go-urn/parsing_mode.go @@ -0,0 +1,12 @@ +package urn + +type ParsingMode int + +const ( + Default ParsingMode = iota + RFC2141Only + RFC7643Only + RFC8141Only +) + +const DefaultParsingMode = RFC2141Only diff --git a/vendor/github.com/leodido/go-urn/scim.go b/vendor/github.com/leodido/go-urn/scim.go new file mode 100644 index 0000000000..f6b7aefbad --- /dev/null +++ b/vendor/github.com/leodido/go-urn/scim.go @@ -0,0 +1,48 @@ +package urn + +import ( + "encoding/json" + "fmt" + + scimschema "github.com/leodido/go-urn/scim/schema" +) + +const errInvalidSCIMURN = "invalid SCIM URN: %s" + +type SCIM struct { + Type scimschema.Type + Name string + Other string + pos int +} + +func (s SCIM) MarshalJSON() ([]byte, error) { + return json.Marshal(s.String()) +} + +func (s *SCIM) UnmarshalJSON(bytes []byte) error { + var str string + if err := json.Unmarshal(bytes, &str); err != nil { + return err + } + // Parse as SCIM + value, ok := Parse([]byte(str), WithParsingMode(RFC7643Only)) + if !ok { + return fmt.Errorf(errInvalidSCIMURN, str) + } + if value.RFC() != RFC7643 { + return fmt.Errorf(errInvalidSCIMURN, str) + } + *s = *value.SCIM() + + return nil +} + +func (s *SCIM) String() string { + ret := fmt.Sprintf("urn:ietf:params:scim:%s:%s", s.Type.String(), s.Name) + if s.Other != "" { + ret += fmt.Sprintf(":%s", s.Other) + } + + return ret +} diff --git a/vendor/github.com/leodido/go-urn/scim/schema/type.go b/vendor/github.com/leodido/go-urn/scim/schema/type.go new file mode 100644 index 0000000000..134918230f --- /dev/null +++ b/vendor/github.com/leodido/go-urn/scim/schema/type.go @@ -0,0 +1,36 @@ +package scimschema + +type Type int + +const ( + Unsupported Type = iota + Schemas + API + Param +) + +func (t Type) String() string { + switch t { + case Schemas: + return "schemas" + case API: + return "api" + case Param: + return "param" + } + + return "" +} + +func TypeFromString(input string) Type { + switch input { + case "schemas": + return Schemas + case "api": + return API + case "param": + return Param + } + + return Unsupported +} diff --git a/vendor/github.com/leodido/go-urn/urn.go b/vendor/github.com/leodido/go-urn/urn.go index b903b7b3cd..894d6258dc 100644 --- a/vendor/github.com/leodido/go-urn/urn.go +++ b/vendor/github.com/leodido/go-urn/urn.go @@ -1,9 +1,13 @@ package urn import ( + "encoding/json" + "fmt" "strings" ) +const errInvalidURN = "invalid URN: %s" + // URN represents an Uniform Resource Name. // // The general form represented is: @@ -12,10 +16,18 @@ import ( // // Details at https://tools.ietf.org/html/rfc2141. type URN struct { - prefix string // Static prefix. Equal to "urn" when empty. - ID string // Namespace identifier - SS string // Namespace specific string - norm string // Normalized namespace specific string + prefix string // Static prefix. Equal to "urn" when empty. + ID string // Namespace identifier (NID) + SS string // Namespace specific string (NSS) + norm string // Normalized namespace specific string + kind Kind + scim *SCIM + rComponent string // RFC8141 + qComponent string // RFC8141 + fComponent string // RFC8141 + rStart bool // RFC8141 + qStart bool // RFC8141 + tolower []int } // Normalize turns the receiving URN into its norm version. @@ -26,12 +38,21 @@ func (u *URN) Normalize() *URN { prefix: "urn", ID: strings.ToLower(u.ID), SS: u.norm, + // rComponent: u.rComponent, + // qComponent: u.qComponent, + // fComponent: u.fComponent, } } // Equal checks the lexical equivalence of the current URN with another one. func (u *URN) Equal(x *URN) bool { - return *u.Normalize() == *x.Normalize() + if x == nil { + return false + } + nu := u.Normalize() + nx := x.Normalize() + + return nu.prefix == nx.prefix && nu.ID == nx.ID && nu.SS == nx.SS } // String reassembles the URN into a valid URN string. @@ -47,17 +68,74 @@ func (u *URN) String() string { res += "urn" } res += u.prefix + ":" + u.ID + ":" + u.SS + if u.rComponent != "" { + res += "?+" + u.rComponent + } + if u.qComponent != "" { + res += "?=" + u.qComponent + } + if u.fComponent != "" { + res += "#" + u.fComponent + } } return res } -// Parse is responsible to create an URN instance from a byte array matching the correct URN syntax. -func Parse(u []byte) (*URN, bool) { - urn, err := NewMachine().Parse(u) +// Parse is responsible to create an URN instance from a byte array matching the correct URN syntax (RFC 2141). +func Parse(u []byte, options ...Option) (*URN, bool) { + urn, err := NewMachine(options...).Parse(u) if err != nil { return nil, false } return urn, true } + +// MarshalJSON marshals the URN to JSON string form (e.g. `"urn:oid:1.2.3.4"`). +func (u URN) MarshalJSON() ([]byte, error) { + return json.Marshal(u.String()) +} + +// UnmarshalJSON unmarshals a URN from JSON string form (e.g. `"urn:oid:1.2.3.4"`). +func (u *URN) UnmarshalJSON(bytes []byte) error { + var str string + if err := json.Unmarshal(bytes, &str); err != nil { + return err + } + if value, ok := Parse([]byte(str)); !ok { + return fmt.Errorf(errInvalidURN, str) + } else { + *u = *value + } + + return nil +} + +func (u *URN) IsSCIM() bool { + return u.kind == RFC7643 +} + +func (u *URN) SCIM() *SCIM { + if u.kind != RFC7643 { + return nil + } + + return u.scim +} + +func (u *URN) RFC() Kind { + return u.kind +} + +func (u *URN) FComponent() string { + return u.fComponent +} + +func (u *URN) QComponent() string { + return u.qComponent +} + +func (u *URN) RComponent() string { + return u.rComponent +} diff --git a/vendor/github.com/leodido/go-urn/urn8141.go b/vendor/github.com/leodido/go-urn/urn8141.go new file mode 100644 index 0000000000..da4dd062e3 --- /dev/null +++ b/vendor/github.com/leodido/go-urn/urn8141.go @@ -0,0 +1,30 @@ +package urn + +import ( + "encoding/json" + "fmt" +) + +const errInvalidURN8141 = "invalid URN per RFC 8141: %s" + +type URN8141 struct { + *URN +} + +func (u URN8141) MarshalJSON() ([]byte, error) { + return json.Marshal(u.String()) +} + +func (u *URN8141) UnmarshalJSON(bytes []byte) error { + var str string + if err := json.Unmarshal(bytes, &str); err != nil { + return err + } + if value, ok := Parse([]byte(str), WithParsingMode(RFC8141Only)); !ok { + return fmt.Errorf(errInvalidURN8141, str) + } else { + *u = URN8141{value} + } + + return nil +} diff --git a/vendor/github.com/posthog/posthog-go/.gitignore b/vendor/github.com/posthog/posthog-go/.gitignore index 942678bd91..aefc4fd5cd 100644 --- a/vendor/github.com/posthog/posthog-go/.gitignore +++ b/vendor/github.com/posthog/posthog-go/.gitignore @@ -6,6 +6,7 @@ # Folders _obj _test +.idea # Architecture specific extensions/prefixes *.[568vq] diff --git a/vendor/github.com/posthog/posthog-go/CHANGELOG.md b/vendor/github.com/posthog/posthog-go/CHANGELOG.md new file mode 100644 index 0000000000..e7383fbfc0 --- /dev/null +++ b/vendor/github.com/posthog/posthog-go/CHANGELOG.md @@ -0,0 +1,128 @@ +## 1.4.1 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.4.0...v1.4.1) + +## 1.4.0 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.3.3...v1.4.0) + +## 1.3.3 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.3.2...v1.3.3) + +## 1.3.2 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.3.1...v1.3.2) + +## 1.3.1 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.3.0...v1.3.1) + +## 1.2.24 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.23...v1.2.24) + +## 1.2.23 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.22...v1.2.23) + +## 1.2.22 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.21...v1.2.22) + +## 1.2.21 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.20...v1.2.21) + +## 1.2.20 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.19...v1.2.20) + +## 1.2.19 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.18...v1.2.19) + +## 1.2.18 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.17...v1.2.18) + +## 1.2.17 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.16...v1.2.17) + +## 1.2.16 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.15...v1.2.16) + +## 1.2.15 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.14...v1.2.15) + +## 1.2.14 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.13...v1.2.14) + +## 1.2.13 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v1.2.12...v1.2.13) + +## 1.2.12 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.12) + +## 1.2.11 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.11) + +## 1.2.10 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.10) + +## 1.2.9 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.9) + +## 1.2.8 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.8) + +## 1.2.7 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.7) + +## 1.2.6 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.6) + +## 1.2.5 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.5) + +## 1.2.4 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.4) + +## 1.2.3 + +* [Full Changelog](https://github.com/PostHog/posthog-go/compare/v...v1.2.3) + +# Changelog + +## 1.2.2 - 2024-08-08 + +1. Adds logging to error responses from the PostHog API so that users can see how a call failed (e.g. rate limiting) from the SDK itself. +2. Better string formatting in `poller.Errorf` + +## 1.2.1 - 2024-08-07 + +1. The client will fall back to the `/decide` endpoint when evaluating feature flags if the user does not wish to provide a PersonalApiKey. This fixes an issue where users were unable to use this SDK without providing a PersonalApiKey. This fallback will make feature flag usage less performant, but will save users money by not making them pay for public API access. + +## 1.2.0 - 2022-08-15 + +Breaking changes: + +1. Minimum PostHog version requirement: 1.38 +2. Local Evaluation added to IsFeatureEnabled and GetFeatureFlag. These functions now accept person and group properties arguments. The arguments will be used to locally evaluate relevant feature flags. +3. Feature flag functions take a payload called `FeatureFlagPayload` when a key is require and `FeatureFlagPayloadNoKey` when a key is not required. The payload will handle defaults for all unspecified arguments automatically. +3. Feature Flag defaults have been removed. If the flag fails for any reason, nil will be returned. +4. GetAllFlags argument added. This function returns all flags related to the id. diff --git a/vendor/github.com/posthog/posthog-go/README.md b/vendor/github.com/posthog/posthog-go/README.md index 53558ce403..fa80848c44 100644 --- a/vendor/github.com/posthog/posthog-go/README.md +++ b/vendor/github.com/posthog/posthog-go/README.md @@ -21,7 +21,15 @@ import ( ) func main() { - client := posthog.New(os.Getenv("POSTHOG_API_KEY")) + client := posthog.New(os.Getenv("POSTHOG_API_KEY")) // This value must be set to the project API key in PostHog + // alternatively, you can do + // client, _ := posthog.NewWithConfig( + // os.Getenv("POSTHOG_API_KEY"), + // posthog.Config{ + // PersonalApiKey: "your personal API key", // Set this to your personal API token you want feature flag evaluation to be more performant. This will incur more costs, though + // Endpoint: "https://us.i.posthog.com", + // }, + // ) defer client.Close() // Capture an event @@ -44,7 +52,7 @@ func main() { // Link user contexts client.Enqueue(posthog.Alias{ DistinctId: "user:123", - Alias: "user:12345" + Alias: "user:12345", }) // Capture a pageview @@ -54,10 +62,49 @@ func main() { Properties: posthog.NewProperties(). Set("$current_url", "https://example.com"), }) + + // Capture event with calculated uuid to deduplicate repeated events. + // The library github.com/google/uuid is used + key := myEvent.Id + myEvent.Project + uid := uuid.NewSHA1(uuid.NameSpaceX500, []byte(key)).String() + client.Enqueue(posthog.Capture{ + Uuid: uid, + DistinctId: "test-user", + Event: "$pageview", + Properties: posthog.NewProperties(). + Set("$current_url", "https://example.com"), + }) + + // Check if a feature flag is enabled + isMyFlagEnabled, err := client.IsFeatureEnabled( + FeatureFlagPayload{ + Key: "flag-key", + DistinctId: "distinct_id_of_your_user", + }) + + if isMyFlagEnabled == true { + // Do something differently for this user + } } ``` +## Testing Locally + +You can run your Go app against a local build of `posthog-go` by making the following change to your `go.mod` file for whichever your app, e.g. + +```Go +module example/posthog-go-app + +go 1.22.5 + +require github.com/posthog/posthog-go v0.0.0-20240327112532-87b23fe11103 + +require github.com/google/uuid v1.3.0 // indirect + +replace github.com/posthog/posthog-go => /path-to-your-local/posthog-go +``` + ## Questions? -### [Join our Slack community.](https://join.slack.com/t/posthogusers/shared_invite/enQtOTY0MzU5NjAwMDY3LTc2MWQ0OTZlNjhkODk3ZDI3NDVjMDE1YjgxY2I4ZjI4MzJhZmVmNjJkN2NmMGJmMzc2N2U3Yjc3ZjI5NGFlZDQ) +### [Visit the community forum.](https://posthog.com/questions) diff --git a/vendor/github.com/posthog/posthog-go/backo.go b/vendor/github.com/posthog/posthog-go/backo.go index 184452184c..2b730df97b 100644 --- a/vendor/github.com/posthog/posthog-go/backo.go +++ b/vendor/github.com/posthog/posthog-go/backo.go @@ -19,10 +19,11 @@ func NewBacko(base time.Duration, factor uint8, jitter float64, cap time.Duratio } // Creates a backo instance with the following defaults: -// base: 100 milliseconds -// factor: 2 -// jitter: 0 -// cap: 10 seconds +// +// base: 100 milliseconds +// factor: 2 +// jitter: 0 +// cap: 10 seconds func DefaultBacko() *Backo { return NewBacko(time.Millisecond*100, 2, 0, time.Second*10) } diff --git a/vendor/github.com/posthog/posthog-go/capture.go b/vendor/github.com/posthog/posthog-go/capture.go index 980df81e6f..31db77d110 100644 --- a/vendor/github.com/posthog/posthog-go/capture.go +++ b/vendor/github.com/posthog/posthog-go/capture.go @@ -9,11 +9,15 @@ type Capture struct { // This field is exported for serialization purposes and shouldn't be set by // the application, its value is always overwritten by the library. Type string - - DistinctId string - Event string - Timestamp time.Time - Properties Properties + // You don't usually need to specify this field - Posthog will generate it automatically. + // Use it only when necessary - for example, to prevent duplicate events. + Uuid string + DistinctId string + Event string + Timestamp time.Time + Properties Properties + Groups Groups + SendFeatureFlags bool } func (msg Capture) internal() { @@ -42,13 +46,15 @@ func (msg Capture) Validate() error { type CaptureInApi struct { Type string `json:"type"` + Uuid string `json:"uuid"` Library string `json:"library"` LibraryVersion string `json:"library_version"` Timestamp time.Time `json:"timestamp"` - DistinctId string `json:"distinct_id"` - Event string `json:"event"` - Properties Properties `json:"properties"` + DistinctId string `json:"distinct_id"` + Event string `json:"event"` + Properties Properties `json:"properties"` + SendFeatureFlags bool `json:"send_feature_flags"` } func (msg Capture) APIfy() APIMessage { @@ -63,8 +69,13 @@ func (msg Capture) APIfy() APIMessage { } } + if msg.Groups != nil { + myProperties.Set("$groups", msg.Groups) + } + apified := CaptureInApi{ Type: msg.Type, + Uuid: msg.Uuid, Library: library, LibraryVersion: libraryVersion, Timestamp: msg.Timestamp, diff --git a/vendor/github.com/posthog/posthog-go/config.go b/vendor/github.com/posthog/posthog-go/config.go index cdd56c2a3e..46d11ce753 100644 --- a/vendor/github.com/posthog/posthog-go/config.go +++ b/vendor/github.com/posthog/posthog-go/config.go @@ -1,7 +1,6 @@ package posthog import ( - "github.com/xtgo/uuid" "net/http" "time" ) @@ -17,8 +16,11 @@ type Config struct { // `DefaultEndpoint` by default. Endpoint string - // You must specify a Personal API Key to use feature flags - // More information on how to get one: https://posthog.com/docs/api/overview + // Specifying a Personal API key will make feature flag evaluation more performant, + // but it's not required for feature flags. If you don't have a personal API key, + // you can leave this field empty, and all of the relevant feature flag evaluation + // methods will still work. + // Information on how to get a personal API key: https://posthog.com/docs/api/overview PersonalApiKey string // The flushing interval of the client. Messages will be sent when they've @@ -26,9 +28,20 @@ type Config struct { // timer triggers. Interval time.Duration - // Interval at which to fetch new feature flags, 5min by default + // Interval at which to fetch new feature flag definitions, 5min by default DefaultFeatureFlagsPollingInterval time.Duration + // Timeout for fetching feature flags, 3 seconds by default + FeatureFlagRequestTimeout time.Duration + + // Calculate when feature flag definitions should be polled next. Setting this property + // will override DefaultFeatureFlagsPollingInterval. + NextFeatureFlagsPollingTick func() time.Duration + + // Flag to enable historical migration + // See more in our migration docs: https://posthog.com/docs/migrate + HistoricalMigration bool + // The HTTP transport used by the client, this allows an application to // redefine how requests are being sent at the HTTP level (for example, // to change the connection pooling policy). @@ -41,6 +54,11 @@ type Config struct { // `os.Stderr`. Logger Logger + // Properties that will be included in every event sent by the client. + // This is useful for adding common metadata like service name or app version across all events. + // If a property conflict occurs, the value from DefaultEventProperties will overwrite any existing value. + DefaultEventProperties Properties + // The callback object that will be used by the client to notify the // application when messages sends to the backend API succeeded or failed. Callback Callback @@ -63,25 +81,19 @@ type Config struct { // If not set the client will fallback to use a default retry policy. RetryAfter func(int) time.Duration - // A function called by the client to generate unique message identifiers. - // The client uses a UUID generator if none is provided. - // This field is not exported and only exposed internally to let unit tests - // mock the id generation. - uid func() string - // A function called by the client to get the current time, `time.Now` is // used by default. - // This field is not exported and only exposed internally to let unit tests - // mock the current time. + // This field is not exported and only exposed internally to control concurrency. now func() time.Time // The maximum number of goroutines that will be spawned by a client to send // requests to the backend API. - // This field is not exported and only exposed internally to let unit tests - // mock the current time. + // This field is not exported and only exposed internally to control concurrency. maxConcurrentRequests int } +const SdkName = "posthog-go" + // This constant sets the default endpoint to which client instances send // messages if none was explictly set. const DefaultEndpoint = "https://app.posthog.com" @@ -93,6 +105,9 @@ const DefaultInterval = 5 * time.Second // Specifies the default interval at which to fetch new feature flags const DefaultFeatureFlagsPollingInterval = 5 * time.Minute +// Specifies the default timeout for fetching feature flags +const DefaultFeatureFlagRequestTimeout = 3 * time.Second + // This constant sets the default batch size used by client instances if none // was explicitly set. const DefaultBatchSize = 250 @@ -131,7 +146,11 @@ func makeConfig(c Config) Config { } if c.DefaultFeatureFlagsPollingInterval == 0 { - c.DefaultFeatureFlagsPollingInterval = DefaultInterval + c.DefaultFeatureFlagsPollingInterval = DefaultFeatureFlagsPollingInterval + } + + if c.FeatureFlagRequestTimeout == 0 { + c.FeatureFlagRequestTimeout = DefaultFeatureFlagRequestTimeout } if c.Transport == nil { @@ -150,10 +169,6 @@ func makeConfig(c Config) Config { c.RetryAfter = DefaultBacko().Duration } - if c.uid == nil { - c.uid = uid - } - if c.now == nil { c.now = time.Now } @@ -164,9 +179,3 @@ func makeConfig(c Config) Config { return c } - -// This function returns a string representation of a UUID, it's the default -// function used for generating unique IDs. -func uid() string { - return uuid.NewRandom().String() -} diff --git a/vendor/github.com/posthog/posthog-go/feature_flag_config.go b/vendor/github.com/posthog/posthog-go/feature_flag_config.go new file mode 100644 index 0000000000..4bbc430c20 --- /dev/null +++ b/vendor/github.com/posthog/posthog-go/feature_flag_config.go @@ -0,0 +1,84 @@ +package posthog + +type FeatureFlagPayload struct { + Key string + DistinctId string + Groups Groups + PersonProperties Properties + GroupProperties map[string]Properties + OnlyEvaluateLocally bool + SendFeatureFlagEvents *bool +} + +func (c *FeatureFlagPayload) validate() error { + if len(c.Key) == 0 { + return ConfigError{ + Reason: "Feature Flag Key required", + Field: "Key", + Value: c.Key, + } + } + + if len(c.DistinctId) == 0 { + return ConfigError{ + Reason: "DistinctId required", + Field: "Distinct Id", + Value: c.DistinctId, + } + } + + if c.Groups == nil { + c.Groups = Groups{} + } + + if c.PersonProperties == nil { + c.PersonProperties = NewProperties() + } + + if c.GroupProperties == nil { + c.GroupProperties = map[string]Properties{} + } + + if c.SendFeatureFlagEvents == nil { + tempTrue := true + c.SendFeatureFlagEvents = &tempTrue + } + return nil +} + +type FeatureFlagPayloadNoKey struct { + DistinctId string + Groups Groups + PersonProperties Properties + GroupProperties map[string]Properties + OnlyEvaluateLocally bool + SendFeatureFlagEvents *bool +} + +func (c *FeatureFlagPayloadNoKey) validate() error { + if len(c.DistinctId) == 0 { + return ConfigError{ + Reason: "DistinctId required", + Field: "Distinct Id", + Value: c.DistinctId, + } + } + + if c.Groups == nil { + c.Groups = Groups{} + } + + if c.PersonProperties == nil { + c.PersonProperties = NewProperties() + } + + if c.GroupProperties == nil { + c.GroupProperties = map[string]Properties{} + } + + if c.SendFeatureFlagEvents == nil { + tempTrue := true + c.SendFeatureFlagEvents = &tempTrue + } + return nil +} diff --git a/vendor/github.com/posthog/posthog-go/featureflags.go b/vendor/github.com/posthog/posthog-go/featureflags.go index 67ec9f04de..60de934d05 100644 --- a/vendor/github.com/posthog/posthog-go/featureflags.go +++ b/vendor/github.com/posthog/posthog-go/featureflags.go @@ -2,13 +2,18 @@ package posthog import ( "bytes" + "context" "crypto/sha1" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" + "net/url" + "regexp" + "sort" "strconv" + "strings" "sync" "time" ) @@ -16,52 +21,129 @@ import ( const LONG_SCALE = 0xfffffffffffffff type FeatureFlagsPoller struct { - ticker *time.Ticker // periodic ticker - loaded chan bool - shutdown chan bool - forceReload chan bool - featureFlags []FeatureFlag - personalApiKey string - projectApiKey string - Errorf func(format string, args ...interface{}) - Endpoint string - http http.Client - mutex sync.RWMutex - fetchedFlagsSuccessfullyOnce bool + loaded chan bool + shutdown chan bool + forceReload chan bool + featureFlags []FeatureFlag + cohorts map[string]PropertyGroup + groups map[string]string + personalApiKey string + projectApiKey string + Errorf func(format string, args ...interface{}) + Endpoint string + http http.Client + mutex sync.RWMutex + nextPollTick func() time.Duration + flagTimeout time.Duration } type FeatureFlag struct { + Key string `json:"key"` + IsSimpleFlag bool `json:"is_simple_flag"` + RolloutPercentage *uint8 `json:"rollout_percentage"` + Active bool `json:"active"` + Filters Filter `json:"filters"` + EnsureExperienceContinuity *bool `json:"ensure_experience_continuity"` +} + +type Filter struct { + AggregationGroupTypeIndex *uint8 `json:"aggregation_group_type_index"` + Groups []FeatureFlagCondition `json:"groups"` + Multivariate *Variants `json:"multivariate"` + Payloads map[string]string `json:"payloads"` +} + +type Variants struct { + Variants []FlagVariant `json:"variants"` +} + +type FlagVariant struct { Key string `json:"key"` - IsSimpleFlag bool `json:"is_simple_flag"` + Name string `json:"name"` RolloutPercentage *uint8 `json:"rollout_percentage"` } +type FeatureFlagCondition struct { + Properties []FlagProperty `json:"properties"` + RolloutPercentage *uint8 `json:"rollout_percentage"` + Variant *string `json:"variant"` +} + +type FlagProperty struct { + Key string `json:"key"` + Operator string `json:"operator"` + Value interface{} `json:"value"` + Type string `json:"type"` + Negation bool `json:"negation"` +} + +type PropertyGroup struct { + Type string `json:"type"` + // []PropertyGroup or []FlagProperty + Values []any `json:"values"` +} + +type FlagVariantMeta struct { + ValueMin float64 + ValueMax float64 + Key string +} + type FeatureFlagsResponse struct { - Results []FeatureFlag `json:"results"` + Flags []FeatureFlag `json:"flags"` + GroupTypeMapping *map[string]string `json:"group_type_mapping"` + Cohorts map[string]PropertyGroup `json:"cohorts"` } type DecideRequestData struct { - ApiKey string `json:"api_key"` - DistinctId string `json:"distinct_id"` + ApiKey string `json:"api_key"` + DistinctId string `json:"distinct_id"` + Groups Groups `json:"groups"` + PersonProperties Properties `json:"person_properties"` + GroupProperties map[string]Properties `json:"group_properties"` } type DecideResponse struct { - FeatureFlags []string `json:"featureFlags"` + FeatureFlags map[string]interface{} `json:"featureFlags"` + FeatureFlagPayloads map[string]string `json:"featureFlagPayloads"` + QuotaLimited *[]string `json:"quota_limited"` +} + +type InconclusiveMatchError struct { + msg string +} + +func (e *InconclusiveMatchError) Error() string { + return e.msg } -func newFeatureFlagsPoller(projectApiKey string, personalApiKey string, errorf func(format string, args ...interface{}), endpoint string, httpClient http.Client, pollingInterval time.Duration) *FeatureFlagsPoller { +func newFeatureFlagsPoller( + projectApiKey string, + personalApiKey string, + errorf func(format string, args ...interface{}), + endpoint string, + httpClient http.Client, + pollingInterval time.Duration, + nextPollTick func() time.Duration, + flagTimeout time.Duration, +) *FeatureFlagsPoller { + + if nextPollTick == nil { + nextPollTick = func() time.Duration { return pollingInterval } + } + poller := FeatureFlagsPoller{ - ticker: time.NewTicker(pollingInterval), - loaded: make(chan bool), - shutdown: make(chan bool), - forceReload: make(chan bool), - personalApiKey: personalApiKey, - projectApiKey: projectApiKey, - Errorf: errorf, - Endpoint: endpoint, - http: httpClient, - mutex: sync.RWMutex{}, - fetchedFlagsSuccessfullyOnce: false, + loaded: make(chan bool), + shutdown: make(chan bool), + forceReload: make(chan bool), + personalApiKey: personalApiKey, + projectApiKey: projectApiKey, + Errorf: errorf, + Endpoint: endpoint, + http: httpClient, + mutex: sync.RWMutex{}, + nextPollTick: nextPollTick, + flagTimeout: flagTimeout, } go poller.run() @@ -70,18 +152,20 @@ func newFeatureFlagsPoller(projectApiKey string, personalApiKey string, errorf f func (poller *FeatureFlagsPoller) run() { poller.fetchNewFeatureFlags() + close(poller.loaded) for { + timer := time.NewTimer(poller.nextPollTick()) select { case <-poller.shutdown: close(poller.shutdown) close(poller.forceReload) - close(poller.loaded) - poller.ticker.Stop() + timer.Stop() return case <-poller.forceReload: + timer.Stop() poller.fetchNewFeatureFlags() - case <-poller.ticker.C: + case <-timer.C: poller.fetchNewFeatureFlags() } } @@ -89,111 +173,665 @@ func (poller *FeatureFlagsPoller) run() { func (poller *FeatureFlagsPoller) fetchNewFeatureFlags() { personalApiKey := poller.personalApiKey - requestData := []byte{} headers := [][2]string{{"Authorization", "Bearer " + personalApiKey + ""}} - res, err := poller.request("GET", "api/feature_flag", requestData, headers) - if err != nil || res.StatusCode != http.StatusOK { - poller.Errorf("Unable to fetch feature flags", err) + res, cancel, err := poller.localEvaluationFlags(headers) + defer cancel() + if err != nil { + poller.Errorf("Unable to fetch feature flags: %s", err) + return + } + + // Handle quota limit response (HTTP 402) + if res.StatusCode == http.StatusPaymentRequired { + // Clear existing flags when quota limited + poller.mutex.Lock() + poller.featureFlags = []FeatureFlag{} + poller.cohorts = map[string]PropertyGroup{} + poller.groups = map[string]string{} + poller.mutex.Unlock() + poller.Errorf("[FEATURE FLAGS] PostHog feature flags quota limited, resetting feature flag data. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts") + return + } + + if res.StatusCode != http.StatusOK { + poller.Errorf("Unable to fetch feature flags, status: %s", res.Status) + return } + defer res.Body.Close() resBody, err := ioutil.ReadAll(res.Body) if err != nil { - poller.Errorf("Unable to fetch feature flags", err) + poller.Errorf("Unable to fetch feature flags: %s", err) return } featureFlagsResponse := FeatureFlagsResponse{} err = json.Unmarshal([]byte(resBody), &featureFlagsResponse) if err != nil { - poller.Errorf("Unable to unmarshal response from api/feature_flag", err) + poller.Errorf("Unable to unmarshal response from api/feature_flag/local_evaluation: %s", err) return } + newFlags := []FeatureFlag{} + newFlags = append(newFlags, featureFlagsResponse.Flags...) poller.mutex.Lock() - if !poller.fetchedFlagsSuccessfullyOnce { - poller.loaded <- true + poller.featureFlags = newFlags + poller.cohorts = featureFlagsResponse.Cohorts + if featureFlagsResponse.GroupTypeMapping != nil { + poller.groups = *featureFlagsResponse.GroupTypeMapping } - poller.featureFlags = featureFlagsResponse.Results poller.mutex.Unlock() +} + +func (poller *FeatureFlagsPoller) GetFeatureFlag(flagConfig FeatureFlagPayload) (interface{}, error) { + flag, err := poller.getFeatureFlag(flagConfig) + + var result interface{} + + if flag.Key != "" { + result, err = poller.computeFlagLocally( + flag, + flagConfig.DistinctId, + flagConfig.Groups, + flagConfig.PersonProperties, + flagConfig.GroupProperties, + poller.cohorts, + ) + } + + if err != nil { + poller.Errorf("Unable to compute flag locally (%s) - %s", flag.Key, err) + } + if (err != nil || result == nil) && !flagConfig.OnlyEvaluateLocally { + + result, err = poller.getFeatureFlagVariant(flag, flagConfig.Key, flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) + if err != nil { + return nil, err + } + } + + return result, err } -func (poller *FeatureFlagsPoller) IsFeatureEnabled(key string, distinctId string, defaultResult bool) (bool, error) { - featureFlags := poller.GetFeatureFlags() - errorMessage := "Failed when checking if flag is enabled" +func (poller *FeatureFlagsPoller) GetFeatureFlagPayload(flagConfig FeatureFlagPayload) (string, error) { + flag, err := poller.getFeatureFlag(flagConfig) + + var variant interface{} + + if flag.Key != "" { + variant, err = poller.computeFlagLocally( + flag, + flagConfig.DistinctId, + flagConfig.Groups, + flagConfig.PersonProperties, + flagConfig.GroupProperties, + poller.cohorts, + ) + } + if err != nil { + poller.Errorf("Unable to compute flag locally (%s) - %s", flag.Key, err) + } + + if variant != nil { + payload, ok := flag.Filters.Payloads[fmt.Sprintf("%v", variant)] + if ok { + return payload, nil + } + } + + if (variant == nil || err != nil) && !flagConfig.OnlyEvaluateLocally { + result, err := poller.getFeatureFlagPayload(flagConfig.Key, flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) + if err != nil { + return "", err + } + + return result, nil + } + + return "", errors.New("unable to compute flag locally") +} - if len(featureFlags) < 1 { - return defaultResult, nil +func (poller *FeatureFlagsPoller) getFeatureFlag(flagConfig FeatureFlagPayload) (FeatureFlag, error) { + featureFlags, err := poller.GetFeatureFlags() + if err != nil { + return FeatureFlag{}, err } featureFlag := FeatureFlag{Key: ""} // avoid using flag for conflicts with Golang's stdlib `flag` for _, storedFlag := range featureFlags { - if key == storedFlag.Key { + if flagConfig.Key == storedFlag.Key { featureFlag = storedFlag break } } - if featureFlag.Key == "" { - return defaultResult, nil + return featureFlag, nil +} + +func (poller *FeatureFlagsPoller) GetAllFlags(flagConfig FeatureFlagPayloadNoKey) (map[string]interface{}, error) { + response := map[string]interface{}{} + featureFlags, err := poller.GetFeatureFlags() + if err != nil { + return nil, err } + fallbackToDecide := false + cohorts := poller.cohorts - isFlagEnabledResponse := false + if len(featureFlags) == 0 { + fallbackToDecide = true + } else { + for _, storedFlag := range featureFlags { + result, err := poller.computeFlagLocally( + storedFlag, + flagConfig.DistinctId, + flagConfig.Groups, + flagConfig.PersonProperties, + flagConfig.GroupProperties, + cohorts, + ) + if err != nil { + poller.Errorf("Unable to compute flag locally (%s) - %s", storedFlag.Key, err) + fallbackToDecide = true + } else { + response[storedFlag.Key] = result + } + } + } - if featureFlag.IsSimpleFlag { + if fallbackToDecide && !flagConfig.OnlyEvaluateLocally { + result, err := poller.getFeatureFlagVariants(flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) - // json.Unmarshal will convert JSON `null` to a nullish value for each type - // which is 0 for uint. However, our feature flags should have rolloutPercentage == 100 - // if it is set to `null`. Having rollout percentage be a pointer and deferencing it - // here allows its value to be `nil` following json.Unmarhsal, so we can appropriately - // set it to 100 - rolloutPercentage := uint8(100) - if featureFlag.RolloutPercentage != nil { - rolloutPercentage = *featureFlag.RolloutPercentage + if err != nil { + return response, err + } else { + for k, v := range result.FeatureFlags { + response[k] = v + } + } + } + + return response, nil +} + +func (poller *FeatureFlagsPoller) computeFlagLocally( + flag FeatureFlag, + distinctId string, + groups Groups, + personProperties Properties, + groupProperties map[string]Properties, + cohorts map[string]PropertyGroup, +) (interface{}, error) { + if flag.EnsureExperienceContinuity != nil && *flag.EnsureExperienceContinuity { + return nil, &InconclusiveMatchError{"Flag has experience continuity enabled"} + } + + if !flag.Active { + return false, nil + } + + if flag.Filters.AggregationGroupTypeIndex != nil { + + groupName, exists := poller.groups[fmt.Sprintf("%d", *flag.Filters.AggregationGroupTypeIndex)] + + if !exists { + errMessage := "flag has unknown group type index" + return nil, errors.New(errMessage) + } + + _, exists = groups[groupName] + + if !exists { + errMessage := fmt.Sprintf("FEATURE FLAGS] Can't compute group feature flag: %s without group names passed in", flag.Key) + return nil, errors.New(errMessage) } + + focusedGroupProperties := groupProperties[groupName] + return matchFeatureFlagProperties(flag, groups[groupName].(string), focusedGroupProperties, cohorts) + } else { + return matchFeatureFlagProperties(flag, distinctId, personProperties, cohorts) + } +} + +func getMatchingVariant(flag FeatureFlag, distinctId string) (interface{}, error) { + lookupTable := getVariantLookupTable(flag) + + hashValue, err := _hash(flag.Key, distinctId, "variant") + if err != nil { + return nil, err + } + + for _, variant := range lookupTable { + if hashValue >= float64(variant.ValueMin) && hashValue < float64(variant.ValueMax) { + return variant.Key, nil + } + } + + return true, nil +} + +func getVariantLookupTable(flag FeatureFlag) []FlagVariantMeta { + lookupTable := []FlagVariantMeta{} + valueMin := 0.00 + + multivariates := flag.Filters.Multivariate + + if multivariates == nil || multivariates.Variants == nil { + return lookupTable + } + + for _, variant := range multivariates.Variants { + valueMax := float64(valueMin) + float64(*variant.RolloutPercentage)/100 + _flagVariantMeta := FlagVariantMeta{ValueMin: float64(valueMin), ValueMax: valueMax, Key: variant.Key} + lookupTable = append(lookupTable, _flagVariantMeta) + valueMin = float64(valueMax) + } + + return lookupTable +} + +func matchFeatureFlagProperties( + flag FeatureFlag, + distinctId string, + properties Properties, + cohorts map[string]PropertyGroup, +) (interface{}, error) { + conditions := flag.Filters.Groups + isInconclusive := false + + // # Stable sort conditions with variant overrides to the top. This ensures that if overrides are present, they are + // # evaluated first, and the variant override is applied to the first matching condition. + // conditionsCopy := make([]PropertyGroup, len(conditions)) + sortedConditions := append([]FeatureFlagCondition{}, conditions...) + + sort.SliceStable(sortedConditions, func(i, j int) bool { + iValue := 1 + jValue := 1 + if sortedConditions[i].Variant != nil { + iValue = -1 + } + + if sortedConditions[j].Variant != nil { + jValue = -1 + } + + return iValue < jValue + }) + + for _, condition := range sortedConditions { + + isMatch, err := isConditionMatch(flag, distinctId, condition, properties, cohorts) + if err != nil { + if _, ok := err.(*InconclusiveMatchError); ok { + isInconclusive = true + } else { + return nil, err + } + } + + if isMatch { + variantOverride := condition.Variant + multivariates := flag.Filters.Multivariate + + if variantOverride != nil && multivariates != nil && multivariates.Variants != nil && containsVariant(multivariates.Variants, *variantOverride) { + return *variantOverride, nil + } else { + return getMatchingVariant(flag, distinctId) + } + } + } + + if isInconclusive { + return false, &InconclusiveMatchError{"Can't determine if feature flag is enabled or not with given properties"} + } + + return false, nil +} + +func isConditionMatch( + flag FeatureFlag, + distinctId string, + condition FeatureFlagCondition, + properties Properties, + cohorts map[string]PropertyGroup, +) (bool, error) { + if len(condition.Properties) > 0 { + for _, prop := range condition.Properties { + var isMatch bool + var err error + + if prop.Type == "cohort" { + isMatch, err = matchCohort(prop, properties, cohorts) + } else { + isMatch, err = matchProperty(prop, properties) + } + + if err != nil { + return false, err + } + + if !isMatch { + return false, nil + } + } + + if condition.RolloutPercentage != nil { + return true, nil + } + } + + if condition.RolloutPercentage != nil { + return checkIfSimpleFlagEnabled(flag.Key, distinctId, *condition.RolloutPercentage) + } + + return true, nil +} + +func matchCohort(property FlagProperty, properties Properties, cohorts map[string]PropertyGroup) (bool, error) { + cohortId := fmt.Sprint(property.Value) + propertyGroup, ok := cohorts[cohortId] + if !ok { + return false, fmt.Errorf("can't match cohort: cohort %s not found", cohortId) + } + + return matchPropertyGroup(propertyGroup, properties, cohorts) +} + +func matchPropertyGroup(propertyGroup PropertyGroup, properties Properties, cohorts map[string]PropertyGroup) (bool, error) { + groupType := propertyGroup.Type + values := propertyGroup.Values + + if len(values) == 0 { + // empty groups are no-ops, always match + return true, nil + } + + errorMatchingLocally := false + + for _, value := range values { + switch prop := value.(type) { + case map[string]any: + if _, ok := prop["values"]; ok { + // PropertyGroup + matches, err := matchPropertyGroup(PropertyGroup{ + Type: getSafeProp[string](prop, "type"), + Values: getSafeProp[[]any](prop, "values"), + }, properties, cohorts) + if err != nil { + if _, ok := err.(*InconclusiveMatchError); ok { + errorMatchingLocally = true + } else { + return false, err + } + } + + if groupType == "AND" { + if !matches { + return false, nil + } + } else { + // OR group + if matches { + return true, nil + } + } + } else { + // FlagProperty + var matches bool + var err error + flagProperty := FlagProperty{ + Key: getSafeProp[string](prop, "key"), + Operator: getSafeProp[string](prop, "operator"), + Value: getSafeProp[any](prop, "value"), + Type: getSafeProp[string](prop, "type"), + Negation: getSafeProp[bool](prop, "negation"), + } + if prop["type"] == "cohort" { + matches, err = matchCohort(flagProperty, properties, cohorts) + } else { + matches, err = matchProperty(flagProperty, properties) + } + + if err != nil { + if _, ok := err.(*InconclusiveMatchError); ok { + errorMatchingLocally = true + } else { + return false, err + } + } + + negation := flagProperty.Negation + if groupType == "AND" { + // if negated property, do the inverse + if !matches && !negation { + return false, nil + } + if matches && negation { + return false, nil + } + } else { + // OR group + if matches && !negation { + return true, nil + } + if !matches && negation { + return true, nil + } + } + } + } + } + + if errorMatchingLocally { + return false, &InconclusiveMatchError{msg: "Can't match cohort without a given cohort property value"} + } + + // if we get here, all matched in AND case, or none matched in OR case + return groupType == "AND", nil +} + +func matchProperty(property FlagProperty, properties Properties) (bool, error) { + key := property.Key + operator := property.Operator + value := property.Value + if _, ok := properties[key]; !ok { + return false, &InconclusiveMatchError{"Can't match properties without a given property value"} + } + + if operator == "is_not_set" { + return false, &InconclusiveMatchError{"Can't match properties with operator is_not_set"} + } + + override_value := properties[key] + + if operator == "exact" { + switch t := value.(type) { + case []interface{}: + return contains(t, override_value), nil + default: + return value == override_value, nil + } + } + + if operator == "is_not" { + switch t := value.(type) { + case []interface{}: + return !contains(t, override_value), nil + default: + return value != override_value, nil + } + } + + if operator == "is_set" { + return true, nil + } + + if operator == "icontains" { + return strings.Contains(strings.ToLower(fmt.Sprintf("%v", override_value)), strings.ToLower(fmt.Sprintf("%v", value))), nil + } + + if operator == "not_icontains" { + return !strings.Contains(strings.ToLower(fmt.Sprintf("%v", override_value)), strings.ToLower(fmt.Sprintf("%v", value))), nil + } + + if operator == "regex" { + + r, err := regexp.Compile(fmt.Sprintf("%v", value)) + // invalid regex + if err != nil { + return false, nil + } + + match := r.MatchString(fmt.Sprintf("%v", override_value)) + + if match { + return true, nil + } else { + return false, nil + } + } + + if operator == "not_regex" { + var r *regexp.Regexp var err error - isFlagEnabledResponse, err = poller.isSimpleFlagEnabled(key, distinctId, rolloutPercentage) + + if valueString, ok := value.(string); ok { + r, err = regexp.Compile(valueString) + } else if valueInt, ok := value.(int); ok { + valueString = strconv.Itoa(valueInt) + r, err = regexp.Compile(valueString) + } else { + errMessage := "regex expression not allowed" + return false, errors.New(errMessage) + } + + // invalid regex if err != nil { - return false, err + return false, nil } - } else { - requestDataBytes, err := json.Marshal(DecideRequestData{ - ApiKey: poller.projectApiKey, - DistinctId: distinctId, - }) + + var match bool + if valueString, ok := override_value.(string); ok { + match = r.MatchString(valueString) + } else if valueInt, ok := override_value.(int); ok { + valueString = strconv.Itoa(valueInt) + match = r.MatchString(valueString) + } else { + errMessage := "value type not supported" + return false, errors.New(errMessage) + } + + if !match { + return true, nil + } else { + return false, nil + } + } + + if operator == "gt" { + valueOrderable, overrideValueOrderable, err := validateOrderable(value, override_value) if err != nil { - errorMessage = "unable to marshal decide endpoint request data" - poller.Errorf(errorMessage) - return false, errors.New(errorMessage) + return false, err } - res, err := poller.request("POST", "decide", requestDataBytes, [][2]string{}) - if err != nil || res.StatusCode != http.StatusOK { - errorMessage = "Error calling /decide/" - poller.Errorf(errorMessage) - return false, errors.New(errorMessage) + + return overrideValueOrderable > valueOrderable, nil + } + + if operator == "lt" { + valueOrderable, overrideValueOrderable, err := validateOrderable(value, override_value) + if err != nil { + return false, err } - resBody, err := ioutil.ReadAll(res.Body) + + return overrideValueOrderable < valueOrderable, nil + } + + if operator == "gte" { + valueOrderable, overrideValueOrderable, err := validateOrderable(value, override_value) if err != nil { - errorMessage = "Error reading response from /decide/" - poller.Errorf(errorMessage) - return false, errors.New(errorMessage) + return false, err } - defer res.Body.Close() - decideResponse := DecideResponse{} - err = json.Unmarshal([]byte(resBody), &decideResponse) + + return overrideValueOrderable >= valueOrderable, nil + } + + if operator == "lte" { + valueOrderable, overrideValueOrderable, err := validateOrderable(value, override_value) if err != nil { - errorMessage = "Error parsing response from /decide/" - poller.Errorf(errorMessage) - return false, errors.New(errorMessage) + return false, err } - for _, enabledFlag := range decideResponse.FeatureFlags { - if key == enabledFlag { - isFlagEnabledResponse = true - } + + return overrideValueOrderable <= valueOrderable, nil + } + + return false, &InconclusiveMatchError{"Unknown operator: " + operator} + +} + +func validateOrderable(firstValue interface{}, secondValue interface{}) (float64, float64, error) { + convertedFirstValue, err := interfaceToFloat(firstValue) + if err != nil { + errMessage := "value 1 is not orderable" + return 0, 0, errors.New(errMessage) + } + convertedSecondValue, err := interfaceToFloat(secondValue) + if err != nil { + errMessage := "value 2 is not orderable" + return 0, 0, errors.New(errMessage) + } + + return convertedFirstValue, convertedSecondValue, nil +} + +func interfaceToFloat(val interface{}) (float64, error) { + var i float64 + switch t := val.(type) { + case int: + i = float64(t) + case int8: + i = float64(t) + case int16: + i = float64(t) + case int32: + i = float64(t) + case int64: + i = float64(t) + case float32: + i = float64(t) + case float64: + i = float64(t) + case uint8: + i = float64(t) + case uint16: + i = float64(t) + case uint32: + i = float64(t) + case uint64: + i = float64(t) + default: + errMessage := "argument not orderable" + return 0.0, errors.New(errMessage) + } + + return i, nil +} + +func contains(s []interface{}, e interface{}) bool { + for _, a := range s { + if a == e { + return true } } + return false +} - return isFlagEnabledResponse, nil +func containsVariant(variantList []FlagVariant, key string) bool { + for _, variant := range variantList { + if variant.Key == key { + return true + } + } + return false } func (poller *FeatureFlagsPoller) isSimpleFlagEnabled(key string, distinctId string, rolloutPercentage uint8) (bool, error) { @@ -208,42 +846,76 @@ func (poller *FeatureFlagsPoller) isSimpleFlagEnabled(key string, distinctId str // extracted as a regular func for testing purposes func checkIfSimpleFlagEnabled(key string, distinctId string, rolloutPercentage uint8) (bool, error) { + val, err := _hash(key, distinctId, "") + if err != nil { + return false, err + } + + return val <= float64(rolloutPercentage)/100, nil +} + +func _hash(key string, distinctId string, salt string) (float64, error) { hash := sha1.New() - hash.Write([]byte("" + key + "." + distinctId + "")) + hash.Write([]byte("" + key + "." + distinctId + "" + salt)) digest := hash.Sum(nil) hexString := fmt.Sprintf("%x\n", digest)[:15] value, err := strconv.ParseInt(hexString, 16, 64) if err != nil { - return false, err + return 0, err + } + + return float64(value) / LONG_SCALE, nil +} + +func (poller *FeatureFlagsPoller) GetFeatureFlags() ([]FeatureFlag, error) { + // When channel is open this will block. When channel is closed it will immediately exit. + _, closed := <-poller.loaded + if closed && poller.featureFlags == nil { + // There was an error with initial flag fetching + return nil, fmt.Errorf("flags were not successfully fetched yet") } - return (float64(value) / LONG_SCALE) <= float64(rolloutPercentage)/100, nil + + return poller.featureFlags, nil } -func (poller *FeatureFlagsPoller) GetFeatureFlags() []FeatureFlag { - // ensure flags are loaded on the first call - if !poller.fetchedFlagsSuccessfullyOnce { - <-poller.loaded +func (poller *FeatureFlagsPoller) decide(requestData []byte, headers [][2]string) (*http.Response, context.CancelFunc, error) { + decideEndpoint := "decide/?v=3" + + url, err := url.Parse(poller.Endpoint + "/" + decideEndpoint + "") + if err != nil { + poller.Errorf("creating url - %s", err) } - poller.mutex.RLock() + return poller.request("POST", url, requestData, headers, poller.flagTimeout) +} + +func (poller *FeatureFlagsPoller) localEvaluationFlags(headers [][2]string) (*http.Response, context.CancelFunc, error) { + localEvaluationEndpoint := "api/feature_flag/local_evaluation" - defer poller.mutex.RUnlock() + url, err := url.Parse(poller.Endpoint + "/" + localEvaluationEndpoint + "") + if err != nil { + poller.Errorf("creating url - %s", err) + } + searchParams := url.Query() + searchParams.Add("token", poller.projectApiKey) + searchParams.Add("send_cohorts", "true") + url.RawQuery = searchParams.Encode() - return poller.featureFlags + return poller.request("GET", url, []byte{}, headers, time.Duration(10)*time.Second) } -func (poller *FeatureFlagsPoller) request(method string, endpoint string, requestData []byte, headers [][2]string) (*http.Response, error) { +func (poller *FeatureFlagsPoller) request(method string, url *url.URL, requestData []byte, headers [][2]string, timeout time.Duration) (*http.Response, context.CancelFunc, error) { + ctx, cancel := context.WithTimeout(context.Background(), timeout) - url := poller.Endpoint + "/" + endpoint + "/" - req, err := http.NewRequest(method, url, bytes.NewReader(requestData)) + req, err := http.NewRequestWithContext(ctx, method, url.String(), bytes.NewReader(requestData)) if err != nil { poller.Errorf("creating request - %s", err) } version := getVersion() - req.Header.Add("User-Agent", "posthog-go (version: "+version+")") + req.Header.Add("User-Agent", SdkName+"/"+version) req.Header.Add("Content-Type", "application/json") req.Header.Add("Content-Length", fmt.Sprintf("%d", len(requestData))) @@ -252,12 +924,11 @@ func (poller *FeatureFlagsPoller) request(method string, endpoint string, reques } res, err := poller.http.Do(req) - if err != nil { poller.Errorf("sending request - %s", err) } - return res, err + return res, cancel, err } func (poller *FeatureFlagsPoller) ForceReload() { @@ -267,3 +938,103 @@ func (poller *FeatureFlagsPoller) ForceReload() { func (poller *FeatureFlagsPoller) shutdownPoller() { poller.shutdown <- true } + +func (poller *FeatureFlagsPoller) getFeatureFlagVariants(distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (*DecideResponse, error) { + errorMessage := "Failed when getting flag variants" + requestDataBytes, err := json.Marshal(DecideRequestData{ + ApiKey: poller.projectApiKey, + DistinctId: distinctId, + Groups: groups, + PersonProperties: personProperties, + GroupProperties: groupProperties, + }) + headers := [][2]string{{"Authorization", "Bearer " + poller.personalApiKey + ""}} + if err != nil { + errorMessage = "unable to marshal decide endpoint request data" + poller.Errorf(errorMessage) + return nil, errors.New(errorMessage) + } + res, cancel, err := poller.decide(requestDataBytes, headers) + defer cancel() + if err != nil || res.StatusCode != http.StatusOK { + errorMessage = "Error calling /decide/" + if err != nil { + errorMessage += " - " + err.Error() + } + poller.Errorf(errorMessage) + return nil, errors.New(errorMessage) + } + resBody, err := ioutil.ReadAll(res.Body) + if err != nil { + errorMessage = "Error reading response from /decide/" + poller.Errorf(errorMessage) + return nil, errors.New(errorMessage) + } + defer res.Body.Close() + decideResponse := DecideResponse{} + err = json.Unmarshal([]byte(resBody), &decideResponse) + if err != nil { + errorMessage = "Error parsing response from /decide/" + poller.Errorf(errorMessage) + return nil, errors.New(errorMessage) + } + + return &decideResponse, nil +} + +func (poller *FeatureFlagsPoller) getFeatureFlagVariant(featureFlag FeatureFlag, key string, distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (interface{}, error) { + var result interface{} = false + + if featureFlag.IsSimpleFlag { + + // json.Unmarshal will convert JSON `null` to a nullish value for each type + // which is 0 for uint. However, our feature flags should have rolloutPercentage == 100 + // if it is set to `null`. Having rollout percentage be a pointer and deferencing it + // here allows its value to be `nil` following json.Unmarhsal, so we can appropriately + // set it to 100 + rolloutPercentage := uint8(100) + if featureFlag.RolloutPercentage != nil { + rolloutPercentage = *featureFlag.RolloutPercentage + } + var err error + result, err = poller.isSimpleFlagEnabled(key, distinctId, rolloutPercentage) + if err != nil { + return false, err + } + } else { + featureFlagVariants, variantErr := poller.getFeatureFlagVariants(distinctId, groups, personProperties, groupProperties) + + if variantErr != nil { + return false, variantErr + } + + for flagKey, flagValue := range featureFlagVariants.FeatureFlags { + flagValueString := fmt.Sprintf("%v", flagValue) + if key == flagKey && flagValueString != "false" { + result = flagValueString + break + } + } + return result, nil + } + return result, nil +} + +func (poller *FeatureFlagsPoller) getFeatureFlagPayload(key string, distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (string, error) { + featureFlagVariants, err := poller.getFeatureFlagVariants(distinctId, groups, personProperties, groupProperties) + if err != nil { + return "", err + } + + return featureFlagVariants.FeatureFlagPayloads[key], nil +} + +func getSafeProp[T any](properties map[string]any, key string) T { + switch v := properties[key].(type) { + case T: + return v + default: + var defaultValue T + return defaultValue + } +} diff --git a/vendor/github.com/posthog/posthog-go/group_identify.go b/vendor/github.com/posthog/posthog-go/group_identify.go new file mode 100644 index 0000000000..52cc210a8e --- /dev/null +++ b/vendor/github.com/posthog/posthog-go/group_identify.go @@ -0,0 +1,69 @@ +package posthog + +import ( + "fmt" + "time" +) + +type GroupIdentify struct { + Type string + Key string + + DistinctId string + Timestamp time.Time + Properties Properties +} + +func (msg GroupIdentify) internal() { + panic(unimplementedError) +} + +func (msg GroupIdentify) Validate() error { + if len(msg.Type) == 0 { + return FieldError{ + Type: "posthog.GroupIdentify", + Name: "Type", + Value: msg.Type, + } + } + + if len(msg.Key) == 0 { + return FieldError{ + Type: "posthog.GroupIdentify", + Name: "Key", + Value: msg.Key, + } + } + + return nil +} + +type GroupIdentifyInApi struct { + Library string `json:"library"` + LibraryVersion string `json:"library_version"` + Timestamp time.Time `json:"timestamp"` + + Event string `json:"event"` + DistinctId string `json:"distinct_id"` + Properties Properties `json:"properties"` +} + +func (msg GroupIdentify) APIfy() APIMessage { + library := "posthog-go" + + myProperties := Properties{}.Set("$lib", library).Set("$lib_version", getVersion()) + myProperties.Set("$group_type", msg.Type).Set("$group_key", msg.Key).Set("$group_set", msg.Properties) + + distinctId := fmt.Sprintf("$%s_%s", msg.Type, msg.Key) + + apified := GroupIdentifyInApi{ + Event: "$groupidentify", + Properties: myProperties, + DistinctId: distinctId, + Timestamp: msg.Timestamp, + Library: library, + LibraryVersion: getVersion(), + } + + return apified +} diff --git a/vendor/github.com/posthog/posthog-go/groups.go b/vendor/github.com/posthog/posthog-go/groups.go new file mode 100644 index 0000000000..3ec6e47f57 --- /dev/null +++ b/vendor/github.com/posthog/posthog-go/groups.go @@ -0,0 +1,17 @@ +package posthog + +// This type is used to represent groups in messages that support it. +// It is a free-form object so the application can set any value it sees fit but +// a few helper method are defined to make it easier to instantiate groups with +// common fields. + +type Groups map[string]interface{} + +func NewGroups() Groups { + return make(Groups, 10) +} + +func (p Groups) Set(name string, value interface{}) Groups { + p[name] = value + return p +} diff --git a/vendor/github.com/posthog/posthog-go/message.go b/vendor/github.com/posthog/posthog-go/message.go index 2edd4edc0e..7536074bde 100644 --- a/vendor/github.com/posthog/posthog-go/message.go +++ b/vendor/github.com/posthog/posthog-go/message.go @@ -55,8 +55,9 @@ func makeTimestamp(t time.Time, def time.Time) time.Time { // export this type because it's only meant to be used internally to send groups // of messages in one API call. type batch struct { - ApiKey string `json:"api_key"` - Messages []message `json:"batch"` + ApiKey string `json:"api_key"` + HistoricalMigration bool `json:"historical_migration,omitempty"` + Messages []message `json:"batch"` } type APIMessage interface{} @@ -119,5 +120,5 @@ func (q *messageQueue) flush() (msgs []message) { const ( maxBatchBytes = 500000 - maxMessageBytes = 32000 + maxMessageBytes = 500000 ) diff --git a/vendor/github.com/posthog/posthog-go/posthog.go b/vendor/github.com/posthog/posthog-go/posthog.go index f4a0c6feee..5502f706ea 100644 --- a/vendor/github.com/posthog/posthog-go/posthog.go +++ b/vendor/github.com/posthog/posthog-go/posthog.go @@ -8,11 +8,13 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "sync" "time" ) const unimplementedError = "not implemented" +const SIZE_DEFAULT = 50_000 // This interface is the main API exposed by the posthog package. // Values that satsify this interface are returned by the client constructors @@ -37,13 +39,31 @@ type Client interface { Enqueue(Message) error // // Method returns if a feature flag is on for a given user based on their distinct ID - IsFeatureEnabled(string, string, bool) (bool, error) + IsFeatureEnabled(FeatureFlagPayload) (interface{}, error) + // + // Method returns variant value if multivariantflag or otherwise a boolean indicating + // if the given flag is on or off for the user + GetFeatureFlag(FeatureFlagPayload) (interface{}, error) + // + // Method returns feature flag payload value matching key for user (supports multivariate flags). + GetFeatureFlagPayload(FeatureFlagPayload) (string, error) + // + // Method returns decrypted feature flag payload value for remote config flags. + GetRemoteConfigPayload(string) (string, error) + // + // Get all flags - returns all flags for a user + GetAllFlags(FeatureFlagPayloadNoKey) (map[string]interface{}, error) // // Method forces a reload of feature flags + // NB: This is only available when using a PersonalApiKey ReloadFeatureFlags() error // // Get feature flags - for testing only + // NB: This is only available when using a PersonalApiKey GetFeatureFlags() ([]FeatureFlag, error) + // + // Get the last captured event + GetLastCapturedEvent() *Capture } type client struct { @@ -69,6 +89,13 @@ type client struct { // A background poller for fetching feature flags featureFlagsPoller *FeatureFlagsPoller + + distinctIdsFeatureFlagsReported *SizeLimitedMap + + // Last captured event + lastCapturedEvent *Capture + // Mutex to protect last captured event + lastEventMutex sync.RWMutex } // Instantiate a new client that uses the write key passed as first argument to @@ -91,16 +118,26 @@ func NewWithConfig(apiKey string, config Config) (cli Client, err error) { } c := &client{ - Config: makeConfig(config), - key: apiKey, - msgs: make(chan APIMessage, 100), - quit: make(chan struct{}), - shutdown: make(chan struct{}), - http: makeHttpClient(config.Transport), + Config: makeConfig(config), + key: apiKey, + msgs: make(chan APIMessage, 100), + quit: make(chan struct{}), + shutdown: make(chan struct{}), + http: makeHttpClient(config.Transport), + distinctIdsFeatureFlagsReported: newSizeLimitedMap(SIZE_DEFAULT), } if len(c.PersonalApiKey) > 0 { - c.featureFlagsPoller = newFeatureFlagsPoller(c.key, c.Config.PersonalApiKey, c.Errorf, c.Endpoint, c.http, c.DefaultFeatureFlagsPollingInterval) + c.featureFlagsPoller = newFeatureFlagsPoller( + c.key, + c.Config.PersonalApiKey, + c.Errorf, + c.Endpoint, + c.http, + c.DefaultFeatureFlagsPollingInterval, + c.NextFeatureFlagsPollingTick, + c.FeatureFlagRequestTimeout, + ) } go c.loop() @@ -131,6 +168,11 @@ func dereferenceMessage(msg Message) Message { return nil } return *m + case *GroupIdentify: + if m == nil { + return nil + } + return *m case *Capture: if m == nil { return nil @@ -160,9 +202,42 @@ func (c *client) Enqueue(msg Message) (err error) { m.Timestamp = makeTimestamp(m.Timestamp, ts) msg = m + case GroupIdentify: + m.Timestamp = makeTimestamp(m.Timestamp, ts) + msg = m + case Capture: m.Type = "capture" m.Timestamp = makeTimestamp(m.Timestamp, ts) + if m.SendFeatureFlags { + // Add all feature variants to event + featureVariants, err := c.getFeatureVariants(m.DistinctId, m.Groups, NewProperties(), map[string]Properties{}) + if err != nil { + c.Errorf("unable to get feature variants - %s", err) + } + + if m.Properties == nil { + m.Properties = NewProperties() + } + + for feature, variant := range featureVariants { + propKey := fmt.Sprintf("$feature/%s", feature) + m.Properties[propKey] = variant + } + // Add all feature flag keys to $active_feature_flags key + featureKeys := make([]string, len(featureVariants)) + i := 0 + for k := range featureVariants { + featureKeys[i] = k + i++ + } + m.Properties["$active_feature_flags"] = featureKeys + } + if m.Properties == nil { + m.Properties = NewProperties() + } + m.Properties.Merge(c.DefaultEventProperties) + c.setLastCapturedEvent(m) msg = m default: @@ -181,25 +256,44 @@ func (c *client) Enqueue(msg Message) (err error) { }() c.msgs <- msg.APIfy() + return } -func (c *client) IsFeatureEnabled(flagKey string, distinctId string, defaultValue bool) (bool, error) { - if c.featureFlagsPoller == nil { - errorMessage := "specifying a PersonalApiKey is required for using feature flags" - c.Errorf(errorMessage) - return false, errors.New(errorMessage) - } - isEnabled, err := c.featureFlagsPoller.IsFeatureEnabled(flagKey, distinctId, defaultValue) - c.Enqueue(Capture{ - DistinctId: distinctId, - Event: "$feature_flag_called", - Properties: NewProperties(). - Set("$feature_flag", flagKey). - Set("$feature_flag_response", isEnabled). - Set("$feature_flag_errored", err != nil), - }) - return isEnabled, err +func (c *client) setLastCapturedEvent(event Capture) { + c.lastEventMutex.Lock() + defer c.lastEventMutex.Unlock() + c.lastCapturedEvent = &event +} + +func (c *client) GetLastCapturedEvent() *Capture { + c.lastEventMutex.RLock() + defer c.lastEventMutex.RUnlock() + if c.lastCapturedEvent == nil { + return nil + } + // Return a copy to avoid data races + eventCopy := *c.lastCapturedEvent + return &eventCopy +} + +func (c *client) IsFeatureEnabled(flagConfig FeatureFlagPayload) (interface{}, error) { + if err := flagConfig.validate(); err != nil { + return false, err + } + + result, err := c.GetFeatureFlag(flagConfig) + if err != nil { + return nil, err + } + + if result == "false" { + result = false + } else if result == "true" { + result = true + } + + return result, nil } func (c *client) ReloadFeatureFlags() error { @@ -212,13 +306,94 @@ func (c *client) ReloadFeatureFlags() error { return nil } +func (c *client) GetFeatureFlagPayload(flagConfig FeatureFlagPayload) (string, error) { + if err := flagConfig.validate(); err != nil { + return "", err + } + + var payload string + var err error + + if c.featureFlagsPoller != nil { + // get feature flag from the poller, which uses the personal api key + // this is only available when using a PersonalApiKey + payload, err = c.featureFlagsPoller.GetFeatureFlagPayload(flagConfig) + } else { + // if there's no poller, get the feature flag from the decide endpoint + c.debugf("getting feature flag from decide endpoint") + payload, err = c.getFeatureFlagPayloadFromDecide(flagConfig.Key, flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) + } + + return payload, err +} + +func (c *client) GetFeatureFlag(flagConfig FeatureFlagPayload) (interface{}, error) { + if err := flagConfig.validate(); err != nil { + return false, err + } + + var flagValue interface{} + var err error + + if c.featureFlagsPoller != nil { + // get feature flag from the poller, which uses the personal api key + // this is only available when using a PersonalApiKey + flagValue, err = c.featureFlagsPoller.GetFeatureFlag(flagConfig) + } else { + // if there's no poller, get the feature flag from the decide endpoint + c.debugf("getting feature flag from decide endpoint") + flagValue, err = c.getFeatureFlagFromDecide(flagConfig.Key, flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) + } + + if *flagConfig.SendFeatureFlagEvents && !c.distinctIdsFeatureFlagsReported.contains(flagConfig.DistinctId, flagConfig.Key) { + c.Enqueue(Capture{ + DistinctId: flagConfig.DistinctId, + Event: "$feature_flag_called", + Properties: NewProperties(). + Set("$feature_flag", flagConfig.Key). + Set("$feature_flag_response", flagValue). + Set("$feature_flag_errored", err != nil), + Groups: flagConfig.Groups, + }) + c.distinctIdsFeatureFlagsReported.add(flagConfig.DistinctId, flagConfig.Key) + } + + return flagValue, err +} + +func (c *client) GetRemoteConfigPayload(flagKey string) (string, error) { + return c.makeRemoteConfigRequest(flagKey) +} + func (c *client) GetFeatureFlags() ([]FeatureFlag, error) { if c.featureFlagsPoller == nil { errorMessage := "specifying a PersonalApiKey is required for using feature flags" c.Errorf(errorMessage) return nil, errors.New(errorMessage) } - return c.featureFlagsPoller.GetFeatureFlags(), nil + return c.featureFlagsPoller.GetFeatureFlags() +} + +func (c *client) GetAllFlags(flagConfig FeatureFlagPayloadNoKey) (map[string]interface{}, error) { + + if err := flagConfig.validate(); err != nil { + return nil, err + } + + var flagsValue map[string]interface{} + var err error + + if c.featureFlagsPoller != nil { + // get feature flags from the poller, which uses the personal api key + // this is only available when using a PersonalApiKey + flagsValue, err = c.featureFlagsPoller.GetAllFlags(flagConfig) + } else { + // if there's no poller, get the feature flags from the decide endpoint + c.debugf("getting all feature flags from decide endpoint") + flagsValue, err = c.getAllFeatureFlagsFromDecide(flagConfig.DistinctId, flagConfig.Groups, flagConfig.PersonProperties, flagConfig.GroupProperties) + } + + return flagsValue, err } // Close and flush metrics. @@ -235,7 +410,7 @@ func (c *client) Close() (err error) { return } -// Asychronously send a batched requests. +// Asynchronously send a batched requests. func (c *client) sendAsync(msgs []message, wg *sync.WaitGroup, ex *executor) { wg.Add(1) @@ -262,8 +437,9 @@ func (c *client) send(msgs []message) { const attempts = 10 b, err := json.Marshal(batch{ - ApiKey: c.key, - Messages: msgs, + ApiKey: c.key, + HistoricalMigration: c.HistoricalMigration, + Messages: msgs, }) if err != nil { @@ -303,7 +479,7 @@ func (c *client) upload(b []byte) error { version := getVersion() - req.Header.Add("User-Agent", "posthog-go (version: "+version+")") + req.Header.Add("User-Agent", SdkName+"/"+version) req.Header.Add("Content-Type", "application/json") req.Header.Add("Content-Length", fmt.Sprintf("%d", len(b))) @@ -443,3 +619,167 @@ func (c *client) notifyFailure(msgs []message, err error) { } } } + +func (c *client) getFeatureVariants(distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (map[string]interface{}, error) { + if c.featureFlagsPoller == nil { + errorMessage := "specifying a PersonalApiKey is required for using feature flags" + c.Errorf(errorMessage) + return nil, errors.New(errorMessage) + } + + featureVariants, err := c.featureFlagsPoller.getFeatureFlagVariants(distinctId, groups, personProperties, groupProperties) + if err != nil { + return nil, err + } + return featureVariants.FeatureFlags, nil +} + +func (c *client) makeDecideRequest(distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (*DecideResponse, error) { + requestData := DecideRequestData{ + ApiKey: c.key, + DistinctId: distinctId, + Groups: groups, + PersonProperties: personProperties, + GroupProperties: groupProperties, + } + + requestDataBytes, err := json.Marshal(requestData) + if err != nil { + return nil, fmt.Errorf("unable to marshal decide endpoint request data: %v", err) + } + + decideEndpoint := "decide/?v=3" + url, err := url.Parse(c.Endpoint + "/" + decideEndpoint) + if err != nil { + return nil, fmt.Errorf("creating url: %v", err) + } + + req, err := http.NewRequest("POST", url.String(), bytes.NewReader(requestDataBytes)) + if err != nil { + return nil, fmt.Errorf("creating request: %v", err) + } + + req.Header.Set("Content-Type", "application/json") + req.Header.Set("User-Agent", "posthog-go/"+Version) + + res, err := c.http.Do(req) + if err != nil { + return nil, fmt.Errorf("sending request: %v", err) + } + defer res.Body.Close() + + if res.StatusCode != http.StatusOK { + return nil, fmt.Errorf("unexpected status code from /decide/: %d", res.StatusCode) + } + + resBody, err := ioutil.ReadAll(res.Body) + if err != nil { + return nil, fmt.Errorf("error reading response from /decide/: %v", err) + } + + var decideResponse DecideResponse + err = json.Unmarshal(resBody, &decideResponse) + if err != nil { + return nil, fmt.Errorf("error parsing response from /decide/: %v", err) + } + + return &decideResponse, nil +} + +func (c *client) makeRemoteConfigRequest(flagKey string) (string, error) { + remoteConfigEndpoint := fmt.Sprintf("api/projects/@current/feature_flags/%s/remote_config/", flagKey) + url, err := url.Parse(c.Endpoint + "/" + remoteConfigEndpoint) + if err != nil { + return "", fmt.Errorf("creating url: %v", err) + } + + req, err := http.NewRequest("GET", url.String(), nil) + if err != nil { + return "", fmt.Errorf("creating request: %v", err) + } + + req.Header.Set("Authorization", "Bearer "+c.PersonalApiKey) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("User-Agent", "posthog-go/"+Version) + + res, err := c.http.Do(req) + if err != nil { + return "", fmt.Errorf("sending request: %v", err) + } + defer res.Body.Close() + + if res.StatusCode != http.StatusOK { + return "", fmt.Errorf("unexpected status code from %s: %d", remoteConfigEndpoint, res.StatusCode) + } + + resBody, err := io.ReadAll(res.Body) + if err != nil { + return "", fmt.Errorf("error reading response from /remote_config/: %v", err) + } + + var responseData string + if err := json.Unmarshal(resBody, &responseData); err != nil { + return "", fmt.Errorf("error parsing JSON response from /remote_config/: %v", err) + } + return responseData, nil +} + +// isFeatureFlagsQuotaLimited checks if feature flags are quota limited in the decide response +func (c *client) isFeatureFlagsQuotaLimited(decideResponse *DecideResponse) bool { + if decideResponse.QuotaLimited != nil { + for _, limitedFeature := range *decideResponse.QuotaLimited { + if limitedFeature == "feature_flags" { + c.Errorf("[FEATURE FLAGS] PostHog feature flags quota limited. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts") + return true + } + } + } + return false +} + +func (c *client) getFeatureFlagFromDecide(key string, distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (interface{}, error) { + decideResponse, err := c.makeDecideRequest(distinctId, groups, personProperties, groupProperties) + if err != nil { + return nil, err + } + + if c.isFeatureFlagsQuotaLimited(decideResponse) { + return false, nil + } + + if value, ok := decideResponse.FeatureFlags[key]; ok { + return value, nil + } + + return false, nil +} + +func (c *client) getFeatureFlagPayloadFromDecide(key string, distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (string, error) { + decideResponse, err := c.makeDecideRequest(distinctId, groups, personProperties, groupProperties) + if err != nil { + return "", err + } + + if c.isFeatureFlagsQuotaLimited(decideResponse) { + return "", nil + } + + if value, ok := decideResponse.FeatureFlagPayloads[key]; ok { + return value, nil + } + + return "", nil +} + +func (c *client) getAllFeatureFlagsFromDecide(distinctId string, groups Groups, personProperties Properties, groupProperties map[string]Properties) (map[string]interface{}, error) { + decideResponse, err := c.makeDecideRequest(distinctId, groups, personProperties, groupProperties) + if err != nil { + return nil, err + } + + if c.isFeatureFlagsQuotaLimited(decideResponse) { + return map[string]interface{}{}, nil + } + + return decideResponse.FeatureFlags, nil +} diff --git a/vendor/github.com/posthog/posthog-go/properties.go b/vendor/github.com/posthog/posthog-go/properties.go index 46205131ac..ed63d12859 100644 --- a/vendor/github.com/posthog/posthog-go/properties.go +++ b/vendor/github.com/posthog/posthog-go/properties.go @@ -12,7 +12,6 @@ package posthog // .Set("revenue", 10.0) // .Set("currency", "USD"), // } -// type Properties map[string]interface{} func NewProperties() Properties { @@ -23,3 +22,17 @@ func (p Properties) Set(name string, value interface{}) Properties { p[name] = value return p } + +// Merge adds the properties from the provided `props` into the receiver `p`. +// If a property in `props` already exists in `p`, its value will be overwritten. +func (p Properties) Merge(props Properties) Properties { + if props == nil { + return p + } + + for k, v := range props { + p[k] = v + } + + return p +} diff --git a/vendor/github.com/posthog/posthog-go/timeout_15.go b/vendor/github.com/posthog/posthog-go/timeout_15.go index 17d882b873..b689d0076d 100644 --- a/vendor/github.com/posthog/posthog-go/timeout_15.go +++ b/vendor/github.com/posthog/posthog-go/timeout_15.go @@ -1,3 +1,4 @@ +//go:build !go1.6 // +build !go1.6 package posthog diff --git a/vendor/github.com/posthog/posthog-go/timeout_16.go b/vendor/github.com/posthog/posthog-go/timeout_16.go index b5bf68aa84..cc0cc22a5b 100644 --- a/vendor/github.com/posthog/posthog-go/timeout_16.go +++ b/vendor/github.com/posthog/posthog-go/timeout_16.go @@ -1,3 +1,4 @@ +//go:build go1.6 // +build go1.6 package posthog diff --git a/vendor/github.com/posthog/posthog-go/util.go b/vendor/github.com/posthog/posthog-go/util.go new file mode 100644 index 0000000000..a6264c6a3e --- /dev/null +++ b/vendor/github.com/posthog/posthog-go/util.go @@ -0,0 +1,44 @@ +package posthog + +type SizeLimitedMap struct { + ids map[string][]string + size int +} + +func newSizeLimitedMap(size int) *SizeLimitedMap { + newMap := SizeLimitedMap{ + ids: map[string][]string{}, + size: size, + } + + return &newMap +} + +func (sizeLimitedMap *SizeLimitedMap) add(key string, element string) { + + if len(sizeLimitedMap.ids) >= sizeLimitedMap.size { + sizeLimitedMap.ids = map[string][]string{} + } + + if val, ok := sizeLimitedMap.ids[key]; ok { + sizeLimitedMap.ids[key] = append(val, element) + } else { + sizeLimitedMap.ids[key] = []string{element} + } +} + +func (sizeLimitedMap *SizeLimitedMap) contains(key string, element string) bool { + if val, ok := sizeLimitedMap.ids[key]; ok { + for _, v := range val { + if v == element { + return true + } + } + } + + return false +} + +func (sizeLimitedMap *SizeLimitedMap) count() int { + return len(sizeLimitedMap.ids) +} diff --git a/vendor/github.com/posthog/posthog-go/version.go b/vendor/github.com/posthog/posthog-go/version.go index bef466c6e2..1f8eca8ebf 100644 --- a/vendor/github.com/posthog/posthog-go/version.go +++ b/vendor/github.com/posthog/posthog-go/version.go @@ -3,7 +3,7 @@ package posthog import "flag" // Version of the client. -const Version = "1.0.2" +const Version = "1.4.1" // make tests easier by using a constant version func getVersion() string { diff --git a/vendor/github.com/xtgo/uuid/AUTHORS b/vendor/github.com/xtgo/uuid/AUTHORS deleted file mode 100644 index a6f0451607..0000000000 --- a/vendor/github.com/xtgo/uuid/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -# This source file refers to The gocql Authors for copyright purposes. - -Christoph Hack -Jonathan Rudenberg -Thorsten von Eicken diff --git a/vendor/github.com/xtgo/uuid/LICENSE b/vendor/github.com/xtgo/uuid/LICENSE deleted file mode 100644 index 18d25f9234..0000000000 --- a/vendor/github.com/xtgo/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The gocql Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/xtgo/uuid/uuid.go b/vendor/github.com/xtgo/uuid/uuid.go deleted file mode 100644 index a0fd7a5a5c..0000000000 --- a/vendor/github.com/xtgo/uuid/uuid.go +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) 2012 The gocql Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package uuid can be used to generate and parse universally unique -// identifiers, a standardized format in the form of a 128 bit number. -// -// http://tools.ietf.org/html/rfc4122 -package uuid - -import ( - "crypto/rand" - "encoding/hex" - "errors" - "io" - "net" - "strconv" - "time" -) - -type UUID [16]byte - -var hardwareAddr []byte - -const ( - VariantNCSCompat = 0 - VariantIETF = 2 - VariantMicrosoft = 6 - VariantFuture = 7 -) - -func init() { - if interfaces, err := net.Interfaces(); err == nil { - for _, i := range interfaces { - if i.Flags&net.FlagLoopback == 0 && len(i.HardwareAddr) > 0 { - hardwareAddr = i.HardwareAddr - break - } - } - } - if hardwareAddr == nil { - // If we failed to obtain the MAC address of the current computer, - // we will use a randomly generated 6 byte sequence instead and set - // the multicast bit as recommended in RFC 4122. - hardwareAddr = make([]byte, 6) - _, err := io.ReadFull(rand.Reader, hardwareAddr) - if err != nil { - panic(err) - } - hardwareAddr[0] = hardwareAddr[0] | 0x01 - } -} - -// Parse parses a 32 digit hexadecimal number (that might contain hyphens) -// representing an UUID. -func Parse(input string) (UUID, error) { - var u UUID - j := 0 - for i := 0; i < len(input); i++ { - b := input[i] - switch { - default: - fallthrough - case j == 32: - goto err - case b == '-': - continue - case '0' <= b && b <= '9': - b -= '0' - case 'a' <= b && b <= 'f': - b -= 'a' - 10 - case 'A' <= b && b <= 'F': - b -= 'A' - 10 - } - u[j/2] |= b << byte(^j&1<<2) - j++ - } - if j == 32 { - return u, nil - } -err: - return UUID{}, errors.New("invalid UUID " + strconv.Quote(input)) -} - -// FromBytes converts a raw byte slice to an UUID. It will panic if the slice -// isn't exactly 16 bytes long. -func FromBytes(input []byte) UUID { - var u UUID - if len(input) != 16 { - panic("UUIDs must be exactly 16 bytes long") - } - copy(u[:], input) - return u -} - -// NewRandom generates a totally random UUID (version 4) as described in -// RFC 4122. -func NewRandom() UUID { - var u UUID - io.ReadFull(rand.Reader, u[:]) - u[6] &= 0x0F // clear version - u[6] |= 0x40 // set version to 4 (random uuid) - u[8] &= 0x3F // clear variant - u[8] |= 0x80 // set to IETF variant - return u -} - -var timeBase = time.Date(1582, time.October, 15, 0, 0, 0, 0, time.UTC).Unix() - -// NewTime generates a new time based UUID (version 1) as described in RFC -// 4122. This UUID contains the MAC address of the node that generated the -// UUID, a timestamp and a sequence number. -func NewTime() UUID { - var u UUID - - now := time.Now().In(time.UTC) - t := uint64(now.Unix()-timeBase)*10000000 + uint64(now.Nanosecond()/100) - u[0], u[1], u[2], u[3] = byte(t>>24), byte(t>>16), byte(t>>8), byte(t) - u[4], u[5] = byte(t>>40), byte(t>>32) - u[6], u[7] = byte(t>>56)&0x0F, byte(t>>48) - - var clockSeq [2]byte - io.ReadFull(rand.Reader, clockSeq[:]) - u[8] = clockSeq[1] - u[9] = clockSeq[0] - - copy(u[10:], hardwareAddr) - - u[6] |= 0x10 // set version to 1 (time based uuid) - u[8] &= 0x3F // clear variant - u[8] |= 0x80 // set to IETF variant - - return u -} - -// String returns the UUID in it's canonical form, a 32 digit hexadecimal -// number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. -func (u UUID) String() string { - buf := [36]byte{8: '-', 13: '-', 18: '-', 23: '-'} - hex.Encode(buf[0:], u[0:4]) - hex.Encode(buf[9:], u[4:6]) - hex.Encode(buf[14:], u[6:8]) - hex.Encode(buf[19:], u[8:10]) - hex.Encode(buf[24:], u[10:]) - return string(buf[:]) -} - -// Bytes returns the raw byte slice for this UUID. A UUID is always 128 bits -// (16 bytes) long. -func (u UUID) Bytes() []byte { - return u[:] -} - -// Variant returns the variant of this UUID. This package will only generate -// UUIDs in the IETF variant. -func (u UUID) Variant() int { - x := u[8] - switch byte(0) { - case x & 0x80: - return VariantNCSCompat - case x & 0x40: - return VariantIETF - case x & 0x20: - return VariantMicrosoft - } - return VariantFuture -} - -// Version extracts the version of this UUID variant. The RFC 4122 describes -// five kinds of UUIDs. -func (u UUID) Version() int { - return int(u[6] & 0xF0 >> 4) -} - -// Node extracts the MAC address of the node who generated this UUID. It will -// return nil if the UUID is not a time based UUID (version 1). -func (u UUID) Node() []byte { - if u.Version() != 1 { - return nil - } - return u[10:] -} - -// Timestamp extracts the timestamp information from a time based UUID -// (version 1). -func (u UUID) Timestamp() uint64 { - if u.Version() != 1 { - return 0 - } - return uint64(u[0])<<24 + uint64(u[1])<<16 + uint64(u[2])<<8 + - uint64(u[3]) + uint64(u[4])<<40 + uint64(u[5])<<32 + - uint64(u[7])<<48 + uint64(u[6]&0x0F)<<56 -} - -// Time is like Timestamp, except that it returns a time.Time. -func (u UUID) Time() time.Time { - t := u.Timestamp() - if t == 0 { - return time.Time{} - } - sec := t / 10000000 - nsec := t - sec - return time.Unix(int64(sec)+timeBase, int64(nsec)) -} diff --git a/vendor/gopkg.in/go-playground/validator.v9/README.md b/vendor/gopkg.in/go-playground/validator.v9/README.md index 24318de0d6..b55f3ecfd4 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/README.md +++ b/vendor/gopkg.in/go-playground/validator.v9/README.md @@ -1,7 +1,9 @@ +**NOTICE:** v9 has entered maintenance status as of 2019-12-24. Please make all new functionality PR's against master. + Package validator ================ [![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![Project status](https://img.shields.io/badge/version-9.30.0-green.svg) +![Project status](https://img.shields.io/badge/version-9.31.0-green.svg) [![Build Status](https://semaphoreci.com/api/v1/joeybloggs/validator/branches/v9/badge.svg)](https://semaphoreci.com/joeybloggs/validator) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v9&service=github)](https://coveralls.io/github/go-playground/validator?branch=v9) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) diff --git a/vendor/gopkg.in/go-playground/validator.v9/baked_in.go b/vendor/gopkg.in/go-playground/validator.v9/baked_in.go index 95d613caf0..cfc5686d45 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/baked_in.go +++ b/vendor/gopkg.in/go-playground/validator.v9/baked_in.go @@ -103,6 +103,7 @@ var ( "rgba": isRGBA, "hsl": isHSL, "hsla": isHSLA, + "e164": isE164, "email": isEmail, "url": isURL, "uri": isURI, @@ -224,14 +225,28 @@ func isOneOf(fl FieldLevel) bool { func isUnique(fl FieldLevel) bool { field := fl.Field() + param := fl.Param() v := reflect.ValueOf(struct{}{}) switch field.Kind() { case reflect.Slice, reflect.Array: - m := reflect.MakeMap(reflect.MapOf(field.Type().Elem(), v.Type())) + if param == "" { + m := reflect.MakeMap(reflect.MapOf(field.Type().Elem(), v.Type())) + + for i := 0; i < field.Len(); i++ { + m.SetMapIndex(field.Index(i), v) + } + return field.Len() == m.Len() + } + + sf, ok := field.Type().Elem().FieldByName(param) + if !ok { + panic(fmt.Sprintf("Bad field name %s", param)) + } + m := reflect.MakeMap(reflect.MapOf(sf.Type, v.Type())) for i := 0; i < field.Len(); i++ { - m.SetMapIndex(field.Index(i), v) + m.SetMapIndex(field.Index(i).FieldByName(param), v) } return field.Len() == m.Len() case reflect.Map: @@ -1219,6 +1234,11 @@ func isFile(fl FieldLevel) bool { panic(fmt.Sprintf("Bad field type %T", field.Interface())) } +// IsE164 is the validation function for validating if the current field's value is a valid e.164 formatted phone number. +func isE164(fl FieldLevel) bool { + return e164Regex.MatchString(fl.Field().String()) +} + // IsEmail is the validation function for validating if the current field's value is a valid email address. func isEmail(fl FieldLevel) bool { return emailRegex.MatchString(fl.Field().String()) @@ -1316,11 +1336,11 @@ func hasValue(fl FieldLevel) bool { // requireCheckField is a func for check field kind func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue bool) bool { field := fl.Field() - var ok bool kind := field.Kind() + var nullable, found bool if len(param) > 0 { - field, kind, ok = fl.GetStructFieldOKAdvanced(fl.Parent(), param) - if !ok { + field, kind, nullable, found = fl.GetStructFieldOKAdvanced2(fl.Parent(), param) + if !found { return defaultNotFoundValue } } @@ -1328,9 +1348,12 @@ func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue boo case reflect.Invalid: return defaultNotFoundValue case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: - return !field.IsNil() + return field.IsNil() default: - return field.IsValid() && field.Interface() != reflect.Zero(field.Type()).Interface() + if nullable && field.Interface() != nil { + return false + } + return field.IsValid() && field.Interface() == reflect.Zero(field.Type()).Interface() } } @@ -1339,7 +1362,7 @@ func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue boo func requiredWith(fl FieldLevel) bool { params := parseOneOfParam2(fl.Param()) for _, param := range params { - if requireCheckFieldKind(fl, param, false) { + if !requireCheckFieldKind(fl, param, true) { return hasValue(fl) } } @@ -1351,7 +1374,7 @@ func requiredWith(fl FieldLevel) bool { func requiredWithAll(fl FieldLevel) bool { params := parseOneOfParam2(fl.Param()) for _, param := range params { - if !requireCheckFieldKind(fl, param, false) { + if requireCheckFieldKind(fl, param, true) { return true } } @@ -1361,11 +1384,8 @@ func requiredWithAll(fl FieldLevel) bool { // RequiredWithout is the validation function // The field under validation must be present and not empty only when any of the other specified fields are not present. func requiredWithout(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if !requireCheckFieldKind(fl, param, true) { - return hasValue(fl) - } + if requireCheckFieldKind(fl, strings.TrimSpace(fl.Param()), true) { + return hasValue(fl) } return true } @@ -1375,7 +1395,7 @@ func requiredWithout(fl FieldLevel) bool { func requiredWithoutAll(fl FieldLevel) bool { params := parseOneOfParam2(fl.Param()) for _, param := range params { - if requireCheckFieldKind(fl, param, true) { + if !requireCheckFieldKind(fl, param, true) { return true } } diff --git a/vendor/gopkg.in/go-playground/validator.v9/doc.go b/vendor/gopkg.in/go-playground/validator.v9/doc.go index e0396cb447..7ad9dea7f1 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/doc.go +++ b/vendor/gopkg.in/go-playground/validator.v9/doc.go @@ -585,9 +585,15 @@ Unique For arrays & slices, unique will ensure that there are no duplicates. For maps, unique will ensure that there are no duplicate values. +For slices of struct, unique will ensure that there are no duplicate values +in a field of the struct specified via a parameter. + // For arrays, slices, and maps: Usage: unique + // For slices of struct: + Usage: unique=field + Alpha Only This validates that a string value contains ASCII alpha characters only @@ -1058,27 +1064,14 @@ Validator notes: And the best reason, you can submit a pull request and we can keep on adding to the validation library of this package! -Panics - -This package panics when bad input is provided, this is by design, bad code like -that should not make it to production. - - type Test struct { - TestField string `validate:"nonexistantfunction=1"` - } - - t := &Test{ - TestField: "Test" - } - - validate.Struct(t) // this will panic - Non standard validators A collection of validation rules that are frequently needed but are more complex than the ones found in the baked in validators. -A non standard validator must be registered manually using any tag you like. -See below examples of registration and use. +A non standard validator must be registered manually like you would +with your own custom validation functions. + +Example of registration and use: type Test struct { TestField string `validate:"yourtag"` @@ -1089,7 +1082,9 @@ See below examples of registration and use. } validate := validator.New() - validate.RegisterValidation("yourtag", validations.ValidatorName) + validate.RegisterValidation("yourtag", validators.NotBlank) + +Here is a list of the current non standard validators: NotBlank This validates that the value is not blank or with length zero. @@ -1097,5 +1092,20 @@ See below examples of registration and use. ensures they don't have zero length. For others, a non empty value is required. Usage: notblank + +Panics + +This package panics when bad input is provided, this is by design, bad code like +that should not make it to production. + + type Test struct { + TestField string `validate:"nonexistantfunction=1"` + } + + t := &Test{ + TestField: "Test" + } + + validate.Struct(t) // this will panic */ package validator diff --git a/vendor/gopkg.in/go-playground/validator.v9/field_level.go b/vendor/gopkg.in/go-playground/validator.v9/field_level.go index 24bc134cb8..f0e2a9a855 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/field_level.go +++ b/vendor/gopkg.in/go-playground/validator.v9/field_level.go @@ -5,7 +5,6 @@ import "reflect" // FieldLevel contains all the information and helper functions // to validate a field type FieldLevel interface { - // returns the top level struct, if any Top() reflect.Value @@ -26,6 +25,9 @@ type FieldLevel interface { // returns param for validation against current field Param() string + // GetTag returns the current validations tag name + GetTag() string + // ExtractType gets the actual underlying type of field value. // It will dive into pointers, customTypes and return you the // underlying value and it's kind. @@ -37,11 +39,27 @@ type FieldLevel interface { // // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field // could not be retrieved because it didn't exist. + // + // Deprecated: Use GetStructFieldOK2() instead which also return if the value is nullable. GetStructFieldOK() (reflect.Value, reflect.Kind, bool) // GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for // the field and namespace allowing more extensibility for validators. + // + // Deprecated: Use GetStructFieldOKAdvanced2() instead which also return if the value is nullable. GetStructFieldOKAdvanced(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool) + + // traverses the parent struct to retrieve a specific field denoted by the provided namespace + // in the param and returns the field, field kind, if it's a nullable type and whether is was successful in retrieving + // the field at all. + // + // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field + // could not be retrieved because it didn't exist. + GetStructFieldOK2() (reflect.Value, reflect.Kind, bool, bool) + + // GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for + // the field and namespace allowing more extensibility for validators. + GetStructFieldOKAdvanced2(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool, bool) } var _ FieldLevel = new(validate) @@ -52,11 +70,16 @@ func (v *validate) Field() reflect.Value { } // FieldName returns the field's name with the tag -// name takeing precedence over the fields actual name. +// name taking precedence over the fields actual name. func (v *validate) FieldName() string { return v.cf.altName } +// GetTag returns the current validations tag name +func (v *validate) GetTag() string { + return v.ct.tag +} + // StructFieldName returns the struct field's name func (v *validate) StructFieldName() string { return v.cf.name @@ -68,12 +91,29 @@ func (v *validate) Param() string { } // GetStructFieldOK returns Param returns param for validation against current field +// +// Deprecated: Use GetStructFieldOK2() instead which also return if the value is nullable. func (v *validate) GetStructFieldOK() (reflect.Value, reflect.Kind, bool) { - return v.getStructFieldOKInternal(v.slflParent, v.ct.param) + current, kind, _, found := v.getStructFieldOKInternal(v.slflParent, v.ct.param) + return current, kind, found } // GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for // the field and namespace allowing more extensibility for validators. +// +// Deprecated: Use GetStructFieldOKAdvanced2() instead which also return if the value is nullable. func (v *validate) GetStructFieldOKAdvanced(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool) { + current, kind, _, found := v.GetStructFieldOKAdvanced2(val, namespace) + return current, kind, found +} + +// GetStructFieldOK returns Param returns param for validation against current field +func (v *validate) GetStructFieldOK2() (reflect.Value, reflect.Kind, bool, bool) { + return v.getStructFieldOKInternal(v.slflParent, v.ct.param) +} + +// GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for +// the field and namespace allowing more extensibility for validators. +func (v *validate) GetStructFieldOKAdvanced2(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool, bool) { return v.getStructFieldOKInternal(val, namespace) } diff --git a/vendor/gopkg.in/go-playground/validator.v9/regexes.go b/vendor/gopkg.in/go-playground/validator.v9/regexes.go index 0253d7091d..7ba7c73937 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/regexes.go +++ b/vendor/gopkg.in/go-playground/validator.v9/regexes.go @@ -16,6 +16,7 @@ const ( hslRegexString = "^hsl\\(\\s*(?:0|[1-9]\\d?|[12]\\d\\d|3[0-5]\\d|360)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*\\)$" hslaRegexString = "^hsla\\(\\s*(?:0|[1-9]\\d?|[12]\\d\\d|3[0-5]\\d|360)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*,\\s*(?:(?:0.[1-9]*)|[01])\\s*\\)$" emailRegexString = "^(?:(?:(?:(?:[a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(?:\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|(?:(?:\\x22)(?:(?:(?:(?:\\x20|\\x09)*(?:\\x0d\\x0a))?(?:\\x20|\\x09)+)?(?:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(?:(?:[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(?:(?:(?:\\x20|\\x09)*(?:\\x0d\\x0a))?(\\x20|\\x09)+)?(?:\\x22))))@(?:(?:(?:[a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(?:(?:[a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])(?:[a-zA-Z]|\\d|-|\\.|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*(?:[a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(?:(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(?:(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])(?:[a-zA-Z]|\\d|-|\\.|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" + e164RegexString = "^\\+[1-9]?[0-9]{7,14}$" base64RegexString = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" base64URLRegexString = "^(?:[A-Za-z0-9-_]{4})*(?:[A-Za-z0-9-_]{2}==|[A-Za-z0-9-_]{3}=|[A-Za-z0-9-_]{4})$" iSBN10RegexString = "^(?:[0-9]{9}X|[0-9]{10})$" @@ -61,6 +62,7 @@ var ( rgbaRegex = regexp.MustCompile(rgbaRegexString) hslRegex = regexp.MustCompile(hslRegexString) hslaRegex = regexp.MustCompile(hslaRegexString) + e164Regex = regexp.MustCompile(e164RegexString) emailRegex = regexp.MustCompile(emailRegexString) base64Regex = regexp.MustCompile(base64RegexString) base64URLRegex = regexp.MustCompile(base64URLRegexString) diff --git a/vendor/gopkg.in/go-playground/validator.v9/util.go b/vendor/gopkg.in/go-playground/validator.v9/util.go index 16a5517c97..71acbdc44d 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/util.go +++ b/vendor/gopkg.in/go-playground/validator.v9/util.go @@ -57,11 +57,10 @@ BEGIN: // // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field // could not be retrieved because it didn't exist. -func (v *validate) getStructFieldOKInternal(val reflect.Value, namespace string) (current reflect.Value, kind reflect.Kind, found bool) { +func (v *validate) getStructFieldOKInternal(val reflect.Value, namespace string) (current reflect.Value, kind reflect.Kind, nullable bool, found bool) { BEGIN: - current, kind, _ = v.ExtractType(val) - + current, kind, nullable = v.ExtractType(val) if kind == reflect.Invalid { return } @@ -112,7 +111,7 @@ BEGIN: arrIdx, _ := strconv.Atoi(namespace[idx+1 : idx2]) if arrIdx >= current.Len() { - return current, kind, false + return } startIdx := idx2 + 1 diff --git a/vendor/gopkg.in/go-playground/validator.v9/validator.go b/vendor/gopkg.in/go-playground/validator.v9/validator.go index 3abf5d33ad..342e72e315 100644 --- a/vendor/gopkg.in/go-playground/validator.v9/validator.go +++ b/vendor/gopkg.in/go-playground/validator.v9/validator.go @@ -7,7 +7,7 @@ import ( "strconv" ) -// per validate contruct +// per validate construct type validate struct { v *Validate top reflect.Value diff --git a/vendor/modules.txt b/vendor/modules.txt index ac18a95f9f..c9e1de8404 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -342,7 +342,7 @@ github.com/davecgh/go-spew/spew # github.com/deckarep/golang-set v1.8.0 ## explicit; go 1.17 github.com/deckarep/golang-set -# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250313102545-75df8a5bec13 +# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43 ## explicit; go 1.21 github.com/devtron-labs/authenticator/apiToken github.com/devtron-labs/authenticator/client @@ -350,7 +350,7 @@ github.com/devtron-labs/authenticator/jwt github.com/devtron-labs/authenticator/middleware github.com/devtron-labs/authenticator/oidc github.com/devtron-labs/authenticator/password -# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250313102545-75df8a5bec13 +# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43 ## explicit; go 1.21 github.com/devtron-labs/common-lib/async github.com/devtron-labs/common-lib/blob-storage @@ -383,7 +383,7 @@ github.com/devtron-labs/common-lib/workflow # github.com/devtron-labs/go-bitbucket v0.9.60-beta ## explicit; go 1.14 github.com/devtron-labs/go-bitbucket -# github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80 +# github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e ## explicit; go 1.17 github.com/devtron-labs/protos/gitSensor # github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f @@ -535,12 +535,12 @@ github.com/go-pg/pg/internal/parser github.com/go-pg/pg/internal/pool github.com/go-pg/pg/orm github.com/go-pg/pg/types -# github.com/go-playground/locales v0.14.0 -## explicit; go 1.13 +# github.com/go-playground/locales v0.14.1 +## explicit; go 1.17 github.com/go-playground/locales github.com/go-playground/locales/currency -# github.com/go-playground/universal-translator v0.18.0 -## explicit; go 1.13 +# github.com/go-playground/universal-translator v0.18.1 +## explicit; go 1.18 github.com/go-playground/universal-translator # github.com/go-redis/cache/v9 v9.0.0 ## explicit; go 1.13 @@ -777,11 +777,9 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/juju/errors v0.0.0-20200330140219-3fe23663418f -## explicit +# github.com/juju/errors v1.0.0 +## explicit; go 1.18 github.com/juju/errors -# github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098 -## explicit; go 1.14 # github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 ## explicit github.com/kballard/go-shellquote @@ -792,9 +790,10 @@ github.com/kevinburke/ssh_config ## explicit; go 1.18 github.com/klauspost/compress/flate github.com/klauspost/compress/s2 -# github.com/leodido/go-urn v1.2.0 -## explicit; go 1.13 +# github.com/leodido/go-urn v1.4.0 +## explicit; go 1.18 github.com/leodido/go-urn +github.com/leodido/go-urn/scim/schema # github.com/lib/pq v1.10.9 ## explicit; go 1.13 github.com/lib/pq @@ -903,8 +902,8 @@ github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a -## explicit; go 1.15 +# github.com/posthog/posthog-go v1.4.1 +## explicit; go 1.18 github.com/posthog/posthog-go # github.com/prometheus/client_golang v1.18.0 ## explicit; go 1.19 @@ -1029,9 +1028,6 @@ github.com/xeipuuv/gojsonschema # github.com/xlab/treeprint v1.2.0 ## explicit; go 1.13 github.com/xlab/treeprint -# github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c -## explicit -github.com/xtgo/uuid # github.com/yannh/kubeconform v0.5.0 ## explicit; go 1.17 github.com/yannh/kubeconform/pkg/cache @@ -1436,9 +1432,7 @@ google.golang.org/protobuf/types/known/wrapperspb # gopkg.in/evanphx/json-patch.v4 v4.12.0 ## explicit gopkg.in/evanphx/json-patch.v4 -# gopkg.in/go-playground/assert.v1 v1.2.1 -## explicit -# gopkg.in/go-playground/validator.v9 v9.30.0 +# gopkg.in/go-playground/validator.v9 v9.31.0 ## explicit gopkg.in/go-playground/validator.v9 # gopkg.in/igm/sockjs-go.v3 v3.0.0 @@ -2226,8 +2220,8 @@ xorm.io/xorm/log xorm.io/xorm/names xorm.io/xorm/schemas xorm.io/xorm/tags -# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250313102545-75df8a5bec13 -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250313102545-75df8a5bec13 +# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43 +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43 # github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 # github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 # k8s.io/api => k8s.io/api v0.29.7 diff --git a/wire_gen.go b/wire_gen.go index df03415fa8..b8264c531a 100644 --- a/wire_gen.go +++ b/wire_gen.go @@ -1,6 +1,6 @@ // Code generated by Wire. DO NOT EDIT. -//go:generate go run -mod=mod github.com/google/wire/cmd/wire +//go:generate go run github.com/google/wire/cmd/wire //go:build !wireinject // +build !wireinject @@ -573,7 +573,7 @@ func InitializeApp() (*App, error) { } scanToolMetadataRepositoryImpl := repository15.NewScanToolMetadataRepositoryImpl(db, sugaredLogger) scanToolMetadataServiceImpl := scanTool.NewScanToolMetadataServiceImpl(sugaredLogger, scanToolMetadataRepositoryImpl) - moduleServiceImpl := module.NewModuleServiceImpl(sugaredLogger, serverEnvConfigServerEnvConfig, moduleRepositoryImpl, moduleActionAuditLogRepositoryImpl, helmAppServiceImpl, serverDataStoreServerDataStore, serverCacheServiceImpl, moduleCacheServiceImpl, moduleCronServiceImpl, moduleServiceHelperImpl, moduleResourceStatusRepositoryImpl, scanToolMetadataServiceImpl) + moduleServiceImpl := module.NewModuleServiceImpl(sugaredLogger, serverEnvConfigServerEnvConfig, moduleRepositoryImpl, moduleActionAuditLogRepositoryImpl, helmAppServiceImpl, serverDataStoreServerDataStore, serverCacheServiceImpl, moduleCacheServiceImpl, moduleCronServiceImpl, moduleServiceHelperImpl, moduleResourceStatusRepositoryImpl, scanToolMetadataServiceImpl, environmentVariables, moduleEnvConfig) eventRESTClientImpl := client2.NewEventRESTClientImpl(sugaredLogger, httpClient, eventClientConfig, pubSubClientServiceImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, attributesRepositoryImpl, moduleServiceImpl) cdWorkflowRepositoryImpl := pipelineConfig.NewCdWorkflowRepositoryImpl(db, sugaredLogger) ciWorkflowRepositoryImpl := pipelineConfig.NewCiWorkflowRepositoryImpl(db, sugaredLogger) @@ -701,7 +701,7 @@ func InitializeApp() (*App, error) { deploymentGroupRepositoryImpl := repository2.NewDeploymentGroupRepositoryImpl(sugaredLogger, db) pipelineStrategyHistoryRepositoryImpl := repository21.NewPipelineStrategyHistoryRepositoryImpl(sugaredLogger, db) pipelineStrategyHistoryServiceImpl := history.NewPipelineStrategyHistoryServiceImpl(sugaredLogger, pipelineStrategyHistoryRepositoryImpl, userServiceImpl) - propertiesConfigServiceImpl := pipeline.NewPropertiesConfigServiceImpl(sugaredLogger, envConfigOverrideRepositoryImpl, chartRepositoryImpl, environmentRepositoryImpl, deploymentTemplateHistoryServiceImpl, scopedVariableManagerImpl, deployedAppMetricsServiceImpl, envConfigOverrideReadServiceImpl, deploymentConfigServiceImpl) + propertiesConfigServiceImpl := pipeline.NewPropertiesConfigServiceImpl(sugaredLogger, envConfigOverrideRepositoryImpl, chartRepositoryImpl, environmentRepositoryImpl, deploymentTemplateHistoryServiceImpl, scopedVariableManagerImpl, deployedAppMetricsServiceImpl, envConfigOverrideReadServiceImpl, deploymentConfigServiceImpl, chartServiceImpl) installedAppDBExtendedServiceImpl := FullMode.NewInstalledAppDBExtendedServiceImpl(installedAppDBServiceImpl, appStatusServiceImpl, gitOpsConfigReadServiceImpl) gitOpsValidationServiceImpl := validation.NewGitOpsValidationServiceImpl(sugaredLogger, gitFactory, gitOperationServiceImpl, gitOpsConfigReadServiceImpl, chartTemplateServiceImpl, chartServiceImpl, installedAppDBExtendedServiceImpl) imageDigestPolicyServiceImpl := imageDigestPolicy.NewImageDigestPolicyServiceImpl(sugaredLogger, qualifierMappingServiceImpl, devtronResourceSearchableKeyServiceImpl) @@ -731,7 +731,7 @@ func InitializeApp() (*App, error) { deploymentTemplateValidationServiceImpl := deploymentTemplate.NewDeploymentTemplateValidationServiceImpl(sugaredLogger, chartRefServiceImpl, scopedVariableManagerImpl) devtronAppGitOpConfigServiceImpl := gitOpsConfig.NewDevtronAppGitOpConfigServiceImpl(sugaredLogger, chartRepositoryImpl, chartServiceImpl, gitOpsConfigReadServiceImpl, gitOpsValidationServiceImpl, argoClientWrapperServiceImpl, deploymentConfigServiceImpl, chartReadServiceImpl) cdHandlerImpl := pipeline.NewCdHandlerImpl(sugaredLogger, userServiceImpl, cdWorkflowRepositoryImpl, ciLogServiceImpl, ciArtifactRepositoryImpl, ciPipelineMaterialRepositoryImpl, pipelineRepositoryImpl, environmentRepositoryImpl, ciWorkflowRepositoryImpl, enforcerUtilImpl, resourceGroupServiceImpl, imageTaggingServiceImpl, k8sServiceImpl, workflowServiceImpl, clusterServiceImplExtended, blobStorageConfigServiceImpl, customTagServiceImpl, deploymentConfigServiceImpl, workFlowStageStatusServiceImpl, cdWorkflowRunnerServiceImpl) - appWorkflowServiceImpl := appWorkflow2.NewAppWorkflowServiceImpl(sugaredLogger, appWorkflowRepositoryImpl, ciCdPipelineOrchestratorImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, resourceGroupServiceImpl, appRepositoryImpl, userAuthServiceImpl, chartServiceImpl, deploymentConfigServiceImpl) + appWorkflowServiceImpl := appWorkflow2.NewAppWorkflowServiceImpl(sugaredLogger, appWorkflowRepositoryImpl, ciCdPipelineOrchestratorImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, resourceGroupServiceImpl, appRepositoryImpl, userAuthServiceImpl, chartServiceImpl, deploymentConfigServiceImpl, pipelineBuilderImpl) appCloneServiceImpl := appClone.NewAppCloneServiceImpl(sugaredLogger, pipelineBuilderImpl, attributesServiceImpl, chartServiceImpl, configMapServiceImpl, appWorkflowServiceImpl, appListingServiceImpl, propertiesConfigServiceImpl, pipelineStageServiceImpl, ciTemplateReadServiceImpl, appRepositoryImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, ciPipelineConfigServiceImpl, gitOpsConfigReadServiceImpl, chartReadServiceImpl) deploymentTemplateRepositoryImpl := repository2.NewDeploymentTemplateRepositoryImpl(db, sugaredLogger) deploymentTemplateHistoryReadServiceImpl := read7.NewDeploymentTemplateHistoryReadServiceImpl(sugaredLogger, deploymentTemplateHistoryRepositoryImpl, scopedVariableManagerImpl) From 6f34c5e2a8390a1ba04321074ea54979a612d12e Mon Sep 17 00:00:00 2001 From: akshatsinha007 Date: Mon, 7 Apr 2025 12:28:51 +0530 Subject: [PATCH 16/79] added liveness readiness --- charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 11 ++++++++++- charts/devtron/templates/casbin.yaml | 4 ++-- charts/devtron/templates/dashboard.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/devtron.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/gitsensor.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/kubelink.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/kubewatch.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/lens.yaml | 20 ++++++++++++++++++++ charts/devtron/templates/notifier.yaml | 21 ++++++++++++++++++++- charts/devtron/values.yaml | 9 +++++++++ 11 files changed, 162 insertions(+), 5 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 118ab2e31e..275a3d0a7d 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -11,7 +11,7 @@ keywords: - argocd - Hyperion engine: gotpl -version: 0.22.88 +version: 0.22.89 sources: - https://github.com/devtron-labs/charts dependencies: diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 03047b2ceb..a7149efc87 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -37,6 +37,7 @@ components: registry: "" image: "dashboard:a400ce3c-690-31030" imagePullPolicy: IfNotPresent + healthPort: 8080 devtron: registry: "" image: "hyperion:846c2d90-280-31082" @@ -51,6 +52,7 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 + healthPort: 8080 ciRunner: registry: "" image: "ci-runner:d79b15c6-138-31014" @@ -86,10 +88,12 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 + healthPort: 50052 kubewatch: registry: "" image: "kubewatch:34abb17d-419-31007" imagePullPolicy: IfNotPresent + healthPort: 8080 configs: devtroncd_NAMESPACE: "devtron-ci" USE_CUSTOM_HTTP_TRANSPORT: "true" @@ -132,6 +136,7 @@ components: dbconfig: secretName: postgresql-postgresql keyName: postgresql-password + healthPort: 8080 # Values for lens lens: registry: "" @@ -148,6 +153,7 @@ components: dbconfig: secretName: postgresql-postgresql keyName: postgresql-password + healthPort: 8080 # Change below values for nats nats: registry: "" @@ -212,6 +218,7 @@ workflowController: security: imageScanner: image: "image-scanner:34abb17d-141-31016" + healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db TRIVY_JAVA_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-java-db @@ -222,6 +229,7 @@ security: # Values for notifier integration notifier: image: "notifier:c2173311-372-31015" + healthPort: 3000 minio: image: "minio:RELEASE.2021-02-14T04-01-33Z" mbImage: "minio-mc:RELEASE.2021-02-14T04-28-06Z" @@ -263,6 +271,7 @@ devtronEnterprise: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 + healthPort: 8080 scoop: enabled: false registry: "" @@ -271,4 +280,4 @@ devtronEnterprise: resources: {} configs: CLUSTER_ID: "1" - ORCHESTRATOR_URL: http://devtron-service.devtroncd.svc.cluster.local/orchestrator + ORCHESTRATOR_URL: http://devtron-service.devtroncd.svc.cluster.local/orchestrator \ No newline at end of file diff --git a/charts/devtron/templates/casbin.yaml b/charts/devtron/templates/casbin.yaml index 9d4abfed25..3c9cbb090b 100644 --- a/charts/devtron/templates/casbin.yaml +++ b/charts/devtron/templates/casbin.yaml @@ -55,7 +55,7 @@ spec: failureThreshold: 3 httpGet: path: /health - port: 8080 + port: {{ $.Values.devtronEnterprise.casbin.healthPort}} initialDelaySeconds: 20 periodSeconds: 10 successThreshold: 1 @@ -64,7 +64,7 @@ spec: failureThreshold: 3 httpGet: path: /health - port: 8080 + port: {{ $.Values.devtronEnterprise.casbin.healthPort}} initialDelaySeconds: 20 periodSeconds: 10 successThreshold: 1 diff --git a/charts/devtron/templates/dashboard.yaml b/charts/devtron/templates/dashboard.yaml index be35e89487..5f033101f2 100644 --- a/charts/devtron/templates/dashboard.yaml +++ b/charts/devtron/templates/dashboard.yaml @@ -90,6 +90,26 @@ spec: securityContext: {{- toYaml $.Values.global.containerSecurityContext | nindent 12 }} {{- end }} + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: {{ $.Values.components.dashboard.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: {{ $.Values.components.dashboard.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 ports: - name: app containerPort: 8080 diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index 3cfa96570e..2ae211dba2 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -278,6 +278,26 @@ spec: - -c - ' curl -X POST -H "Content-Type: application/json" -d ''{"eventType": "SIG_TERM"}'' localhost:8080/orchestrator/telemetry/summary' + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.devtron.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.devtron.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 ports: - name: devtron containerPort: 8080 diff --git a/charts/devtron/templates/gitsensor.yaml b/charts/devtron/templates/gitsensor.yaml index eed39814f6..3aa98912b3 100644 --- a/charts/devtron/templates/gitsensor.yaml +++ b/charts/devtron/templates/gitsensor.yaml @@ -112,6 +112,26 @@ spec: volumeMounts: - name: git-volume mountPath: /git-base/ + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.gitsensor.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.gitsensor.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 env: - name: DEVTRON_APP_NAME value: git-sensor diff --git a/charts/devtron/templates/kubelink.yaml b/charts/devtron/templates/kubelink.yaml index 3c3de6cabd..eab17e5d96 100644 --- a/charts/devtron/templates/kubelink.yaml +++ b/charts/devtron/templates/kubelink.yaml @@ -85,6 +85,26 @@ spec: name: {{ .dbconfig.secretName }} key: {{ .dbconfig.keyName }} {{- end }} + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.kubelink.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.kubelink.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 envFrom: - configMapRef: name: kubelink-cm diff --git a/charts/devtron/templates/kubewatch.yaml b/charts/devtron/templates/kubewatch.yaml index 4e792cad25..f66c81c613 100644 --- a/charts/devtron/templates/kubewatch.yaml +++ b/charts/devtron/templates/kubewatch.yaml @@ -188,6 +188,26 @@ spec: - name: app containerPort: 3000 protocol: TCP + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.kubewatch.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.kubewatch.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 env: - name: POD_NAME valueFrom: diff --git a/charts/devtron/templates/lens.yaml b/charts/devtron/templates/lens.yaml index 6b7afc7aee..d442eee358 100644 --- a/charts/devtron/templates/lens.yaml +++ b/charts/devtron/templates/lens.yaml @@ -84,6 +84,26 @@ spec: securityContext: {{- toYaml $.Values.global.containerSecurityContext | nindent 12 }} {{- end }} + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.lens.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.components.lens.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 ports: - name: app containerPort: 8080 diff --git a/charts/devtron/templates/notifier.yaml b/charts/devtron/templates/notifier.yaml index 282e2c5266..ebc256e8c3 100644 --- a/charts/devtron/templates/notifier.yaml +++ b/charts/devtron/templates/notifier.yaml @@ -88,7 +88,26 @@ spec: securityContext: {{- toYaml $.Values.global.containerSecurityContext | nindent 12 }} {{- end }} - + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.notifier.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: {{ $.Values.notifier.healthPort}} + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 ports: - name: app containerPort: 3000 diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 7e9dbe0565..0c739c4789 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -85,12 +85,14 @@ components: registry: "" image: "dashboard:a400ce3c-690-31030" imagePullPolicy: IfNotPresent + healthPort: 8080 devtron: registry: "" image: "hyperion:846c2d90-280-31082" cicdImage: "devtron:846c2d90-434-31081" imagePullPolicy: IfNotPresent customOverrides: {} + healthPort: 8080 podSecurityContext: fsGroup: 1001 runAsGroup: 1001 @@ -133,6 +135,7 @@ components: registry: "" image: "kubelink:ccd98a22-564-31008" imagePullPolicy: IfNotPresent + healthPort: 50052 podSecurityContext: fsGroup: 1001 runAsGroup: 1001 @@ -159,6 +162,7 @@ components: registry: "" image: "kubewatch:34abb17d-419-31007" imagePullPolicy: IfNotPresent + healthPort: 8080 configs: devtroncd_NAMESPACE: "devtron-ci" USE_CUSTOM_HTTP_TRANSPORT: "true" @@ -194,6 +198,7 @@ components: enabled: false persistence: volumeSize: 2Gi + healthPort: 8080 configs: PG_ADDR: postgresql-postgresql.devtroncd PG_USER: postgres @@ -210,6 +215,7 @@ components: imagePullPolicy: IfNotPresent secrets: {} resources: {} + healthPort: 8080 configs: GIT_SENSOR_PROTOCOL: GRPC GIT_SENSOR_URL: git-sensor-service.devtroncd:90 @@ -409,6 +415,7 @@ security: enabled: false imageScanner: image: "image-scanner:34abb17d-141-31016" + healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db TRIVY_JAVA_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-java-db @@ -434,6 +441,7 @@ notifier: DB_PORT: "5432" DB_USER: postgres secrets: {} + healthPort: 3000 dbconfig: secretName: postgresql-postgresql keyName: postgresql-password @@ -484,6 +492,7 @@ devtronEnterprise: registry: "" image: "casbin:f6ff5f74-064b67e5-462-30822" imagePullPolicy: IfNotPresent + healthPort: 8080 configs: PG_ADDR: postgresql-postgresql.devtroncd PG_DATABASE: casbin From 8c2a02a311955416a9648ee0f932a4961568ef84 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:47:18 +0530 Subject: [PATCH 17/79] Update release.txt --- manifests/release.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/release.txt b/manifests/release.txt index 0a8666161e..51ee350e8f 100644 --- a/manifests/release.txt +++ b/manifests/release.txt @@ -1 +1 @@ -beta -1 v1.4.0 +stable -1 v1.4.0 From 057b96675cd6b528bd52dbaef8e99824d5076e7b Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 7 Apr 2025 08:17:27 +0000 Subject: [PATCH 18/79] Updated latest image of git-sensor in installer --- charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 6 +++--- charts/devtron/values.yaml | 4 ++-- manifests/install/devtron-installer.yaml | 2 +- manifests/installation-script | 2 +- manifests/release.txt | 2 +- manifests/version.txt | 2 +- manifests/yamls/gitsensor.yaml | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 275a3d0a7d..5325952bca 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: devtron-operator -appVersion: 1.4.0 +appVersion: 1.4.1 description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. keywords: - Devtron diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index a7149efc87..29fc1e6bfa 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -10,7 +10,7 @@ global: containerRegistry: "quay.io/devtron" extraManifests: [] installer: - release: "v1.4.0" + release: "v1.4.1" registry: "" image: "inception" tag: "473deaa4-185-21582" @@ -121,7 +121,7 @@ components: armImage: postgres_exporter:v0.10.1 gitsensor: registry: "" - image: "git-sensor:2b4b8363-200-31009" + image: "git-sensor:31f7877c-200-31629" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false @@ -280,4 +280,4 @@ devtronEnterprise: resources: {} configs: CLUSTER_ID: "1" - ORCHESTRATOR_URL: http://devtron-service.devtroncd.svc.cluster.local/orchestrator \ No newline at end of file + ORCHESTRATOR_URL: http://devtron-service.devtroncd.svc.cluster.local/orchestrator diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 0c739c4789..4bc9c7d1c4 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -29,7 +29,7 @@ global: extraManifests: [] installer: repo: "devtron-labs/devtron" - release: "v1.4.0" + release: "v1.4.1" registry: "" image: inception tag: 473deaa4-185-21582 @@ -192,7 +192,7 @@ components: volumeSize: "20Gi" gitsensor: registry: "" - image: "git-sensor:2b4b8363-200-31009" + image: "git-sensor:31f7877c-200-31629" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false diff --git a/manifests/install/devtron-installer.yaml b/manifests/install/devtron-installer.yaml index af83dea5ea..825492791b 100644 --- a/manifests/install/devtron-installer.yaml +++ b/manifests/install/devtron-installer.yaml @@ -4,4 +4,4 @@ metadata: name: installer-devtron namespace: devtroncd spec: - url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.4.0/manifests/installation-script + url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.4.1/manifests/installation-script diff --git a/manifests/installation-script b/manifests/installation-script index 0648dd6e10..b755b92b71 100644 --- a/manifests/installation-script +++ b/manifests/installation-script @@ -1,4 +1,4 @@ -LTAG="v1.4.0"; +LTAG="v1.4.1"; REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/"; log("executed devtron setup installation"); diff --git a/manifests/release.txt b/manifests/release.txt index 51ee350e8f..07a41d54a2 100644 --- a/manifests/release.txt +++ b/manifests/release.txt @@ -1 +1 @@ -stable -1 v1.4.0 +stable -1 v1.4.1 diff --git a/manifests/version.txt b/manifests/version.txt index 0d0c52f84d..66d62a8001 100644 --- a/manifests/version.txt +++ b/manifests/version.txt @@ -1 +1 @@ -v1.4.0 +v1.4.1 diff --git a/manifests/yamls/gitsensor.yaml b/manifests/yamls/gitsensor.yaml index 61e0afa6bd..01faca8b2b 100644 --- a/manifests/yamls/gitsensor.yaml +++ b/manifests/yamls/gitsensor.yaml @@ -67,7 +67,7 @@ spec: - /bin/sh - -c - mkdir -p /git-base/ssh-keys && chown -R devtron:devtron /git-base && chmod 777 /git-base/ssh-keys - image: "quay.io/devtron/git-sensor:2b4b8363-200-31009" + image: "quay.io/devtron/git-sensor:31f7877c-200-31629" imagePullPolicy: IfNotPresent name: chown-git-base resources: {} @@ -80,7 +80,7 @@ spec: name: git-volume containers: - name: git-sensor - image: "quay.io/devtron/git-sensor:2b4b8363-200-31009" + image: "quay.io/devtron/git-sensor:31f7877c-200-31629" securityContext: allowPrivilegeEscalation: false runAsUser: 1000 From 96135d8a0ed6a5f993f42d0dd462d61af46b1ea2 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:51:29 +0530 Subject: [PATCH 19/79] Update devtron.yaml --- charts/devtron/templates/devtron.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index 2ae211dba2..3aa2dda591 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -34,6 +34,7 @@ data: CI_WORKFLOW_EXECUTOR_TYPE: SYSTEM DEVTRON_INSTALLATION_TYPE: enterprise DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES: "devtron.installer.release" + DEVTRON_MANAGED_LICENSING_ENABLED: "false" DEVTRON_BOM_URL: https://raw.githubusercontent.com/devtron-labs/charts/refs/tags/devtron-enterprise-%s/charts/devtron-enterprise/devtron-bom.yaml {{- end }} {{- if $.Values.installer.modules }} @@ -351,4 +352,4 @@ spec: matchLabels: app: devtron {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From 7b7491b87ba69af9d625bdcbdaf50d5225998c52 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 7 Apr 2025 10:13:11 +0000 Subject: [PATCH 20/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 4134c7fc86..88cf7f341e 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -9,6 +9,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- misc: patch api for user attribute (#6490) - chore: nil implementations fixed for user attribute in telemetry (#6497) - chore: code restructuring (#6476) - sync: main changes synced into develop (#6492) From 11a0a0aa1550df6c438f37c8f5a8bdb6d439343a Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 7 Apr 2025 11:36:20 +0000 Subject: [PATCH 21/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 88cf7f341e..8bf83938c5 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -6,6 +6,7 @@ - fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements +- feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) - feat: licensing changes (#6474) ## Documentation ## Others From 2d6adfa0cc481ead4f1ee8a4775c8871e60afbd1 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 7 Apr 2025 18:00:36 +0530 Subject: [PATCH 22/79] added md=5 for postgresql --- charts/devtron/templates/postgresql.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/devtron/templates/postgresql.yaml b/charts/devtron/templates/postgresql.yaml index 1295e16664..bba7c18c1f 100644 --- a/charts/devtron/templates/postgresql.yaml +++ b/charts/devtron/templates/postgresql.yaml @@ -515,6 +515,10 @@ spec: secretKeyRef: key: postgresql-password name: postgresql-postgresql + - name: POSTGRES_HOST_AUTH_METHOD + value: "md5" + - name: POSTGRES_INITDB_ARGS + value: "--auth-local=md5" envFrom: - secretRef: name: postgresql-postgresql From 9215a17a138ff96f85c96808f1de4aa514e741a0 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 8 Apr 2025 07:36:37 +0000 Subject: [PATCH 23/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 8bf83938c5..c6a27ffd5d 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -10,6 +10,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: Main sync develop 8apr (#6504) - misc: patch api for user attribute (#6490) - chore: nil implementations fixed for user attribute in telemetry (#6497) - chore: code restructuring (#6476) From c8cd9c15ca059de609215b0b59918609b2c170ba Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 8 Apr 2025 14:16:17 +0000 Subject: [PATCH 24/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index c6a27ffd5d..6776823712 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: Grafana data-source get API (#6503) - fix: Grafana revert patch (#6498) - fix: made triggeredBy for CI & CD uniform (#6489) - fix: hpa permission denied error (#6485) From 6f53d86e4a19f67a7e25eb9e7032b4914ba8252f Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 10 Apr 2025 06:00:21 +0000 Subject: [PATCH 25/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 6776823712..19ae565789 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: postgresql skip unique constraints error and handle network connection error (#6509) - fix: Grafana data-source get API (#6503) - fix: Grafana revert patch (#6498) - fix: made triggeredBy for CI & CD uniform (#6489) From 109807a582f04bf72ae729ef726dca405eaa406c Mon Sep 17 00:00:00 2001 From: systemsdt Date: Thu, 10 Apr 2025 12:48:52 +0000 Subject: [PATCH 26/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 19ae565789..3f11ef7dfc 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -12,6 +12,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- misc: update the descriptions of env variables (#6499) - sync: Main sync develop 8apr (#6504) - misc: patch api for user attribute (#6490) - chore: nil implementations fixed for user attribute in telemetry (#6497) From 7c683ddb9d7f54f1750b8298a1a7d14794a3283f Mon Sep 17 00:00:00 2001 From: systemsdt Date: Fri, 11 Apr 2025 05:57:42 +0000 Subject: [PATCH 27/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 3f11ef7dfc..2531db4f4b 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -12,6 +12,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: Release candidate v0.33.0 (#6514) - misc: update the descriptions of env variables (#6499) - sync: Main sync develop 8apr (#6504) - misc: patch api for user attribute (#6490) From 5b6ca759ca4cc728b234e8fc6d56d67ec080499b Mon Sep 17 00:00:00 2001 From: systemsdt Date: Fri, 11 Apr 2025 07:27:16 +0000 Subject: [PATCH 28/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 2531db4f4b..070b242e95 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -12,6 +12,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: vendor update (#6515) - sync: Release candidate v0.33.0 (#6514) - misc: update the descriptions of env variables (#6499) - sync: Main sync develop 8apr (#6504) From 20cb3f37de69f072dfc05b588a3a5cf9d23b23b6 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 14 Apr 2025 06:00:54 +0000 Subject: [PATCH 29/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 070b242e95..fdd1aa2705 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: sql query memory issue (#6516) - fix: postgresql skip unique constraints error and handle network connection error (#6509) - fix: Grafana data-source get API (#6503) - fix: Grafana revert patch (#6498) From fb521e232da053da7991db717f11341b37f6f42e Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 14 Apr 2025 07:25:02 +0000 Subject: [PATCH 30/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index fdd1aa2705..05fa6bc992 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -9,6 +9,7 @@ - fix: optimisation in workflow status api (#6473) - fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements +- feat: only deploy unhibernated apps in app group (#6494) - feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) - feat: licensing changes (#6474) ## Documentation From 76ee42eed29cdae04235322b235f81eab3497a82 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 14 Apr 2025 08:03:51 +0000 Subject: [PATCH 31/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 05fa6bc992..4b17dd6951 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -14,6 +14,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: Main sync develop (#6518) - sync: vendor update (#6515) - sync: Release candidate v0.33.0 (#6514) - misc: update the descriptions of env variables (#6499) From 579e1ee359c6318eea3995ba517901d9a70fadcf Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 14 Apr 2025 13:54:07 +0000 Subject: [PATCH 32/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 4b17dd6951..7d1d3abfc9 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: making tx independent of git sensor call (#6519) - fix: sql query memory issue (#6516) - fix: postgresql skip unique constraints error and handle network connection error (#6509) - fix: Grafana data-source get API (#6503) From 652eecd6a537a932c8ffe3711bde86eec95f9c7c Mon Sep 17 00:00:00 2001 From: systemsdt Date: Wed, 16 Apr 2025 06:21:52 +0000 Subject: [PATCH 33/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 7d1d3abfc9..86cf6ddb3d 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: added support for IAM role S3 blob client (#6521) - fix: making tx independent of git sensor call (#6519) - fix: sql query memory issue (#6516) - fix: postgresql skip unique constraints error and handle network connection error (#6509) From 5d627f0acc13222630e571ea2e3beb8b00705da7 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Wed, 16 Apr 2025 06:41:59 +0000 Subject: [PATCH 34/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 86cf6ddb3d..8b15a8c27f 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: CI dangling pod after aborting build (#6522) - fix: added support for IAM role S3 blob client (#6521) - fix: making tx independent of git sensor call (#6519) - fix: sql query memory issue (#6516) From 1fba1955e014202c84f44556c852eda4a8766fd8 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Wed, 16 Apr 2025 11:34:56 +0000 Subject: [PATCH 35/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 8b15a8c27f..76d52ccff7 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: added more fields in webhook notification (#6520) - fix: CI dangling pod after aborting build (#6522) - fix: added support for IAM role S3 blob client (#6521) - fix: making tx independent of git sensor call (#6519) From a8ab8e853c1c4c7c00f34705db5cc08b70f7e338 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Sat, 19 Apr 2025 23:16:42 +0530 Subject: [PATCH 36/79] feat: Postgres upgrade from 11 to 14 (#6525) * updated postgresql.yaml * updated the postgres image to postgre:14.9 and removed the postgres-misc migration * updated claim template name to devtron * updated claim template name to devtron * reverted the claim template name to data * changed targetport to actual portnumber instead of name * updated the check for POSTGRES_MIGRATED * POSTGRES_MIGRATED for devtron-custom-cm * POSTGRES_MIGRATED for devtron-custom-cm * synced from charts repo for airgapped argocd changes * moved nodeselectors,tolerations and imagepullsecrets below their description --- charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 6 +- charts/devtron/templates/NOTES.txt | 8 + charts/devtron/templates/argocd-secret.yaml | 3 + charts/devtron/templates/devtron.yaml | 1 + charts/devtron/templates/migrator.yaml | 54 --- charts/devtron/templates/postgresql.yaml | 499 +++++--------------- charts/devtron/values.yaml | 15 +- 8 files changed, 133 insertions(+), 455 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 5325952bca..2393e15444 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -11,7 +11,7 @@ keywords: - argocd - Hyperion engine: gotpl -version: 0.22.89 +version: 0.22.90 sources: - https://github.com/devtron-labs/charts dependencies: diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 29fc1e6bfa..0da02de14c 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -112,13 +112,11 @@ components: keyName: postgresql-password postgres: registry: "" - image: "postgres:11.9.0-debian-10-r26" - armImage: "postgres:11.9" + image: "postgres:14.9" initImage: "minideb:latest" imagePullPolicy: "IfNotPresent" metrics: - image: postgres_exporter:v0.4.7 - armImage: postgres_exporter:v0.10.1 + image: postgres_exporter:v0.10.1 gitsensor: registry: "" image: "git-sensor:31f7877c-200-31629" diff --git a/charts/devtron/templates/NOTES.txt b/charts/devtron/templates/NOTES.txt index 0150709137..72d3525643 100644 --- a/charts/devtron/templates/NOTES.txt +++ b/charts/devtron/templates/NOTES.txt @@ -1,3 +1,11 @@ +{{- if .Release.IsUpgrade }} + {{- $liveCm := lookup "v1" "ConfigMap" "devtroncd" "devtron-custom-cm" }} + {{- $currentValue := pluck "POSTGRES_MIGRATED" $liveCm.data | first | default "" }} + {{- if ne $currentValue "14" }} + {{- fail "Upgrade Failed Please ensure that you have completed the pre-requisites mentioned in " }} + {{- end }} +{{- end }} + Please wait for ~1 minute before running any of the following commands. 1. Run the following command to get the password for the default admin user: diff --git a/charts/devtron/templates/argocd-secret.yaml b/charts/devtron/templates/argocd-secret.yaml index b8d7775b3f..1d55e545bc 100644 --- a/charts/devtron/templates/argocd-secret.yaml +++ b/charts/devtron/templates/argocd-secret.yaml @@ -1,3 +1,4 @@ +{{- $customOverrides := index $.Values.components.devtron.customOverrides }} apiVersion: v1 kind: Secret metadata: @@ -22,6 +23,7 @@ metadata: data: timeout.hard.reconciliation: "0" timeout.reconciliation: 60s + {{- if ne $customOverrides.IS_AIR_GAP_ENVIRONMENT "true" }} repositories: |- - name: devtron type: helm @@ -56,6 +58,7 @@ data: - name: kedacore type: helm url: https://kedacore.github.io/charts + {{- end }} resource.customizations: > kubernetes-client.io/ExternalSecret: health.lua: | diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index b88cb34748..66994e6c86 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -207,6 +207,7 @@ data: {{- $modules = append $modules "argo-cd" }} {{- end }} {{- end }} + POSTGRES_MIGRATED: "14" INSTALLED_MODULES: {{ if $modules }}{{ printf "'%s'" (join "," $modules) }}{{ else }}""{{ end }} DEFAULT_CI_IMAGE: {{ include "common.image" (dict "component" $.Values.components.ciRunner "global" $.Values.global ) }} --- diff --git a/charts/devtron/templates/migrator.yaml b/charts/devtron/templates/migrator.yaml index e3af542602..e600750c02 100644 --- a/charts/devtron/templates/migrator.yaml +++ b/charts/devtron/templates/migrator.yaml @@ -462,60 +462,6 @@ spec: name: shared-volume backoffLimit: 20 activeDeadlineSeconds: 1500 - {{- end }} ---- -{{- if $.Capabilities.APIVersions.Has "batch/v1/Job" }} -apiVersion: batch/v1 -{{- else }} -apiVersion: batch/v1beta1 -{{- end }} -#this job is added for creating new database(clairv4). -#This database is needed for clair upgrade (v2 to v4), since old database does not support migration for new clair. -#Without this job, database can be created for new users, but not for existing users. -kind: Job -metadata: - name: postgresql-miscellaneous -spec: - ttlSecondsAfterFinished: 1000 - template: - spec: - {{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.components.migrator.nodeSelector "tolerations" $.Values.components.migrator.tolerations "imagePullSecrets" $.Values.components.migrator.imagePullSecrets "global" $.Values.global) | indent 6 }} - securityContext: - fsGroup: 1000 - runAsGroup: 1000 - runAsUser: 1000 - containers: - - name: postgresql-miscellaneous - image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.armImage ) }} - securityContext: - allowPrivilegeEscalation: false - runAsUser: 1000 - runAsNonRoot: true - env: - - name: PGPASSWORD - valueFrom: - secretKeyRef: - name: postgresql-postgresql - key: postgresql-password - - name: PGHOST - value: postgresql-postgresql - envFrom: - - configMapRef: - name: devtron-common-cm - command: - - /bin/sh - - -c - - psql -Upostgres -f /docker-entrypoint-initdb.d/db_create.sql - volumeMounts: - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d/ - volumes: - - name: custom-init-scripts - configMap: - name: postgresql-postgresql-init-scripts - restartPolicy: OnFailure - backoffLimit: 20 - activeDeadlineSeconds: 1800 {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/devtron/templates/postgresql.yaml b/charts/devtron/templates/postgresql.yaml index bba7c18c1f..c50884459c 100644 --- a/charts/devtron/templates/postgresql.yaml +++ b/charts/devtron/templates/postgresql.yaml @@ -1,55 +1,36 @@ {{- with .Values.components.postgres }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: postgresql-postgresql-init-scripts - labels: - app: postgresql - chart: postgresql-8.6.4 - release: "devtron" - annotations: - "helm.sh/hook": pre-install - "helm.sh/hook-weight": "-2" - "helm.sh/resource-policy": keep -data: - db_create.sql: | - create database casbin; - create database git_sensor; - create database lens; - create database clairv4 -{{- if not $.Values.installer.arch }} --- apiVersion: v1 kind: Service metadata: - name: postgresql-postgresql-metrics + name: postgresql-postgresql + namespace: devtroncd labels: app: postgresql - chart: postgresql-8.6.4 release: "devtron" + app.kubernetes.io/managed-by: Helm annotations: - prometheus.io/port: "9187" - prometheus.io/scrape: "true" "helm.sh/resource-policy": keep spec: type: ClusterIP ports: - - name: http-metrics - port: 9187 - targetPort: http-metrics + - name: tcp-postgresql + port: 5432 + targetPort: 5432 selector: app: postgresql - release: devtron + release: "devtron" role: master --- apiVersion: v1 kind: Service metadata: name: postgresql-postgresql-headless + namespace: devtroncd labels: app: postgresql - chart: postgresql-8.6.4 release: "devtron" + app.kubernetes.io/managed-by: Helm annotations: "helm.sh/resource-policy": keep spec: @@ -58,7 +39,7 @@ spec: ports: - name: tcp-postgresql port: 5432 - targetPort: tcp-postgresql + targetPort: 5432 selector: app: postgresql release: "devtron" @@ -66,37 +47,43 @@ spec: apiVersion: v1 kind: Service metadata: - name: postgresql-postgresql + name: postgresql-postgresql-metrics + namespace: devtroncd labels: app: postgresql - chart: postgresql-8.6.4 release: "devtron" + app.kubernetes.io/managed-by: Helm annotations: + prometheus.io/port: "9187" + prometheus.io/scrape: "true" "helm.sh/resource-policy": keep spec: type: ClusterIP ports: - - name: tcp-postgresql - port: 5432 - targetPort: tcp-postgresql + - name: http-metrics + port: 9187 + targetPort: http-metrics selector: app: postgresql - release: "devtron" + release: devtron role: master --- apiVersion: apps/v1 kind: StatefulSet metadata: name: postgresql-postgresql + namespace: devtroncd labels: app: postgresql - chart: postgresql-8.6.4 release: "devtron" annotations: "helm.sh/resource-policy": keep + "meta.helm.sh/release-name": devtron + "meta.helm.sh/release-namespace": devtroncd spec: - serviceName: postgresql-postgresql-headless replicas: 1 + serviceName: postgresql-postgresql + podManagementPolicy: OrderedReady updateStrategy: type: RollingUpdate selector: @@ -106,353 +93,10 @@ spec: role: master template: metadata: - name: postgresql-postgresql labels: app: postgresql - chart: postgresql-8.6.4 release: "devtron" role: master - spec: - {{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.components.postgres.nodeSelector "tolerations" $.Values.components.postgres.tolerations "imagePullSecrets" $.Values.components.postgres.imagePullSecrets "global" $.Values.global) | indent 6 }} - serviceAccountName: devtron-default-sa - securityContext: - fsGroup: 1001 - initContainers: - - name: init-chmod-data - image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.initImage ) }} - imagePullPolicy: "IfNotPresent" - command: - - /bin/sh - - -cx - - | - - mkdir -p /bitnami/postgresql/data - chmod 700 /bitnami/postgresql/data - find /bitnami/postgresql -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \ - xargs chown -R 1001:1001 - chmod -R 777 /dev/shm - {{- if .initContainer }} - {{- if .initContainer.resources }} - resources: - {{- toYaml .initContainer.resources | nindent 12 }} - {{- end }} - {{- end }} - envFrom: - - configMapRef: - name: devtron-common-cm - securityContext: - runAsUser: 0 - volumeMounts: - - name: data - mountPath: /bitnami/postgresql - subPath: - - name: dshm - mountPath: /dev/shm - containers: - - name: postgresql-postgresql - image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global ) }} - imagePullPolicy: {{ .imagePullPolicy }} - securityContext: - runAsUser: 1001 - env: - - name: BITNAMI_DEBUG - value: "false" - - name: POSTGRESQL_PORT_NUMBER - value: "5432" - - name: POSTGRESQL_VOLUME_DIR - value: "/bitnami/postgresql" - - name: PGDATA - value: "/bitnami/postgresql/data" - - name: POSTGRES_USER - value: postgres - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: postgresql-postgresql - key: postgresql-password - - name: POSTGRES_DB - value: "orchestrator" - - name: POSTGRESQL_ENABLE_LDAP - value: "no" - - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES - value: pgaudit, uuid-ossp - envFrom: - - configMapRef: - name: devtron-common-cm - {{- if .resources }} - resources: - {{- toYaml .resources | nindent 12 }} - {{- end }} - ports: - - name: tcp-postgresql - containerPort: 5432 - livenessProbe: - exec: - command: - - /bin/sh - - -c - - exec pg_isready -U "postgres" -d "orchestrator" -h 127.0.0.1 -p 5432 - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 6 - readinessProbe: - exec: - command: - - /bin/sh - - -c - - -e - - | - exec pg_isready -U "postgres" -d "orchestrator" -h 127.0.0.1 -p 5432 - [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ] - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 6 - volumeMounts: - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d/ - - name: dshm - mountPath: /dev/shm - - name: data - mountPath: /bitnami/postgresql - subPath: - - name: metrics - image: {{ include "common.image" (dict "component" $.Values.components.postgres.metrics "global" $.Values.global ) }} - imagePullPolicy: "IfNotPresent" - env: - - name: DATA_SOURCE_URI - value: "127.0.0.1:5432/orchestrator?sslmode=disable" - - name: DATA_SOURCE_PASS - valueFrom: - secretKeyRef: - name: postgresql-postgresql - key: postgresql-password - - name: DATA_SOURCE_USER - value: postgres - envFrom: - - configMapRef: - name: devtron-common-cm - {{- if .postgresExporter }} - {{- if .postgresExporter.resources }} - resources: - {{- toYaml .postgresExporter.resources | nindent 12 }} - {{- end }} - {{- end }} - livenessProbe: - httpGet: - path: / - port: http-metrics - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 6 - readinessProbe: - httpGet: - path: / - port: http-metrics - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 6 - volumeMounts: - ports: - - name: http-metrics - containerPort: 9187 - volumes: - - name: custom-init-scripts - configMap: - name: postgresql-postgresql-init-scripts - - name: dshm - emptyDir: - medium: Memory - sizeLimit: 1Gi - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - "ReadWriteOnce" - {{- include "common.storageclass" $ | indent 8 }} - resources: - requests: - storage: {{ .persistence.volumeSize }} -{{- else }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: postgresql-postgresql-customscripts - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/hook": pre-install - "helm.sh/hook-weight": "-2" - "helm.sh/resource-policy": keep -data: - db_create.sql: | - create database casbin; - create database git_sensor; - create database lens; - create database clairv4; ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: postgresql-postgresql-scripts - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/hook": pre-install - "helm.sh/hook-weight": "-2" - "helm.sh/resource-policy": keep -data: - 01-init-userdb.sh: | - #!/bin/sh - create_user() - { - psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -v USERDBNAME="$POSTGRES_DB" -v USERDBUSER="$USERDB_USER" -v USERDBPASSWORD="'$USERDB_PASSWORD'" <<-EOSQL - CREATE USER :USERDBUSER WITH PASSWORD :USERDBPASSWORD; - GRANT ALL PRIVILEGES ON DATABASE :USERDBNAME TO :USERDBUSER; - EOSQL - } - set -e - if [ ! -z "$POSTGRES_DB" ] && [ ! -z "$USERDB_USER" ] && [ ! -z "$USERDB_PASSWORD" ]; then - create_user - fi - init.sh: | - #!/bin/sh - echo "Start initialization" - echo "Copy init-userdb script" - cp /initscripts/01-init-userdb.sh /scripts - if [ -d /extrascripts ]; then - echo "Copy extra scripts" - cp /extrascripts/* /scripts - fi - if [ -d /customscripts ]; then - echo "Copy custom scripts" - cp /customscripts/* /scripts - fi - if [ -d /customconfig ]; then - echo "Create postgres config" - cat /customconfig/* >>/configs/postgresql.conf - fi - if [ -d /extraconfigs ]; then - echo "Add extra configs to postgres config" - cat /extraconfigs/* >>/configs/postgresql.conf - fi - echo "Initialization done." ---- -apiVersion: v1 -kind: Service -metadata: - name: postgresql-postgresql - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/resource-policy": keep -spec: - type: ClusterIP - ports: - - port: 5432 - targetPort: postgres - protocol: TCP - name: postgres - selector: - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron ---- -apiVersion: v1 -kind: Service -metadata: - name: postgresql-postgresql-metrics - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - prometheus.io/port: "9187" - prometheus.io/scrape: "true" - "helm.sh/resource-policy": keep -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 9187 - targetPort: http-metrics - selector: - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron ---- -apiVersion: v1 -kind: Service -metadata: - name: postgresql-postgresql-headless - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/resource-policy": keep -spec: - type: ClusterIP - clusterIP: None - ports: - - port: 5432 - targetPort: postgres - protocol: TCP - name: postgres - selector: - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgresql-postgresql - labels: - helm.sh/chart: postgres-0.4.0 - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - app.kubernetes.io/version: "14.5" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/resource-policy": keep -spec: - replicas: 1 - serviceName: postgresql-postgresql - podManagementPolicy: OrderedReady - updateStrategy: - type: RollingUpdate - selector: - matchLabels: - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron - template: - metadata: - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/instance: devtron spec: {{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.components.postgres.nodeSelector "tolerations" $.Values.components.postgres.tolerations "imagePullSecrets" $.Values.components.postgres.imagePullSecrets "global" $.Values.global) | indent 6 }} serviceAccountName: devtron-default-sa @@ -467,7 +111,7 @@ spec: runAsGroup: 999 runAsNonRoot: true runAsUser: 999 - image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.armImage ) }} + image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.image ) }} imagePullPolicy: {{ .imagePullPolicy }} {{- if .initContainer }} {{- if .initContainer.resources }} @@ -497,14 +141,14 @@ spec: runAsGroup: 999 runAsNonRoot: true runAsUser: 999 - image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.armImage ) }} + image: {{ include "common.image" (dict "component" $.Values.components.postgres "global" $.Values.global "extraImage" $.Values.components.postgres.image ) }} imagePullPolicy: {{ .imagePullPolicy }} {{- if .resources }} resources: {{- toYaml .resources | nindent 12 }} {{- end }} ports: - - name: postgres + - name: tcp-postgresql containerPort: 5432 protocol: TCP env: @@ -515,6 +159,11 @@ spec: secretKeyRef: key: postgresql-password name: postgresql-postgresql + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + name: postgresql-postgresql + key: POSTGRES_USER - name: POSTGRES_HOST_AUTH_METHOD value: "md5" - name: POSTGRES_INITDB_ARGS @@ -569,8 +218,8 @@ spec: - mountPath: /etc/postgresql name: configs - name: metrics - image: {{ include "common.image" (dict "component" $.Values.components.postgres.metrics "global" $.Values.global "extraImage" $.Values.components.postgres.metrics.armImage ) }} - imagePullPolicy: "IfNotPresent" + image: {{ include "common.image" (dict "component" $.Values.components.postgres.metrics "global" $.Values.global "extraImage" $.Values.components.postgres.metrics.image ) }} + imagePullPolicy: {{ .imagePullPolicy }} env: - name: DATA_SOURCE_URI value: "127.0.0.1:5432/orchestrator?sslmode=disable" @@ -608,7 +257,6 @@ spec: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 6 - volumeMounts: ports: - name: http-metrics containerPort: 9187 @@ -639,5 +287,82 @@ spec: resources: requests: storage: {{ .persistence.volumeSize }} -{{- end }} +--- +# Source: devtron-operator/templates/postgresql.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgresql-postgresql-customscripts + namespace: devtroncd + labels: + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-weight": "-2" + "helm.sh/resource-policy": keep + "meta.helm.sh/release-name": devtron + "meta.helm.sh/release-namespace": devtroncd +data: + db_create.sql: | + create database casbin; + create database git_sensor; + create database lens; + create database clairv4; +--- +# Source: devtron-operator/templates/postgresql.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgresql-postgresql-scripts + namespace: devtroncd + labels: + helm.sh/chart: postgres-0.4.0 + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron + app.kubernetes.io/version: "14.5" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-weight": "-2" + "helm.sh/resource-policy": keep + "meta.helm.sh/release-name": devtron + "meta.helm.sh/release-namespace": devtroncd +data: + 01-init-userdb.sh: | + #!/bin/sh + create_user() + { + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -v USERDBNAME="$POSTGRES_DB" -v USERDBUSER="$USERDB_USER" -v USERDBPASSWORD="'$USERDB_PASSWORD'" <<-EOSQL + CREATE USER :USERDBUSER WITH PASSWORD :USERDBPASSWORD; + GRANT ALL PRIVILEGES ON DATABASE :USERDBNAME TO :USERDBUSER; + EOSQL + } + set -e + if [ ! -z "$POSTGRES_DB" ] && [ ! -z "$USERDB_USER" ] && [ ! -z "$USERDB_PASSWORD" ]; then + create_user + fi + init.sh: | + #!/bin/sh + echo "Start initialization" + echo "Copy init-userdb script" + cp /initscripts/01-init-userdb.sh /scripts + if [ -d /extrascripts ]; then + echo "Copy extra scripts" + cp /extrascripts/* /scripts + fi + if [ -d /customscripts ]; then + echo "Copy custom scripts" + cp /customscripts/* /scripts + fi + if [ -d /customconfig ]; then + echo "Create postgres config" + cat /customconfig/* >>/configs/postgresql.conf + fi + if [ -d /extraconfigs ]; then + echo "Add extra configs to postgres config" + cat /extraconfigs/* >>/configs/postgresql.conf + fi + echo "Initialization done." {{- end }} diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 4bc9c7d1c4..52cc6f9311 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -17,15 +17,14 @@ global: # value: "value1" # effect: "NoSchedule" # imagePullSecrets: - # - name: your-image-pull-secret - + # - name: your-image-pull-secret + nodeSelector: {} + tolerations: [] + imagePullSecrets: [] # Set the storage class to be used for PVCs (would use default sc if not specified) storageClass: "" # Add Proxy Configs to be propagated to all the Devtron Microservices. configs: {} - nodeSelector: {} - tolerations: [] - imagePullSecrets: [] extraManifests: [] installer: repo: "devtron-labs/devtron" @@ -181,13 +180,11 @@ components: keyName: postgresql-password postgres: registry: "" - image: "postgres:11.9.0-debian-10-r26" - armImage: "postgres:11.9" + image: "postgres:14.9" initImage: "minideb:latest" imagePullPolicy: "IfNotPresent" metrics: - image: postgres_exporter:v0.4.7 - armImage: postgres_exporter:v0.10.1 + image: postgres_exporter:v0.10.1 persistence: volumeSize: "20Gi" gitsensor: From 560e236bfb191f9b4e485aa5c4b5599e4d5255a0 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 18:06:44 +0000 Subject: [PATCH 37/79] Updated latest image of devtron in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 0da02de14c..3e284e4f90 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -41,7 +41,7 @@ components: devtron: registry: "" image: "hyperion:846c2d90-280-31082" - cicdImage: "devtron:846c2d90-434-31081" + cicdImage: "devtron:37ee8a65-434-32064" imagePullPolicy: IfNotPresent customOverrides: {} podSecurityContext: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 52cc6f9311..64b6919df8 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -88,7 +88,7 @@ components: devtron: registry: "" image: "hyperion:846c2d90-280-31082" - cicdImage: "devtron:846c2d90-434-31081" + cicdImage: "devtron:37ee8a65-434-32064" imagePullPolicy: IfNotPresent customOverrides: {} healthPort: 8080 From 24674218869f4207c90cd91e2cf9bb5c2e80e537 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 18:20:39 +0000 Subject: [PATCH 38/79] Updated latest image of kubewatch in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 3e284e4f90..ad39cae31c 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -91,7 +91,7 @@ components: healthPort: 50052 kubewatch: registry: "" - image: "kubewatch:34abb17d-419-31007" + image: "kubewatch:6d3037d9-419-32065" imagePullPolicy: IfNotPresent healthPort: 8080 configs: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 64b6919df8..91664c1f04 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -159,7 +159,7 @@ components: keyName: postgresql-password kubewatch: registry: "" - image: "kubewatch:34abb17d-419-31007" + image: "kubewatch:6d3037d9-419-32065" imagePullPolicy: IfNotPresent healthPort: 8080 configs: From c87b132dd7ea38579f0ecd630debcbc1d1f9a8a6 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 18:39:11 +0000 Subject: [PATCH 39/79] Updated latest image of git-sensor in installer --- charts/devtron/devtron-bom.yaml | 2 ++ charts/devtron/values.yaml | 2 ++ manifests/yamls/gitsensor.yaml | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index ad39cae31c..d000005feb 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -196,6 +196,8 @@ components: runAsNonRoot: true runAsUser: 1001 extraConfigs: {} + git-sensor: + image: git-sensor:6d3037d9-200-32069 # values for argocd integration argo-cd: global: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 91664c1f04..3d1bb5d382 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -268,6 +268,8 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 + git-sensor: + image: git-sensor:6d3037d9-200-32069 # values for argocd integration argo-cd: enabled: false diff --git a/manifests/yamls/gitsensor.yaml b/manifests/yamls/gitsensor.yaml index 01faca8b2b..b36dcd9149 100644 --- a/manifests/yamls/gitsensor.yaml +++ b/manifests/yamls/gitsensor.yaml @@ -67,7 +67,7 @@ spec: - /bin/sh - -c - mkdir -p /git-base/ssh-keys && chown -R devtron:devtron /git-base && chmod 777 /git-base/ssh-keys - image: "quay.io/devtron/git-sensor:31f7877c-200-31629" + image: "quay.io/devtron/git-sensor:6d3037d9-200-32069" imagePullPolicy: IfNotPresent name: chown-git-base resources: {} @@ -80,7 +80,7 @@ spec: name: git-volume containers: - name: git-sensor - image: "quay.io/devtron/git-sensor:31f7877c-200-31629" + image: "quay.io/devtron/git-sensor:6d3037d9-200-32069" securityContext: allowPrivilegeEscalation: false runAsUser: 1000 From e2116d925f4e16b03937ffd01c08186f4eaf1f20 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:12:10 +0530 Subject: [PATCH 40/79] updated gitsensor image --- charts/devtron/values.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 3d1bb5d382..c1d7db9ef2 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -189,7 +189,7 @@ components: volumeSize: "20Gi" gitsensor: registry: "" - image: "git-sensor:31f7877c-200-31629" + image: "git-sensor:6d3037d9-200-32069" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false @@ -268,8 +268,6 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 - git-sensor: - image: git-sensor:6d3037d9-200-32069 # values for argocd integration argo-cd: enabled: false From bc096d824aac833cfb1193f8e2c49c17e89ab6f9 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:12:44 +0530 Subject: [PATCH 41/79] Updated devtron-bom.yaml --- charts/devtron/devtron-bom.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index d000005feb..852ab47166 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -119,7 +119,7 @@ components: image: postgres_exporter:v0.10.1 gitsensor: registry: "" - image: "git-sensor:31f7877c-200-31629" + image: "git-sensor:6d3037d9-200-32069" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false @@ -196,8 +196,6 @@ components: runAsNonRoot: true runAsUser: 1001 extraConfigs: {} - git-sensor: - image: git-sensor:6d3037d9-200-32069 # values for argocd integration argo-cd: global: From 51fef26db98915ee823f35019e6844f086fb9f17 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 18:48:05 +0000 Subject: [PATCH 42/79] Updated latest image of lens in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 852ab47166..19a2234114 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -138,7 +138,7 @@ components: # Values for lens lens: registry: "" - image: "lens:34abb17d-333-31011" + image: "lens:6d3037d9-333-32070" imagePullPolicy: IfNotPresent configs: GIT_SENSOR_PROTOCOL: GRPC diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index c1d7db9ef2..f4f5a59a94 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -208,7 +208,7 @@ components: # Values for lens lens: registry: "" - image: "lens:34abb17d-333-31011" + image: "lens:6d3037d9-333-32070" imagePullPolicy: IfNotPresent secrets: {} resources: {} From 030be2d44e8b6da5a749b4d9786569a1d1f9c3d2 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 18:48:41 +0000 Subject: [PATCH 43/79] Updated latest image of ci-runner in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 19a2234114..5e607854a3 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -55,7 +55,7 @@ components: healthPort: 8080 ciRunner: registry: "" - image: "ci-runner:d79b15c6-138-31014" + image: "ci-runner:6d3037d9-138-32071" argocdDexServer: registry: "" image: "dex:v2.30.2" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index f4f5a59a94..16aefd72aa 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -123,7 +123,7 @@ components: # - devtron.example.com ciRunner: registry: "" - image: "ci-runner:d79b15c6-138-31014" + image: "ci-runner:6d3037d9-138-32071" argocdDexServer: registry: "" image: "dex:v2.30.2" From 80523d5a6d5a3e2784af988cedf2559336b8e423 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 19:01:15 +0000 Subject: [PATCH 44/79] Updated latest image of notifier in devtron --- charts/devtron/devtron-bom.yaml | 2 ++ charts/devtron/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 5e607854a3..d156bf268f 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -196,6 +196,8 @@ components: runAsNonRoot: true runAsUser: 1001 extraConfigs: {} + notifier: + image: notifier:56798239-372-32072 # values for argocd integration argo-cd: global: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 16aefd72aa..3bf913ec4d 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -268,6 +268,8 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 + notifier: + image: notifier:56798239-372-32072 # values for argocd integration argo-cd: enabled: false From 9ed56157cfcfc66e7f766972b1705966533a7d69 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 19:02:57 +0000 Subject: [PATCH 45/79] Updated latest image of image-scanner in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index d156bf268f..314277dd4d 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -217,7 +217,7 @@ workflowController: IMDSv1ExecutorImage: "argoexec:v3.0.7" security: imageScanner: - image: "image-scanner:34abb17d-141-31016" + image: "image-scanner:6d3037d9-141-32073" healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 3bf913ec4d..f1356dca7d 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -413,7 +413,7 @@ argo-cd: security: enabled: false imageScanner: - image: "image-scanner:34abb17d-141-31016" + image: "image-scanner:6d3037d9-141-32073" healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db From dfa253d47606a1d5c47d16a028f8647d84adce0d Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:35:14 +0530 Subject: [PATCH 46/79] updated image of notifier --- charts/devtron/values.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index f1356dca7d..134243ce60 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -268,8 +268,6 @@ components: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1001 - notifier: - image: notifier:56798239-372-32072 # values for argocd integration argo-cd: enabled: false @@ -432,7 +430,7 @@ security: notifier: enabled: false imagePullPolicy: IfNotPresent - image: "notifier:c2173311-372-31015" + image: "notifier:56798239-372-32072" configs: CD_ENVIRONMENT: PROD DB: orchestrator From 20a1d8001665e1ad4b66b19f3e45e1b1ec20eaaa Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:35:56 +0530 Subject: [PATCH 47/79] updated image of notifier --- charts/devtron/devtron-bom.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 314277dd4d..b15fdee4a1 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -196,8 +196,6 @@ components: runAsNonRoot: true runAsUser: 1001 extraConfigs: {} - notifier: - image: notifier:56798239-372-32072 # values for argocd integration argo-cd: global: @@ -228,7 +226,7 @@ security: tag: 4.3.6 # Values for notifier integration notifier: - image: "notifier:c2173311-372-31015" + image: "notifier:56798239-372-32072" healthPort: 3000 minio: image: "minio:RELEASE.2021-02-14T04-01-33Z" From 49a32be2cb86fe35a051af41ee9e2fb88edab2ca Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 19:12:06 +0000 Subject: [PATCH 48/79] Updated latest image of chart-sync in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index b15fdee4a1..d0c3f8e54e 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -185,7 +185,7 @@ components: DB_NAME: "lens" chartSync: registry: "" - image: chart-sync:34abb17d-836-31017 + image: chart-sync:6d3037d9-836-32074 schedule: "0 19 * * *" podSecurityContext: fsGroup: 1001 diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 134243ce60..bdc2b0f814 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -257,7 +257,7 @@ components: DB_NAME: "lens" chartSync: registry: "" - image: chart-sync:34abb17d-836-31017 + image: chart-sync:6d3037d9-836-32074 schedule: "0 19 * * *" extraConfigs: {} podSecurityContext: From b32ef82839094a8f0eedc74d443f75fd9c697709 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 19:21:32 +0000 Subject: [PATCH 49/79] Updated latest image of hyperion in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index d0c3f8e54e..8dc88db664 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -40,7 +40,7 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:846c2d90-280-31082" + image: "hyperion:37ee8a65-280-32075" cicdImage: "devtron:37ee8a65-434-32064" imagePullPolicy: IfNotPresent customOverrides: {} diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index bdc2b0f814..9450ce9e51 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -87,7 +87,7 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:846c2d90-280-31082" + image: "hyperion:37ee8a65-280-32075" cicdImage: "devtron:37ee8a65-434-32064" imagePullPolicy: IfNotPresent customOverrides: {} From 8e140612b87917277bfc55e88572ef2d933630a5 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Sat, 19 Apr 2025 19:27:18 +0000 Subject: [PATCH 50/79] Updated latest image of kubelink in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 8dc88db664..42bc9dacd1 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -64,7 +64,7 @@ components: authenticator: "authenticator:e414faff-393-13273" kubelink: registry: "" - image: "kubelink:ccd98a22-564-31008" + image: "kubelink:6d3037d9-564-32076" imagePullPolicy: IfNotPresent configs: ENABLE_HELM_RELEASE_CACHE: "true" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 9450ce9e51..a5989c5490 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -132,7 +132,7 @@ components: authenticator: "authenticator:e414faff-393-13273" kubelink: registry: "" - image: "kubelink:ccd98a22-564-31008" + image: "kubelink:6d3037d9-564-32076" imagePullPolicy: IfNotPresent healthPort: 50052 podSecurityContext: From 7a478298e812e7fd37f480c1578ba3711e566428 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 21 Apr 2025 06:36:04 +0000 Subject: [PATCH 51/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 76d52ccff7..cd51d5850f 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -1,4 +1,5 @@ ## Bugs +- fix: issues in helm apps and git provide (#6523) - fix: added more fields in webhook notification (#6520) - fix: CI dangling pod after aborting build (#6522) - fix: added support for IAM role S3 blob client (#6521) From 5a33e55e1d2d0b2cef7c74043a2564e438ef0ab2 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:02:51 +0000 Subject: [PATCH 52/79] Updated latest image of devtron in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 42bc9dacd1..6e2fd04a6a 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -41,7 +41,7 @@ components: devtron: registry: "" image: "hyperion:37ee8a65-280-32075" - cicdImage: "devtron:37ee8a65-434-32064" + cicdImage: "devtron:e2daf69a-434-32096" imagePullPolicy: IfNotPresent customOverrides: {} podSecurityContext: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index a5989c5490..0f238e848e 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -88,7 +88,7 @@ components: devtron: registry: "" image: "hyperion:37ee8a65-280-32075" - cicdImage: "devtron:37ee8a65-434-32064" + cicdImage: "devtron:e2daf69a-434-32096" imagePullPolicy: IfNotPresent customOverrides: {} healthPort: 8080 From 3e7bd2dc5c79ca0f0a548d1a2ac8721d44b10480 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:22:23 +0000 Subject: [PATCH 53/79] Updated latest image of kubewatch in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 6e2fd04a6a..2e109957b6 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -91,7 +91,7 @@ components: healthPort: 50052 kubewatch: registry: "" - image: "kubewatch:6d3037d9-419-32065" + image: "kubewatch:c49b4aa5-419-32097" imagePullPolicy: IfNotPresent healthPort: 8080 configs: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 0f238e848e..4904516b5c 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -159,7 +159,7 @@ components: keyName: postgresql-password kubewatch: registry: "" - image: "kubewatch:6d3037d9-419-32065" + image: "kubewatch:c49b4aa5-419-32097" imagePullPolicy: IfNotPresent healthPort: 8080 configs: From 5ee3faf63babf9e358165ef4600d3d9d8e8f0d09 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:22:38 +0000 Subject: [PATCH 54/79] Updated latest image of kubelink in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 2e109957b6..c1d5fcba52 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -64,7 +64,7 @@ components: authenticator: "authenticator:e414faff-393-13273" kubelink: registry: "" - image: "kubelink:6d3037d9-564-32076" + image: "kubelink:c49b4aa5-564-32098" imagePullPolicy: IfNotPresent configs: ENABLE_HELM_RELEASE_CACHE: "true" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 4904516b5c..6898179913 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -132,7 +132,7 @@ components: authenticator: "authenticator:e414faff-393-13273" kubelink: registry: "" - image: "kubelink:6d3037d9-564-32076" + image: "kubelink:c49b4aa5-564-32098" imagePullPolicy: IfNotPresent healthPort: 50052 podSecurityContext: From 4b9246118c4e8b3443f4d96c0a9e81f389cf9b0b Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:36:27 +0000 Subject: [PATCH 55/79] Updated latest image of git-sensor in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index c1d5fcba52..09c8797539 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -119,7 +119,7 @@ components: image: postgres_exporter:v0.10.1 gitsensor: registry: "" - image: "git-sensor:6d3037d9-200-32069" + image: "git-sensor:c49b4aa5-200-32099" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 6898179913..e7748ab36f 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -189,7 +189,7 @@ components: volumeSize: "20Gi" gitsensor: registry: "" - image: "git-sensor:6d3037d9-200-32069" + image: "git-sensor:c49b4aa5-200-32099" imagePullPolicy: IfNotPresent serviceMonitor: enabled: false From 641be5e794ee35449ad0cb8eac2da2f405d44c2e Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:38:03 +0000 Subject: [PATCH 56/79] Updated latest image of lens in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 09c8797539..6a178d1e8c 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -138,7 +138,7 @@ components: # Values for lens lens: registry: "" - image: "lens:6d3037d9-333-32070" + image: "lens:c49b4aa5-333-32100" imagePullPolicy: IfNotPresent configs: GIT_SENSOR_PROTOCOL: GRPC diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index e7748ab36f..0ad8371f87 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -208,7 +208,7 @@ components: # Values for lens lens: registry: "" - image: "lens:6d3037d9-333-32070" + image: "lens:c49b4aa5-333-32100" imagePullPolicy: IfNotPresent secrets: {} resources: {} From ebe68c42e004abe7d03f52b54091d4dd4a27a113 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:40:21 +0000 Subject: [PATCH 57/79] Updated latest image of ci-runner in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 6a178d1e8c..da2c98cce2 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -55,7 +55,7 @@ components: healthPort: 8080 ciRunner: registry: "" - image: "ci-runner:6d3037d9-138-32071" + image: "ci-runner:c49b4aa5-138-32101" argocdDexServer: registry: "" image: "dex:v2.30.2" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 0ad8371f87..a870bf5bcb 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -123,7 +123,7 @@ components: # - devtron.example.com ciRunner: registry: "" - image: "ci-runner:6d3037d9-138-32071" + image: "ci-runner:c49b4aa5-138-32101" argocdDexServer: registry: "" image: "dex:v2.30.2" From 70ff98d187c86667dcfb614e385ec31fe6ff265f Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:42:09 +0000 Subject: [PATCH 58/79] Updated latest image of image-scanner in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index da2c98cce2..afe10a4fe1 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -215,7 +215,7 @@ workflowController: IMDSv1ExecutorImage: "argoexec:v3.0.7" security: imageScanner: - image: "image-scanner:6d3037d9-141-32073" + image: "image-scanner:c49b4aa5-141-32102" healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index a870bf5bcb..6cbca6dec4 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -411,7 +411,7 @@ argo-cd: security: enabled: false imageScanner: - image: "image-scanner:6d3037d9-141-32073" + image: "image-scanner:c49b4aa5-141-32102" healthPort: 8080 configs: TRIVY_DB_REPOSITORY: mirror.gcr.io/aquasec/trivy-db From 933027afa4a0ac1f43d4e6becdd3635c2c970a8e Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:43:59 +0000 Subject: [PATCH 59/79] Updated latest image of chart-sync in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index afe10a4fe1..213dd4f5fc 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -185,7 +185,7 @@ components: DB_NAME: "lens" chartSync: registry: "" - image: chart-sync:6d3037d9-836-32074 + image: chart-sync:c49b4aa5-836-32103 schedule: "0 19 * * *" podSecurityContext: fsGroup: 1001 diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 6cbca6dec4..f7479557f3 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -257,7 +257,7 @@ components: DB_NAME: "lens" chartSync: registry: "" - image: chart-sync:6d3037d9-836-32074 + image: chart-sync:c49b4aa5-836-32103 schedule: "0 19 * * *" extraConfigs: {} podSecurityContext: From c85dc38ab3e0f4cf7d0ef98ab07af75bfad97800 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 08:48:25 +0000 Subject: [PATCH 60/79] Updated latest image of hyperion in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 213dd4f5fc..4d97c72605 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -40,7 +40,7 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:37ee8a65-280-32075" + image: "hyperion:e2daf69a-280-32104" cicdImage: "devtron:e2daf69a-434-32096" imagePullPolicy: IfNotPresent customOverrides: {} diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index f7479557f3..3089c2f059 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -87,7 +87,7 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:37ee8a65-280-32075" + image: "hyperion:e2daf69a-280-32104" cicdImage: "devtron:e2daf69a-434-32096" imagePullPolicy: IfNotPresent customOverrides: {} From e7b39a06d11e92c58e4c6357459d8f78733fb2cb Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Mon, 21 Apr 2025 09:36:56 +0000 Subject: [PATCH 61/79] Updated latest image of dashboard in devtron --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 4d97c72605..7eda56d937 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -35,7 +35,7 @@ components: ENABLE_RESOURCE_SCAN: "true" FEATURE_CODE_MIRROR_ENABLE: "false" registry: "" - image: "dashboard:a400ce3c-690-31030" + image: "dashboard:0fc42ac3-690-32105" imagePullPolicy: IfNotPresent healthPort: 8080 devtron: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 3089c2f059..3e65bcf7d4 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -82,7 +82,7 @@ components: ENABLE_RESOURCE_SCAN: "true" FEATURE_CODE_MIRROR_ENABLE: "false" registry: "" - image: "dashboard:a400ce3c-690-31030" + image: "dashboard:0fc42ac3-690-32105" imagePullPolicy: IfNotPresent healthPort: 8080 devtron: From ddda2c62e8e3384e6a18d2180908a905f655115c Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 21 Apr 2025 15:18:15 +0530 Subject: [PATCH 62/79] Update devtron-bom.yaml --- charts/devtron/devtron-bom.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 7eda56d937..09f5423b3f 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -33,7 +33,7 @@ components: FEATURE_STEP_WISE_LOGS_ENABLE: "true" FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: "true" ENABLE_RESOURCE_SCAN: "true" - FEATURE_CODE_MIRROR_ENABLE: "false" + FEATURE_CODE_MIRROR_ENABLE: "true" registry: "" image: "dashboard:0fc42ac3-690-32105" imagePullPolicy: IfNotPresent From 60796a4e508fa122c213d7a32bef0895a46ed345 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Mon, 21 Apr 2025 15:18:33 +0530 Subject: [PATCH 63/79] Update values.yaml --- charts/devtron/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 3e65bcf7d4..0a9e7e1e82 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -80,7 +80,7 @@ components: FEATURE_STEP_WISE_LOGS_ENABLE: "true" FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: "true" ENABLE_RESOURCE_SCAN: "true" - FEATURE_CODE_MIRROR_ENABLE: "false" + FEATURE_CODE_MIRROR_ENABLE: "true" registry: "" image: "dashboard:0fc42ac3-690-32105" imagePullPolicy: IfNotPresent From 18c2f5875047116101eb43017b9a1349767d39b7 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 21 Apr 2025 13:19:56 +0000 Subject: [PATCH 64/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index cd51d5850f..c118d092f8 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -19,6 +19,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: Main sync develop (#6527) - sync: Main sync develop (#6518) - sync: vendor update (#6515) - sync: Release candidate v0.33.0 (#6514) From 6d3610dc17e631ee605a9e6a4cd768c4cda6896f Mon Sep 17 00:00:00 2001 From: systemsdt Date: Mon, 21 Apr 2025 14:07:58 +0000 Subject: [PATCH 65/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index c118d092f8..9c8f52c013 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -19,6 +19,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- sync: Vendor update develop (#6528) - sync: Main sync develop (#6527) - sync: Main sync develop (#6518) - sync: vendor update (#6515) From fa8bd71d15eee8188f94441f85b5d7f5b49020d2 Mon Sep 17 00:00:00 2001 From: systemsdt Date: Tue, 22 Apr 2025 09:11:07 +0000 Subject: [PATCH 66/79] Updated release notes --- beta-releasenotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/beta-releasenotes.md b/beta-releasenotes.md index 9c8f52c013..21aa103f09 100644 --- a/beta-releasenotes.md +++ b/beta-releasenotes.md @@ -19,6 +19,7 @@ - feat: licensing changes (#6474) ## Documentation ## Others +- refactor: Refactor ci and multi cluster cicd (#6505) - sync: Vendor update develop (#6528) - sync: Main sync develop (#6527) - sync: Main sync develop (#6518) From 012572f9facf389e88282aa3c328264fc0ca2a2b Mon Sep 17 00:00:00 2001 From: akshatsinha007 Date: Tue, 22 Apr 2025 16:19:58 +0530 Subject: [PATCH 67/79] modified postgresql.yaml --- charts/devtron/templates/postgresql.yaml | 56 +++++++++++------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/charts/devtron/templates/postgresql.yaml b/charts/devtron/templates/postgresql.yaml index c50884459c..a42fd85e6d 100644 --- a/charts/devtron/templates/postgresql.yaml +++ b/charts/devtron/templates/postgresql.yaml @@ -14,13 +14,13 @@ metadata: spec: type: ClusterIP ports: - - name: tcp-postgresql + - name: postgres port: 5432 - targetPort: 5432 + protocol: TCP + targetPort: postgres selector: - app: postgresql - release: "devtron" - role: master + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron --- apiVersion: v1 kind: Service @@ -37,12 +37,13 @@ spec: type: ClusterIP clusterIP: None ports: - - name: tcp-postgresql + - name: postgres port: 5432 - targetPort: 5432 + protocol: TCP + targetPort: postgres selector: - app: postgresql - release: "devtron" + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron --- apiVersion: v1 kind: Service @@ -64,22 +65,21 @@ spec: port: 9187 targetPort: http-metrics selector: - app: postgresql - release: devtron - role: master + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron --- apiVersion: apps/v1 kind: StatefulSet metadata: name: postgresql-postgresql - namespace: devtroncd labels: - app: postgresql - release: "devtron" + helm.sh/chart: postgres-0.4.0 + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron + app.kubernetes.io/version: "14.5" + app.kubernetes.io/managed-by: Helm annotations: "helm.sh/resource-policy": keep - "meta.helm.sh/release-name": devtron - "meta.helm.sh/release-namespace": devtroncd spec: replicas: 1 serviceName: postgresql-postgresql @@ -88,15 +88,13 @@ spec: type: RollingUpdate selector: matchLabels: - app: postgresql - release: "devtron" - role: master + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron template: metadata: labels: - app: postgresql - release: "devtron" - role: master + app.kubernetes.io/name: postgres + app.kubernetes.io/instance: devtron spec: {{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.components.postgres.nodeSelector "tolerations" $.Values.components.postgres.tolerations "imagePullSecrets" $.Values.components.postgres.imagePullSecrets "global" $.Values.global) | indent 6 }} serviceAccountName: devtron-default-sa @@ -148,7 +146,7 @@ spec: {{- toYaml .resources | nindent 12 }} {{- end }} ports: - - name: tcp-postgresql + - name: postgres containerPort: 5432 protocol: TCP env: @@ -159,11 +157,6 @@ spec: secretKeyRef: key: postgresql-password name: postgresql-postgresql - - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: postgresql-postgresql - key: POSTGRES_USER - name: POSTGRES_HOST_AUTH_METHOD value: "md5" - name: POSTGRES_INITDB_ARGS @@ -219,7 +212,7 @@ spec: name: configs - name: metrics image: {{ include "common.image" (dict "component" $.Values.components.postgres.metrics "global" $.Values.global "extraImage" $.Values.components.postgres.metrics.image ) }} - imagePullPolicy: {{ .imagePullPolicy }} + imagePullPolicy: "IfNotPresent" env: - name: DATA_SOURCE_URI value: "127.0.0.1:5432/orchestrator?sslmode=disable" @@ -257,6 +250,7 @@ spec: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 6 + volumeMounts: ports: - name: http-metrics containerPort: 9187 @@ -365,4 +359,4 @@ data: cat /extraconfigs/* >>/configs/postgresql.conf fi echo "Initialization done." -{{- end }} +{{- end }} \ No newline at end of file From f340054045fabb3673ac39b91c80043045d077b9 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:05:18 +0530 Subject: [PATCH 68/79] Update NOTES.txt --- charts/devtron/templates/NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/devtron/templates/NOTES.txt b/charts/devtron/templates/NOTES.txt index 72d3525643..3399e5f0e1 100644 --- a/charts/devtron/templates/NOTES.txt +++ b/charts/devtron/templates/NOTES.txt @@ -2,7 +2,7 @@ {{- $liveCm := lookup "v1" "ConfigMap" "devtroncd" "devtron-custom-cm" }} {{- $currentValue := pluck "POSTGRES_MIGRATED" $liveCm.data | first | default "" }} {{- if ne $currentValue "14" }} - {{- fail "Upgrade Failed Please ensure that you have completed the pre-requisites mentioned in " }} + {{- fail "Upgrade Failed Please ensure that you have completed the pre-requisites mentioned in https://docs.devtron.ai/upgrade/devtron-upgrade-1.5.0" }} {{- end }} {{- end }} From 61f1ad043a00e59f5ace07744c155a97744455c5 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Wed, 23 Apr 2025 11:13:06 +0000 Subject: [PATCH 69/79] Updated the version in scripts --- .../release-notes-v1.5.0.md | 4 ++ charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- manifests/install/devtron-installer.yaml | 2 +- manifests/installation-script | 2 +- releasenotes.md | 40 +++++++++++++++++++ 7 files changed, 49 insertions(+), 5 deletions(-) rename beta-releasenotes.md => CHANGELOG/release-notes-v1.5.0.md (99%) diff --git a/beta-releasenotes.md b/CHANGELOG/release-notes-v1.5.0.md similarity index 99% rename from beta-releasenotes.md rename to CHANGELOG/release-notes-v1.5.0.md index 21aa103f09..fe7912d01c 100644 --- a/beta-releasenotes.md +++ b/CHANGELOG/release-notes-v1.5.0.md @@ -1,3 +1,5 @@ +## v1.5.0 + ## Bugs - fix: issues in helm apps and git provide (#6523) - fix: added more fields in webhook notification (#6520) @@ -34,3 +36,5 @@ - sync: Main sync develop 27mar (#6483) - sync: vendor update (#6480) - sync: Release candidate v0.32.0 (#6479) + + diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 2393e15444..33e6cbfbc5 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: devtron-operator -appVersion: 1.4.1 +appVersion: 1.5.0 description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. keywords: - Devtron diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 09f5423b3f..c5a3cebb09 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -10,7 +10,7 @@ global: containerRegistry: "quay.io/devtron" extraManifests: [] installer: - release: "v1.4.1" + release: "v1.5.0" registry: "" image: "inception" tag: "473deaa4-185-21582" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 0a9e7e1e82..c254e73d51 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -28,7 +28,7 @@ global: extraManifests: [] installer: repo: "devtron-labs/devtron" - release: "v1.4.1" + release: "v1.5.0" registry: "" image: inception tag: 473deaa4-185-21582 diff --git a/manifests/install/devtron-installer.yaml b/manifests/install/devtron-installer.yaml index 825492791b..e7c5b98414 100644 --- a/manifests/install/devtron-installer.yaml +++ b/manifests/install/devtron-installer.yaml @@ -4,4 +4,4 @@ metadata: name: installer-devtron namespace: devtroncd spec: - url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.4.1/manifests/installation-script + url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.5.0/manifests/installation-script diff --git a/manifests/installation-script b/manifests/installation-script index b755b92b71..08922660ec 100644 --- a/manifests/installation-script +++ b/manifests/installation-script @@ -1,4 +1,4 @@ -LTAG="v1.4.1"; +LTAG="v1.5.0"; REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/"; log("executed devtron setup installation"); diff --git a/releasenotes.md b/releasenotes.md index e69de29bb2..fe7912d01c 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -0,0 +1,40 @@ +## v1.5.0 + +## Bugs +- fix: issues in helm apps and git provide (#6523) +- fix: added more fields in webhook notification (#6520) +- fix: CI dangling pod after aborting build (#6522) +- fix: added support for IAM role S3 blob client (#6521) +- fix: making tx independent of git sensor call (#6519) +- fix: sql query memory issue (#6516) +- fix: postgresql skip unique constraints error and handle network connection error (#6509) +- fix: Grafana data-source get API (#6503) +- fix: Grafana revert patch (#6498) +- fix: made triggeredBy for CI & CD uniform (#6489) +- fix: hpa permission denied error (#6485) +- fix: force abort for pre/post cd (#6475) +- fix: optimisation in workflow status api (#6473) +- fix: let user delete the container reg if the ref app was deleted (#6464) +## Enhancements +- feat: only deploy unhibernated apps in app group (#6494) +- feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) +- feat: licensing changes (#6474) +## Documentation +## Others +- refactor: Refactor ci and multi cluster cicd (#6505) +- sync: Vendor update develop (#6528) +- sync: Main sync develop (#6527) +- sync: Main sync develop (#6518) +- sync: vendor update (#6515) +- sync: Release candidate v0.33.0 (#6514) +- misc: update the descriptions of env variables (#6499) +- sync: Main sync develop 8apr (#6504) +- misc: patch api for user attribute (#6490) +- chore: nil implementations fixed for user attribute in telemetry (#6497) +- chore: code restructuring (#6476) +- sync: main changes synced into develop (#6492) +- sync: Main sync develop 27mar (#6483) +- sync: vendor update (#6480) +- sync: Release candidate v0.32.0 (#6479) + + From a7f45960bcc329c6abad4c2b3836ef7c97ec6f11 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:47:09 +0530 Subject: [PATCH 70/79] Update release.txt --- manifests/release.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/release.txt b/manifests/release.txt index 07a41d54a2..7444c53000 100644 --- a/manifests/release.txt +++ b/manifests/release.txt @@ -1 +1 @@ -stable -1 v1.4.1 +stable -1 v1.5.0 From 50bf0bb80854fa4d2ebdd3511e8c3afaaf374e06 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:47:23 +0530 Subject: [PATCH 71/79] Update version.txt --- manifests/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/version.txt b/manifests/version.txt index 66d62a8001..2e7bd91085 100644 --- a/manifests/version.txt +++ b/manifests/version.txt @@ -1 +1 @@ -v1.4.1 +v1.5.0 From 15de5f964c260e1d7b78887fb22f0f95d228f953 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:50:43 +0530 Subject: [PATCH 72/79] Update release-notes-v1.5.0.md --- CHANGELOG/release-notes-v1.5.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG/release-notes-v1.5.0.md b/CHANGELOG/release-notes-v1.5.0.md index fe7912d01c..900171abc0 100644 --- a/CHANGELOG/release-notes-v1.5.0.md +++ b/CHANGELOG/release-notes-v1.5.0.md @@ -19,7 +19,6 @@ - feat: only deploy unhibernated apps in app group (#6494) - feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) - feat: licensing changes (#6474) -## Documentation ## Others - refactor: Refactor ci and multi cluster cicd (#6505) - sync: Vendor update develop (#6528) From c1fbda439656e0158b5574f79e73405c6853e6bf Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:51:00 +0530 Subject: [PATCH 73/79] Update releasenotes.md --- releasenotes.md | 1 - 1 file changed, 1 deletion(-) diff --git a/releasenotes.md b/releasenotes.md index fe7912d01c..900171abc0 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -19,7 +19,6 @@ - feat: only deploy unhibernated apps in app group (#6494) - feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) - feat: licensing changes (#6474) -## Documentation ## Others - refactor: Refactor ci and multi cluster cicd (#6505) - sync: Vendor update develop (#6528) From daf51c75ae53af574a37b0389b2e1f9f99301cc1 Mon Sep 17 00:00:00 2001 From: Vikram <73224103+vikramdevtron@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:06:59 +0530 Subject: [PATCH 74/79] Update releasenotes.md Removed urmerged PR's --- releasenotes.md | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/releasenotes.md b/releasenotes.md index 900171abc0..2282292114 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,39 +1,21 @@ ## v1.5.0 ## Bugs -- fix: issues in helm apps and git provide (#6523) -- fix: added more fields in webhook notification (#6520) -- fix: CI dangling pod after aborting build (#6522) -- fix: added support for IAM role S3 blob client (#6521) -- fix: making tx independent of git sensor call (#6519) -- fix: sql query memory issue (#6516) -- fix: postgresql skip unique constraints error and handle network connection error (#6509) +- fix: Added support for IAM role S3 blob client (#6521) +- fix: Making tx independent of git sensor call (#6519) +- fix: Sql query memory issue (#6516) - fix: Grafana data-source get API (#6503) -- fix: Grafana revert patch (#6498) -- fix: made triggeredBy for CI & CD uniform (#6489) -- fix: hpa permission denied error (#6485) -- fix: force abort for pre/post cd (#6475) -- fix: optimisation in workflow status api (#6473) -- fix: let user delete the container reg if the ref app was deleted (#6464) +- fix: Made triggeredBy for CI & CD uniform (#6489) +- fix: HPA permission denied error (#6485) +- fix: Force abort for pre/post cd (#6475) +- fix: Optimisation in workflow status api (#6473) +- fix: Let user delete the container reg if the ref app was deleted (#6464) ## Enhancements -- feat: only deploy unhibernated apps in app group (#6494) - feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) -- feat: licensing changes (#6474) +- feat: Licensing changes (#6474) ## Others -- refactor: Refactor ci and multi cluster cicd (#6505) -- sync: Vendor update develop (#6528) -- sync: Main sync develop (#6527) -- sync: Main sync develop (#6518) -- sync: vendor update (#6515) -- sync: Release candidate v0.33.0 (#6514) -- misc: update the descriptions of env variables (#6499) -- sync: Main sync develop 8apr (#6504) -- misc: patch api for user attribute (#6490) -- chore: nil implementations fixed for user attribute in telemetry (#6497) -- chore: code restructuring (#6476) -- sync: main changes synced into develop (#6492) -- sync: Main sync develop 27mar (#6483) -- sync: vendor update (#6480) -- sync: Release candidate v0.32.0 (#6479) +- misc: Update the descriptions of env variables (#6499) +- misc: Patch api for user attribute (#6490) +- chore: Nil implementations fixed for user attribute in telemetry (#6497) From da03f02c874304b9ff2106c4b7486ca18dd281e6 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:13:02 +0530 Subject: [PATCH 75/79] Update release-notes-v1.5.0.md --- CHANGELOG/release-notes-v1.5.0.md | 48 +++++++++---------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/CHANGELOG/release-notes-v1.5.0.md b/CHANGELOG/release-notes-v1.5.0.md index 900171abc0..12ce18e29e 100644 --- a/CHANGELOG/release-notes-v1.5.0.md +++ b/CHANGELOG/release-notes-v1.5.0.md @@ -1,39 +1,19 @@ ## v1.5.0 -## Bugs -- fix: issues in helm apps and git provide (#6523) -- fix: added more fields in webhook notification (#6520) -- fix: CI dangling pod after aborting build (#6522) -- fix: added support for IAM role S3 blob client (#6521) -- fix: making tx independent of git sensor call (#6519) -- fix: sql query memory issue (#6516) -- fix: postgresql skip unique constraints error and handle network connection error (#6509) -- fix: Grafana data-source get API (#6503) -- fix: Grafana revert patch (#6498) -- fix: made triggeredBy for CI & CD uniform (#6489) -- fix: hpa permission denied error (#6485) -- fix: force abort for pre/post cd (#6475) -- fix: optimisation in workflow status api (#6473) -- fix: let user delete the container reg if the ref app was deleted (#6464) ## Enhancements -- feat: only deploy unhibernated apps in app group (#6494) - feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) -- feat: licensing changes (#6474) +- feat: Licensing changes (#6474) +## Bugs +- fix: Added support for IAM role S3 blob client (#6521) +- fix: Making tx independent of git sensor call (#6519) +- fix: Sql query memory issue (#6516) +- fix: Grafana data-source get API (#6503) +- fix: Made triggeredBy for CI & CD uniform (#6489) +- fix: HPA permission denied error (#6485) +- fix: Force abort for pre/post cd (#6475) +- fix: Optimisation in workflow status api (#6473) +- fix: Let user delete the container reg if the ref app was deleted (#6464) ## Others -- refactor: Refactor ci and multi cluster cicd (#6505) -- sync: Vendor update develop (#6528) -- sync: Main sync develop (#6527) -- sync: Main sync develop (#6518) -- sync: vendor update (#6515) -- sync: Release candidate v0.33.0 (#6514) -- misc: update the descriptions of env variables (#6499) -- sync: Main sync develop 8apr (#6504) -- misc: patch api for user attribute (#6490) -- chore: nil implementations fixed for user attribute in telemetry (#6497) -- chore: code restructuring (#6476) -- sync: main changes synced into develop (#6492) -- sync: Main sync develop 27mar (#6483) -- sync: vendor update (#6480) -- sync: Release candidate v0.32.0 (#6479) - - +- misc: Update the descriptions of env variables (#6499) +- misc: Patch api for user attribute (#6490) +- chore: Nil implementations fixed for user attribute in telemetry (#6497) From e4c97df22cc31b74cb14c4178c71e0e9a0282a54 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:13:41 +0530 Subject: [PATCH 76/79] Update releasenotes.md --- releasenotes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releasenotes.md b/releasenotes.md index 2282292114..2de45b1915 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,5 +1,8 @@ ## v1.5.0 +## Enhancements +- feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) +- feat: Licensing changes (#6474) ## Bugs - fix: Added support for IAM role S3 blob client (#6521) - fix: Making tx independent of git sensor call (#6519) @@ -10,9 +13,6 @@ - fix: Force abort for pre/post cd (#6475) - fix: Optimisation in workflow status api (#6473) - fix: Let user delete the container reg if the ref app was deleted (#6464) -## Enhancements -- feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) -- feat: Licensing changes (#6474) ## Others - misc: Update the descriptions of env variables (#6499) - misc: Patch api for user attribute (#6490) From ee06ff4e73f93dc0afe11e0903a0d7b6fc58623d Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:36:34 +0530 Subject: [PATCH 77/79] Update devtron-images.txt.source --- devtron-images.txt.source | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/devtron-images.txt.source b/devtron-images.txt.source index c1475bd3ed..6f420f5094 100644 --- a/devtron-images.txt.source +++ b/devtron-images.txt.source @@ -1,38 +1,37 @@ -quay.io/devtron/image-scanner:0dde3b1a-141-30093 +quay.io/devtron/image-scanner:c49b4aa5-141-32102 quay.io/devtron/inception:473deaa4-185-21582 -quay.io/devtron/hyperion:e67c3b76-280-30100 +quay.io/devtron/hyperion:e2daf69a-280-32104 public.ecr.aws/docker/library/redis:7.0.5-alpine quay.io/argoproj/argocd:v2.5.2 quay.io/argoproj/workflow-controller:v3.4.3 quay.io/devtron/authenticator:e414faff-393-13273 quay.io/devtron/bats:v1.4.1 quay.io/devtron/busybox:1.31.1 -quay.io/devtron/chart-sync:0dde3b1a-836-30095 +quay.io/devtron/chart-sync:c49b4aa5-836-32103 quay.io/devtron/curl:7.73.0 -quay.io/devtron/dashboard:1c40d516-690-30089 +quay.io/devtron/dashboard:0fc42ac3-690-32105 quay.io/devtron/devtron-utils:dup-chart-repo-v1.1.0 quay.io/devtron/devtron:e67c3b76-434-30101 -quay.io/devtron/ci-runner:0dde3b1a-138-30091 +quay.io/devtron/ci-runner:c49b4aa5-138-32101 quay.io/devtron/dex:v2.30.2 -quay.io/devtron/git-sensor:0dde3b1a-200-30085 +quay.io/devtron/git-sensor:c49b4aa5-200-32099 quay.io/devtron/grafana:7.3.1 quay.io/devtron/k8s-sidecar:1.1.0 quay.io/devtron/k8s-utils:tutum-curl quay.io/devtron/kubectl:latest -quay.io/devtron/kubelink:0dde3b1a-564-30082 -quay.io/devtron/kubewatch:0dde3b1a-419-30285 -quay.io/devtron/lens:0dde3b1a-333-30090 +quay.io/devtron/kubelink:c49b4aa5-564-32098 +quay.io/devtron/kubewatch:c49b4aa5-419-32097 +quay.io/devtron/lens:c49b4aa5-333-32100 quay.io/devtron/migrator:v4.16.2 quay.io/devtron/nats-box quay.io/devtron/nats-server-config-reloader:0.6.2 quay.io/devtron/nats:2.9.3-alpine -quay.io/devtron/notifier:5e9c010b-372-30094 -quay.io/devtron/postgres:11.9 +quay.io/devtron/notifier:56798239-372-32072 quay.io/devtron/postgres_exporter:v0.10.1 quay.io/devtron/prometheus-nats-exporter:0.9.0 quay.io/devtron/minio:RELEASE.2021-02-14T04-01-33Z quay.io/devtron/clair:4.3.6 -quay.io/devtron/postgres:11.9.0-debian-10-r26 quay.io/devtron/postgres_exporter:v0.4.7 quay.io/devtron/minio-mc:RELEASE.2021-02-14T04-28-06Z quay.io/devtron/minideb:latest +quay.io/devtron/postgres:14.9 From 0ee7081c68aa63de32cd7a6dc66427bf0188f6a1 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:44:02 +0530 Subject: [PATCH 78/79] Update releasenotes.md --- releasenotes.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/releasenotes.md b/releasenotes.md index 2de45b1915..acd53820c9 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,3 +1,18 @@ +====CRITICAL UPGRADE NOTICE - POSTGRES 11 TO 14==== + +IMPORTANT: This upgrade requires planned downtime +Before proceeding with the upgrade to version 1.5.0, please: + +1. Review the [Upgrade Guide](https://docs.devtron.ai/upgrade/devtron-upgrade-1.5.0) for all prerequisites. + +2. Deploy the [Devtron-Backup Chart](https://docs.devtron.ai/install/devtron-backup). + +3. Verify at least one successful backup has been completed. + +WARNING: Your Devtron will be unavailable during the entire prerequisite process until successful completion. + +For questions or assistance, our team is available on [Discord](https://discord.devtron.ai/). + ## v1.5.0 ## Enhancements @@ -17,5 +32,3 @@ - misc: Update the descriptions of env variables (#6499) - misc: Patch api for user attribute (#6490) - chore: Nil implementations fixed for user attribute in telemetry (#6497) - - From 89fc19103d9575846629a69bfa39a72fc8707ba8 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:46:18 +0530 Subject: [PATCH 79/79] Update releasenotes.md --- releasenotes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releasenotes.md b/releasenotes.md index acd53820c9..c716ae1779 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,3 +1,4 @@ + ====CRITICAL UPGRADE NOTICE - POSTGRES 11 TO 14==== IMPORTANT: This upgrade requires planned downtime @@ -12,6 +13,7 @@ Before proceeding with the upgrade to version 1.5.0, please: WARNING: Your Devtron will be unavailable during the entire prerequisite process until successful completion. For questions or assistance, our team is available on [Discord](https://discord.devtron.ai/). + ## v1.5.0