Looking for automated database schema migration safety? See our guide on Schema Migration Constraints.
The Challenge
Consider a scenario where your team builds a feature in theconsumer service that calls a newly added endpoint in the provider service, which is maintained by a different team. For the feature to work in production, both services must be running compatible versions. Without automated constraint checking, you’d need to manually coordinate these deployments across teams and environments—a process prone to human error and potential outages.
Declaring Dependencies
Ryvn lets you declare cross-service dependencies directly in your release metadata. Supposeconsumer is currently at version 0.8.0 and you’re building a new feature for version 0.9.0 that requires the new endpoint from provider 0.2.0. When merging your feature, include a dependency constraint in your service’s release file:
consumer 0.9.0 release to Ryvn.
How Ryvn Enforces Constraints
When Ryvn’s control plane observes the newconsumer 0.9.0 release, it evaluates whether it can safely upgrade existing installations. Consider an environment with this current state:
consumer from 0.8.0 to 0.9.0, it applies dependency constraints by asking:
Do the currently installed services meet the target release’s dependency constraints?When it loads the release dependencies for
consumer 0.9.0, it discovers that the current provider 0.1.0 installation violates the new dependency constraint.
consumer release until provider has been upgraded to a version that satisfies the constraint (any version between 0.2.0 and 0.x.x).
Bidirectional Constraint Enforcement
Ryvn applies service dependency constraints in both directions, preventing breaking changes from being deployed prematurely. Consider an environment with this current state:provider release version 1.0.0 which removes support for endpoints deprecated in 0.x.x versions. When Ryvn considers upgrading provider, it applies reverse dependency constraints by asking:
Will any currently installed services have dependency constraints violated by this upgrade?Ryvn would refuse to deploy
1.0.0 to any environment where consumer is still running a version that declares a dependency on provider with maxVersion: 0.x.x.
Result: Ryvn blocks the provider upgrade until you either:
Cut a new release of consumer (e.g., 0.9.0) that is compatible with provider 1.0.0:
0.8.0) on the Ryvn platform to expand its accepted version range to include provider 1.0.0:
Benefits
Service dependency constraints eliminate entire classes of production incidents: Without automated constraints, organizations typically either:- Require manual coordination to ensure features land in the same release cycle as their dependencies
- Risk production outages from version mismatches
- Spend significant time on manual remediation when things go wrong
- Automatic validation of cross-service compatibility
- Prevention of broken deployments before they happen
- Elimination of manual coordination between teams
- Safe, progressive rollout of breaking changes
Best Practices
Declare constraints at feature merge time: Add dependency constraints to release metadata when merging features that require them, not retroactively. This ensures the constraint is present when the release is published. Use version ranges to express compatibility windows: SetminVersion to the first provider version with required functionality, and maxVersion to the last known compatible major version (e.g., 0.x.x or 1.x.x). This allows Ryvn to safely upgrade within compatible versions.