Skip to content

Commit

Permalink
Merge branch 'main' into jdb/2024-08-update-publish-workflows-to-avoi…
Browse files Browse the repository at this point in the history
…d-org-secrets
  • Loading branch information
dehaansa authored Jan 14, 2025
2 parents 0e8dc77 + 2b1e3dc commit cd1b6f7
Show file tree
Hide file tree
Showing 82 changed files with 1,178 additions and 520 deletions.
122 changes: 61 additions & 61 deletions .drone/drone.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .drone/pipelines/build_images.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local locals = {
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',
'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes',
'docker buildx create --name multiarch --driver docker-container --use',
'docker buildx build --build-arg="GO_RUNTIME=golang:1.22.5-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image',
'docker buildx build --build-arg="GO_RUNTIME=golang:1.22.9-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image',
],
}],
volumes: [{
Expand All @@ -55,7 +55,7 @@ local locals = {
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',
'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes',
'docker buildx create --name multiarch --driver docker-container --use',
'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image',
'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.9-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image',
],
}],
volumes: [{
Expand Down
10 changes: 0 additions & 10 deletions .github/issue_commands.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/bump-formula-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Update Homebrew formula
if: 'steps.latest_release.outputs.release_id == github.event.release.id'
uses: dawidd6/action-homebrew-bump-formula@v3
uses: dawidd6/action-homebrew-bump-formula@v4
with:
# Required, custom GitHub access token with the 'public_repo' and 'workflow' scopes
token: ${{secrets.HOMEBREW_FORMULA_GH_TOKEN}}
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Update Homebrew formula
if: 'steps.latest_release.outputs.release_id == github.event.release.id'
uses: dawidd6/action-homebrew-bump-formula@v3
uses: dawidd6/action-homebrew-bump-formula@v4
with:
# Required, custom GitHub access token with the 'public_repo' and 'workflow' scopes
token: ${{secrets.HOMEBREW_FORMULA_GH_TOKEN}}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-linux-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check-linux-build-image:
runs-on: ubuntu-latest
runs-on: github-hosted-ubuntu-x64-large
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -19,19 +19,19 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Create test Linux build image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./build-image
push: false
tags: grafana/agent-build-image:latest
build-args: |
GO_RUNTIME=golang:1.22.5-bullseye
GO_RUNTIME=golang:1.22.9-bullseye
- name: Create test Linux build image for boring crypto
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./build-image
push: false
tags: grafana/agent-build-image:latest
build-args: |
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.9-bullseye
2 changes: 1 addition & 1 deletion .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
# The tag name in grafana/helm-charts is <package>-<version>, while the
# tag name for grafana/agent is helm-chart/<version>.
- name: Make github release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.parse-chart.outputs.packagename }}
repository: grafana/helm-charts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: ct lint --config ./operations/helm/ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.11.0
if: steps.list-changed.outputs.changed == 'true'

- name: Add dependency chart repos
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:
jobs:
run_tests:
runs-on: ubuntu-latest
runs-on: github-hosted-ubuntu-x64-large
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/issue_commands.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7c2007bcb556501da015201bcba5aa14069b74e2
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0
with:
image-ref: 'grafana/agent:main'
format: 'template'
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,61 @@ internal API changes are not present.
Main (unreleased)
-----------------

v0.44.0-rc.0 (2024-12-19)
-------------------------

### Bugfixes

- `loki.source.podlogs`: Fixed a bug which prevented clustering from working and caused duplicate logs to be sent.
The bug only happened when no `selector` or `namespace_selector` blocks were specified in the Agent configuration. (@ptodev)

- `pyroscope.scrape` no longer tries to scrape endpoints which are not active targets anymore. (@wildum @mattdurham @dehaansa @ptodev)

### Enhancements

- Upgrade `github.com/goccy/go-json` to v0.10.4, which reduces the memory consumption of an Agent instance by 20MB.
If Agent is running certain otelcol components, this reduction will not apply. (@ptodev)

### Other changes

- Remove setcap for `cap_net_bind_service` to allow Agent to run in restricted environments.
Modern container runtimes allow binding to unprivileged ports as non-root. (@ptodev)

v0.43.4 (2024-11-25)
-----------------

### Other

- Update to go 1.22.9 (@mattdurham)

v0.43.3 (2024-09-26)
-------------------------

### Bugfixes

- Windows installer: Don't quote Alloy's binary path in the Windows Registry. (@jkroepke)

v0.43.2 (2024-09-25)
-------------------------

### Security fixes

