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 software-with-bundle-ID add when the same title with different/no bundle ID, add missing request timeout special case for edit package endpoint #22413

Merged
merged 7 commits into from
Sep 26, 2024

Conversation

iansltx
Copy link
Member

@iansltx iansltx commented Sep 26, 2024

Same as #22412, for #21370, but against main rather than 4.57.0.

Checklist for submitter

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

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Added/updated tests
  • Manual QA for all new/changed functionality

…ndle ID is provided

This avoids "no rows in set" errors when adding software whose name/source matches an existing software title but whose bundle ID doesn't, likely because the bundle ID is null due to e.g. a GitOps upload.

There's likely more work to do (e.g. on VPP) for this fallback, and on the write side we should probably be saving bundle identifiers in more places than we're doing (e.g. in the batch endpoint where GitOps is used) but this is the smallest fix that will un-break software uploads.
Missed this in dev. This fixes package uploads on software edit timing out on lower-speed internet connections on larger packages.
@iansltx
Copy link
Member Author

iansltx commented Sep 26, 2024

@spokanemac You're on here because I missed mentioning an endpoint for timeouts tweaks, so this PR includes a guide update to fix that.

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.21%. Comparing base (b7e8031) to head (c1e8eed).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
cmd/fleet/serve.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22413      +/-   ##
==========================================
- Coverage   65.21%   65.21%   -0.01%     
==========================================
  Files        1496     1496              
  Lines      117157   117169      +12     
  Branches     3516     3516              
==========================================
+ Hits        76408    76409       +1     
- Misses      33640    33641       +1     
- Partials     7109     7119      +10     
Flag Coverage Δ
backend 66.48% <89.47%> (-0.01%) ⬇️

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

@lucasmrod lucasmrod 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!

Pending a test in integration_enterprise_test.go

spokanemac
spokanemac previously approved these changes Sep 26, 2024
@iansltx iansltx changed the title Fix software-with-bundle-ID add when the same title with no bundle ID exists, add missing request timeout special case for edit package endpoint Fix software-with-bundle-ID add when the same title with different/no bundle ID, add missing request timeout special case for edit package endpoint Sep 26, 2024
@iansltx
Copy link
Member Author

iansltx commented Sep 26, 2024

Caught this up with the PR into 4.57.1.

@roperzh roperzh merged commit b43dab7 into main Sep 26, 2024
28 checks passed
@roperzh roperzh deleted the software-add-edit-fixes branch September 26, 2024 18:23
@roperzh roperzh modified the milestone: 4.57.1 Sep 26, 2024
georgekarrv pushed a commit that referenced this pull request Sep 26, 2024
… bundle ID, add missing request timeout special case for edit package endpoint (#22413)

Same as #22412, for #21370, but against `main` rather than 4.57.0.

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
georgekarrv pushed a commit that referenced this pull request Oct 1, 2024
… bundle ID, add missing request timeout special case for edit package endpoint (#22413)

Same as #22412, for #21370, but against `main` rather than 4.57.0.

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
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.

4 participants