From e41ae61f5842d45f3132b1c5807e6fc04653f366 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:18:39 +0100 Subject: [PATCH 1/3] Update `make docs` procedure (#6874) Co-authored-by: grafanabot --- docs/make-docs | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/docs/make-docs b/docs/make-docs index 43efdb5faad3..fc4f3d7a148f 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -6,6 +6,22 @@ # [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes. # Changes are relevant to this script and the support docs.mk GNU Make interface. # +# ## 6.1.0 (2024-04-22) +# +# ### Changed +# +# - Mount volumes with SELinux labels. +# +# https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label +# +# ## 6.1.0 (2024-04-22) +# +# ### Added +# +# - Pseudo project for including only website resources and no website content. +# +# Facilitates testing shortcodes and layout changes with a small documentation set instead of Grafana Cloud or the entire website. +# # ## 6.0.1 (2024-02-28) # # ### Added @@ -300,6 +316,7 @@ SOURCES_helm_charts_tempo_distributed='tempo' SOURCES_opentelemetry='opentelemetry-docs' SOURCES_plugins_grafana_datadog_datasource='datadog-datasource' SOURCES_plugins_grafana_oracle_datasource='oracle-datasource' +SOURCES_resources='website' VERSIONS_as_code='UNVERSIONED' VERSIONS_grafana_cloud='UNVERSIONED' @@ -311,6 +328,7 @@ VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED' VERSIONS_opentelemetry='UNVERSIONED' VERSIONS_plugins_grafana_datadog_datasource='latest' VERSIONS_plugins_grafana_oracle_datasource='latest' +VERSIONS_resources='UNVERSIONED' VERSIONS_technical_documentation='UNVERSIONED' VERSIONS_website='UNVERSIONED' VERSIONS_writers_toolkit='UNVERSIONED' @@ -321,6 +339,7 @@ PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed' PATHS_mimir='docs/sources/mimir' PATHS_plugins_grafana_datadog_datasource='docs/sources' PATHS_plugins_grafana_oracle_datasource='docs/sources' +PATHS_resources='content' PATHS_tempo='docs/sources/tempo' PATHS_website='content' @@ -584,6 +603,11 @@ POSIX_HERESTRING proj_to_url_src_dst_ver "$(new_proj helm-charts/mimir-distributed "${_version}")" proj_to_url_src_dst_ver "$(new_proj enterprise-metrics "${_version}")" ;; + resources) + _repo="$(repo_path website)" + echo "arbitrary^${_repo}/config^/hugo/config" "arbitrary^${_repo}/layouts^/hugo/layouts" "arbitrary^${_repo}/scripts^/hugo/scripts" + unset _repo + ;; traces) proj_to_url_src_dst_ver "$(new_proj tempo "${_version}")" proj_to_url_src_dst_ver "$(new_proj enterprise-traces "${_version}")" @@ -617,7 +641,7 @@ $x POSIX_HERESTRING if [ -n "${url}" ]; then - if [ "${_url}" != "arbitrary" ]; then + if [ "${url}" != arbitrary ]; then printf '\r %s\r\n' "${url}" fi fi @@ -670,9 +694,9 @@ POSIX_HERESTRING fi _repo="$(repo_path website)" - volumes="--volume=${_repo}/config:/hugo/config" - volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts" - volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts" + volumes="--volume=${_repo}/config:/hugo/config:z" + volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts:z" + volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts:z" fi unset _project _repo done @@ -682,7 +706,7 @@ for x in ${url_src_dst_vers}; do $x POSIX_HERESTRING - if [ "${_url}" != "arbitrary" ]; then + if [ "${_url}" != arbitrary ]; then if [ ! -f "${_src}/_index.md" ]; then errr "Index file '${_src}/_index.md' does not exist." note "Is '${_src}' the correct source directory?" @@ -693,9 +717,9 @@ POSIX_HERESTRING debg "Mounting '${_src}' at container path '${_dst}'" if [ -z "${volumes}" ]; then - volumes="--volume=${_src}:${_dst}" + volumes="--volume=${_src}:${_dst}:z" else - volumes="${volumes} --volume=${_src}:${_dst}" + volumes="${volumes} --volume=${_src}:${_dst}:z" fi if [ -n "${_ver}" ] && [ "${_ver}" != 'UNVERSIONED' ]; then @@ -789,7 +813,7 @@ fi ${WEBSITE_EXEC} EOF chmod +x "${tempfile}" - volumes="${volumes} --volume=${tempfile}:/entrypoint" + volumes="${volumes} --volume=${tempfile}:/entrypoint:z" readonly volumes IFS='' read -r cmd < Date: Tue, 23 Apr 2024 15:32:17 +0100 Subject: [PATCH 2/3] Sum in alerts by cluster and namespace (#6875) --- operations/agent-flow-mixin/alerts/opentelemetry.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet b/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet index 7863d44cdf22..cb16033a0a4c 100644 --- a/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet +++ b/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet @@ -8,7 +8,7 @@ alert.newGroup( // imposed by otelcol.processor.memory_limiter. alert.newRule( 'OtelcolReceiverRefusedSpans', - 'sum(rate(receiver_refused_spans_ratio_total{}[1m])) > 0', + 'sum by (cluster, namespace) (rate(receiver_refused_spans_ratio_total{}[1m])) > 0', 'The receiver could not push some spans to the pipeline.', '5m', ), @@ -17,7 +17,7 @@ alert.newGroup( // There could be an issue with the payload or with the destination endpoint. alert.newRule( 'OtelcolExporterFailedSpans', - 'sum(rate(exporter_send_failed_spans_ratio_total{}[1m])) > 0', + 'sum by (cluster, namespace) (rate(exporter_send_failed_spans_ratio_total{}[1m])) > 0', 'The exporter failed to send spans to their destination.', '5m', ), From 817be06b4a2261275acab8ed6096968bad6b0f8a Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Wed, 24 Apr 2024 18:23:56 +0300 Subject: [PATCH 3/3] packaging: properly unregister Grafana Agent when uninstalling on Windows (#166) (#6867) grafana/agent#6550 fixed an issue where the service settings were not being removed properly, but inadvertedly broke the process of removing the application from the Add/Remove programs list. Grafana AGent is registered as a program to the 32-bit registry, and so it must be removed from the 32-bit registry and not the 64-bit registry. Co-authored-by: Robert Fratto --- CHANGELOG.md | 3 +++ packaging/grafana-agent-flow/windows/install_script.nsis | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ef9e663f508..d3021ebe446b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,9 @@ Main (unreleased) - Fixed an issue where creating a `prometheus.exporter.postgres` component with multiple `data_source_names` would result in an error. (@thampiotr) +- Fix an issue on Windows where uninstalling Alloy did not remove it from the + Add/Remove programs list. (@rfratto) + ### Other changes - Clustering for Grafana Agent in Flow mode has graduated from beta to stable. diff --git a/packaging/grafana-agent-flow/windows/install_script.nsis b/packaging/grafana-agent-flow/windows/install_script.nsis index dfb8ae95b3c7..0d06eae01d76 100644 --- a/packaging/grafana-agent-flow/windows/install_script.nsis +++ b/packaging/grafana-agent-flow/windows/install_script.nsis @@ -218,9 +218,10 @@ Section "uninstall" RMDir /r "$INSTDIR" # Install directory. RMDir /r "$APPDATA\${APPNAME}" # Application data. - # Remove service and uninstaller information from the registry. + # Remove service and uninstaller information from the registry. Note that the + # service settings are stored in the 64-bit registry (so we use /reg:64), + # while the uninstaller information is stored in the 32-bit registry. nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Grafana\Grafana Agent Flow" /reg:64 /f' Pop $0 - nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" /reg:64 /f' - Pop $0 + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" SectionEnd