Skip to content

Commit

Permalink
Cherry pick commits for v1.3.1 release (#1534)
Browse files Browse the repository at this point in the history
* Remove fail-fast behaviour on cluster bootstrap when peers discovery fails (#1513)

(cherry picked from commit 5f50950)

* Fix memory leak in `loki.process` on config update (#1431)

* Cleanup loki.process on update

* Fix goroutine leaks in other unit tests

* Refactor unit test

* Cleanup unit test code
* close output channels
* stop the updating process first

* Increase timeout for Mimir ruler test

(cherry picked from commit 5bca979)

* changelog wording

* update docker command in integration tests (#1421)

(cherry picked from commit b59e6c3)

---------

Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
Co-authored-by: William Dumont <william.dumont@grafana.com>
  • Loading branch information
3 people authored Aug 23, 2024
1 parent dfc3968 commit e9e0d5b
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 69 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ This document contains a historical list of changes between releases. Only
changes that impact end-user behavior are listed; changes to documentation or
internal API changes are not present.

v1.3.1
-----------------

### Bugfixes

- Changed the cluster startup behaviour, reverting to the previous logic where
a failure to resolve cluster join peers results in the node creating its own cluster. This is
to facilitate the process of bootstrapping a new cluster following user feedback (@thampiotr)


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

v1.3.0
-----------------

Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/integration-tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func buildAlloy() {
}

func setupEnvironment() {
executeCommand("docker-compose", []string{"up", "-d"}, "Setting up environment with Docker Compose")
executeCommand("docker", []string{"compose", "up", "-d"}, "Setting up environment with Docker Compose")
fmt.Println("Sleep for 45 seconds to ensure that the env has time to initialize...")
time.Sleep(45 * time.Second)
}
Expand Down Expand Up @@ -114,7 +114,7 @@ func runAllTests() {

func cleanUpEnvironment() {
fmt.Println("Cleaning up Docker environment...")
err := exec.Command("docker-compose", "down", "--volumes", "--rmi", "all").Run()
err := exec.Command("docker", "compose", "down", "--volumes", "--rmi", "all").Run()
if err != nil {
panic(err)
}
Expand Down
6 changes: 3 additions & 3 deletions internal/component/loki/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func (c *Component) Run(ctx context.Context) error {
if c.entryHandler != nil {
c.entryHandler.Stop()
}
close(c.processIn)
c.mut.RUnlock()
}()
wg := &sync.WaitGroup{}
Expand Down Expand Up @@ -138,8 +137,9 @@ func (c *Component) Update(args component.Arguments) error {
if err != nil {
return err
}
c.entryHandler = loki.NewEntryHandler(c.processOut, func() { pipeline.Cleanup() })
c.processIn = pipeline.Wrap(c.entryHandler).Chan()
entryHandler := loki.NewEntryHandler(c.processOut, func() { pipeline.Cleanup() })
c.entryHandler = pipeline.Wrap(entryHandler)
c.processIn = c.entryHandler.Chan()
c.stages = newArgs.Stages
}

Expand Down
Loading

0 comments on commit e9e0d5b

Please sign in to comment.