diff --git a/RELEASE b/RELEASE index be27cdce84..622207fa6b 100644 --- a/RELEASE +++ b/RELEASE @@ -1,4 +1,4 @@ -tag: v0.48.2 +tag: v0.48.3 releaseNoteGenerator: showCommitter: false diff --git a/cmd/pipecd/ops.go b/cmd/pipecd/ops.go index f1066c6629..528dfbb998 100644 --- a/cmd/pipecd/ops.go +++ b/cmd/pipecd/ops.go @@ -35,7 +35,6 @@ import ( "github.com/pipe-cd/pipecd/pkg/app/ops/orphancommandcleaner" "github.com/pipe-cd/pipecd/pkg/app/ops/pipedstatsbuilder" "github.com/pipe-cd/pipecd/pkg/app/ops/planpreviewoutputcleaner" - "github.com/pipe-cd/pipecd/pkg/app/ops/platformprovidermigration" "github.com/pipe-cd/pipecd/pkg/app/ops/staledpipedstatcleaner" "github.com/pipe-cd/pipecd/pkg/cache/rediscache" "github.com/pipe-cd/pipecd/pkg/cli" @@ -148,15 +147,6 @@ func (s *ops) run(ctx context.Context, input cli.Input) error { } }() - // Start running CloudProvider to PlatformProvider migration task. - // TODO: Remove this task after a few releases. - { - runner := platformprovidermigration.NewRunner(ds, input.Logger) - group.Go(func() error { - return runner.Migrate(ctx) - }) - } - statCache := rediscache.NewHashCache(rd, defaultPipedStatHashKey) // Start running staled piped stat cleaner. { diff --git a/pkg/app/ops/platformprovidermigration/runner.go b/pkg/app/ops/platformprovidermigration/runner.go deleted file mode 100644 index 891eed70b1..0000000000 --- a/pkg/app/ops/platformprovidermigration/runner.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2024 The PipeCD Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package platformprovidermigration - -import ( - "context" - "fmt" - "time" - - "go.uber.org/zap" - - "github.com/pipe-cd/pipecd/pkg/datastore" - "github.com/pipe-cd/pipecd/pkg/model" -) - -const ( - migrationRunInterval = 30 * time.Minute -) - -type applicationStore interface { - List(ctx context.Context, opts datastore.ListOptions) ([]*model.Application, string, error) - UpdatePlatformProvider(ctx context.Context, id string, provider string) error -} - -type Runner struct { - applicationStore applicationStore - logger *zap.Logger -} - -func NewRunner(ds datastore.DataStore, logger *zap.Logger) *Runner { - w := datastore.OpsCommander - return &Runner{ - applicationStore: datastore.NewApplicationStore(ds, w), - logger: logger.Named("platform-provider-migrate-runner"), - } -} - -func (r *Runner) Migrate(ctx context.Context) error { - r.logger.Info("start running application migration task") - - // Run migration task once on start this ops migration. - cursor, err := r.migrate(ctx, "") - if err == nil { - r.logger.Info("application migration task finished successfully") - return nil - } - - r.logger.Error("unable to finish application platform provider migration task in first run", zap.Error(err)) - - taskRunTicker := time.NewTicker(migrationRunInterval) - defer taskRunTicker.Stop() - - for { - select { - case <-ctx.Done(): - return nil - case <-taskRunTicker.C: - cursor, err = r.migrate(ctx, cursor) - if err == nil { - r.logger.Info("application migration task finished successfully") - return nil - } - } - } -} - -// migrate runs the migration task to update all applications in the database. -// In case of error occurred, it returns error and a cursor string which contains -// the information so that next time we can pass that value to keep migrating from -// failed application, not from start. -func (r *Runner) migrate(ctx context.Context, cursor string) (string, error) { - const limit = 100 - - for { - apps, nextCur, err := r.applicationStore.List(ctx, datastore.ListOptions{ - Filters: []datastore.ListFilter{ - { - Field: "Deleted", - Operator: datastore.OperatorEqual, - Value: false, - }, - }, - Orders: []datastore.Order{ - { - Field: "CreatedAt", - Direction: datastore.Asc, - }, - { - Field: "Id", - Direction: datastore.Asc, - }, - }, - Limit: limit, - Cursor: cursor, - }) - if err != nil { - r.logger.Error("failed to fetch applications to run migrate task", zap.Error(err)) - return cursor, err - } - - if len(apps) == 0 { - return "", nil - } - - r.logger.Info(fmt.Sprintf("migrate platform provider value for %d application(s)", len(apps))) - - for _, app := range apps { - if app.PlatformProvider != "" { - continue - } - - //lint:ignore SA1019 app.CloudProvider is deprecated. - if err = r.applicationStore.UpdatePlatformProvider(ctx, app.Id, app.CloudProvider); err != nil { - r.logger.Error("failed to update application platform provider value", - zap.String("id", app.Id), - //lint:ignore SA1019 app.CloudProvider is deprecated. - zap.String("provider", app.CloudProvider), - zap.Error(err), - ) - return cursor, err - } - } - - cursor = nextCur - } -} diff --git a/pkg/app/piped/platformprovider/ecs/client.go b/pkg/app/piped/platformprovider/ecs/client.go index 178dca1f4b..6598b93af5 100644 --- a/pkg/app/piped/platformprovider/ecs/client.go +++ b/pkg/app/piped/platformprovider/ecs/client.go @@ -176,6 +176,7 @@ func (c *client) RegisterTaskDefinition(ctx context.Context, taskDefinition type NetworkMode: taskDefinition.NetworkMode, Volumes: taskDefinition.Volumes, RuntimePlatform: taskDefinition.RuntimePlatform, + EphemeralStorage: taskDefinition.EphemeralStorage, // Requires defined at task level in case Fargate is used. Cpu: taskDefinition.Cpu, Memory: taskDefinition.Memory, diff --git a/web/package.json b/web/package.json index 6751bb449e..a69b130344 100644 --- a/web/package.json +++ b/web/package.json @@ -60,20 +60,18 @@ "webpack-merge": "^5.7.3" }, "dependencies": { - "@date-io/dayjs": "^1.3.13", "@loadable/component": "^5.16.4", "@material-ui/core": "^4.12.4", "@material-ui/icons": "^4.11.3", "@material-ui/lab": "^4.0.0-alpha.56", - "@material-ui/pickers": "^3.2.10", "@primer/octicons-react": "^14.2.1", "@reduxjs/toolkit": "^1.9.7", "@types/dagre": "^0.7.52", - "@types/yup": "^0.29.11", - "clsx": "^1.1.1", + "@types/yup": "^0.29.14", + "clsx": "^1.2.1", "dagre": "^0.8.5", "dayjs": "^1.8.28", - "dotenv": "^8.2.0", + "dotenv": "^8.6.0", "echarts": "^5.5.1", "formik": "^2.2.9", "google-protobuf": "^3.15.6", @@ -84,7 +82,7 @@ "react": "^17.0.2", "react-cookie": "^4.0.3", "react-dom": "^17.0.2", - "react-draggable": "^4.4.3", + "react-draggable": "^4.4.6", "react-intersection-observer": "^8.26.2", "react-markdown": "^6.0.2", "react-redux": "^7.2.9", diff --git a/web/src/api/client.ts b/web/src/api/client.ts index 88cfe71a71..d8474b0a87 100644 --- a/web/src/api/client.ts +++ b/web/src/api/client.ts @@ -7,7 +7,7 @@ export const apiClient = new WebServiceClient(apiEndpoint, null, { }); interface ApiCallback { - (err: grpcWeb.Error, response: { toObject: () => Res }): void; + (err: grpcWeb.RpcError, response: { toObject: () => Res }): void; } export async function apiRequest( diff --git a/web/yarn.lock b/web/yarn.lock index cf26208284..3ca2195f8b 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -568,14 +568,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.12.13": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" - integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/runtime@^7.12.18": +"@babel/runtime@^7.12.13", "@babel/runtime@^7.12.18": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== @@ -603,13 +596,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.6.0": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" @@ -710,18 +696,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@date-io/core@1.x", "@date-io/core@^1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@date-io/core/-/core-1.3.13.tgz#90c71da493f20204b7a972929cc5c482d078b3fa" - integrity sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA== - -"@date-io/dayjs@^1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@date-io/dayjs/-/dayjs-1.3.13.tgz#3a9edf5a7227b31b0f00a4f640f8715626833a61" - integrity sha512-nD39xWYwQjDMIdpUzHIcADHxY9m1hm1DpOaRn3bc2rBdgmwQC0PfW0WYaHyGGP/6LEzEguINRbHuotMhf+T9Sg== - dependencies: - "@date-io/core" "^1.3.13" - "@discoveryjs/json-ext@^0.5.0": version "0.5.2" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" @@ -1105,18 +1079,6 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@material-ui/pickers@^3.2.10": - version "3.2.10" - resolved "https://registry.yarnpkg.com/@material-ui/pickers/-/pickers-3.2.10.tgz#19df024895876eb0ec7cd239bbaea595f703f0ae" - integrity sha512-B8G6Obn5S3RCl7hwahkQj9sKUapwXWFjiaz/Bsw1fhYFdNMnDUolRiWQSoKPb1/oKe37Dtfszoywi1Ynbo3y8w== - dependencies: - "@babel/runtime" "^7.6.0" - "@date-io/core" "1.x" - "@types/styled-jsx" "^2.2.8" - clsx "^1.0.2" - react-transition-group "^4.0.0" - rifm "^0.7.0" - "@material-ui/styles@^4.11.5": version "4.11.5" resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.11.5.tgz#19f84457df3aafd956ac863dbe156b1d88e2bbfb" @@ -1710,13 +1672,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/styled-jsx@^2.2.8": - version "2.2.8" - resolved "https://registry.yarnpkg.com/@types/styled-jsx/-/styled-jsx-2.2.8.tgz#b50d13d8a3c34036282d65194554cf186bab7234" - integrity sha512-Yjye9VwMdYeXfS71ihueWRSxrruuXTwKCbzue4+5b2rjnQ//AtyM7myZ1BEhNhBQ/nL/RE7bdToUoLln2miKvg== - dependencies: - "@types/react" "*" - "@types/testing-library__jest-dom@^5.9.1": version "5.13.0" resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.13.0.tgz#b6bd9b57f88c87766eed43a4f0ec91c2b621576e" @@ -1767,10 +1722,10 @@ dependencies: "@types/yargs-parser" "*" -"@types/yup@^0.29.11": - version "0.29.11" - resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.29.11.tgz#d654a112973f5e004bf8438122bd7e56a8e5cd7e" - integrity sha512-9cwk3c87qQKZrT251EDoibiYRILjCmxBvvcb4meofCmx1vdnNcR9gyildy5vOHASpOKMsn42CugxUvcwK5eu1g== +"@types/yup@^0.29.14": + version "0.29.14" + resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.29.14.tgz#754f1dccedcc66fc2bbe290c27f5323b407ceb00" + integrity sha512-Ynb/CjHhE/Xp/4bhHmQC4U1Ox+I2OpfRYF3dnNgQqn1cHa6LK3H1wJMNPT02tSVZA6FYuXE2ITORfbnb6zBCSA== "@types/zrender@*": version "4.0.0" @@ -2562,11 +2517,6 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.1.tgz#2fd46d9906a126965aa541345c499aaa18e8cd73" integrity sha512-jVamGdJPDeuQilKhvVn1h3knuMOZzr8QDnpk+M9aMlCaMkTDd6fBWPhiDqFvFZ07pL0liqabAiuy8SY4jGHeaw== -classnames@^2.2.5: - version "2.2.6" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" - integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== - clean-css@^5.2.2: version "5.3.1" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.1.tgz#d0610b0b90d125196a2894d35366f734e5d7aa32" @@ -2601,11 +2551,16 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clsx@^1.0.2, clsx@^1.0.4, clsx@^1.1.1: +clsx@^1.0.4, clsx@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== +clsx@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -3086,10 +3041,10 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dotenv@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== +dotenv@^8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== echarts@^5.5.1: version "5.5.1" @@ -5801,7 +5756,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.4" -prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -5810,6 +5765,15 @@ prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + property-expr@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.4.tgz#37b925478e58965031bb612ec5b3260f8241e910" @@ -5907,13 +5871,13 @@ react-dom@^17.0.2: object-assign "^4.1.1" scheduler "^0.20.2" -react-draggable@^4.4.3: - version "4.4.3" - resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.3.tgz#0727f2cae5813e36b0e4962bf11b2f9ef2b406f3" - integrity sha512-jV4TE59MBuWm7gb6Ns3Q1mxX8Azffb7oTtDtBgFkxRvhDp38YAARmRplrj0+XGkhOJB5XziArX+4HUUABtyZ0w== +react-draggable@^4.4.6: + version "4.4.6" + resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.6.tgz#63343ee945770881ca1256a5b6fa5c9f5983fe1e" + integrity sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw== dependencies: - classnames "^2.2.5" - prop-types "^15.6.0" + clsx "^1.1.1" + prop-types "^15.8.1" react-error-boundary@^3.1.0: version "3.1.3" @@ -5934,7 +5898,7 @@ react-intersection-observer@^8.26.2: dependencies: tiny-invariant "^1.1.0" -react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.0, react-is@^16.8.1: +react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.0, react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -6037,7 +6001,7 @@ react-test-renderer@^17.0.2: react-shallow-renderer "^16.13.1" scheduler "^0.20.2" -react-transition-group@^4.0.0, react-transition-group@^4.4.0: +react-transition-group@^4.4.0: version "4.4.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== @@ -6281,13 +6245,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rifm@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rifm/-/rifm-0.7.0.tgz#debe951a9c83549ca6b33e5919f716044c2230be" - integrity sha512-DSOJTWHD67860I5ojetXdEQRIBvF6YcpNe53j0vn1vp9EUb9N80EiZTxgP+FkDKorWC8PZw052kTF4C1GOivCQ== - dependencies: - "@babel/runtime" "^7.3.1" - rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"