🐛 jamf: fix provider ID mismatch that broke all queries#8870
Open
AdamVB wants to merge 2 commits into
Open
Conversation
The jamf provider's config.go ID was "go.mondoo.com/mql/providers/jamf" while the schema (derived from jamf.lr's `option provider`) uses "go.mondoo.com/mql/v13/providers/jamf". At providers/runtime.go:931 the runtime compares the resource's owning provider (info.Provider, from the schema) against the connected provider's Instance.ID (from config.go). The missing /v13/ segment made them differ, and since jamf isn't in the cross-provider allowlist, every jamf resource lookup failed with "incorrect provider for asset, not adding go.mondoo.com/mql/v13/providers/jamf" and returned no data — even though the connection to Jamf Pro succeeded. Align the config.go ID with the .lr provider option and the go.mod module path (go.mondoo.com/mql/v13/providers/jamf). jamf was the only provider whose .lr provider option and config.go ID disagreed. Fixes #8868 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No reviewable changes found. All changed files were either excluded by path filters or the diff was empty. |
| @@ -12,8 +12,8 @@ import ( | |||
|
|
|||
| var Config = plugin.Provider{ | |||
| Name: "jamf", | |||
| ID: "go.mondoo.com/mql/providers/jamf", | |||
| Version: "13.1.6", | |||
| ID: "go.mondoo.com/mql/v13/providers/jamf", | |||
There was a problem hiding this comment.
🔴 critical — The ID is updated here but providers/defaults.go line 432 still has the old value "go.mondoo.com/mql/providers/jamf". The defaults registry is what the runtime uses to discover providers before their binary is loaded, so the mismatch will persist. Update providers/defaults.go to use "go.mondoo.com/mql/v13/providers/jamf" as well.
Contributor
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.
The jamf provider's config.go ID was "go.mondoo.com/mql/providers/jamf" while the schema (derived from jamf.lr's
option provider) uses "go.mondoo.com/mql/v13/providers/jamf". At providers/runtime.go:931 the runtime compares the resource's owning provider (info.Provider, from the schema) against the connected provider's Instance.ID (from config.go). The missing /v13/ segment made them differ, and since jamf isn't in the cross-provider allowlist, every jamf resource lookup failed with "incorrect provider for asset, not addinggo.mondoo.com/mql/v13/providers/jamf" and returned no data — even though the connection to Jamf Pro succeeded.
Align the config.go ID with the .lr provider option and the go.mod module path (go.mondoo.com/mql/v13/providers/jamf). jamf was the only provider whose .lr provider option and config.go ID disagreed.
Fixes #8868