diff --git a/renovate-presets/README.md b/renovate-presets/README.md new file mode 100644 index 0000000000000..7427c9b9d8190 --- /dev/null +++ b/renovate-presets/README.md @@ -0,0 +1,64 @@ +# Renovate shared presets + +This folder contains shared presets. +It also improve separation of concerns between packageRules in a single file quickly become hard to maintain. + +# How to use a preset + +1. Add the preset to your renovate.json file: + +```json +{ + //json + "extends": [ + "github>argoproj/argo-cd//renovate-presets:argoproj" +] +} +``` + +### Note : + +It would make sense to move this folder to a new repository in the future. + +Benefits: +- Improved feedback loop for configuration changes, no need to wait for a PR to be merged into master. +- Avoid polluting git history. +- Avoids consuming the repository's CI/CD resources. +- The `renovate.json` in each repository can be simplified to only include a single presets : + ```json + { + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>argoproj/renovate-presets//argoproj/renovate.json5" + ], + // rules are empty and this file won't need to be modified again. + "packageRules": [] + } + ``` +Inconvenient: +- Owners of a repository can impact the configuration of all repositories. Use codeowners to prevent this. + +Example of repo structure : +```shell +. +├── README.md +├── .github/CODEOWNERS +├── common.json5 # common presets for all repositories +├── fix/ +│ └── openssf-merge-confidence-columns.json5 +├── custom-managers/ +│ ├── bash.json5 +│ └── yaml.json5 +└── argoproj/ # organization + ├── argo-cd/ # repository + ├── devtools.json5 # rules specific to the devtool (CI and dev environment...) + ├── doc.json5 # rules specific to the doc written with mkdoc. + ├── # etc... + └── renovate.json5 # A single preset referenced from the repository argopro/argo-cd. + ├── argo-rollouts/ # repository + │ ── renovate.json5 + + + + +``` diff --git a/renovate-presets/commons.json5 b/renovate-presets/commons.json5 new file mode 100644 index 0000000000000..f6676a1d28540 --- /dev/null +++ b/renovate-presets/commons.json5 @@ -0,0 +1,74 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Contains rules that makes sense to enforce by default.", + "dependencyDashboard": true, + "dependencyDashboardOSVVulnerabilitySummary": "all", + "osvVulnerabilityAlerts": true, + "vulnerabilityAlerts": { + "description": "Settings specific to PRs of type security", + "addLabels": ["security"] + }, + "extends": [ + "config:best-practices", + ":gitSignOff", + ":labels(dependencies)", + "customManagers:dockerfileVersions", + "security:openssf-scorecard", + "mergeConfidence:all-badges", + "github>argoproj/argo-cd//renovate-presets/fix/openssf-merge-confidence-columns.json5", + ], + "packageRules": [ + { + "description": "Define the label to make Renovate stop updating a PR.", + "stopUpdatingLabel": "renovate:stop-updating" + }, + { + "description": "Define the label to make Renovate rebase a PR.", + "rebaseLabel": "renovate:do-rebase" + }, + { + "description": "Define labels of the dependency dashboard issues.", + "dependencyDashboardLabels": [ + "dependencies", + ] + }, + { + "description": "Add label major to PRs with major updates", + "matchUpdateTypes": [ + "major" + ], + "addLabels": [ + "major" + ] + }, + { + "description": "Add labels for PRs related to javascript", + "matchDatasources": [ + "node-version", + "npm" + ], + "addLabels": [ + "javascript" + ] + }, + { + "description": "Add labels for PRs related to go", + "matchDatasources": [ + "golang-version", + "go" + ], + "addLabels": [ + "go" + ] + }, + { + "description": "Add labels for PRs related to python", + "matchCategories": [ + "python" + ], + "addLabels": [ + "python" + ] + } + ] +} \ No newline at end of file diff --git a/renovate-presets/custom-managers/yaml.json5 b/renovate-presets/custom-managers/yaml.json5 index 70cc6629ef756..8729f611c8ea7 100644 --- a/renovate-presets/custom-managers/yaml.json5 +++ b/renovate-presets/custom-managers/yaml.json5 @@ -2,7 +2,7 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "customManagers": [ { - "description": "A generic custom manager for updating any yaml fields ending by *version: case incensitive", + "description": "A generic custom manager for updating any yaml fields ending by 'version:' (case insensitive)", "customType": "regex", "fileMatch": [ ".github\\/workflows.+\\.(?:yml|yaml)$" diff --git a/renovate-presets/devtool.json5 b/renovate-presets/devtool.json5 new file mode 100644 index 0000000000000..96ad51d3808e6 --- /dev/null +++ b/renovate-presets/devtool.json5 @@ -0,0 +1,72 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Rules specific to the devtool (CI, dev environment...)", + "packageRules": [ + { + "description": "Enable updates from specified datasources", + "matchDatasources": [ + "node-version", + "golang-version" + ], + "enabled": true + }, + { + "description": "Enable updates from specified go modules", + "matchDatasources": [ + "go" + ], + "matchPackageNames": [ + "github.com/golangci/golangci-lint" + ], + "enabled": true + }, + { + "description": "Enable updates from specified docker images", + "matchDatasources": [ + "docker" + ], + "matchPackageNames": [ + "docker.io/library/node", + "docker.io/library/golang" + ], + "enabled": true + }, + { + "description": "Group golang-version packages", + "groupName": "group golang", + "matchDatasources": [ + "docker", + "golang-version" + ], + "matchPackageNames": [ + "/(?:^|/)golang$/" + ] + }, + { + "description": "Group node-version packages", + "groupName": "group node", + "matchDatasources": [ + "docker", + "node-version" + ], + "matchPackageNames": [ + "/(?:^|/)node$/", + "!calico/node", + "!docker.io/calico/node", + "!kindest/node" + ] + }, + { + "description": "Example to reduce noise with the automerge features.", + "matchDatasources": [ + "golang-version" + ], + "matchUpdateTypes": [ + "patch", + "pin", + "digest" + ], + "automerge": false + } + ] +} \ No newline at end of file diff --git a/renovate-presets/docs.json5 b/renovate-presets/docs.json5 new file mode 100644 index 0000000000000..0eb67107f7308 --- /dev/null +++ b/renovate-presets/docs.json5 @@ -0,0 +1,21 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Rules specific to the docs directory", + "packageRules": [ + { + "description": "Group all dependencies from the docs directory", + "matchFileNames": ["docs/**"], + "matchCategories": [ + "python" + ], + "excludePackageNames": [ + "mkdocs-material" + ], + "groupName": "Docs dependencies", + "enabled": true + } + ] +} + + + diff --git a/renovate-presets/fix/disable-all-updates.json5 b/renovate-presets/fix/disable-all-updates.json5 new file mode 100644 index 0000000000000..5db24b27f02a9 --- /dev/null +++ b/renovate-presets/fix/disable-all-updates.json5 @@ -0,0 +1,13 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Disable all updates to avoid conflicts with dependabot, then enable what you need.", + "packageRules": [ + { + "matchPackageNames": [ + "*" + ], + "enabled": false + } + ] +} + diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 228b3d77f4616..0000000000000 --- a/renovate.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "dependencyDashboard": true, - "dependencyDashboardOSVVulnerabilitySummary": "all", - "osvVulnerabilityAlerts": true, - "reviewersFromCodeOwners": true, - "extends": [ - "config:best-practices", - "customManagers:dockerfileVersions", - "security:openssf-scorecard", - "mergeConfidence:all-badges", - "github>argoproj/argo-cd//renovate-presets/fix/openssf-merge-confidence-columns.json5", - "github>argoproj/argo-cd//renovate-presets/custom-managers/shell.json5", - "github>argoproj/argo-cd//renovate-presets/custom-managers/yaml.json5" - ], - "packageRules": [ - { - "description": "Disable all updates to avoid conflicts with dependabot, then enable what we want", - "matchPackageNames": [ - "*" - ], - "enabled": false - }, - { - "description": "Add label dependencies to all PRs", - "matchPackageNames": [ - "*" - ], - "labels": [ - "dependencies" - ] - }, - { - "description": "Enable node-version", - "matchDatasources": [ - "node-version" - ], - "addLabels": [ - "javascript" - ], - "enabled": true - }, - { - "description": "Enable golang-version", - "matchDatasources": [ - "golang-version" - ], - "addLabels": [ - "go" - ], - "enabled": true - }, - { - "description": "Enable some go modules", - "matchDatasources": [ - "go" - ], - "matchPackageNames": [ - "go", - "github.com/golangci/golangci-lint" - ], - "addLabels": [ - "go" - ], - "enabled": true - }, - { - "description": "Enable bump of golang version in go.mod", - "matchDatasources": [ - "golang-version" - ], - "rangeStrategy": "bump" - }, - { - "description": "Enable some docker images", - "matchDatasources": [ - "docker" - ], - "matchPackageNames": [ - "docker.io/library/node", - "docker.io/library/golang" - ], - "enabled": true - }, - { - "description": "Group golang-version packages", - "groupName": "golang version", - "matchDepNames": [ - "go", - "golang", - "docker.io/golang", - "docker.io/library/golang" - ] - }, - { - "description": "Group node-version packages", - "groupName": "node version", - "matchDepNames": [ - "node", - "docker.io/library/node" - ] - }, - { - "description": "an example to reduce noise by automerging pkgs that are safe to merge, multiple match fields can be used to reduce the scope of this rule...)", - "matchUpdateTypes": [ - "patch", - "pin", - "digest" - ], - "automerge": false - } - ] -} diff --git a/renovate.json5 b/renovate.json5 new file mode 100644 index 0000000000000..b7b2a7e094db2 --- /dev/null +++ b/renovate.json5 @@ -0,0 +1,12 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "prHourlyLimit": 50, + "extends": [ + "github>ggjulio/argo-cd//renovate-presets/commons.json5", + "github>argoproj/argo-cd//renovate-presets/custom-managers/shell.json5", + "github>argoproj/argo-cd//renovate-presets/custom-managers/yaml.json5", + //"github>ggjulio/argo-cd//renovate-presets/fix/disable-all-updates.json5", + "github>ggjulio/argo-cd//renovate-presets/devtool.json5", + "github>ggjulio/argo-cd//renovate-presets/docs.json5" + ] +} diff --git a/ui-test/Dockerfile b/ui-test/Dockerfile index edbd2becbdf00..8b5044f67d7c8 100644 --- a/ui-test/Dockerfile +++ b/ui-test/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:22.9.0@sha256:69e667a79aa41ec0db50bc452a60e705ca16f35285eaf037ebe627a65a5cdf52 as node +FROM docker.io/library/node:22.8.0@sha256:cbe2d5f94110cea9817dd8c5809d05df49b4bd1aac5203f3594d88665ad37988 as node RUN apt-get update && apt-get install --no-install-recommends -y \ software-properties-common diff --git a/ui/.nvmrc b/ui/.nvmrc index a8d3ff91fa10d..aa297307e2db7 100644 --- a/ui/.nvmrc +++ b/ui/.nvmrc @@ -1 +1 @@ -v21.6.1 +v22.8.0 diff --git a/ui/package.json b/ui/package.json index e5b5b0a874a47..e53eabb1b0a3f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -38,7 +38,7 @@ "react-autocomplete": "^1.8.1", "react-diff-view": "^2.4.10", "react-dom": "^16.9.3", - "react-form": "2.16.3", + "react-form": "4.0.1", "react-ga": "^2.7.0", "react-helmet": "^6.1.0", "react-hot-loader": "^3.1.3", @@ -85,7 +85,7 @@ "@types/react": "^16.8.5", "@types/react-autocomplete": "^1.8.10", "@types/react-dom": "^16.9.14", - "@types/react-form": "^2.16.0", + "@types/react-form": "^4.0.0", "@types/react-helmet": "^6.1.6", "@types/react-paginate": "^7.1.4", "@types/react-router": "^4.0.27", diff --git a/ui/yarn.lock b/ui/yarn.lock index e2a305a5c9132..352b594ae03bd 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -2246,10 +2246,10 @@ dependencies: "@types/react" "^16" -"@types/react-form@^2.16.0": - version "2.16.2" - resolved "https://registry.yarnpkg.com/@types/react-form/-/react-form-2.16.2.tgz#f8f5df0b0f27a1dcca62fe35e32ad42e8a71d273" - integrity sha512-hXWSs5M3OdTbgQHk8q5X1/VhttJz/VgOt3B9ZDj5z8mPv9eaaI5O/h/DUmE8EaGSGoZ1pluDPbhqo0sTmTjRew== +"@types/react-form@^4.0.0": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/react-form/-/react-form-4.0.6.tgz#2b31a177085d2fb893f85357bba41d7e5ddbe973" + integrity sha512-gbwxd3fx1O8kuZfgWiQoU4J/gJS4HBJjyH0q4b33TOWBBR06jzVfLFYIHOQq2G5V6k0y0Rv+TzlWuNW/7j3S3w== dependencies: "@types/react" "*" @@ -8484,7 +8484,12 @@ react-fast-compare@^3.1.1: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== -react-form@2.16.3, react-form@^2.16.0: +react-form@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/react-form/-/react-form-4.0.1.tgz#f442adae7142261a6650a63001c49827e4317ca5" + integrity sha512-vhsCuBLZJYjm6vd8TBxIhIWeB/8Jg4mmmiR3Zj+1zIGBM39qJf1CLqekadLp0J9NeW0EsZxUnBtbmEnMeZ/7Pw== + +react-form@^2.16.0: version "2.16.3" resolved "https://registry.yarnpkg.com/react-form/-/react-form-2.16.3.tgz#c45a575483696ea3f99cf271984fcabcf470f1b2" integrity sha512-Pp0XFvEUkIWUImEsyi8DQ7j3Ls6h8J7BCXPwIzBOv5ZgOynLFwJX+/gYqQRNtSZbjPP4+3FVA4zW3Qktq7H+lw==