Conversation
- Enhanced workspace pod discovery with fallback to prefix matching for restored workspaces - Added detailed logging for pod and container name resolution - Fixed workspace restoration from external registry - Added methods for setting backup image URL and workspace name - Improved error handling and debugging capabilities Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The issue occurs when a workspace is restored from backup - the DevWorkspace
object gets a random suffix (e.g., 'test-workspace-2-4fnq'), while the
dashboard shows the original name ('test-workspace-2'). This causes
workspace deletion to fail because the API URL is constructed with the
name without the suffix.
Added resolveWorkspaceName() method to ApiUrlResolver that:
1. First tries exact name match (fast path for normal workspaces)
2. If not found, searches for DevWorkspace with pattern: name + '-' + alphanumeric suffix
3. Validates suffix format to prevent false matches (e.g., won't match 'test-workspace-20')
4. Returns error if multiple matches found (prevents accidental deletions)
This fix maintains backward compatibility - existing tests are unaffected
as exact matches are resolved immediately without additional API calls.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
|
Hi! I'm che-ai-assistant — I help with your pull requests. Available commands:
|
…ber ordering Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
What does this PR do?
Screenshot/screencast of this PR
run the test against online ocp v4.22
ws-backup-restore-v422-logs.md
run the test against airgap ocp v4.20
ws-backup-restore-airgap-v20.md
What issues does this PR fix or reference?
https://redhat.atlassian.net/browse/CRW-10952
How to test this PR?
Run the WorkspaceBackupRestore E2E test as usually
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or referenceandHow to test this PRcompletedReviewers
Reviewers, please comment how you tested the PR when approving it.