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

Catch missing values file in k3d script #8604

Closed
mrjones-plip opened this issue Oct 2, 2023 · 1 comment
Closed

Catch missing values file in k3d script #8604

mrjones-plip opened this issue Oct 2, 2023 · 1 comment
Assignees
Labels
Type: Technical issue Improve something that users won't notice
Milestone

Comments

@mrjones-plip
Copy link
Contributor

Describe the issue
when you're using the soon to be merged k3d script, and your values.yml is missing, you get an ugly error:

 ./cht-deploy -f values.yaml                               
 Traceback (most recent call last):
   File "/home/mrjones/.local/bin/invoke", line 8, in <module>
     sys.exit(program.run())
   File "/home/mrjones/.local/lib/python3.8/site-packages/invoke/program.py", line 384, in run
     self.execute()
   File "/home/mrjones/.local/lib/python3.8/site-packages/invoke/program.py", line 569, in execute 
     executor.execute(*self.tasks)
   File "/home/mrjones/.local/lib/python3.8/site-packages/invoke/executor.py", line 129, in execute
     result = call.task(*args, **call.kwargs)
   File "/home/mrjones/.local/lib/python3.8/site-packages/invoke/tasks.py", line 127, in __call__
     result = self.body(*args, **kwargs)
   File "/home/mrjones/Documents/MedicMobile/cht-core/scripts/deploy/tasks.py", line 160, in install
     prepare(c, f)
   File "/home/mrjones/.local/lib/python3.8/site-packages/invoke/tasks.py", line 127, in __call__
     result = self.body(*args, **kwargs)
   File "/home/mrjones/Documents/MedicMobile/cht-core/scripts/deploy/tasks.py", line 11, in prepare
     with open(f, 'r') as stream:
 FileNotFoundError: [Errno 2] No such file or directory: 'values.yaml

Describe the improvement you'd like
It would be great if the cht-deploy script detected a missing file and just told you instead outputting a bit scary stack trace.

Describe alternatives you've considered

@mrjones-plip mrjones-plip added the Type: Technical issue Improve something that users won't notice label Oct 2, 2023
@mrjones-plip mrjones-plip changed the title Catch missing values in k3d script Catch missing values file in k3d script Oct 2, 2023
@henokgetachew henokgetachew self-assigned this Apr 29, 2024
@henokgetachew
Copy link
Contributor

Complete. PR in review

@garethbowen garethbowen added this to the 4.11.0 milestone Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Technical issue Improve something that users won't notice
Projects
None yet
Development

No branches or pull requests

3 participants