bugfix: postgresql exporter delete task#119
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.
@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.
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.
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
| accumulated_config: dict = field(default_factory=dict) | ||
| conduit_dir: str = "" | ||
|
|
||
| def get_validation_errors(self) -> list[str]: |
There was a problem hiding this comment.
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.
Thanks for the suggestion. I created issue #123
algochoi
left a comment
There was a problem hiding this comment.
I didn't look closely at the tests but the lint + fix LGTM
winder
left a comment
There was a problem hiding this comment.
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.goandconduit/plugins/exporters/postgresql/util/prune.gopyproject.tomland*.py). This required providing the capability to query the indexer database.conduit initcommand to be more in line with the other such descriptions (pkg/cli/internal/initialize/init.go)TestMetricsinconduit/pipeline/pipeline_test.gowhich 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