Skip to content
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

[Bug]: Repo name conflict leading to a 403 client error #2198

Open
peterschmidt85 opened this issue Jan 17, 2025 · 1 comment
Open

[Bug]: Repo name conflict leading to a 403 client error #2198

peterschmidt85 opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@peterschmidt85
Copy link
Contributor

Steps to reproduce

  1. Create two users in the same project
  2. Both users create a folder with the same name
  3. Both users run dstack init and then dstack apply in this folder

Actual behaviour

The second user gets this exception:

Traceback (most recent call last):
  File "/workspaces/workspace/dstackServer/.venv/bin/dstack", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/_internal/cli/main.py", line 81, in main
    args.func(args)
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/_internal/cli/commands/apply.py", line 123, in _command
    configurator.apply_configuration(
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/_internal/cli/services/configurators/run.py", line 171, in apply_configuration
    run = self.api.runs.exec_plan(
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/api/_public/runs.py", line 573, in exec_plan
    self._api_client.repos.upload_code(
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/api/server/_repos.py", line 46, in upload_code
    self._request(
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/dstack/api/server/__init__.py", line 148, in _request
    resp.raise_for_status()
  File "/workspaces/workspace/dstackServer/.venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://dstack.dev-mlops.cloud.audi/api/project/main/repos/upload_code?repo_id=dstack-rbig83ga

Expected behaviour

As a user, I don't want my repos to interfere with the repos of other users even if the repo name is the same.

dstack version

0.18.35

Server logs

Additional information

No response

@peterschmidt85 peterschmidt85 added the bug Something isn't working label Jan 17, 2025
@r4victor
Copy link
Collaborator

Failed to reproduce so far. Also, looking at the code, using the same repo name should not lead to any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants