Skip to content

WIP: watcher: add sqs sdk, add first draft for event payload structs #3349

Draft
syphar wants to merge 16 commits into
rust-lang:mainfrom
syphar:crates-io-sqs
Draft

WIP: watcher: add sqs sdk, add first draft for event payload structs #3349
syphar wants to merge 16 commits into
rust-lang:mainfrom
syphar:crates-io-sqs

Conversation

@syphar

@syphar syphar commented May 22, 2026

Copy link
Copy Markdown
Member

first draft of the event payload contents / format for the link between crates.io & docs.rs.

Loosely based on Change in crates-index-diff.

( and just a base for discussion).

In my mind I would release this subcrate to be directly used by crates.io.

I don't know if there is an overlap of the enum / structs inside crates.io, and we should use crates.io internal structs in some cases?

@syphar syphar self-assigned this May 22, 2026
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label May 22, 2026
@syphar syphar changed the title watcher: add sqs sdk, add first draft for event payload structs WIP: watcher: add sqs sdk, add first draft for event payload structs May 22, 2026
syphar added 7 commits May 22, 2026 17:32
Wrap typed change payloads in a conventional event envelope with id, occurred_at, source, and schema_version.
Rename the current wire payload to ChangeV1 and make the event envelope generic for future schema versions.
Remove event source metadata and store occurred_at as an RFC 3339 OffsetDateTime.
Replace time::OffsetDateTime with chrono::DateTime<Utc> for RFC 3339 event timestamps.
syphar added 8 commits May 22, 2026 18:33
Treat duplicate version deletion events as a no-op so temporary event-based handling can safely replay them.
Add watcher config fields for an SQS queue URL and region to support an event-based path.
Use url::Url for the watcher SQS queue URL config so invalid values fail during config loading.
Update Cargo.lock after making docs_rs_watcher depend directly on url.
Remove the redundant schema_version field from the crates.io event envelope and keep versioning in the typed payloads.
@rustbot

This comment has been minimized.

#[serde(tag = "type", content = "payload", rename_all = "snake_case")]
pub enum IndexChangeV1 {
/// A crate version was added.
Added(CrateVersion),

@syphar syphar Jun 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note to myself:
this needs either pub or accessors

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants