fix(ENG-701788): support kSkipped in copy-run status enums - #261
Merged
Conversation
deepayan-bose-cohesity
requested review from
deepak-patel-cohesity and
kavinagrawalcohesity
August 24, 2026 08:58
kavinagrawalcohesity
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes deserialization failure when C# cmdlets resolve a protection job by name on clusters running Iris 7.3.2+ that return
kSkippedfor skipped archival/replication copy runs inlastRun.copyRun[].KSkipped = 11with[EnumMember(Value = "kSkipped")]toCopyRun.StatusEnumandCopySnapshotTaskStatus.StatusEnum1.10.4to1.10.5Problem
Start-CohesityProtectionJob -Name <job>fails with:The same command with
-Idsucceeds because it skips the name-resolution GET.Root cause
When
-Nameis used,RestApiCommon.GetProtectionJobByName()calls:The full JSON array is deserialized via Newtonsoft.Json into strongly typed
ProtectionJobmodels. Iris 7.3.2+ can return"kSkipped"atlastRun.copyRun[n].statuswhen an archival/replication copy task was skipped, but the PowerShell module enums did not define that value.Script-based cmdlets such as
Get-CohesityProtectionJobwere unaffected because they useConvertFrom-Jsonand keep status values as strings.Changes
src/Cohesity.Powershell.Models/CopyRun.csKSkippedtoStatusEnumsrc/Cohesity.Powershell.Models/CopySnapshotTaskStatus.csKSkippedtoStatusEnumsrc/Cohesity.Powershell/Cohesity.PowerShell.psd1src/Cohesity.Powershell/Cohesity.PowerShell.Core.psd1Other cmdlets affected by the same root cause
Any C# cmdlet calling
GetProtectionJobByName()with-Name/-JobName:Start-CohesityProtectionJobSuspend-CohesityProtectionJob/Resume-CohesityProtectionJobEnable-CohesityProtectionJob/Disable-CohesityProtectionJobRemove-CohesityProtectionJobRemove-CohesitySnapshot -JobNameTest plan
src/Build.bat)10.136.7.114Start-CohesityProtectionJob -Name "PG-repro-FI-67449"no longer throws on deserializationStart-CohesityProtectionJob -Id <jobId>still works (control)Suspend-CohesityProtectionJob -Name/Resume-CohesityProtectionJob -Nameon the same jobtests/Get-CohesityProtectionJobRun.Tests.ps1Made with Cursor