Skip to content

Commit

Permalink
V0.40.0 rc.1 update refs (release branch) (#6501)
Browse files Browse the repository at this point in the history
* Fix an issue where services were included in the graph and updated in a child flow controller (#6486)

* prevent remotecfg from propagating to a NewController

Signed-off-by: erikbaranowski <[email protected]>

* Fix an issue where services were included in the graph and updated in a child flow controller.

Signed-off-by: erikbaranowski <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Robert Fratto <[email protected]>

---------

Signed-off-by: erikbaranowski <[email protected]>
Co-authored-by: Robert Fratto <[email protected]>
(cherry picked from commit c00b19c)

* Update refs for v0.40.0-rc.1 (#6500)

* Update refs for v0.40.0-rc.1

  - Update references in preparation for v0.40.0-rc.1 release

* Re-trigger CI

(cherry picked from commit 500efc3)

---------

Co-authored-by: Erik Baranowski <[email protected]>
  • Loading branch information
jcreixell and erikbaranowski authored Feb 23, 2024
1 parent 7e6b7fe commit 299d17b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ changes that impact end-user behavior are listed; changes to documentation or
internal API changes are not present.


v0.40.0-rc.0 (2024-02-22)
v0.40.0-rc.1 (2024-02-23)
-------------------------

### Breaking changes
Expand Down Expand Up @@ -110,6 +110,8 @@ v0.40.0-rc.0 (2024-02-22)

- Fix bug in `pyroscope.ebpf` component when elf's PT_LOAD section is not page aligned . [PR](https://github.com/grafana/pyroscope/pull/2983) (@korniltsev)

- Fix an issue where the configuration of the `http` and `remotecfg` blocks get ignored after loading a module. (@erikbaranowski)

### Other changes

- Removed support for Windows 2012 in line with Microsoft end of life. (@mattdurham)
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.40.0-rc.0
AGENT_RELEASE: v0.40.0-rc.1
OTEL_VERSION: v0.87.0
---

Expand Down
19 changes: 11 additions & 8 deletions pkg/flow/internal/controller/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ func (l *Loader) populateServiceNodes(g *dag.Graph, serviceBlocks []*ast.BlockSt

// First, build the services.
for _, svc := range l.services {
if !l.isRootController() {
break
}

id := svc.Definition().Name

if g.GetByID(id) != nil {
Expand Down Expand Up @@ -402,7 +406,7 @@ func (l *Loader) populateServiceNodes(g *dag.Graph, serviceBlocks []*ast.BlockSt
for _, block := range serviceBlocks {
blockID := BlockComponentID(block).String()

if l.isModule() {
if !l.isRootController() {
diags.Add(diag.Diagnostic{
Severity: diag.SeverityLevelError,
Message: fmt.Sprintf("service blocks not allowed inside a module: %q", blockID),
Expand Down Expand Up @@ -470,17 +474,17 @@ func (l *Loader) populateConfigBlockNodes(args map[string]any, g *dag.Graph, con
g.Add(node)
}

validateDiags := nodeMap.Validate(l.isModule(), args)
validateDiags := nodeMap.Validate(!l.isRootController(), args)
diags = append(diags, validateDiags...)

// If a logging config block is not provided, we create an empty node which uses defaults.
if nodeMap.logging == nil && !l.isModule() {
if nodeMap.logging == nil && l.isRootController() {
c := NewDefaultLoggingConfigNode(l.globals)
g.Add(c)
}

// If a tracing config block is not provided, we create an empty node which uses defaults.
if nodeMap.tracing == nil && !l.isModule() {
if nodeMap.tracing == nil && l.isRootController() {
c := NewDefaulTracingConfigNode(l.globals)
g.Add(c)
}
Expand Down Expand Up @@ -828,10 +832,9 @@ func multierrToDiags(errors error) diag.Diagnostics {
return diags
}

// If the definition of a module ever changes, update this.
func (l *Loader) isModule() bool {
// Either 1 of these checks is technically sufficient but let's be extra careful.
return l.globals.OnExportsChange != nil && l.globals.ControllerID != ""
// isRootController returns true if the loader is for the root flow controller.
func (l *Loader) isRootController() bool {
return l.globals.ControllerID == ""
}

// findCustomComponentReferences returns references to import/declare nodes in a declare block.
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package operator

// Supported versions of the Grafana Agent.
var (
DefaultAgentVersion = "v0.40.0-rc.0"
DefaultAgentVersion = "v0.40.0-rc.1"
DefaultAgentBaseImage = "grafana/agent"
DefaultAgentImage = DefaultAgentBaseImage + ":" + DefaultAgentVersion
)
Expand Down
2 changes: 1 addition & 1 deletion tools/gen-versioned-files/agent-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.40.0-rc.0
v0.40.0-rc.1

0 comments on commit 299d17b

Please sign in to comment.