Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add handling for imagestream status with no tags

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devops

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.status objects have a tags property or not
  • If it is deemed valuable to highlight the fact that an imagestream.status object has no tags property, 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

  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.

More from bcgov/AppAssessment

All issues in bcgov/AppAssessment

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.