Skip to content

chore: Add a URL parameter for the existing workspace name #2922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

olexii4
Copy link
Contributor

@olexii4 olexii4 commented Jul 1, 2025

What does this pull request change?

This PR adds a URL parameter for the existing workspace name.

Знімок екрана 2025-07-01 о 17 01 04

What issues does this pull request fix or reference?

need for eclipse-che/che#23402

Specify the version of the product this pull request applies to

DS 3.23

Pull Request checklist

The author and the reviewers validate the content of this pull request with the following checklist, in addition to the automated tests.

  • Any procedure:
    • Successfully tested.
  • Any page or link rename:
    • The page contains a redirection for the previous URL.
    • Propagate the URL change in:
  • Builds on Eclipse Che hosted by Red Hat.
  • the Validate language on files added or modified step reports no vale warnings.

Signed-off-by: Oleksii Orel <oorel@redhat.com>
@olexii4 olexii4 requested review from deerskindoll and a team as code owners July 1, 2025 14:05
@olexii4 olexii4 requested a review from tolusha July 1, 2025 14:05
Copy link

github-actions bot commented Jul 1, 2025

Click here to review and test in web IDE: Contribute

Copy link

github-actions bot commented Jul 1, 2025

🎊 Navigate the preview: https://686540b38bc78e5542016e67--eclipse-che-docs-pr.netlify.app 🎊

@deerskindoll
Copy link
Contributor

please add the document to the end user nav.adoc

Signed-off-by: Oleksii Orel <oorel@redhat.com>
@deerskindoll deerskindoll reopened this Jul 1, 2025
= URL parameter for the existing workspace name

If the URL for starting a new workspace contain a URL parameter specifying the existing workspace name,
an existing workspace created from the same URL is opened, or a new workspace is created.
Copy link
Contributor

Choose a reason for hiding this comment

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

to understand this sentence better: in which case is a new workspace created with the existing URL parameter?

Copy link
Contributor Author

@olexii4 olexii4 Jul 2, 2025

Choose a reason for hiding this comment

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

A new workspace is created with the existing URL parameter if no workspaces with the same repository URL already exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the existing URL parameter to prioritize opening workspaces when multiple workspaces are created from the same URL.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. thanks for the explanation, I re-worded the sentence a bit. I'm wondering if there's a way to rewrite "The specified existing workspace name will be preferred " to make it more clear what's going to happen. does it mean that the workspace with the existing parameter will open instead of the others?

…ate-workspaces.adoc

Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com>
an existing workspace created from the same URL is opened, or a new workspace is created.
The specified existing workspace name will be preferred if multiple workspaces were created from the same URL.

The URL parameter for the existing workspace name is `existing=`:
Copy link
Contributor

@svor svor Jul 3, 2025

Choose a reason for hiding this comment

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

@olexii4
could you please document the case when the name is not set or workspace with this name doesn't exist.
Examples:

1. `pass:c,a,q[{prod-url}]#<git_repository_url>?existing`
2. `pass:c,a,q[{prod-url}]#<git_repository_url>?existing=workspace-doesnt-exist`

NOTE: If you currently have a workspace that you started using a URL, then visiting the URL again without the `new` URL parameter results in an error message.
[NOTE]
====
If you currently have a workspace that you started by using a URL, then visiting the URL again without the `new` URL parameter opens the existing workspace.
Copy link
Contributor

@svor svor Jul 3, 2025

Choose a reason for hiding this comment

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

Could you please add an example like
pass:c,a,q[{prod-url}]#<git_repository_url>?new


====

`pass:c,a,q[{prod-url}]#https://github.com/eclipse-che/che-docs?existing=che-docs`
Copy link
Contributor

@svor svor Jul 3, 2025

Choose a reason for hiding this comment

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

@deerskindoll I think it should be good, because it's just an example, but to double check: would it be OK if we have che related link in the DevSpaces documentation ?

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch! we shouldn't do that. we need separate example for Dev Spaces or a neutral example applicable for both.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it could be replaced with
pass:c,a,q[{prod-url}]#<git_repository_url>?existing=workspace_name

Comment on lines +10 to +12
If the URL for starting a new workspace contain a URL parameter specifying the existing workspace name,
an existing workspace created from the same URL is opened, or a new workspace is created.
The specified existing workspace name will be preferred if multiple workspaces were created from the same URL.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If the URL for starting a new workspace contain a URL parameter specifying the existing workspace name,
an existing workspace created from the same URL is opened, or a new workspace is created.
The specified existing workspace name will be preferred if multiple workspaces were created from the same URL.
If you start a new workspace with a URL that contains the `existing` URL parameter specifying an existing workspace name, the existing workspace created from the same URL is opened. If no workspace from the same URL exists yet, a new workspace is created.
[NOTE]
====
If you create multiple workspaces from the same URL, the specified existing workspace name will be preferred.
====

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants