fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Update `POST /scripts/run/sync` API to receive `script_name` and `team_id` params

Open gillespi314 opened this issue 1 year ago • 1 comments

TODO:

  • Integration tests
  • Update CLI

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • [ ] Changes file added for user-visible changes in changes/ or orbit/changes/. See Changes files for more information.
  • [ ] Documented any permissions changes (docs/Using Fleet/manage-access.md)
  • [ ] 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 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.
  • [ ] Manual QA for all new/changed functionality
    • For Orbit and Fleet Desktop changes:
      • [ ] 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).

gillespi314 avatar Mar 01 '24 23:03 gillespi314

Codecov Report

Attention: Patch coverage is 84.02778% with 23 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (feat-scripts-char-limit@0858f5a). Click here to learn what that means.

Files Patch % Lines
server/fleet/scripts.go 71.42% 10 Missing :warning:
server/datastore/mysql/scripts.go 76.19% 4 Missing and 1 partial :warning:
server/service/client_scripts.go 58.33% 5 Missing :warning:
cmd/fleetctl/scripts.go 92.50% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@                    Coverage Diff                     @@
##             feat-scripts-char-limit   #17322   +/-   ##
==========================================================
  Coverage                           ?   65.44%           
==========================================================
  Files                              ?     1188           
  Lines                              ?   106605           
  Branches                           ?     2546           
==========================================================
  Hits                               ?    69771           
  Misses                             ?    31535           
  Partials                           ?     5299           
Flag Coverage Δ
backend 66.44% <84.02%> (?)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 02 '24 00:03 codecov[bot]

Additional integration test coverage will follow in a separate PR

gillespi314 avatar Mar 05 '24 05:03 gillespi314

Looks good, just a few minor things and I think the changes file might be missing? The goal is to add integration tests post-freeze, correct?

Yes, thanks! And I can the changes file along with the integration tests too :)

gillespi314 avatar Mar 05 '24 14:03 gillespi314