Skip to content

Feature: Api to make deployment template override for env of Devtron application #5091

Open
@ajaydevtron

Description

@ajaydevtron

🔖 Feature description

We need to update the chart version of application from 3.7 to 4.18 and used the below api .

curl -sX PATCH 'https://cd.devtron.com/orchestrator/app/env/patch' \
  -H 'token: xxxxx' \
  --data-raw "{\"envId\":env_id,\"targetChartRefId\":36,\"appId\":app_id}"

But this api only update the chart version if env have overridden otherwise it through below error .

{"level":"error","ts":1715257109.8727689,"caller":"configure/DeploymentPipelineRestHandler.go:546","msg":"env properties not found, ChangeChartRef","err":null,"payload":{"appId":4136,"envId":41,"targetChartRefId":36},"stacktrace":"github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure.(*PipelineConfigRestHandlerImpl).ChangeChartRef\n\t/go/src/github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go:546\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux.traceware.ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux/mux.go:179\ngithub.com/devtron-labs/common-lib/middlewares.Recovery.func1\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/common-lib/middlewares/recovery.go:26\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-labs/devtron/internal/middleware.PrometheusMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/internal/middleware/instrument.go:132\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-labs/devtron/api/util.LoggingMiddlewareImpl.LoggingMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/api/util/logger.go:68\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/gorilla/mux/mux.go:210\ngithub.com/devtron-labs/authenticator/middleware.Authorizer.func1.1\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/authenticator/middleware/AuthMiddleware.go:92\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2936\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1995"}
So due to this we need a put api by which we can allow override using app id and env id and then we can hit the env patch api to update the chart version .

🎤 Pitch / Usecases

NA

🔄️ Alternative

NA

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

AB#9772

Metadata

Metadata

Labels

ICA-AUG24Issue Cleanup Activity Aug 2024enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions