Core: Submodule commit hashes in main repo do not match the commits in the submodule repositories #100882

Closed
opened 2022-09-07 18:32:28 +02:00 by Falk David · 11 comments
Member

For example, looking at blender-v3.2-release:

$ git checkout blender-v3.2-release && git pull --rebase origin
$ git submodule foreach git checkout blender-v3.2-release && git submodule foreach git pull --rebase origin
$ git submodule status
 71e0f87dd1ba4e0ed5f619b031045a428e534230 release/datafiles/locale (v3.2.2)
+9c39b79cdcadf7ea700c92bc4f641138a6ff03e1 release/scripts/addons (v3.2.2)
+61e45814503f51963c91c51aaf764612e7c5dc72 release/scripts/addons_contrib (v3.2.2)
+b41c89a8a7e19096a1b5cd3e83ff41258ebaf60d source/tools (v3.2.2)
$ git ls-tree HEAD release/scripts/addons [...]
160000 commit 71e0f87dd1ba4e0ed5f619b031045a428e534230  release/datafiles/locale
160000 commit bcb71eea69a7b83c44112a5872ccd67cae96ec6f  release/scripts/addons
160000 commit 61efd17f87b45c3049091127a5619219f9d2a821  release/scripts/addons_contrib
160000 commit ccc8fceb6bd83ffbf6e5207247fb8f76fc47a5b6  source/tools

As we can see the hashes for release/scripts/addons, release/scripts/addons_contrib and source/tools do not match.
The same problem applies to blender-v3.3-release (and probably more that I have not checked).

Here is an example of a commit that changed the hash for release/scripts/addons/ for no apparent reason: 000312ab51.
Another more recent example: 65ad36f5fd.

This is an issue, especially when not relying on make_update.py. For example git submodule update will not work as expected, since it will use the hash from the main repo to update the submodule.

For example, looking at `blender-v3.2-release`: ``` $ git checkout blender-v3.2-release && git pull --rebase origin $ git submodule foreach git checkout blender-v3.2-release && git submodule foreach git pull --rebase origin $ git submodule status 71e0f87dd1ba4e0ed5f619b031045a428e534230 release/datafiles/locale (v3.2.2) +9c39b79cdcadf7ea700c92bc4f641138a6ff03e1 release/scripts/addons (v3.2.2) +61e45814503f51963c91c51aaf764612e7c5dc72 release/scripts/addons_contrib (v3.2.2) +b41c89a8a7e19096a1b5cd3e83ff41258ebaf60d source/tools (v3.2.2) $ git ls-tree HEAD release/scripts/addons [...] 160000 commit 71e0f87dd1ba4e0ed5f619b031045a428e534230 release/datafiles/locale 160000 commit bcb71eea69a7b83c44112a5872ccd67cae96ec6f release/scripts/addons 160000 commit 61efd17f87b45c3049091127a5619219f9d2a821 release/scripts/addons_contrib 160000 commit ccc8fceb6bd83ffbf6e5207247fb8f76fc47a5b6 source/tools ``` As we can see the hashes for `release/scripts/addons`, `release/scripts/addons_contrib` and `source/tools` do not match. The same problem applies to `blender-v3.3-release` (and probably more that I have not checked). Here is an example of a commit that changed the hash for `release/scripts/addons/` for no apparent reason: 000312ab51. Another more recent example: 65ad36f5fd. This is an issue, especially when not relying on `make_update.py`. For example `git submodule update` will not work as expected, since it will use the hash from the main repo to update the submodule.
Author
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Added subscriber: @LucaRood-3

Added subscriber: @LucaRood-3

Added subscribers: @ThomasDinges, @Sergey, @brecht

Added subscribers: @ThomasDinges, @Sergey, @brecht

We have to clarify this in the release checklist. I believe should first tag the submodule repositories, then make a commit in the Blender repository that references the corresponding submodule hashes, and then tag the Blender repository including that commit.

Probably we should also commit updated submodule hashes in master at least once per release cycle, so they don't lag arbitrarily far behind.

We have to clarify this in the release checklist. I believe should first tag the submodule repositories, then make a commit in the Blender repository that references the corresponding submodule hashes, and then tag the Blender repository including that commit. Probably we should also commit updated submodule hashes in master at least once per release cycle, so they don't lag arbitrarily far behind.

We used to commit updated submodule hashes after tagging addons//tools repositories prior to tagging the blender.git. This way the git way of dealing with submodules was always leading to a proper and consistent repository state. This helps the external maintainers like from Linux distros. At leats that was the plan and goal.

I am not sure we can fix it for the existing releases, but it would indeed be nice to make the adjustments to the release checklist as you've mentioned.

We used to commit updated submodule hashes after tagging addons//tools repositories prior to tagging the blender.git. This way the git way of dealing with submodules was always leading to a proper and consistent repository state. This helps the external maintainers like from Linux distros. At leats that was the plan and goal. I am not sure we can fix it for the existing releases, but it would indeed be nice to make the adjustments to the release checklist as you've mentioned.
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Blender 3.4 is gonna be released today. To make sure I understand this correct:

  • I tag the submodules first, as usual:
    git tag -a v3.4.0 -m "Tagging Blender 3.4.0 release"
    git push origin v3.4.0

  • The updated hashes are commited to the Blender branch, how exactly is this done?

  • Tag the branch as usual as well, including the hash update commit.

Blender 3.4 is gonna be released today. To make sure I understand this correct: - I tag the submodules first, as usual: `git tag -a v3.4.0 -m "Tagging Blender 3.4.0 release"` `git push origin v3.4.0` - The updated hashes are commited to the Blender branch, **how exactly is this done?** - Tag the branch as usual as well, including the hash update commit.

Running git commit release/scripts/addons release/scripts/addons_contrib release/datafiles/locale source/tools should do it.

Running `git commit release/scripts/addons release/scripts/addons_contrib release/datafiles/locale source/tools` should do it.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges self-assigned this 2022-12-07 12:58:22 +01:00

That worked well. I updated the release docs now to incorporate this: https://wiki.blender.org/wiki/Process/Release_Checklist#Release

That worked well. I updated the release docs now to incorporate this: https://wiki.blender.org/wiki/Process/Release_Checklist#Release
Author
Member

Thanks for adding this step :)

Thanks for adding this step :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100882
No description provided.