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

Hide currently known failures from the summary dashboards #619

Merged
merged 7 commits into from
Oct 16, 2024

Conversation

alarthast
Copy link
Contributor

@alarthast alarthast commented Oct 16, 2024

  • There are a couple of known failures (check links, dependabot updates) that are appearing daily and creating clutter
  • Register these known failures in the config.py and hide them when creating summaries
  • From the Slack convo, still show them when the target is a specific repo, not a summary

It would be better to make this an optional configuration - explore in #618
Previous iteration of this PR: #617

wf_conclusions = {
k: v
for k, v in wf_conclusions.items()
if v == "success" or int(k) not in known_failure_ids
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing values being converted between types in the middle of a function like this is a bit of a code smell to me. In this case, it suggests we're not clear whether the workflow IDs should be ints or (presumably) strs, which means there's a risk we'll get them mixed up. Ideally, we'd do any necessary conversion at the boundary of a system -- here this would either involve converting str->int in RepoWorkflowReporter, or converting str->int when loading WORKFLOWS_KNOWN_TO_FAIL, or insisting that WORKFLOWS_KNOWN_TO_FAIL contains strs.

No need to fix now if it's not straightforward, but something to bear in mind in future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This int() is not actually needed - I've removed it. Workflow IDs are int except when read/writing to/from the cache (due to json.dumps) - this is me forgetting that. I'll do some tidying in a later PR so that type conversions are only at the boundary of the cache.

alarthast and others added 4 commits October 16, 2024 17:40
These are expected to break from time to time and we have other
mechanisms for letting us know about it. (At the time of writing Steve
checks these himself, but soon this will be automated and handed over
to Tech Support.)
@alarthast
Copy link
Contributor Author

alarthast commented Oct 16, 2024

Post-approval changes

@alarthast alarthast merged commit 9d64540 into main Oct 16, 2024
6 checks passed
@alarthast alarthast deleted the benbc/ignore-some-failures branch October 16, 2024 17:04
@alarthast
Copy link
Contributor Author

Apologies that I forgot to squash this 😭 , I'll remember next time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants