Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ thiserror = "2.0"
tlog_tiles = { path = "crates/tlog_tiles", version = "0.2.0" }
tokio = { version = "1", features = ["sync"] }
url = "2.2"
worker = "0.6.5"
worker = "0.6.6"
x509-cert = "0.2.5"
x509-verify = { version = "0.4.4", features = [
"md2",
Expand Down
9 changes: 9 additions & 0 deletions crates/ct_worker/src/frontend_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
stub.fetch_with_str(&format!("http://fake_url.com{METRICS_ENDPOINT}"))
.await
})
.get("/logs/:log/sequencer_id", |_req, ctx| {
// Print out the Durable Object ID of the sequencer to allow
// looking it up in internal Cloudflare dashboards. This
// value does not need to be kept secret.
let name = ctx.data;
let namespace = ctx.env.durable_object("SEQUENCER")?;
let object_id = namespace.id_from_name(name)?;
Response::ok(object_id.to_string())
})
.get_async("/logs/:log/*key", |_req, ctx| async move {
let name = ctx.data;
let key = ctx.param("key").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/ct_worker/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "static-ct",
"main": "build/worker/shim.mjs",
"compatibility_date": "2025-04-01",
"compatibility_date": "2025-09-25",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this require re-deploying the workers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll need to redeploy to pick up this change, but afaik this shouldn't have any practical impact as we're not relying on legacy behavior.

"workers_dev": false,
"build": {
"command": "echo 'Default environment not configured. Please specify an environment with the \"-e\" flag.' && exit 1"
Expand Down
8 changes: 4 additions & 4 deletions crates/generic_log_worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ pub fn init_logging(level: Option<&str>) {
let level = level
.and_then(|level| Level::from_str(level).ok())
.unwrap_or(Level::Info);
console_error_panic_hook::set_once();
INIT_LOGGING.call_once(|| {
console_log::init_with_level(level).expect("error initializing logger");
});
Expand Down Expand Up @@ -244,9 +243,10 @@ impl CacheRead for DedupCache {
}

impl DedupCache {
// Batches are written at most once per second, and we only need them deduplicate
// entries long enough for KV's eventual consistency guarantees (~60s).
// Cap at 128 so we can use a single get_multiple call to get all batches at once.
// Batches are written at most once per second, and we only need them to
// deduplicate entries long enough for KV's eventual consistency guarantees
// (~60s). Cap at 128 so we can use a single get_multiple call to get all
// batches at once.
// https://developers.cloudflare.com/durable-objects/api/storage-api/#get
const MAX_BATCHES: usize = 128;
const FIFO_HEAD_KEY: &str = "fifo:head";
Expand Down
9 changes: 9 additions & 0 deletions crates/mtc_worker/src/frontend_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,15 @@ async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
stub.fetch_with_str(&format!("http://fake_url.com{METRICS_ENDPOINT}"))
.await
})
.get("/logs/:log/sequencer_id", |_req, ctx| {
// Print out the Durable Object ID of the sequencer to allow
// looking it up in internal Cloudflare dashboards. This
// value does not need to be kept secret.
let name = ctx.data;
let namespace = ctx.env.durable_object("SEQUENCER")?;
let object_id = namespace.id_from_name(name)?;
Response::ok(object_id.to_string())
})
.get_async("/logs/:log/*key", |_req, ctx| async move {
let name = ctx.data;
let key = ctx.param("key").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/mtc_worker/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mtc",
"main": "build/worker/shim.mjs",
"compatibility_date": "2025-04-01",
"compatibility_date": "2025-09-25",
"workers_dev": false,
"build": {
"command": "echo 'Default environment not configured. Please specify an environment with the \"-e\" flag.' && exit 1"
Expand Down