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

[filestorage] - Add directory validation for compaction on-rebound #35114

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

VihasMakwana
Copy link
Contributor

@VihasMakwana VihasMakwana commented Sep 10, 2024

Description:

Currently, we only verify the existence of the compaction directory when compaction.on_start is enabled. This check should also be performed when compaction.on_rebound is enabled.
Otherwise, we encounter continuous error notifications due to the directory not existing, which results in compaction failures.

Testing: Added

{
name: "directory-must-exists-error",
validate: func(t *testing.T) {
f := NewFactory()
Copy link

@mauri870 mauri870 Sep 10, 2024

Choose a reason for hiding this comment

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

Most of the validate function body is the same for every test, do you think it is worth to refactor it so that tests is a []struct {name string; config *Config; err error } or similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've refactored them, but we still need to call CreateDefaultConfig() since some of the fields, while not relevant to this test, are still required.

@djaglowski djaglowski merged commit 0678231 into open-telemetry:main Sep 10, 2024
155 of 156 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants