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

Remove pydantic-settings as a dependency #57

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Remove pydantic-settings as a dependency #57

merged 1 commit into from
Jul 12, 2024

Conversation

Devansh3712
Copy link
Member

Use dotenv library's load_dotenv() function instead of pydantic-settings for loading environment variables from .env file

Checklist

@kamoltat kamoltat assigned kamoltat and Devansh3712 and unassigned kamoltat Jun 3, 2024
@kamoltat kamoltat added the dependency Dependency related stuff label Jun 3, 2024
@kamoltat
Copy link
Member

kamoltat commented Jun 3, 2024

CI failure

#10 9.122 ERROR: Package 'teuthology-1.1.1.dev729-g861a8dcf' requires a different Python: 3.8.10 not in '>=3.10'
#10 ERROR: process "/bin/sh -c pip3 install -e ." did not complete successfully: exit code: 1
------
 > [6/7] RUN pip3 install -e .:
4.776 Collecting teuthology@ git+https://github.com/ceph/teuthology#egg=teuthology[test]
4.776   Cloning https://github.com/ceph/teuthology to /tmp/pip-install-g6d3wo0z/teuthology
4.776   Running command git clone -q https://github.com/ceph/teuthology /tmp/pip-install-g6d3wo0z/teuthology
6.291   Installing build dependencies: started
8.420   Installing build dependencies: finished with status 'done'
8.421   Getting requirements to build wheel: started
8.735   Getting requirements to build wheel: finished with status 'done'
8.739     Preparing wheel metadata: started
9.044     Preparing wheel metadata: finished with status 'done'
9.122 ERROR: Package 'teuthology-1.1.1.dev729-g861a8dcf' requires a different Python: 3.8.10 not in '>=3.10'
------
Dockerfile:24
--------------------
  22 |     WORKDIR /teuthology_api
  23 |     COPY . /teuthology_api/
  24 | >>> RUN pip3 install -e .
  25 |     RUN mkdir /archive_dir/
  26 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install -e ." did not complete successfully: exit code: 1
Service 'teuthology_api' failed to build : Build failed
Error: Process completed with exit code 1.

@VallariAg VallariAg added the gsoc-24 Related to GSoC 2024 teuthology project label Jun 27, 2024
Copy link
Member

@VallariAg VallariAg left a comment

Choose a reason for hiding this comment

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

Looks good to me! Maybe we can add a comment in the commit message about why we are changing this just to document it somewhere.
From what I understand, we are doing this because we are not using any complex settings types which pydantic-settings provides, so we are switching to reading env variables using dotenv and removing an extra dependency.

@Devansh3712
Copy link
Member Author

sure, i'll amend the commit message

Use dotenv instead of pydantic-settings for loading
environment variables from .env file. We are switching
to dotenv as we are not using any complex types and
don't require type checking for the variables.

Signed-off-by: Devansh Singh <[email protected]>
@VallariAg VallariAg merged commit 4660f3c into main Jul 12, 2024
4 checks passed
@zmc zmc deleted the use-dotenv branch August 14, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Dependency related stuff gsoc-24 Related to GSoC 2024 teuthology project
Projects
Development

Successfully merging this pull request may close these issues.

3 participants