-
Notifications
You must be signed in to change notification settings - Fork 14
chore: improve verify-schemas-synced and regenerate-temp-migration #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit a467f00
☁️ Nx Cloud last updated this comment at |
b031e2a to
5d3fda7
Compare
0ed394f to
37e2df8
Compare
5d3fda7 to
0154266
Compare
37e2df8 to
5e7ecd7
Compare
0154266 to
c3afc05
Compare
5e7ecd7 to
2b27c54
Compare
c3afc05 to
e8a6a85
Compare
e8a6a85 to
2843841
Compare
252a37d to
83609aa
Compare
2843841 to
0adad2e
Compare
36190c3 to
2a32203
Compare
8e2d37b to
18fd9d1
Compare
902a9df to
acdca8d
Compare
18fd9d1 to
53cc331
Compare
acdca8d to
fefb86b
Compare
fefb86b to
d04fa3f
Compare
43c4799 to
26104e7
Compare
26104e7 to
d52a0e0
Compare
d04fa3f to
a467f00
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-219.pgflow.pages.dev 📝 Details:
_Last updated: _ |
🔍 Preview Deployment: Playground✅ Deployment successful! 🔗 Preview URL: https://pr-219--pgflow-demo.netlify.app 📝 Details:
_Last updated: _ |
Merge activity
|
) ### TL;DR Improved schema verification and temporary migration regeneration scripts with better error handling, isolation, and user feedback. ### What changed? - Enhanced `atlas-verify-schemas-synced` script to: - Use a temporary directory for migrations to avoid modifying the actual migrations directory - Add proper cleanup with trap handlers for temporary files and Docker containers - Display the first 50 lines of migration diff when schemas are out of sync - Improve error reporting with more context - Updated `regenerate-temp-migration` script to: - Check if schemas are already in sync before attempting regeneration - Skip unnecessary work if schemas are already synchronized - Provide clearer user feedback about the state of schemas - Update the step numbering in the action plan to reflect the new initial check ### How to test? 1. Run `pnpm nx verify-schemas-synced core` to test the schema verification 2. Make a change to a schema file without updating migrations 3. Run `./scripts/regenerate-temp-migration` to see the improved workflow 4. Verify that temporary files are properly cleaned up after script execution 5. Check that the error output provides helpful context when schemas are out of sync ### Why make this change? These improvements make the schema verification and migration regeneration process more robust and developer-friendly by: 1. Preventing accidental modification of actual migration files during verification 2. Ensuring proper cleanup of resources even when scripts fail 3. Providing more helpful feedback when schemas are out of sync 4. Avoiding unnecessary work when schemas are already in sync 5. Making the error messages more informative for faster debugging

TL;DR
Improved schema verification and temporary migration regeneration scripts with better error handling, isolation, and user feedback.
What changed?
Enhanced
atlas-verify-schemas-syncedscript to:Updated
regenerate-temp-migrationscript to:How to test?
pnpm nx verify-schemas-synced coreto test the schema verification./scripts/regenerate-temp-migrationto see the improved workflowWhy make this change?
These improvements make the schema verification and migration regeneration process more robust and developer-friendly by: