-
Notifications
You must be signed in to change notification settings - Fork 267
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!: replace the influx tracer with a local one #1290
Conversation
refactor!: convert to using a tracer interface feat: add the local client refactor!: fix the schema package feat: decode with types feat!: add ability to change the tracer in the config chore!: remove support for influx chore!: finish purging all things influx chore: remove unnedded e2e setup chore: remove server to reduce changes in this PR chore: linter chore: linter fix: just use the noop for the default tracer to avoid annoying failures feat: concurrently read and write using new a new file and buffer chore: redelete the fileserver fix: give up on being fancy with no mutexes and optimize later docs: add readme docs: update docs in toml fix: go vuln fix: cat mempool tracing chore: go mod tidy reafactor!: rename everything refactor!: convert to using a tracer interface feat: add the local client refactor!: fix the schema package feat: decode with types feat!: add ability to change the tracer in the config chore!: remove support for influx chore!: finish purging all things influx chore: remove unnedded e2e setup chore: remove server to reduce changes in this PR chore: linter chore: linter fix: just use the noop for the default tracer to avoid annoying failures feat: concurrently read and write using new a new file and buffer chore: redelete the fileserver fix: give up on being fancy with no mutexes and optimize later docs: add readme docs: update docs in toml fix: go vuln feat: add the pull based fileserver fix: remove second server in test chore: linter chore: rename chore: linter chore: cleanup old docs feat: add the ability to push traces to an s3 bucket fix: rebase
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 think we should be wary that we're using v0.34.x-celestia for both v1 and v2 which could be breaking in some ways i.e. with the config and could thus make it difficult to release patches if they were needed
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.
[question] why do we want to backport a config breaking change to v0.34.x? How do we intend on releasing this change? Will it be v2.0.0-tm-v0.34.29?
If that's the case, what's our current branch management strategy in this repo because I think this backport conflicts with my understanding:
v0.34.x-celestia was originally based on tendermint's v0.34.x release branch but now it receives patches from the CometBFT v0.34.x release branch. This branch also contains Celestia-specific changes. Future v1.x.0-tm-v0.34.x releases of this repo will be based on this branch.
Ref: https://github.com/celestiaorg/celestia-core?tab=readme-ov-file#branches
// InfluxURL is the influxdb url. | ||
InfluxURL string `mapstructure:"influx_url"` | ||
// TracePushConfig is the relative path of the push config. This second | ||
// config contains credentials for where and how often to. |
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.
?
// config contains credentials for where and how often to. | |
// config contains credentials for where and how often to push. |
// TraceType is the type of tracer used. Options are "local" and "noop". | ||
TraceType string `mapstructure:"trace_type"` |
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.
[question] why not continue supporting the existing config + pushing to InfluxDB and add the local tracer as a strictly new feature + new config? I think that could make this PR non-breaking.
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 have to have a fix for #1141 , which is already breaking, but also keeping the old tracer was pretty burdensome as we had to have a ton of consts and enforce the schema in a really weird way. Here, we're just using a struct, but if we keep the influx, we have to keep two separate mechanisms for enforcing the schema
// InfluxBucket is the influxdb bucket. | ||
InfluxBucket string `mapstructure:"influx_bucket"` | ||
// TraceBufferSize is the number of traces to write in a single batch. | ||
TraceBufferSize int `mapstructure:"trace_push_batch_size"` |
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.
[nit] why don't the field name and tag match?
TraceBufferSize int `mapstructure:"trace_push_batch_size"` | |
TraceBufferSize int `mapstructure:"trace_buffer_size"` |
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.
just forgot to change. fixing upstream and moving down
return nil | ||
} | ||
if cfg.InfluxToken == "" { | ||
if cfg.TracePullAddress == "" { | ||
return fmt.Errorf("token is required") |
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.
[blocking] this error looks misleading given the field rename
return fmt.Errorf("token is required") | |
return fmt.Errorf("trace pull address is required") |
On second thought, is this field optional or required? I suspect it's optional in which case the whole conditional can be deleted.
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.
Copying code from elsewhere in this PR:
# The tracer pull address specifies which address will be used for pull based
# event collection. If empty, the pull based server will not be started.
seems optional so we shouldn't error here
if cfg.TraceType == "" { | ||
return fmt.Errorf("org is required") |
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.
[blocking] this error is misleading
if cfg.TraceType == "" { | |
return fmt.Errorf("org is required") | |
if cfg.TraceType == "" { | |
return fmt.Errorf("TraceType is required") |
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.
fixing upstream and moving down
# collection. If empty, remote event collection is disabled. | ||
influx_url = "{{ .Instrumentation.InfluxURL }}" | ||
# TracePushConfig is the relative path of the push config. | ||
# This second config contains credentials for where and how often to |
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.
idk what "second" means here? What was the first config?
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.
the second config is a json that contains creds to accessing an s3 bucket
Trace data will now be stored to the `.celestia-app/data/traces` directory, and | ||
save the file to the specified directory in the `table_name.jsonl` format. |
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.
grammar looks off
Trace data will now be stored to the `.celestia-app/data/traces` directory, and | |
save the file to the specified directory in the `table_name.jsonl` format. | |
Trace data will now be stored to the `.celestia-app/data/traces` directory, and | |
files will be saved in the `table_name.jsonl` format. |
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.
fixing upstream and moving down
make && ./build/runner -f ./networks/ci.toml --influxdb-url=http://your-influx-ip:8086/ --influxdb-token="your-token" | ||
``` | ||
*/ | ||
/**/ |
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.
/**/ |
Also sorry I didn't review the original PR. It's okay if you don't want to address my feedback on this PR because the divergence between the PR that already merged. I would still like to understand the release strategy for this breaking change. |
this is a good point, and we should document this. in the past, we've briefly discussed using a migration script. In a similar vein to a migration script, if we know what the error is, then we can automatically fix the config and log it should that error occur. we will address this in #1299 |
During a 1:1 I think we decided to make the config change strictly additive and non-breaking so that we don't have to write a config migrator. If that's the case, do we still want this PR reviewed as-is? |
going to merge this, as I just tested and this is no longer breaking the config now that we've renamed everything. its still a super breaking change in that we've technically replaced an entire feature with something that is completely different, but we don't have to complete #1299 |
@evan-forbes why did we merge this? As far as I can tell, it's a breaking change and it targeted a release branch. |
manual of backport of #1279