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

Always return a value from _update_or_create_domain_metrics #35606

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

nospame
Copy link
Contributor

@nospame nospame commented Jan 9, 2025

Otherwise it will TypeError on unpacking metrics, __ and fail the whole update_domain_metrics_for_domains task

Technical Summary

Just a bugfix for an in-development feature.

Safety Assurance

Safety story

We're not swallowing any additional errors here, just returning a tuple of something that can be unpacked. The caller, update_domain_metrics_for_domains already accounts for metrics potentially being None.

Automated test coverage

No tests for this particular return value.

QA Plan

No QA planned.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

Otherwise it will TypeError on unpacking `metrics, __` and fail the whole `update_domain_metrics_for_domains` task
@nospame nospame added the product/invisible Change has no end-user visible impact label Jan 9, 2025
@nospame nospame marked this pull request as ready for review January 9, 2025 23:18
corehq/apps/data_analytics/tasks.py Outdated Show resolved Hide resolved
Both in the sense of just returning 'metrics', because we never use 'created', and in having one return statement for the function
@nospame nospame merged commit 98629ea into master Jan 13, 2025
13 checks passed
@nospame nospame deleted the em/domain-metrics-error-return branch January 13, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/invisible Change has no end-user visible impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants