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

feat: add S3 chunk delimiter config to support MinIO running on Windows #16319

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Notedop
Copy link

@Notedop Notedop commented Feb 17, 2025

What this PR does / why we need it:
When MinIO runs on Windows, it cannot handle the colon ":" chunk delimiter and any put of chunks will be rejected.
Confirmed by MinIO here

This change allows the user to override the chunk delimiter similar as we allow for Azure storage configuration.

Default chunk delimiter remains unchanged for backwards compatibility.
Delimiter is converted before sending out a chunk (put) as well as when listing chunks (list) to continue to support any downstream logic.

Which issue(s) this PR fixes:
Fixes #14600

Special notes for your reviewer:
Only updated the documented example and added a comment for it's specific usage

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

when the chunk_delimiter is specified then the objectkey will be converted
prior to sending a request to the S3 (MinIO) storage provider.
The list() response creates StorageObjects so convert the key back to normal
again so that downstream logic still works.
@Notedop Notedop requested a review from a team as a code owner February 17, 2025 10:50
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Feb 17, 2025
@cyriltovena
Copy link
Contributor

Makes sense though you can't change this midflight. We should probably document it.

adding the flag mapping as well as updating
the documentation.
@Notedop
Copy link
Author

Notedop commented Feb 26, 2025

@cyriltovena added flag and updated documentation

@Notedop
Copy link
Author

Notedop commented Mar 5, 2025

@cyriltovena can you let me know if the PR is fine with the comments handled?

configuration.md is auto generated and usage is coming from
the RegisterFlagsWithPrefix definition.
@Notedop
Copy link
Author

Notedop commented Mar 10, 2025

@cyriltovena @JStickler comments have been addressed. Please let me know if there is anything else to address.

@JStickler
Copy link
Contributor

@Notedop, since you added a flag, you need to update the generated configuration documentation by running 'make doc' (singular) from the root directory (/loki) and commit the generated changes. Then we should be ready to merge this.

@Notedop
Copy link
Author

Notedop commented Mar 11, 2025

@JStickler I ran make doc and it automatically updated configuration.md with the changes extracted from the flag configuration from RegisterFlagsWithPrefix.

Copy link
Contributor

@ashwanthgoli ashwanthgoli left a comment

Choose a reason for hiding this comment

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

lgtm!

Ideally we should also support this option for new storage clients introduced in 3.4 release but it should not block us from merging this
https://grafana.com/docs/loki/latest/setup/migrate/migrate-storage-clients/

@Notedop Notedop closed this Mar 12, 2025
@Notedop Notedop reopened this Mar 12, 2025
@Notedop
Copy link
Author

Notedop commented Mar 12, 2025

@ashwanthgoli So there's one test failing but I don't see how it is related to this change. What would be best method to address this?

Update: After rerunning the previously failing test is now passing (promtail test was failing). But still the golangcilint check is failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M 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.

Please add support for chunkDelimiter also to S3 storage
4 participants