diff --git a/documentation/release_notes_8.markdown b/documentation/release_notes_8.markdown index 3974dea52a..3645e3607f 100644 --- a/documentation/release_notes_8.markdown +++ b/documentation/release_notes_8.markdown @@ -12,6 +12,19 @@ canonical: "/puppetdb/latest/release_notes.html" # PuppetDB: Release notes +## PuppetDB 8.5.1 + +Released TBD. + +### Bug fixes + +* Fix an error when querying for `nodes` and `latest_report_status` + [GitHub #3966](https://github.com/puppetlabs/puppetdb/issues/3966) + +### Contributors + +Austin Blatt and ... + ## PuppetDB 8.5.0 Released April 11 2024 diff --git a/src/puppetlabs/puppetdb/query_eng/engine.clj b/src/puppetlabs/puppetdb/query_eng/engine.clj index 6478c2a48e..c17e24dae5 100644 --- a/src/puppetlabs/puppetdb/query_eng/engine.clj +++ b/src/puppetlabs/puppetdb/query_eng/engine.clj @@ -353,7 +353,7 @@ "latest_report_status" {:type :string :queryable? true :field :report_statuses.status - :join-deps #{:report_statuses :reports}} + :join-deps #{:certnames :report_statuses :reports}} "latest_report_corrective_change" {:type :boolean :queryable? true :field :reports.corrective_change diff --git a/test/puppetlabs/puppetdb/http/nodes_test.clj b/test/puppetlabs/puppetdb/http/nodes_test.clj index b882f0cd1a..1558267676 100644 --- a/test/puppetlabs/puppetdb/http/nodes_test.clj +++ b/test/puppetlabs/puppetdb/http/nodes_test.clj @@ -123,7 +123,9 @@ (testing "querying on latest report status works" (is-query-result' ["=" "latest_report_status" "success"] []) (is-query-result' ["=" "latest_report_status" "failure"] []) - (is-query-result' ["=" "latest_report_status" "unchanged"] [web1 db puppet])) + (is-query-result' ["=" "latest_report_status" "unchanged"] [web1 db puppet]) + (is (= #{{:latest_report_status nil} {:latest_report_status "unchanged"}} + (query-result method endpoint ["extract" ["latest_report_status"]])))) (testing "querying on latest report noop works" (is-query-result' ["=" "latest_report_noop" true] [])