Bot creation pins Git submodules to the tip of a named branch instead of respecting the .gitmodules file
| Originator: | mauricerkelly | ||
| Number: | rdar://15457042 | Date Originated: | 13-Nov-2013 09:35 AM |
| Status: | Open | Resolved: | |
| Product: | OS X Server | Product Version: | 3.0.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: When creating a Bot that builds a Git project with submodules OS X Server stores the current branch name for the submodule and uses that information for subsequent checkouts. This leads to a number of problems - if a submodule is on a detached HEAD when the bot it created, it has no formal branch name and will fail to check out during an integration. If a submodule is on the tip of a branch, it will have a branch name, but the created bot will be tied to that branch name only. If the submodule is a shared project, then a specific branch needs to be created and maintained in order to ensure that the bot can continue to build. The Bot should use submodules in the same way that the developer does - if the developer specifies a submodule to use a specific commit, then the Bot should build the same code. Steps to Reproduce: 1. Open a project that contains a Git submodule. 2. Checkout the submodule to the master branch. 3. Commit the new pathspec for the submodule in the main project, pushing the changes to the remote repository. 4. Create a Bot and ensure that it integrates properly. 5. Introduce a change to the submodule that breaks the main project and commit to the master branch, pushing the changes to the remote repository. 6. Issue a "git submodule update" command in the Terminal to move the submodule back to the previous good commit. 7. Start an integration on the Xcode server. Expected Results: 8. The integration should check out the submodule to the pathspec in the .gitmodules file, and should succeed. Actual Results: 8. The integration actually checks out the submodule to master (the branch name at Bot creation time) and causes the integration to fail. Regression: N/A Notes: None.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!