Skip to main content

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 upload
  • secret - Secret change
  • rollback - Rollback operation
  • promotion - Promoted from another environment

Deployments

View deployment history to see which versions are currently deployed:

Deployment Output

The most recent deployment is marked as 🟩 Active.

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

Versions are immutable once created. You cannot modify a version’s code or configuration. To make changes, upload a new version.
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:
Older versions remain in history but cannot be deployed directly.

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 message
  • workers/triggered_by - What triggered the version
  • workers/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
Currently, you can deploy at most 2 versions simultaneously. This limitation may be lifted in future releases.

Best Practices

  1. Use Semantic Versioning - Tag versions like v1.2.3
  2. Write Descriptive Messages - Explain what changed
  3. Keep Recent Versions - Maintain deployable rollback options
  4. Monitor Deployments - Track which versions serve traffic
  5. Document Changes - Use messages to create an audit trail

Next Steps

Deploying

Deploy versions to production

Rollbacks

Roll back to previous versions