Skip to content

Improve get piped's oldestVersion in ListDeprecatedNotes api#6135

Merged
khanhtc1202 merged 1 commit into
pipe-cd:masterfrom
linhdangduy:fix-versions-index-out-of-range
Aug 20, 2025
Merged

Improve get piped's oldestVersion in ListDeprecatedNotes api#6135
khanhtc1202 merged 1 commit into
pipe-cd:masterfrom
linhdangduy:fix-versions-index-out-of-range

Conversation

@linhdangduy
Copy link
Copy Markdown
Contributor

@linhdangduy linhdangduy commented Aug 18, 2025

What this PR does:

  • Get the oldest piped version by using semver.Compare instead of semver.Sort
  • With this we don't have to create versions list, and also avoid index out of range error

Why we need it:

  • Simple way to get oldest piped version. Avoid unexpected error.

Which issue(s) this PR fixes:

Fixes #6133

result: no more error
image

Does this PR introduce a user-facing change?:

  • How are users affected by this change: No more 503 Service Available error as described in the issue
  • Is this breaking change: No
  • How to migrate (if breaking change):

@linhdangduy linhdangduy requested a review from a team as a code owner August 18, 2025 16:46
@linhdangduy linhdangduy force-pushed the fix-versions-index-out-of-range branch from 504c337 to e04c723 Compare August 18, 2025 16:50
Signed-off-by: Dan <dangduylinh.bk@gmail.com>
@linhdangduy linhdangduy force-pushed the fix-versions-index-out-of-range branch from e04c723 to 0cc76b1 Compare August 18, 2025 16:56
@linhdangduy linhdangduy changed the title get oldestVersion when looping pipeds Improve get piped's oldestVersion in ListDeprecatedNotes api Aug 18, 2025
Copy link
Copy Markdown
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks 💯

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) August 19, 2025 23:58
@khanhtc1202 khanhtc1202 merged commit 6e1d871 into pipe-cd:master Aug 20, 2025
43 checks passed
@linhdangduy linhdangduy deleted the fix-versions-index-out-of-range branch August 23, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server returns runtime error index out of range for ListDeprecatedNotes api

3 participants