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

OpenSearch indexes partitioned to daily partitions #4

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

xdaniel3
Copy link

  • allow to match them through pattern matching

@xdaniel3 xdaniel3 force-pushed the tda/feat/index_pattern_matching branch 2 times, most recently from 3ff7082 to a7e9f1c Compare November 5, 2023 23:44
@coveralls
Copy link

coveralls commented Nov 6, 2023

Pull Request Test Coverage Report for Build 6796045226

  • 36 of 39 (92.31%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 92.118%

Changes Missing Coverage Covered Lines Changed/Added Lines %
security/backends/elasticsearch/connection.py 3 4 75.0%
security/backends/elasticsearch/models.py 28 29 96.55%
security/backends/elasticsearch/tests.py 4 5 80.0%
Totals Coverage Status
Change from base Build 5115838720: -0.02%
Covered Lines: 3366
Relevant Lines: 3654

💛 - Coveralls

@xdaniel3 xdaniel3 force-pushed the tda/feat/index_pattern_matching branch 7 times, most recently from c3caaa9 to 47959df Compare November 7, 2023 10:53
logstash.example.conf Outdated Show resolved Hide resolved
@xdaniel3 xdaniel3 force-pushed the tda/feat/index_pattern_matching branch from 47959df to 350dab1 Compare November 8, 2023 08:58
- allow to match them through pattern matching
@xdaniel3 xdaniel3 force-pushed the tda/feat/index_pattern_matching branch from 350dab1 to 071ed96 Compare November 8, 2023 09:09
@xdaniel3 xdaniel3 merged commit e4742b8 into master Nov 8, 2023
14 checks passed
@@ -3,6 +3,7 @@
from django.test.utils import override_settings

from .models import CommandLog, CeleryTaskRunLog, CeleryTaskInvocationLog, InputRequestLog, OutputRequestLog
from .models import PartitionedLog

Choose a reason for hiding this comment

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

why is there another import line instead of an addition to the one above?

Copy link
Author

Choose a reason for hiding this comment

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

line length would be too long

Choose a reason for hiding this comment

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

why not use parentheses instead? they are used elsewhere int he project

Copy link
Author

Choose a reason for hiding this comment

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

Ok, but let's incorporate some linting, it's hard to search in project what conventions should be used.

template = document_class.get_template()
template.save()
else:
document_class.init()

Choose a reason for hiding this comment

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

Wouldn't it be better to override the init method of the PartitionedLog and save the template there? You could remove this whole if/else change in both places and it would comform to the pattern of the other Documents.

Copy link
Author

Choose a reason for hiding this comment

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

init is particularly for creating index, while I create here just a template, so it might be confusing imho. This implementation is directly from documentation of elasticsearch-dsl for time-based indexes.
But it could be in some function, that's for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants