Add handling for imagestream status with no tags
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
Research direction
Start in build/report.py at getImageStreamSize(), especially line 74, and reproduce the report run against a namespace whose imagestream.status lacks tags. Trace how the resulting size is used in writeReport(). Done means AppAssessment generates its report for both imagestream shapes, with any chosen missing-tags information reflected in the final report.
Written by the indexing model from the issue text.
Description
While trying to run AppAssessment in the bdec76- namespace, I found in the initialload pod that the ./build/report.py run would fail with this KeyError error output in the logs:
Traceback (most recent call last):
File "./report.py", line 345, in <module>
writeReport(args.o, results, namespace, checksInfo, clusterName, podsWithFailedChecks)
File "./report.py", line 194, in writeReport
imagestreamSize = getImageStreamSize(namespace)
File "./report.py", line 74, in getImageStreamSize
if len(imagestream['status']['tags']) > 0:
KeyError: 'tags'
We should gracefully handle this case where an imagestream.status object has no tags key, either by:
- displaying something in the final report indicating what might be missing from our app configuration, or
- including a
hasattr()check before trying to access this property here to enable the report to be generated as expected
Definition of done
- Code is updated such that AppAssessment can be successfully run against a namespace whether all
imagestream.statusobjects have atagsproperty or not - If it is deemed valuable to highlight the fact that an
imagestream.statusobject has notagsproperty, this information appears in the generated report
- Dominant language
- Python
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bcgov/AppAssessment
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
bcgov/AppAssessment#41 ·
-
It's Been a While Since This Repository has Been UpdatedMay be free again @ShovelHand claimed this 1505 days ago, and no pull request is open. Open
bcgov/AppAssessment#40 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
bcgov/AppAssessment#37 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
bcgov/AppAssessment#19 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
bcgov/AppAssessment#17 ·
All issues in bcgov/AppAssessment
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
letsencrypt/cp-cps#353 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DOI-USGS/pywatershed#421 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-pillow/Pillow#10087 · 1 comment ·
Maintainers usually reply within 1 day