apache / incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
https://devlake.apache.org/
Apache License 2.0
2.5k stars 493 forks source link

fix(migration): fix unexpected `defer unlock` #7634

Closed d4x1 closed 1 week ago

d4x1 commented 1 week ago

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

Summary

What does this PR do? If err from err := migrator.Execute() is not nil, it will panic with fatal error: sync: unlock of unlocked mutex. This PR just fix it, and panic with the correct error.

Does this close any open issues?

Closes N/A

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.

github-actions[bot] commented 1 week ago

🤖 Target: #release-v1.0 cherry pick finished successfully 🎉!