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

Improve secret variables error on software upload. #25052

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

getvictor
Copy link
Member

@getvictor getvictor commented Dec 30, 2024

#24899
Better errors when secret variables used in software scripts are missing in the database. The name field indicates which script has the issue.

{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "install script",
      "reason": "Couldn't add. Secret variables \"$FLEET_SECRET_INVALID1\", \"$FLEET_SECRET_INVALID0\" missing from database"
    },
    {
      "name": "post-install script",
      "reason": "Couldn't add. Secret variable \"$FLEET_SECRET_INVALID2\" missing from database"
    },
    {
      "name": "uninstall script",
      "reason": "Couldn't add. Secret variable \"$FLEET_SECRET_INVALID3\" missing from database"
    }
  ],
  "uuid": "49d671dc-636a-4966-ba2a-c159302f0f5c"
}

Checklist for submitter

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

  • Added/updated tests
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 15 lines in your changes missing coverage. Please review.

Project coverage is 63.82%. Comparing base (5f4400b) to head (22ccf72).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
ee/server/service/software_installers.go 62.06% 11 Missing ⚠️
server/service/base_client_errors.go 85.71% 2 Missing and 1 partial ⚠️
ee/server/service/maintained_apps.go 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #25052   +/-   ##
=======================================
  Coverage   63.82%   63.82%           
=======================================
  Files        1613     1613           
  Lines      153431   153487   +56     
  Branches     3985     3985           
=======================================
+ Hits        97922    97967   +45     
- Misses      47716    47727   +11     
  Partials     7793     7793           
Flag Coverage Δ
backend 64.70% <78.57%> (+<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.

@getvictor getvictor marked this pull request as ready for review December 30, 2024 22:00
@getvictor getvictor requested a review from a team as a code owner December 30, 2024 22:00
Copy link
Member

@iansltx iansltx 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 getvictor merged commit e7458b9 into main Dec 31, 2024
25 checks passed
@getvictor getvictor deleted the victor/24899-secret-variable-errors branch December 31, 2024 00:46
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