Estratégias de Versionamento e Reversão
Aprenda a versionar remotos federados com segurança e reverter instantaneamente um único microfrontend quando uma implantação dá errado.
Estratégias de Versionamento e Reversão é uma aula grátis de Micro Frontends Architecture with Module Federation no CoddyKit. Esta é a aula 4 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Micro Frontends Architecture with Module Federation, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Micro Frontends Architecture with Module Federation inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
Why Versioning Is Hard in MFEs
Each micro frontend deploys independently, yet they run together in the browser. Without disciplined versioning, one bad deploy can break a host that was working moments ago.
Immutable Build Artifacts
The foundation of safe deployment is immutable artifacts: every build produces uniquely named files that are never overwritten.
/cart/2.4.1/remoteEntry.js
/cart/2.4.2/remoteEntry.jsContent Hashing
Adding a content hash to filenames guarantees a changed bundle gets a new URL, so caches and hosts never serve a stale or mismatched file by accident.
/cart/remoteEntry.7f3a9c.jsA Version Manifest
A small manifest maps each remote name to the URL currently in production. The host reads it to discover which remote version to load.
{
"cart": "/cart/2.4.2/remoteEntry.js",
"search": "/search/1.9.0/remoteEntry.js"
}Deploying = Updating the Manifest
Because artifacts are immutable, a deployment is just pointing the manifest to a new version. This makes promotion and rollback a single, fast change.
Instant Rollback
To roll back, point the manifest entry back to the previous version. Since the old artifact still exists, the rollback is immediate and risk-free.
// rollback cart
"cart": "/cart/2.4.1/remoteEntry.js"Canary Releases per Remote
Serve a new remote version to a small percentage of users via the manifest, watch metrics, then ramp to 100% — or roll back instantly if errors spike.
Semantic Versioning of Remotes
Use semver for remotes and especially for shared contracts. A major bump signals a breaking interface change that consumers must coordinate around.
Coordinating Shared Dependencies
Rolling back one remote while others advanced can create shared-dependency mismatches. Keep shared library versions within compatible ranges so any single rollback stays safe.
Automating Rollback in CI/CD
Wire health checks into the pipeline so a failed post-deploy check automatically reverts the manifest, turning rollback into a hands-off safety net.
if ! healthcheck cart; then
promote cart 2.4.1 # auto rollback
fiAuditing Versions
Log every manifest change with who, what, and when. This audit trail is invaluable when diagnosing which deploy introduced a regression.
Quick Check
Test your versioning and rollback knowledge.
Recap
You learned versioning and rollback:
- Use immutable, content-hashed artifacts
- A manifest maps remotes to current versions
- Deploy and rollback by changing the manifest
- Canary per remote and use semver for contracts
- Automate rollback on failed health checks
Disciplined versioning makes independent deploys safe.
Aprenda JavaScript com um tutor de IA — grátis
Escreva e execute código real no seu navegador, obtenha ajuda instantânea de um tutor de IA 24/7 e continue de onde parou na web ou no app.
- Cursos
- 12
- Aulas
- 48
Perguntas Frequentes
A aula “Estratégias de Versionamento e Reversão” é grátis?
Sim — o texto completo de “Estratégias de Versionamento e Reversão” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Micro Frontends Architecture with Module Federation, atualize para CoddyKit PRO. O curso de Micro Frontends Architecture with Module Federation inclui 4 aulas no total.
O que vou aprender em “Estratégias de Versionamento e Reversão”?
Aprenda a versionar remotos federados com segurança e reverter instantaneamente um único microfrontend quando uma implantação dá errado. Você pratica Micro Frontends Architecture with Module Federation com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Micro Frontends Architecture with Module Federation?
Nenhuma experiência prévia é necessária. Micro Frontends Architecture with Module Federation no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 4 de 4.
Quanto tempo leva a aula “Estratégias de Versionamento e Reversão”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Micro Frontends Architecture with Module Federation?
Sim. Cada aula de Micro Frontends Architecture with Module Federation inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Fluxos de implantação independente
- Compilações e lançamentos automatizados
- Hospedagem e escalabilidade de aplicações federadas
- Estratégias de Versionamento e Reversão