rust-lang / rust-lang/simpleinfra
Write unit tests for `static.crates.io` function
Nobody has claimed this yet.
- Dominant language
- HCL
- Stars
- 178
- Forks
- 107
- Avg merge
- 15h 57m
- Merged PRs (30d)
- 38
Description
Context
The crates on crates.io are stored in S3 and served to users through our Content Delivery Networks, most importantly Fastly. On Fastly, we are using their Compute platform to run every request through a custom Rust function.
This function mainly has two responsibilities:
- It handles the request, which means applying some rewrite rules and fetching the crate from S3.
- It logs the request and sends it to the configured log destinations.
Since the function runs in WebAssembly, testing the function has been historically difficult. But Fastly provides more documentation now that might make it feasible to write unit tests for (some parts of) the function.
Tasks
- Write (a few) unit tests for the function
- Document how to run them in local development
- Run the tests automatically as part of this repository's CI
Resources
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in terragrunt/modules/crates-io/compute-static and read the linked Fastly Rust unit-testing guidance and Viceroy usage. Identify testable parts of the Compute function, then document local test execution and add the tests to this repository's CI. Done means a few unit tests run locally and automatically in CI, with setup documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- ci-cd, documentation, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100