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

Fix unchecked type assertions #2580

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucacome
Copy link
Member

Proposed changes

Fixes the remaining unchecked type assertions

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@lucacome lucacome requested a review from a team as a code owner September 18, 2024 21:54
@github-actions github-actions bot added chore Pull requests for routine tasks tests Pull requests that update tests labels Sep 18, 2024
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 89.19%. Comparing base (11f7fcb) to head (9445586).

Files with missing lines Patch % Lines
internal/mode/static/manager.go 0.00% 8 Missing ⚠️
internal/framework/status/updater.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2580      +/-   ##
==========================================
- Coverage   89.29%   89.19%   -0.11%     
==========================================
  Files         100      100              
  Lines        7633     7643      +10     
  Branches       50       50              
==========================================
+ Hits         6816     6817       +1     
- Misses        761      769       +8     
- Partials       56       57       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

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

looks good except for the missing unit tests

Comment on lines +94 to +96
u.logger.Error(ErrFailedAssert, "object is not a client.Object")
return
Copy link
Contributor

Choose a reason for hiding this comment

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

missing unit tests

Comment on lines +204 to +206
ngxruntimeCollector, ok := ngxruntimeCollector.(prometheus.Collector)
if !ok {
return fmt.Errorf("ngxruntimeCollector is not a prometheus.Collector: %w", status.ErrFailedAssert)
Copy link
Contributor

Choose a reason for hiding this comment

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

missing unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks tests Pull requests that update tests
Projects
Status: 🏗 In Progress
Development

Successfully merging this pull request may close these issues.

4 participants