From 6c3bd78fb0c28fd9be5dd7ac330ac68cce38bfde Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:44:09 +0000 Subject: [PATCH 01/12] Initial plan From b50abacdbf8a861e40da5334632df7e716747eb8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:51:09 +0000 Subject: [PATCH 02/12] Fix: Use LastDeployed instead of FirstDeployed for revision timestamps - Changed pkg/cli/helm/cluster.go line 598 to use LastDeployed instead of FirstDeployed - Updated Test_Helm_GetRadiusRevisions_Success to use different timestamps for different revisions - Added comprehensive test Test_Helm_GetRadiusRevisions_MultipleUpgradesWithDifferentTimestamps - All tests pass successfully Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com> --- pkg/cli/helm/cluster.go | 4 +- pkg/cli/helm/cluster_test.go | 92 +++++++++++++++++++++++++++++++++++- 2 files changed, 93 insertions(+), 3 deletions(-) diff --git a/pkg/cli/helm/cluster.go b/pkg/cli/helm/cluster.go index fa175fcb3b..74910f65b5 100644 --- a/pkg/cli/helm/cluster.go +++ b/pkg/cli/helm/cluster.go @@ -594,8 +594,8 @@ func (i *Impl) GetRadiusRevisions(ctx context.Context, kubeContext string) ([]Re Description: release.Info.Description, } - if !release.Info.FirstDeployed.IsZero() { - info.UpdatedAt = release.Info.FirstDeployed.Format("2006-01-02 15:04:05") + if !release.Info.LastDeployed.IsZero() { + info.UpdatedAt = release.Info.LastDeployed.Format("2006-01-02 15:04:05") } if release.Chart != nil && release.Chart.Metadata != nil { diff --git a/pkg/cli/helm/cluster_test.go b/pkg/cli/helm/cluster_test.go index cb9c0b224e..a17fae6353 100644 --- a/pkg/cli/helm/cluster_test.go +++ b/pkg/cli/helm/cluster_test.go @@ -496,6 +496,7 @@ func Test_Helm_GetRadiusRevisions_Success(t *testing.T) { Info: &release.Info{ Status: release.StatusSuperseded, FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 12, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 12, 0, 0, 0, time.UTC)}, Description: "Install complete", }, }, @@ -505,6 +506,7 @@ func Test_Helm_GetRadiusRevisions_Success(t *testing.T) { Info: &release.Info{ Status: release.StatusDeployed, FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 12, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 2, 14, 30, 0, 0, time.UTC)}, Description: "Upgrade complete", }, }, @@ -524,12 +526,13 @@ func Test_Helm_GetRadiusRevisions_Success(t *testing.T) { require.Equal(t, "0.46.0", revisions[0].ChartVersion) require.Equal(t, "deployed", revisions[0].Status) require.Equal(t, "Upgrade complete", revisions[0].Description) - require.Equal(t, "2023-01-01 12:00:00", revisions[0].UpdatedAt) + require.Equal(t, "2023-01-02 14:30:00", revisions[0].UpdatedAt) require.Equal(t, 1, revisions[1].Revision) require.Equal(t, "0.45.0", revisions[1].ChartVersion) require.Equal(t, "superseded", revisions[1].Status) require.Equal(t, "Install complete", revisions[1].Description) + require.Equal(t, "2023-01-01 12:00:00", revisions[1].UpdatedAt) } func Test_Helm_GetRadiusRevisions_NoRevisions(t *testing.T) { @@ -573,6 +576,93 @@ func Test_Helm_GetRadiusRevisions_HistoryError(t *testing.T) { require.Contains(t, err.Error(), "failed to get release history") } +func Test_Helm_GetRadiusRevisions_MultipleUpgradesWithDifferentTimestamps(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockHelmClient := NewMockHelmClient(ctrl) + impl := &Impl{Helm: mockHelmClient} + ctx := context.Background() + kubeContext := "test-context" + + // Mock history simulating multiple upgrades and rollbacks across different days + // This test validates that each revision shows its own LastDeployed timestamp, + // not the FirstDeployed timestamp which would be the same for all revisions + history := []*release.Release{ + { + Version: 1, + Chart: &chart.Chart{Metadata: &chart.Metadata{Version: "0.45.0"}}, + Info: &release.Info{ + Status: release.StatusSuperseded, + FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC)}, + Description: "Install complete", + }, + }, + { + Version: 2, + Chart: &chart.Chart{Metadata: &chart.Metadata{Version: "0.46.0"}}, + Info: &release.Info{ + Status: release.StatusSuperseded, + FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 2, 15, 30, 0, 0, time.UTC)}, + Description: "Upgrade complete", + }, + }, + { + Version: 3, + Chart: &chart.Chart{Metadata: &chart.Metadata{Version: "0.45.0"}}, + Info: &release.Info{ + Status: release.StatusSuperseded, + FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 3, 9, 15, 0, 0, time.UTC)}, + Description: "Rollback to 1", + }, + }, + { + Version: 4, + Chart: &chart.Chart{Metadata: &chart.Metadata{Version: "0.47.0"}}, + Info: &release.Info{ + Status: release.StatusDeployed, + FirstDeployed: helmtime.Time{Time: time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC)}, + LastDeployed: helmtime.Time{Time: time.Date(2023, 1, 4, 11, 45, 0, 0, time.UTC)}, + Description: "Upgrade complete", + }, + }, + } + + mockHelmClient.EXPECT(). + RunHelmHistory(gomock.AssignableToTypeOf(&helm.Configuration{}), "radius"). + Return(history, nil). + Times(1) + + revisions, err := impl.GetRadiusRevisions(ctx, kubeContext) + require.NoError(t, err) + require.Len(t, revisions, 4) + + // Verify that each revision has its own unique LastDeployed timestamp + // (not the same FirstDeployed timestamp for all) + require.Equal(t, 4, revisions[0].Revision) + require.Equal(t, "0.47.0", revisions[0].ChartVersion) + require.Equal(t, "deployed", revisions[0].Status) + require.Equal(t, "2023-01-04 11:45:00", revisions[0].UpdatedAt) + + require.Equal(t, 3, revisions[1].Revision) + require.Equal(t, "0.45.0", revisions[1].ChartVersion) + require.Equal(t, "superseded", revisions[1].Status) + require.Equal(t, "2023-01-03 09:15:00", revisions[1].UpdatedAt) + + require.Equal(t, 2, revisions[2].Revision) + require.Equal(t, "0.46.0", revisions[2].ChartVersion) + require.Equal(t, "superseded", revisions[2].Status) + require.Equal(t, "2023-01-02 15:30:00", revisions[2].UpdatedAt) + + require.Equal(t, 1, revisions[3].Revision) + require.Equal(t, "0.45.0", revisions[3].ChartVersion) + require.Equal(t, "superseded", revisions[3].Status) + require.Equal(t, "2023-01-01 10:00:00", revisions[3].UpdatedAt) +} + func Test_Helm_CheckRadiusInstall_UsesAppVersion(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() From 07a8f11b72c420576773eb1ef53a674ba0a61d3e Mon Sep 17 00:00:00 2001 From: aeroNJneer Date: Tue, 10 Feb 2026 20:56:54 -0800 Subject: [PATCH 03/12] new agent to investigate issues --- .github/agents/issue-investigator.agent.md | 141 +++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 .github/agents/issue-investigator.agent.md diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md new file mode 100644 index 0000000000..4c29d39f0a --- /dev/null +++ b/.github/agents/issue-investigator.agent.md @@ -0,0 +1,141 @@ +--- +name: issue-investigator +description: Review and analyze an issues and provide focused and detailed technical context to help developers understand, evaluate, and create a plan to resolve the issue efficiently. +tools: ["read", "search", "edit", "web", "shell"] +--- + +# Dynamic inputs provided when invoking the agent. +inputs: + - name: issue + type: integer + required: true + description: Numeric GitHub issue number (e.g. 345) + +You are a technical investigation agent for the Radius Project. Your role is to analyze the specified issues and provide in-depth technical context to help developers understand and resolve them efficiently. + +The audience for the results of your investigation is an experienced Radius developer, so you do not need to provide a an overview of Radius, its functionality, or architecture. + +Focus on the specified issue and bring together only that information that will help the agent or develop assigned the issue understand the issue quickly. + +For each issue, perform the following technical investigation: + +## 1. Code Exploration and Problem Localization +- Identify the functionality or feature area described in the issue +- Search the codebase for: + - Functions, classes, or modules likely involved + - Entry points where the issue might manifest + - Data flow paths that could be affected +- List potential problem locations with brief explanations: + +## 2. Reference Material Gathering +Find and document relevant resources: +- **Code references:** + - Related functions and their locations + - Similar implementations elsewhere in the codebase + - Test files that cover this functionality +- **Documentation:** + - API documentation for the affected endpoints + - Architecture decisions records (ADRs) related to this area + - README sections or wiki pages + - Related issues or pull requests (both open and closed) +- **External resources:** + - Dependencies that might be involved + - Discussions about similar problems and known issues + - Official documentation for frameworks/libraries used + +## 3. Behavior Analysis +Document the discrepancy between expected and actual behavior: +- **Expected behavior:** + - What should happen according to documentation + - What the user reasonably expects + - What the tests indicate should occur +- **Current behavior:** + - What actually happens + - Error messages or unexpected outputs + - Side effects observed +- **Behavior delta:** + - Specific differences + - Conditions under which the problem occurs + - Edge cases that might trigger the issue + +## 4. Impact Assessment +Analyze the scope and criticality: +- **Scope:** + - How many users/use cases are affected + - Which features depend on this functionality + - Whether this blocks other functionality +- **Criticality factors:** + - Data integrity risks + - Security implications + - Performance impact + - User experience degradation +- **Severity rating:** [Critical/High/Medium/Low] with justification + +## 5. Cross-Cutting Concerns +Identify related issues elsewhere: +- **Similar patterns:** + - Search for similar code patterns that might have the same issue + - List other components using the same approach +- **Dependency analysis:** + - Other modules that depend on the affected code + - Downstream effects of potential fixes +- **Related bugs:** + - Past issues in the same area + - Known limitations or technical debt + +## Investigation Report Template: +Technical Investigation Summary +Issue: [Issue Title] +1. Problem Localization +The issue appears to originate from: +Primary location: [file:line] - [brief explanation] +Secondary locations: [list other relevant code areas] + +2. Root Cause Hypothesis +Based on code inspection, the likely cause is: +[Technical explanation of what might be going wrong] + +3. Expected vs Actual Behavior +Expected: [What should happen] +Actual: [What currently happens] +Trigger conditions: [When this occurs] + +4. Relevant References +Code: +[Link to function/class] +[Link to tests] +Documentation: +[Link to relevant docs] +Related issues: +[Links to similar problems] + +5. Impact Analysis +Severity: [Critical/High/Medium/Low] +Scope: [Number of affected features/users] +Risk areas: [What could break] + +6. Similar Patterns Found +[List other code areas with similar implementation] +[Potential for same issue elsewhere] + +7. Technical Context for Developers +Key functions to review: [List] +Relevant design patterns: [Explain] +Potential gotchas: [Warn about tricky aspects] +Suggested investigation steps: [Next steps for assigned developer] + +## Guidelines: +- Do not try to solve the issue +- Do not create a plan to solve hthe issue +- Do not change any code or product documentation +- Do not provide summaries or overviews of Radius as a whole, its functionality or architecture. +- Do not provide summaries or overviews of the purpse, structure, or content of the current repo. +- Focus on providing relevant and actionable technical information +- Include code snippets when relevant +- Link to specific lines of code in the repository +- Highlight architectural implications +- Note any technical debt that might complicate fixes +- Identify opportunities for broader improvements +- Consider backward compatibility implications + +Analyze the submitted issue and provide your technical investigation following this framework. From 791a60b0ea6905cc804c542a8ecd72ef03e01955 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 05:03:47 +0000 Subject: [PATCH 04/12] Initial plan From 2bc957a6b9c25671a08a4b272f5a0420574a66f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 05:12:03 +0000 Subject: [PATCH 05/12] Increase maxRetries to fix UCP CrashLoopBackOff during initialization - Increase maxRetries from 5 to 10 in manifest registration retry logic - This provides ~8 minutes of total retry time instead of ~62 seconds - Allows async operations during UCP initialization to complete successfully - Fixes intermittent CrashLoopBackOff state when resources are in "Accepted" state - All existing tests pass without modification Fixes #11017 Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com> --- pkg/cli/manifest/registermanifest.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/cli/manifest/registermanifest.go b/pkg/cli/manifest/registermanifest.go index b8cf9bf65e..524aaf0266 100644 --- a/pkg/cli/manifest/registermanifest.go +++ b/pkg/cli/manifest/registermanifest.go @@ -34,7 +34,13 @@ import ( const ( initialBackoff = 2 * time.Second - maxRetries = 5 + // maxRetries is the maximum number of retry attempts for 409 Conflict errors. + // With exponential backoff starting at 2s, this allows approximately 8 minutes + // of retry time (2s + 4s + 8s + 16s + 32s + 64s + 128s + 256s + 512s ≈ 1022s). + // This is necessary to handle async operations that may take several minutes + // to complete, especially during UCP initialization when multiple resources + // are being created sequentially. See: https://github.com/radius-project/radius/issues/11017 + maxRetries = 10 ) // RegisterFile registers a manifest file From 89181c59fe6c3258ffcb669a9a3c3a89402afc35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 05:12:53 +0000 Subject: [PATCH 06/12] Fix calculation in comment: 1022s is ~17 minutes, not ~8 minutes Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com> --- pkg/cli/manifest/registermanifest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/manifest/registermanifest.go b/pkg/cli/manifest/registermanifest.go index 524aaf0266..4da64443c7 100644 --- a/pkg/cli/manifest/registermanifest.go +++ b/pkg/cli/manifest/registermanifest.go @@ -35,7 +35,7 @@ import ( const ( initialBackoff = 2 * time.Second // maxRetries is the maximum number of retry attempts for 409 Conflict errors. - // With exponential backoff starting at 2s, this allows approximately 8 minutes + // With exponential backoff starting at 2s, this allows approximately 17 minutes // of retry time (2s + 4s + 8s + 16s + 32s + 64s + 128s + 256s + 512s ≈ 1022s). // This is necessary to handle async operations that may take several minutes // to complete, especially during UCP initialization when multiple resources From 69d36e168127244b1b74cd5df2bf47de3c5889c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 05:13:28 +0000 Subject: [PATCH 07/12] Clarify comment: show seconds first, then minutes conversion Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com> --- pkg/cli/manifest/registermanifest.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cli/manifest/registermanifest.go b/pkg/cli/manifest/registermanifest.go index 4da64443c7..ffdc0c95a6 100644 --- a/pkg/cli/manifest/registermanifest.go +++ b/pkg/cli/manifest/registermanifest.go @@ -35,8 +35,8 @@ import ( const ( initialBackoff = 2 * time.Second // maxRetries is the maximum number of retry attempts for 409 Conflict errors. - // With exponential backoff starting at 2s, this allows approximately 17 minutes - // of retry time (2s + 4s + 8s + 16s + 32s + 64s + 128s + 256s + 512s ≈ 1022s). + // With exponential backoff starting at 2s, this allows approximately 1022 seconds + // (~17 minutes) of retry time (2s + 4s + 8s + 16s + 32s + 64s + 128s + 256s + 512s). // This is necessary to handle async operations that may take several minutes // to complete, especially during UCP initialization when multiple resources // are being created sequentially. See: https://github.com/radius-project/radius/issues/11017 From c9c26d663a2a5c98af6e7ed6cb4ab545a352568e Mon Sep 17 00:00:00 2001 From: Nicole James <101607760+nicolejms@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:02:34 -0800 Subject: [PATCH 08/12] Update .github/agents/issue-investigator.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nicole James <101607760+nicolejms@users.noreply.github.com> --- .github/agents/issue-investigator.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md index 4c29d39f0a..c78f4680d4 100644 --- a/.github/agents/issue-investigator.agent.md +++ b/.github/agents/issue-investigator.agent.md @@ -15,7 +15,7 @@ You are a technical investigation agent for the Radius Project. Your role is to The audience for the results of your investigation is an experienced Radius developer, so you do not need to provide a an overview of Radius, its functionality, or architecture. -Focus on the specified issue and bring together only that information that will help the agent or develop assigned the issue understand the issue quickly. +Focus on the specified issue and bring together only that information that will help the agent or developer assigned the issue understand the issue quickly. For each issue, perform the following technical investigation: From 47be56a7ba03cd3713414b1f96c9b8881e8915ef Mon Sep 17 00:00:00 2001 From: Nicole James <101607760+nicolejms@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:02:47 -0800 Subject: [PATCH 09/12] Update .github/agents/issue-investigator.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nicole James <101607760+nicolejms@users.noreply.github.com> --- .github/agents/issue-investigator.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md index c78f4680d4..8e3ee869a5 100644 --- a/.github/agents/issue-investigator.agent.md +++ b/.github/agents/issue-investigator.agent.md @@ -126,7 +126,7 @@ Suggested investigation steps: [Next steps for assigned developer] ## Guidelines: - Do not try to solve the issue -- Do not create a plan to solve hthe issue +- Do not create a plan to solve the issue - Do not change any code or product documentation - Do not provide summaries or overviews of Radius as a whole, its functionality or architecture. - Do not provide summaries or overviews of the purpse, structure, or content of the current repo. From 6f94aa7ce1ca6e0e189a1acf1099af041df2d461 Mon Sep 17 00:00:00 2001 From: Nicole James <101607760+nicolejms@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:03:39 -0800 Subject: [PATCH 10/12] Update .github/agents/issue-investigator.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nicole James <101607760+nicolejms@users.noreply.github.com> --- .github/agents/issue-investigator.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md index 8e3ee869a5..4a19bd7824 100644 --- a/.github/agents/issue-investigator.agent.md +++ b/.github/agents/issue-investigator.agent.md @@ -13,7 +13,7 @@ inputs: You are a technical investigation agent for the Radius Project. Your role is to analyze the specified issues and provide in-depth technical context to help developers understand and resolve them efficiently. -The audience for the results of your investigation is an experienced Radius developer, so you do not need to provide a an overview of Radius, its functionality, or architecture. +The audience for the results of your investigation is an experienced Radius developer, so you do not need to provide an overview of Radius, its functionality, or architecture. Focus on the specified issue and bring together only that information that will help the agent or developer assigned the issue understand the issue quickly. From aa082d4a1a1ec360ea4c63c2cc656827e790b9e4 Mon Sep 17 00:00:00 2001 From: Nicole James <101607760+nicolejms@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:04:59 -0800 Subject: [PATCH 11/12] Update .github/agents/issue-investigator.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nicole James <101607760+nicolejms@users.noreply.github.com> --- .github/agents/issue-investigator.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md index 4a19bd7824..6e5f4d3f4e 100644 --- a/.github/agents/issue-investigator.agent.md +++ b/.github/agents/issue-investigator.agent.md @@ -35,7 +35,7 @@ Find and document relevant resources: - Test files that cover this functionality - **Documentation:** - API documentation for the affected endpoints - - Architecture decisions records (ADRs) related to this area + - Architecture decision records (ADRs) related to this area - README sections or wiki pages - Related issues or pull requests (both open and closed) - **External resources:** From deae1ac7b9dc7c4763c7daca23243e8c1873c518 Mon Sep 17 00:00:00 2001 From: Nicole James <101607760+nicolejms@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:06:02 -0800 Subject: [PATCH 12/12] Update .github/agents/issue-investigator.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nicole James <101607760+nicolejms@users.noreply.github.com> --- .github/agents/issue-investigator.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/issue-investigator.agent.md b/.github/agents/issue-investigator.agent.md index 6e5f4d3f4e..cd4dd7175a 100644 --- a/.github/agents/issue-investigator.agent.md +++ b/.github/agents/issue-investigator.agent.md @@ -1,6 +1,6 @@ --- name: issue-investigator -description: Review and analyze an issues and provide focused and detailed technical context to help developers understand, evaluate, and create a plan to resolve the issue efficiently. +description: Review and analyze issues to provide focused, detailed technical context that helps developers understand and evaluate each issue efficiently. tools: ["read", "search", "edit", "web", "shell"] ---