Overview
Worker versions allow you to maintain multiple versions of your code and control which version serves traffic. Each version is immutable and contains:- Worker code and modules
- Compatibility settings
- Bindings and configuration
- Secrets
- Metadata (tag, message, author)
Listing Versions
View the 10 most recent versions of your Worker:Output Format
JSON Output
Get structured version data:Viewing Version Details
Inspect a specific version:Example Output
JSON Format
Version Metadata
Version Source
Versions track their creation source:Triggered By
Versions may also track what triggered their creation:upload- Direct version uploadsecret- Secret changerollback- Rollback operationpromotion- Promoted from another environment
Deployments
View deployment history to see which versions are currently deployed:Deployment Output
View Specific Deployment
Get details about a deployment:Deployment Details
Version Lifecycle
1
Upload
Create a new version:
2
Preview
Test the version at its preview URL before deploying.
3
Deploy
Deploy the version to production traffic:
4
Monitor
Watch metrics and logs to verify the deployment.
5
Iterate
Upload new versions or rollback if needed.
Version Immutability
Immutability ensures:- Reproducibility - The same version always behaves identically
- Safe Rollbacks - Roll back to known-good versions with confidence
- Audit Trail - Complete history of all changes
Deployable Versions
Only the 10 most recent versions are “deployable” - available for traffic splitting:Filtering Versions
The versions list is sorted by creation date (most recent first):Version Annotations
Versions support optional annotations:workers/tag- User-defined tag (e.g., “v1.2.0”)workers/message- Deployment messageworkers/triggered_by- What triggered the versionworkers/rollback_from- Source version for rollbacks
Setting Annotations
Version Limits
- Maximum 10 deployable versions
- Maximum 2 versions in a single deployment (traffic split)
- Unlimited version history retention
Best Practices
- Use Semantic Versioning - Tag versions like
v1.2.3 - Write Descriptive Messages - Explain what changed
- Keep Recent Versions - Maintain deployable rollback options
- Monitor Deployments - Track which versions serve traffic
- Document Changes - Use messages to create an audit trail
Next Steps
Deploying
Deploy versions to production
Rollbacks
Roll back to previous versions