Skip to content

Conversation

ivkalita
Copy link
Contributor

What this PR does / why we need it:

When opening the Loki project in IntelliJ GoLand, the IDE automatically runs "go list -m -mod=readonly all", which was updating go.mod and go.sum files in nested modules even with the -mod=readonly flag.

This occurs because:

Changes:

  • Synced cmd/dataobj-inspect/go.mod and go.sum with parent module dependencies
  • Removed cmd/segment-inspect entirely as it no longer compiles

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

…ent-inspect

When opening the Loki project in IntelliJ GoLand, the IDE automatically runs
"go list -m -mod=readonly all", which was updating go.mod and go.sum files in
nested modules even with the -mod=readonly flag.

This occurs because:
- cmd/dataobj-inspect uses "replace github.com/grafana/loki/v3 => ../.." which
  causes Go to sync transitive dependencies with the parent module whenever
  the dependency graph is resolved, even in readonly mode
- cmd/segment-inspect was outdated, depending on code removed in November 2024
  (PRs #14821 and #14828)

Changes:
- Synced cmd/dataobj-inspect/go.mod and go.sum with parent module dependencies
- Removed cmd/segment-inspect entirely as it no longer compiles
@ivkalita ivkalita marked this pull request as ready for review October 20, 2025 05:26
@ivkalita ivkalita requested a review from a team as a code owner October 20, 2025 05:26
@spiridonov
Copy link
Contributor

Thanks for looking into that! I think the reason cmd/segment-inspect does not compile is because it is not a part of Makefile and is not triggered by go build ./..., so it might be missing in CI. I think it is not outdated and abandoned, it just needs some love. There might be other tools that are rarely used and also fail compilation today because of overseen changes.

@ivkalita
Copy link
Contributor Author

Thanks for looking into that! I think the reason cmd/segment-inspect does not compile is because it is not a part of Makefile and is not triggered by go build ./..., so it might be missing in CI. I think it is not outdated and abandoned, it just needs some love. There might be other tools that are rarely used and also fail compilation today because of overseen changes.

@spiridonov thank you for the review! If this is the case I'm happy to make it work with the current WAL implementation. What I understood from the commit and PRs history though is that there was an "RF=1 WAL experiment" for which this CLI command was introduced. The code for the experiment was cleaned up a year ago but this command remained.

@benclive could you please also take a look? For sure my intention is not to remove something in-use 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants