upgrading-a-project-to-v1220
Upgrades the project and all microservices to v1.22.0.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Workflow
Copy this checklist and track your progress:
Upgrade a Microbus project to v1.22.0:
- [ ] Step 1: Breaking changes (before microservices)
- [ ] Step 2: Identify microservices to upgrade
- [ ] Step 3: Upgrade in parallel
- [ ] Step 4: Breaking changes (after microservices)
Step 1: Breaking Changes (Before Microservices)
The package github.com/microbus-io/fabric/rand was deprecated.
- Replace calls to
rand.AlphaNum64(n)withutils.RandomIdentifier(n)located in thegithub.com/microbus-io/fabric/utilspackage - Similarly, replace calls to
rand.AlphaNum32(n)withstrings.ToLower(utils.RandomIdentifier(n)) - Replace calls to
rand.IntNwith the equivalent function inmath/rand/v2
Some distributed caching methods were deprecated.
- Replace calls to
svc.DistribCache().LoadJSONorsvc.DistribCache().LoadCompressedJSONwithsvc.DistribCache().Get - Replace calls to
svc.DistribCache().StoreJSONorsvc.DistribCache().StoreCompressedJSONwithsvc.DistribCache().Set
The JWT dependency was upgraded from github.com/golang-jwt/jwt/v4 to github.com/golang-jwt/jwt/v5. When parsing a JWT, set the time function option to svc.Now(ctx) if validation is required.
jwt.WithTimeFunc(func() time.Time {
return svc.Now(ctx)
}),
The Startup and Shutdown methods of the Connector now require ctx context.Context argument. If a context is not available in the parent function, use t.Context() if in tests, or context.Background() otherwise.
The Startup, Shutdown and AddAndStartup methods of the Application now require ctx context.Context argument. If a context is not available in the parent function, use t.Context() if in tests, or context.Background() otherwise.
Step 2: Identify Microservices to Upgrade
Scan the project for all directories containing a service.yaml file. Each of these directories is a microservice that needs upgrading to v1.22.0.
Step 3: Upgrade in Parallel
Read and follow ALL steps of the skill upgrade/v1.22.0-microservice to upgrade each of the identified microservices separately. You may invoke subagents to perform the upgrade in parallel.
Step 4: Breaking Changes (After Microservices)
The initializer passed to the Init method of the microservice now must return an err error.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-03-11
- Mise à jour de l’index
- 2026-03-11
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!