deepset-ai / deepset-ai/deepset-cloud-sdk

local .env file in project root supersedes global ~/.deepset-cloud/.env

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
16
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
The CLI does not look for the global .env-file created using deepset-cloud login when a local .env-file in the project root is present. This means that CLI-commands cannot be executed as long as the project-.env file is present in the project-root.
The related error messages are not intuitively hinting at this conflict.

To Reproduce
Steps to reproduce the behavior:

  1. create new project with .env-file in root folder and some example texts to upload to dP workspace
  2. deepset-cloud login
  3. deepset-cloud upload ./data/examples
  4. the CLI raises WorkspaceNotDefinedError("Workspace name is not defined. Got ''. Enter the name of the workspace in workspace_name.")
  5. deepset-cloud upload ./data/examples --workspace-name "default"
  6. the CLI raises FailedToUploadFileException('Failed to upload file with status code 404. response was: {"detail":"Not Found"}')
  7. moving the local .env-file out of the project root solves the issue

Expected behavior
Have CLI always default to using ~/.deepset-cloud/.env or choose during deepset-cloud login whether to use global or local .env-file

Screenshots

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the deepset-cloud login and deepset-cloud upload entry points and reproduce the conflict between the project .env file and ~/.deepset-cloud/.env. Trace which environment source is selected and how the workspace and upload errors are produced. Done means the global credentials remain usable with a project-root .env file, with an unambiguous behavior for choosing the environment source.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.