- Add quotes to windows service path to prevent path interception attack. [CVE-2024-8996](https://grafana.com/security/security-advisories/cve-2024-8996/) (@wildum)

v0.43.0 (2024-09-11)
-------------------------

### Bugfixes

- Fix a memory leak which would occur any time `loki.process` had its configuration reloaded. (@ptodev)

- Fix a bug where custom components would not shadow the stdlib. If you have a module whose name conflicts with an stdlib function
and if you use this exact function in your config, then you will need to rename your module. (@wildum)

- Fix an issue where nested import.git config blocks could conflict if they had the same labels. (@wildum)

- Fix an issue where `loki.source.docker` stops collecting logs after a container restart. (@wildum)

### Other changes

- Change the Docker base image for Linux containers to `ubuntu:noble`. (@amontalban)
Expand Down
2 changes: 1 addition & 1 deletion build-image/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM library/golang:1.22.5-windowsservercore-1809
FROM library/golang:1.22.9-windowsservercore-1809

SHELL ["powershell", "-command"]

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.2 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
5 changes: 2 additions & 3 deletions cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.2 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down Expand Up @@ -41,7 +41,7 @@ LABEL org.opencontainers.image.source="https://github.com/grafana/agent"
# Install dependencies needed at runtime.
RUN <<EOF
apt-get update
apt-get install -qy libsystemd-dev tzdata ca-certificates libcap2-bin
apt-get install -qy libsystemd-dev tzdata ca-certificates
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EOF

Expand All @@ -53,7 +53,6 @@ RUN groupadd --gid $UID $USERNAME
RUN useradd -m -u $UID -g $UID $USERNAME
RUN chown -R $USERNAME:$USERNAME /etc/agent
RUN chown -R $USERNAME:$USERNAME /bin/grafana-agent
RUN setcap 'cap_net_bind_service=+ep' /bin/grafana-agent

ENTRYPOINT ["/bin/grafana-agent"]
ENV AGENT_DEPLOY_MODE=docker
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.41.1-windows as builder
FROM grafana/agent-build-image:0.41.2-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.2 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.41.1-windows as builder
FROM grafana/agent-build-image:0.41.2-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
6 changes: 3 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ include docs.mk
docs: check-cloudwatch-integration

check-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.9-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.9-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md

generate-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go generate
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.9-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go generate

sources/assets/hierarchy.svg: sources/operator/hierarchy.dot
cat $< | $(PODMAN) run --rm -i nshine/dot dot -Tsvg > $@
4 changes: 2 additions & 2 deletions docs/developer/release/3-update-version-in-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The project must be updated to reference the upcoming release tag whenever a new
3. Create a PR to merge to main (must be merged before continuing).
- Release Candidate example PR [here](https://github.com/grafana/agent/pull/3065)
- Release Candidate example PR [here](https://github.com/grafana/agent/pull/6987)
- Stable Release example PR [here](https://github.com/grafana/agent/pull/6993)
- Patch Release example PR [here](https://github.com/grafana/agent/pull/6944)
Expand All @@ -52,7 +52,7 @@ The project must be updated to reference the upcoming release tag whenever a new
6. Create a PR to merge to `release-VERSION_PREFIX` (must be merged before continuing).
- Release Candidate example PR [here](https://github.com/grafana/agent/pull/3066)
- Release Candidate example PR [here](https://github.com/grafana/agent/pull/6988)
- Stable Release example PR [here](https://github.com/grafana/agent/pull/6994)
- Patch Release example PR [here](https://github.com/grafana/agent/pull/6945)
- This PR takes a shortcut by both changing the version and cherry-picking other required changes on the release branch.
32 changes: 24 additions & 8 deletions docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,28 @@
# [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.
#
# ## 8.3.0 (2024-12-27)
#
# ### Added
#
# - Debug output of the final command when DEBUG=true.
#
# Useful to inspect if the script is correctly constructing the final command.
#
# ## 8.2.0 (2024-12-22)
#
# ### Removed
#
# - Special cases for Oracle and Datadog plugins now that they exist in the plugins monorepo.
#
# ## 8.1.0 (2024-08-22)
#
# ### Added
#
# - Additional website mounts for projects that use the website repository.
#
# Mounts are required for `make docs` to work in the website repository or with the website project.
# The Makefile is also mounted for convenient development of the procedure that repository.
# The Makefile is also mounted for convenient development of the procedure in that repository.
#
# ## 8.0.1 (2024-07-01)
#
Expand Down Expand Up @@ -355,8 +369,6 @@ SOURCES_grafana_cloud_frontend_observability_faro_web_sdk='faro-web-sdk'
SOURCES_helm_charts_mimir_distributed='mimir'
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'
Expand All @@ -367,8 +379,6 @@ VERSIONS_grafana_cloud_k6='UNVERSIONED'
VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
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'
Expand All @@ -378,8 +388,6 @@ PATHS_grafana_cloud='content/docs/grafana-cloud'
PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
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'
Expand Down Expand Up @@ -631,7 +639,7 @@ POSIX_HERESTRING

case "${_project}" in
# Workaround for arbitrary mounts where the version field is expected to be the local directory
# and the repo field is expected to be the container directory.
# and the repo field is expected to be the container directory.
arbitrary)
echo "${_project}^${_version}^${_repo}^" # TODO
;;
Expand Down Expand Up @@ -801,6 +809,10 @@ case "${image}" in
| sed "s#$(proj_dst "${proj}")#sources#"
EOF

if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi

case "${OUTPUT_FORMAT}" in
human)
if ! command -v jq >/dev/null 2>&1; then
Expand Down Expand Up @@ -837,6 +849,10 @@ EOF
/hugo/content/docs
EOF

if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi

case "${OUTPUT_FORMAT}" in
human)
${cmd} --output=line \
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: Grafana Agent
description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry collector
weight: 350
cascade:
AGENT_RELEASE: v0.42.0
AGENT_RELEASE: v0.44.0-rc.0
OTEL_VERSION: v0.96.0
refs:
variants:
Expand Down
Loading

0 comments on commit cd1b6f7

Please sign in to comment.