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

drenv: Detect os details once #1824

Open
Tracked by #1717
nirs opened this issue Feb 11, 2025 · 0 comments
Open
Tracked by #1717

drenv: Detect os details once #1824

nirs opened this issue Feb 11, 2025 · 0 comments
Labels
good first issue Good for newcomers test Testing related issue

Comments

@nirs
Copy link
Member

nirs commented Feb 11, 2025

When parsing environment file we need to detect the os an architecture. However we do this once per profile instead of once per environment file:

2025-02-11 08:53:03,339 DEBUG   [main] Created new process group 2442346
2025-02-11 08:53:03,356 DEBUG   [envfile] Detected os: 'linux'
2025-02-11 08:53:03,356 DEBUG   [envfile] Detected machine: 'x86_64'
2025-02-11 08:53:03,356 DEBUG   [envfile] Using provider: 'minikube'
2025-02-11 08:53:03,356 DEBUG   [envfile] Using driver: 'kvm2'
2025-02-11 08:53:03,356 DEBUG   [envfile] Using network: 'default'
2025-02-11 08:53:03,357 DEBUG   [envfile] Detected os: 'linux'
2025-02-11 08:53:03,357 DEBUG   [envfile] Detected machine: 'x86_64'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using provider: 'minikube'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using driver: 'kvm2'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using network: 'default'
2025-02-11 08:53:03,357 DEBUG   [envfile] Detected os: 'linux'
2025-02-11 08:53:03,357 DEBUG   [envfile] Detected machine: 'x86_64'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using provider: 'minikube'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using driver: 'kvm2'
2025-02-11 08:53:03,357 DEBUG   [envfile] Using network: 'default'

Can be fixed by a cached function discovering and logging the information.
https://docs.python.org/3/library/functools.html#functools.cache

@nirs nirs added good first issue Good for newcomers test Testing related issue labels Feb 11, 2025
@nirs nirs mentioned this issue Feb 11, 2025
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers test Testing related issue
Projects
None yet
Development

No branches or pull requests

1 participant