Shipping and Launch

- Deploying a feature to production for the first time

What Is This

The "Shipping and Launch" skill on the Happycapy Skills platform is designed to guide developers through the critical process of deploying a feature or application to production for the first time. This skill provides a comprehensive framework for preparing production launches, ensuring that deployments are not only functional but also safe, observable, and reversible. By leveraging this skill, development teams can significantly reduce the risks associated with releasing new software, whether it is a new feature, a significant change, a data migration, or the opening of a beta program.

This skill encapsulates industry best practices for production readiness, emphasizing the need for thorough pre-launch checklists, robust monitoring, staged rollouts, and well-defined rollback strategies. The primary goal is to foster a culture where shipping code is a deliberate, controlled process that maximizes success and minimizes disruptions for end users.

Why Use It

Deploying software to production is a high-stakes activity. Bugs, outages, and security breaches can have significant consequences for users and businesses. The "Shipping and Launch" skill helps teams avoid common pitfalls by enforcing a rigorous approach to production deployments. The benefits of using this skill include:

  • Reduced Risk: By following a structured checklist, teams can catch issues before users are impacted.
  • Improved Observability: Setting up monitoring ensures that problems are detected quickly and can be addressed before they escalate.
  • Controlled Rollouts: Staged releases and feature flags allow for gradual exposure, limiting the blast radius of potential failures.
  • Reversibility: Having a rollback strategy ensures that if something goes wrong, changes can be quickly undone.
  • Consistency: A standardized process ensures that every deployment meets quality, security, and operational standards.

This skill is especially valuable for teams operating in fast-paced environments where frequent releases are the norm. It creates a safety net that supports continuous delivery practices while maintaining production stability.

How to Use It

Implementing the "Shipping and Launch" skill involves a series of actionable steps, structured around a pre-launch checklist and associated best practices. Below is a detailed breakdown of the process:

1. Code Quality

Checks

Ensure that your codebase meets the highest standards before deployment:

## Run all tests
npm test

## Build the project
npm run build

## Check for linting errors
npm run lint

## Type checking (for TypeScript projects)
npm run type-check
  • All unit, integration, and end-to-end tests should pass.
  • The build process must complete without warnings.
  • Linting and type checks should show no issues.
  • The code should be reviewed and approved by peers.
  • Remove any TODO comments and debugging statements such as console.log from production code.

2. Security

Validations

Prevent vulnerabilities from reaching production:

## Check for known vulnerabilities
npm audit
  • Ensure that no secrets are committed to code or version control.
  • Address any critical or high security vulnerabilities.
  • Validate all user inputs on exposed endpoints.
  • Confirm authentication and authorization are enforced.
  • Configure security headers (e.g., Content Security Policy, HSTS).
  • Rate limit authentication endpoints to mitigate brute force attacks.
  • Set up proper CORS configurations.

3. Pre-Launch

Operations

  • Prepare a staged rollout plan using feature flags or canary deployments.
  • Define clear success metrics and monitoring dashboards.
  • Draft a rollback strategy that can be executed quickly if required.

Example: Using LaunchDarkly for feature flags

if (ldClient.variation('new-feature', user, false)) {
  enableNewFeature();
}

4. Monitoring and

Observability

  • Set up logging, metrics, and alerting for critical paths.
  • Integrate with monitoring tools (e.g., Datadog, Prometheus, Sentry).
  • Ensure dashboards are updated to reflect the new feature or change.
  • Perform a smoke test after deployment to validate basic functionality.

5. Rollback

Preparedness

  • Document rollback procedures.
  • Test rollback mechanisms in a staging environment.
  • Ensure that database migrations are reversible if possible.

When to Use It

The "Shipping and Launch" skill should be used in any scenario where production stability or user experience could be affected. Typical situations include:

  • Deploying a feature to production for the first time
  • Rolling out a significant update or change
  • Migrating databases, servers, or infrastructure components
  • Launching a beta or early access program
  • Any deployment that carries operational or reputational risk

Using this skill is not limited to major releases; it should be considered for any deployment where new code or configuration changes are introduced.

Important Notes

  • Always treat every deployment as potentially risky. Even minor changes can have unintended consequences in production.
  • Automation is your ally. Integrate as many checklist steps as possible into your CI/CD pipeline to reduce manual errors.
  • Communication is key. Notify stakeholders in advance of launches and rollbacks.
  • Documentation matters. Keep detailed records of what was shipped, when, and by whom.
  • Iterate on your process. Use post-mortems and retrospectives to improve your launch procedures over time.

By adopting the "Shipping and Launch" skill, teams can systematically improve their deployment practices, leading to more reliable releases, faster recovery from incidents, and higher confidence in shipping new features to users.