Skip to content

feat: Release candidate v0.44.0#3023

Merged
arunjaindev merged 486 commits intomainfrom
release-candidate-v0.44.0
Dec 18, 2025
Merged

feat: Release candidate v0.44.0#3023
arunjaindev merged 486 commits intomainfrom
release-candidate-v0.44.0

Conversation

@arunjaindev
Copy link
Contributor

@arunjaindev arunjaindev commented Dec 18, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2743

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

shivani170 and others added 30 commits September 25, 2025 12:12
feat: action menu replacement with Action Menu component
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Abhishek <abhishek@devtron.ai>
Co-authored-by: Abhishek <abhishek@devtron.ai>
…abs/dashboard into feat/deployment-metrics-charts
…icsEnabled and toggleAppMetrics for better state management
…arts

feat: replace recharts with Chart component in deployment metrics
arunjaindev and others added 19 commits December 12, 2025 17:57
…s for better readability and maintainability
…, and add gap class to EnvironmentStatusComponent
feat: add app, infra and security overview from fe-lib
feat: Dynamic doc link added in help button
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions github-actions bot added the PR:Issue-verification-failed PR:Issue-verification-failed label Dec 18, 2025
@sonarqubecloud
Copy link

required: RemoteConnectionRadio && remoteConnectionMethod === RemoteConnectionType.Proxy,
validator: {
error: 'Please provide a valid URL. URL must start with http:// or https://',
regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with 'http://-.' and containing many repetitions of '-.'.

Copilot Autofix

AI about 2 months ago

General fix:
To resolve the ambiguity and prevent catastrophic backtracking, the ambiguous sub-patterns must be rewritten. This is typically done by ensuring that within a repeated group, no part can match the same string in multiple ways. In this case, [\w.-]+ should be rewritten to make . and - unambiguous, typically by not allowing them to be adjacent to each other in a way that would create ambiguity, or by splitting host/domain validation into stricter components.

Best detailed fix:
Rewrite the pattern to avoid [.-] inside a repetition over the group. In the context of validating a URL, it's better to switch to a stricter hostname/domain matching pattern. For common domain validation, one can use:

  • Each label: [a-zA-Z0-9-]+ (cannot start/end with -)
  • Separated by ., at least one .
    But for quick practical repairs (avoiding extensive rewriting), replace [\w.-]+ with [\w-]+(?:\.[\w-]+)* which means "one or more word/dash, optionally repeated, separated by "."". This approach avoids the ambiguity.
    The overall regex could become:
/^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/

Alternatively, if strict URL validation is needed, consider using a trusted library (e.g. validator.js) instead of custom regex, but as per the prompt, only touch what we've been shown.

Where to change:
In file src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx, at line 62, change the regular expression to use [\w-]+(?:\.[\w-]+)+.

What's needed:

  • Only code edit — no new imports or methods necessary.
Suggested changeset 1
src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx b/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
--- a/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
+++ b/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
@@ -59,7 +59,7 @@
         required: RemoteConnectionRadio && remoteConnectionMethod === RemoteConnectionType.Proxy,
         validator: {
             error: 'Please provide a valid URL. URL must start with http:// or https://',
-            regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
+            regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
         },
     },
     sshUsername: {
EOF
@@ -59,7 +59,7 @@
required: RemoteConnectionRadio && remoteConnectionMethod === RemoteConnectionType.Proxy,
validator: {
error: 'Please provide a valid URL. URL must start with http:// or https://',
regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
},
},
sshUsername: {
Copilot is powered by AI and may make mistakes. Always verify output.
remoteConnectionMethod === RemoteConnectionType.SSHTunnel
? {
error: 'Please provide a valid URL. URL must start with http:// or https://',
regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with 'http://-.' and containing many repetitions of '-.'.

Copilot Autofix

AI about 2 months ago

To fix this problem, we need to remove ambiguity from the repeated subexpression by ensuring that each repetition can't match the same string via different paths. Specifically, [\w.-]+ can be ambiguous since . and - can be matched by more than one iteration. Instead, for validating domain names, a safer approach is to split alternation so that periods are treated as separators, not as possible characters within the repeated part, or to use a more specific character class such as [\w-] (excluding period) for matching domain labels, and use (?:\.[\w-]+)+ for subsequent parts.

The best way to fix this, focusing only on the snippet shown, is to change [\w.-]+(?:\.[\w.-]+)+ to [\w-]+(?:\.[\w-]+)+. This ensures:

  • Each domain label is [\w-]+
  • Labels are separated by a literal dot
  • No ambiguity between dot and other characters inside the repeated group.

Apply this change on line 94 and also on line 62, since both use the same pattern. No external dependencies or additional imports are required as this is a pure regex fix.


Suggested changeset 1
src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx b/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
--- a/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
+++ b/src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/utils.tsx
@@ -59,7 +59,7 @@
         required: RemoteConnectionRadio && remoteConnectionMethod === RemoteConnectionType.Proxy,
         validator: {
             error: 'Please provide a valid URL. URL must start with http:// or https://',
-            regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
+            regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
         },
     },
     sshUsername: {
@@ -91,7 +91,7 @@
             remoteConnectionMethod === RemoteConnectionType.SSHTunnel
                 ? {
                       error: 'Please provide a valid URL. URL must start with http:// or https://',
-                      regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
+                      regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
                   }
                 : { error: '', regex: /^(?!\s*$).+/ },
     },
EOF
@@ -59,7 +59,7 @@
required: RemoteConnectionRadio && remoteConnectionMethod === RemoteConnectionType.Proxy,
validator: {
error: 'Please provide a valid URL. URL must start with http:// or https://',
regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
},
},
sshUsername: {
@@ -91,7 +91,7 @@
remoteConnectionMethod === RemoteConnectionType.SSHTunnel
? {
error: 'Please provide a valid URL. URL must start with http:// or https://',
regex: /^(http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
regex: /^(http(s)?:\/\/)[\w-]+(?:\.[\w-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/,
}
: { error: '', regex: /^(?!\s*$).+/ },
},
Copilot is powered by AI and may make mistakes. Always verify output.
@github-actions github-actions bot added PR:Ready-to-Review PR:Ready-to-Review and removed PR:Issue-verification-failed PR:Issue-verification-failed labels Dec 18, 2025
@arunjaindev arunjaindev merged commit 300805e into main Dec 18, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Ready-to-Review PR:Ready-to-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants