Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove whole stream deletion mode #6435

Merged

Conversation

MichelHollands
Copy link
Contributor

@MichelHollands MichelHollands commented Jun 20, 2022

What this PR does / why we need it:

The whole stream deletion mode is no longer required as the filter-and-delete mode can do the same and more.

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0.3%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@MichelHollands MichelHollands marked this pull request as ready for review June 20, 2022 14:50
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
-        distributor	-0.3%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
-        distributor	-0.3%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
-               loki	-0.6%

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@MasslessParticle MasslessParticle left a comment

Choose a reason for hiding this comment

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

This looks good. I think things can be simplified by replacing the deletion mode switch statements with if statements.

pkg/loki/modules.go Outdated Show resolved Hide resolved
pkg/storage/stores/shipper/compactor/compactor.go Outdated Show resolved Hide resolved
pkg/storage/stores/shipper/compactor/deletion/mode_test.go Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jun 21, 2022
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0.1%

Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Michel Hollands <[email protected]>
@MichelHollands MichelHollands force-pushed the remove_whole_stream_deletion_mode branch from c85169b to 1610706 Compare June 22, 2022 11:38
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0.1%

@MasslessParticle
Copy link
Contributor

LGTM

@MasslessParticle MasslessParticle merged commit f80e487 into grafana:main Jun 22, 2022
Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

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

Docs look good to me.

@grafanabot
Copy link
Collaborator

The backport to k102 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-6435-to-k102 origin/k102
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x f80e487dcf106a6c4ea0a82d8afe7b0104addbc3
# Push it to GitHub
git push --set-upstream origin backport-6435-to-k102
git switch main
# Remove the local backport branch
git branch -D backport-6435-to-k102

Then, create a pull request where the base branch is k102 and the compare/head branch is backport-6435-to-k102.

MichelHollands added a commit to MichelHollands/loki that referenced this pull request Jun 23, 2022
* Remove whole-stream-deletion mode

Signed-off-by: Michel Hollands <[email protected]>

* Remove whole-stream-deletion from docs

Signed-off-by: Michel Hollands <[email protected]>

* Update the changelog

Signed-off-by: Michel Hollands <[email protected]>

* Sort changelog entries

Signed-off-by: Michel Hollands <[email protected]>

* Remove link to wrong configuration

Signed-off-by: Michel Hollands <[email protected]>

* Fix integration test

Signed-off-by: Michel Hollands <[email protected]>

* Set default deletion mode to disabled

Signed-off-by: Michel Hollands <[email protected]>

* Remove extra white line in documentation

Signed-off-by: Michel Hollands <[email protected]>

* Fix default value in docs

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Add DeletionEnabled method on mode

Signed-off-by: Michel Hollands <[email protected]>

* Rename test

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit f80e487)
MichelHollands added a commit that referenced this pull request Jun 23, 2022
* Remove whole stream deletion mode (#6435)

* Remove whole-stream-deletion mode

Signed-off-by: Michel Hollands <[email protected]>

* Remove whole-stream-deletion from docs

Signed-off-by: Michel Hollands <[email protected]>

* Update the changelog

Signed-off-by: Michel Hollands <[email protected]>

* Sort changelog entries

Signed-off-by: Michel Hollands <[email protected]>

* Remove link to wrong configuration

Signed-off-by: Michel Hollands <[email protected]>

* Fix integration test

Signed-off-by: Michel Hollands <[email protected]>

* Set default deletion mode to disabled

Signed-off-by: Michel Hollands <[email protected]>

* Remove extra white line in documentation

Signed-off-by: Michel Hollands <[email protected]>

* Fix default value in docs

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Add DeletionEnabled method on mode

Signed-off-by: Michel Hollands <[email protected]>

* Rename test

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit f80e487)

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog link

Signed-off-by: Michel Hollands <[email protected]>
grafanabot pushed a commit that referenced this pull request Jun 24, 2022
* Remove whole stream deletion mode (#6435)

* Remove whole-stream-deletion mode

Signed-off-by: Michel Hollands <[email protected]>

* Remove whole-stream-deletion from docs

Signed-off-by: Michel Hollands <[email protected]>

* Update the changelog

Signed-off-by: Michel Hollands <[email protected]>

* Sort changelog entries

Signed-off-by: Michel Hollands <[email protected]>

* Remove link to wrong configuration

Signed-off-by: Michel Hollands <[email protected]>

* Fix integration test

Signed-off-by: Michel Hollands <[email protected]>

* Set default deletion mode to disabled

Signed-off-by: Michel Hollands <[email protected]>

* Remove extra white line in documentation

Signed-off-by: Michel Hollands <[email protected]>

* Fix default value in docs

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Add DeletionEnabled method on mode

Signed-off-by: Michel Hollands <[email protected]>

* Rename test

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit f80e487)

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog link

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit da3fbd9)
vlad-diachenko pushed a commit that referenced this pull request Jun 24, 2022
)

* Remove whole stream deletion mode (#6435)

* Remove whole-stream-deletion mode

Signed-off-by: Michel Hollands <[email protected]>

* Remove whole-stream-deletion from docs

Signed-off-by: Michel Hollands <[email protected]>

* Update the changelog

Signed-off-by: Michel Hollands <[email protected]>

* Sort changelog entries

Signed-off-by: Michel Hollands <[email protected]>

* Remove link to wrong configuration

Signed-off-by: Michel Hollands <[email protected]>

* Fix integration test

Signed-off-by: Michel Hollands <[email protected]>

* Set default deletion mode to disabled

Signed-off-by: Michel Hollands <[email protected]>

* Remove extra white line in documentation

Signed-off-by: Michel Hollands <[email protected]>

* Fix default value in docs

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Add DeletionEnabled method on mode

Signed-off-by: Michel Hollands <[email protected]>

* Rename test

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit f80e487)

* Fix changelog

Signed-off-by: Michel Hollands <[email protected]>

* Fix changelog link

Signed-off-by: Michel Hollands <[email protected]>
(cherry picked from commit da3fbd9)

Co-authored-by: Michel Hollands <[email protected]>
@osg-grafana osg-grafana added type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories and removed area/docs labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants