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: fix slice init length #22608

Merged
merged 1 commit into from
Oct 9, 2024
Merged

fix: fix slice init length #22608

merged 1 commit into from
Oct 9, 2024

Conversation

cuishuang
Copy link
Contributor

Checklist for submitter

The intention here should be to initialize a slice with a capacity of totalTitlesToProcess rather than initializing the length of this slice.

The only demo: https://go.dev/play/p/q1BcVCmvidW

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added support on fleet's osquery simulator cmd/osquery-perf for new osquery data ingestion features.
  • Added/updated tests
  • If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
    • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
    • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).
  • Manual QA for all new/changed functionality
  • For Orbit and Fleet Desktop changes:
    • Orbit runs on macOS, Linux and Windows. Check if the orbit feature/bugfix should only apply to one platform (runtime.GOOS).
    • Manual QA must be performed in the three main OSs, macOS, Windows and Linux.
    • Auto-update manual QA, from released version of component to new version (see tools/tuf/test).

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.13%. Comparing base (54f209d) to head (f17689c).
Report is 105 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22608      +/-   ##
==========================================
+ Coverage   65.09%   65.13%   +0.03%     
==========================================
  Files        1498     1498              
  Lines      117134   117134              
  Branches     3535     3535              
==========================================
+ Hits        76247    76291      +44     
+ Misses      33801    33761      -40     
+ Partials     7086     7082       -4     
Flag Coverage Δ
backend 66.39% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@getvictor getvictor left a comment

Choose a reason for hiding this comment

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

LGTM

@getvictor
Copy link
Member

@cuishuang Thank you for finding this issue!

@getvictor getvictor merged commit cc6384e into fleetdm:main Oct 9, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants