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

Fleet UI: Add automatic install to custom packages upload #24729

Merged
merged 5 commits into from
Dec 27, 2024

Conversation

RachelElysia
Copy link
Member

@RachelElysia RachelElysia commented Dec 12, 2024

Issue

Story #23344
FE #24384

Description

  • Select manual or automatic install type when uploading a custom package

Screenshots/screen recording

Screen.Recording.2024-12-27.at.2.01.00.PM.mov

Tests updated

Checklist for submitter

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

  • TODO: QA Wolf test request
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

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

Project coverage is 63.79%. Comparing base (963cc7e) to head (a3555f4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
frontend/services/entities/software.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24729      +/-   ##
==========================================
- Coverage   63.79%   63.79%   -0.01%     
==========================================
  Files        1612     1612              
  Lines      153445   153447       +2     
  Branches     3984     4039      +55     
==========================================
  Hits        97897    97897              
- Misses      47745    47747       +2     
  Partials     7803     7803              
Flag Coverage Δ
frontend 53.25% <0.00%> (-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.

@@ -276,6 +277,7 @@ export interface ISoftwareInstallResult {
post_install_script_output: string;
created_at: string;
updated_at: string | null;
automatic_install: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

@lucasmrod Will this return? or is it just for post

Copy link
Member

Choose a reason for hiding this comment

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

Just for the POST. Because what makes the installer automated is the fact that it has a policy associated to it. The UI already renders the "Automatic install" using the automatic_install_policies field.

@@ -306,6 +308,7 @@ export interface ISoftwareInstallVersion {

export interface IHostSoftwarePackage {
name: string;
automatic_install: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

@lucasmrod Will this return? or is it just for post

Copy link
Member

Choose a reason for hiding this comment

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

@RachelElysia
Copy link
Member Author

This is ready for review except @lucasmrod might be changing the 424 error spec, so it's just in a holding pattern until BE is ready and merged

@RachelElysia
Copy link
Member Author

RachelElysia commented Dec 19, 2024

@ghernandez345 last commit I converted to re-use the component you made and so it'll be easier for you to integrate with the labels work you're doing. I tagged you as a reviewer instead of @jacobshandling since we'll need to merge our work together anyway. Heads up looks like #23744 will be adding my section onto the vpp page as well so reusable components might be the way to go. Lmk if you think I should move it to it's own file or just wait until 23744 to do so. https://www.figma.com/design/OqlVvqpp5E6A7JOfdEKMR6/%2323744%3A-Create-policies-automatically-for-installing-App-Store-apps-(VPP)?t=ECOf6SUjyZZMuQYn-0

/>
</>
);
} else if (reason.includes("Fleet couldn't read the version from")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

looks good thanks for catching

Copy link
Contributor

@ghernandez345 ghernandez345 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. When you merge this in I will finish up the custom package form work.

}

// Also used in custom package form (PackageForm.tsx)
export const InstallTypeSection = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good but if this also used in Package form I think it should live in that file and be imported here instead of the other way around. Seems strange to have components/PackageForm import a component from a specific page.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ghernandez345 PackageForm.tsx is the custom package page's version of FMA's FleetAppDetailsForm.tsx, I was thinking of making a components directory for stuff that is used in both but since it was only this item, I just left it where it was, WDYT?

@RachelElysia RachelElysia merged commit 5319156 into main Dec 27, 2024
14 checks passed
@RachelElysia RachelElysia deleted the 23344-custom-package branch December 27, 2024 19:19
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.

3 participants