-
Notifications
You must be signed in to change notification settings - Fork 29
bugfix: postgresql exporter delete task #119
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #119 +/- ##
==========================================
+ Coverage 67.66% 70.36% +2.69%
==========================================
Files 32 36 +4
Lines 1976 2500 +524
==========================================
+ Hits 1337 1759 +422
- Misses 570 646 +76
- Partials 69 95 +26
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
found++ | ||
// 1 hour in seconds | ||
assert.Contains(t, stat.String(), "sample_count:1 sample_sum:3600") | ||
assert.Regexp(t, regexp.MustCompile("sample_count:1 +sample_sum:3600"), stat.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winder
For mysterious reasons, this tests started failing on me and I had to be more lenient on the assertions in order to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would guess it's related to upgrading the prometheus versions.
Am I reading the regex correctly, that there is additional whitespace and some control character changes (quotes instead of angles?) but the data is otherwise the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. We now have {
instead of <
and unpredictable white space.
e2e_tests/src/e2e_conduit/scenarios/follower_indexer_scenario.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestions
accumulated_config: dict = field(default_factory=dict) | ||
conduit_dir: str = "" | ||
|
||
def get_validation_errors(self) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we actually run accounting validation in indexer e2e. we should probably create a ticket to migrate that to conduit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I created issue #123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look closely at the tests but the lint + fix LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix look good.
The one thing I'd like to see changed is the error messages for the integration test. If the test were to fail, the current error messages are not much to work with.
no need to create temp var in assignment Co-authored-by: Will Winder <wwinder.unh@gmail.com>
Summary
The delete task wasn't running because the exporter config is wasn't actually being set in the exporter struct.
This PR includes:
conduit/plugins/exporters/postgresql/postgresql_exporter.go
andconduit/plugins/exporters/postgresql/util/prune.go
pyproject.toml
and*.py
). This required providing the capability to query the indexer database.conduit init
command to be more in line with the other such descriptions (pkg/cli/internal/initialize/init.go
)TestMetrics
inconduit/pipeline/pipeline_test.go
which started failing mysteriously.TODO
Issues
#117
Test Plan
A new E2E test is introduced to ensure that the delete task works as expected. I tried running this new test against the original code, and it failed in the expected manner.
See: #121