Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

upgrade to loki v2.4.1 - #1102

Closed
rlankfo wants to merge 5 commits into
grafana-cold-storage:mainfrom
rlankfo:loki-2.4.1
Closed

upgrade to loki v2.4.1#1102
rlankfo wants to merge 5 commits into
grafana-cold-storage:mainfrom
rlankfo:loki-2.4.1

Conversation

@rlankfo

@rlankfo rlankfo commented Nov 15, 2021

Copy link
Copy Markdown
Contributor

PR Description

  • upgrade to loki v2.4.1.
  • replace cortex ring with dskit ring package

Which issue(s) this PR fixes

Fixes #1127

Notes to the Reviewer

The github.com/cortexproject/cortex/pkg/ring has been migrated to a more generic version of the ring in github.com/grafana/dskit/ring. Loki has moved to this version. There were some minor API differences this PR addresses, and this ring version uses promauto so we no longer need the calls to register. I believe we could also remove explicit calls to Unregister but I have not done that here.

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

Comment thread pkg/metrics/cluster/node.go Outdated
Comment thread pkg/metrics/cluster/node.go Outdated
Comment thread pkg/metrics/cluster/node.go Outdated
Comment thread pkg/metrics/cluster/node_test.go Outdated
lcConfig.Port = l.Addr().(*net.TCPAddr).Port

lc, err := ring.NewLifecycler(lcConfig, ring.NewNoopFlushTransferer(), "agent", "agent", false, prometheus.NewRegistry())
lc, err := ring.NewLifecycler(lcConfig, ring.NewNoopFlushTransferer(), "agent", "agent", false, logger, prometheus.NewRegistry())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can wrap here if it matters for the tests.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or if we don't use the registry in tests you can just pass nil instead of prometheus.NewRegistry()

Comment thread pkg/metrics/cluster/node.go Outdated
lcConfig.Port = l.Addr().(*net.TCPAddr).Port

lc, err := ring.NewLifecycler(lcConfig, ring.NewNoopFlushTransferer(), "agent", "agent", false, prometheus.NewRegistry())
lc, err := ring.NewLifecycler(lcConfig, ring.NewNoopFlushTransferer(), "agent", "agent", false, logger, prometheus.WrapRegistererWithPrefix("cortex_", prometheus.NewRegistry()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually in thinking, you can pass nil here in place of the registry since we don't even save it off to a variable, so I don't think we even look at it.

@rlankfo
rlankfo marked this pull request as draft November 15, 2021 23:06
@rlankfo rlankfo mentioned this pull request Nov 23, 2021
@stale

stale Bot commented Jan 3, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale Issue/PR mark as stale due lack of activity label Jan 3, 2022
@rlankfo rlankfo removed the stale Issue/PR mark as stale due lack of activity label Jan 11, 2022
@rfratto

rfratto commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

I'd like to return to this, but I think given the risk of upgrading to dskit means we should wait for #1326 first so we can be notified if something breaks here.

@rlankfo

rlankfo commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1422

@rlankfo rlankfo closed this Feb 24, 2022
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 3, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Loki v2.4.1

3 participants