ITADN

GitOps: specify a single package under policy if multiple packages are defined in the YAML file.

#51358Openmarko-lisica 创建于 4 天前
bugP2customer-numa#g-auto-patchingcustomer-cisneros-w
M
marko-lisicacommented
- `customer-numa`: [Slack thread](https://fleetdm.slack.com/archives/C075T40SYB1/p1787181161404659?thread_ts=1787164637.583949&cid=C075T40SYB1). **Fleet versions** <!-- Copy this from the "My account" page in the Fleet UI, or run `fleetctl --version` --> - *Discovered:* 4.90 - *Reproduced:* <!-- Fleet version where the issue was successfully reproduced/confirmed --> **Web browser and operating system**: <!-- e.g. Chrome 88.0.4324 running on macOS --> <hr/> ### 💥  Actual behavior <!-- What did you see? Paste a screenshot, include a 30s video, or write 1-2 sentences describing the issue you observed. --> Currently, if multiple packages are added in a single YAML file, then specifying that file under the policy's `install_software.package_path` will use the first added package. Same if `install_software.hash_sha256` is used. In the UI, the user can specify a specific package from the multi-package software title. ### 🛠️ Expected behavior <!-- Add the expected behavior here. If you're not sure, you can leave this blank for the Product Designer (PD) to specify. --> - If the user adds multiple packages of the same software where packages are nested in a single YAML file, then the user can use `install_software.hash_sha256` on the policy. If in this case user tries to use `install_software.package_path`, throw and error, that when multiple packages are in the same YAML file, use `hash_sha256` instead. - If the user adds multiple packages of the same software, where each package is defined via separate YAML file, then they can use `install_software.package_path` and `hash_sha256` under the `policies` - For `POST`/`PATCH` `/api/v1/fleet/fleets/:id/policies`, rename the `software_installer_id` to `software_package_id` and open PR to document that field in the API docs. ### 🧑‍💻  Steps to reproduce <!-- Provide step-by-step actions of how to recreate this bug in a clean install of Fleet. (This helps others understand and fix it more quickly.) --> <!-- PRs that fix this bug must include reproduction and manual verification. --> These steps: - [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances. - [ ] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances. 1. Specify multiple packages in `.../lib/windows/software/<software-name>.yml` 2. TODO 3. ### 🕯️ More info _(optional)_ <!-- Add any additional details you think could be relevant to solving or reproducing the bug (e.g., "this does not reproduce when...") --> N/A
4 条评论