Add hash_sha256 to example software titles API response#28453
Merged
Conversation
2 tasks
rachaelshaw
approved these changes
Apr 22, 2025
sgress454
added a commit
that referenced
this pull request
Apr 24, 2025
# Checklist for submitter 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] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) # Details To facilitate using the work of [#23497](#23497) in the new fleetctl generate-gitops command, we need to be able to retrieve the hash values of the current software installers for a team. This PR adds a new `hash_sha256` field to the response for the GET /software/titles API in order to do that. # Testing Updated an existing automated test to check for the presence of the new field when expected. Other tests still pass without it, as it's omitted when the underlying `storage_id` db column is null 👍 I verified that the API response is as expected in Fleet: <img width="361" alt="image" src="https://github.com/user-attachments/assets/498b0a95-f35c-4ff5-8831-e4c5c68e5f94" /> # Docs See #28453
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #28447