[ci] now the submodule check checks for strict equality#33332
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis pull request modifies the GitHub Actions workflow that validates the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
b616cde to
cf3d8ef
Compare
|
Is it right that this forces every PR to update the submodule, even if the PR is unrelated to the latest submodule changes, and it would take much effort to perform the update? I'm not sure if that's so ideal. |
In short, yes, this requires an update from everyone. To update the submodule we only need to run Problem: The submodule may not be updated or point to a different fork. Typical situation:
The AU guys provided us with a check to verify situation 1. The idea is that any PR will require the submodule to point to the latest commit, so the developer creating the PR will be forced to update the submodule. This is similar to the requirement to now fetch the latest upstream changes before creating a PR. |
|
A disadvantage would be the following situation:
Therefore I would suggest not strictly enforcing this check, i.e. don't fail, but post a warning comment. This way, each PR author can consider whether the framework should be updated in their PR, or that that's someone else's responsibility. It's also not great when a check can suddenly fail based on external circumstances. For example, when you open the PR, everything might be fine, but when you then push a second commit, the check suddenly fails because apparently there has been an unrelated framework change in the meantime. |
|
Today, we encountered a situation where the application simply wouldn't launch because we merged the changes but didn't update the MF. This seems like a more critical issue. What other solutions are there? |
|
I suppose something like that should have been detected by CI or QA before the MU/AU PR was merged |
|
Updating a submodule is like requiring we to update your local repository from upstream before PR. |
|
I understand your concerns. I'd prefer a strict check right now, but we'll closely monitor what's happening, and if it does create problems, we'll change it. |
I'm not sure I agree. Updating a submodule (or any dependency) is a deliberate change, that you make at the moment that it makes sense and that you are ready for it. You wouldn't update FluidSynth either in every PR that touches something completely unrelated. |
|
Anyway, this makes the process of contributing yet more complicated, and will result in a big mess because submodule updates will be detached from the MU/AU PRs that they were related to. |
|
I'd prefer to think of this now not as updating a submodule because it includes dependent changes. We are just learning to adapt to the new process, it is quite possible that you will be right... we will try. |
|
Updating the submodule should be an intentional step, because if you do it blindly like keeping your local repo up to date, you get broken builds. In fact, right now, the master branch does not launch, because the submodule was updated but the corresponding MuseScore PR was not merged. See musescore/muse_framework#6; the framework should not have been updated with that change until (the first commit of) #33301 was merged. |
|
@igorkorsukov When can we expect the promised instructions on the dev and PR process now that the muse framework is a separate repo? |
|
@krasko78 We're currently learning and gaining new experience working in a new way. And then we'll write instructions on how to work under the new conditions. |
I think this was a pretty simple case; we just needed to make the PR in MF as a draft. Then we wouldn't have merged it before the changes were merged into the MU repository. |
I don't think we'll be able to keep up with this. There are too many people. |
Gotcha! :) But even so, you can share what you have so far. :) For instance: a dev is working on a story that requires changes in MF. How can the dev test them locally? I saw a setting for the local path to the MF repo - when and how is it supposed to be used? Then, when the dev is happy with the changes, he/she commits them to the MF repo and how is the submodule then updated in MuseScore? Same PR or separate PR? All the PRs I see everyday like the one we are writing in right now, only add to the confusion. :) Or am I being too impatient? :) |
|
@igorkorsukov Some additional thoughts occurred to me:
So, either way, things may break, equally likely. The difference is that if we do force updates in every PR, an update might appear in a PR where it is completely unrelated, resulting in messy history. However, I can understand the desire to always keep the framework always up to date as soon as possible. How about a different strategy: create a GH Action that always creates an "Update framework" PR as soon as any commit is pushed to the framework repo. Then someone reviews this PR; if no app code changes are required, the PR can just be merged; if code changes are required, any maintainer can push those changes to the auto-generated PR, or create a PR manually to replace the autogenerated PR. To me, that sounds like a good balance between always staying on the latest framework and keeping framework updates intentional / conscious, without disrupting other peoples PRs with forced unrelated framework updates. What do you think? |
|
It's an interesting idea, I think it's definitely worth keeping in mind. I had some thoughts about it too (or rather, I remembered them). We're actually getting closer to the second approach now. |
|
I'm also concerned that the MF using two projects. They need to be synchronized and the same strategy used in both. |
Problem: The submodule may not be updated or point to a different fork.
Typical situation:
During development, the developer replaced the submodule with his own fork and forgot to change it back.
Some PR depends on changes in the MF. They were made and merged into the MF, but the submodule was forgotten or didn't know it needed to be updated. Although the test should have detected this.
Some fixes have been made in the MF, but no one has updated the submodule in the MU.
The AU guys provided us with a check to verify situation 1.
But I've now changed it to address situations 2 and 3.
The idea is that any PR will require the submodule to point to the latest commit, so the developer creating the PR will be forced to update the submodule. This is similar to the requirement to now fetch the latest upstream changes before creating a PR.