Page MenuHome

Fix `make source_archive_complete` for release branches
ClosedPublic

Authored by Dalai Felinto (dfelinto) on Mar 9 2022, 3:03 PM.

Details

Summary

In Blender 3.1 we can't run the source_archive_complete because the
cmake program is trying to download the packages from svn trunk. However
3.2 (aka master) already changed the version of some of the source
packages.

For example the OpenXR-SDK. It should be looking for OpenXR-SDK-1.0.17.tar.gz in:
https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/packages/

But instead it tries to look for it in:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/

Which can't be found since it was replaced with OpenXR-SDK-1.0.22.tar.gz

Diff Detail

Repository
rB Blender
Branch
fix-source-archive-complete (branched from master)
Build Status
Buildable 21197
Build 21197: arc lint + arc unit

Event Timeline

Dalai Felinto (dfelinto) requested review of this revision.Mar 9 2022, 3:03 PM
Dalai Felinto (dfelinto) created this revision.
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)Mar 9 2022, 3:05 PM

Fix blender version detection.

  • Fix typo in macros.cmake comment
Dalai Felinto (dfelinto) retitled this revision from Fix `make source_archive_complete` for release branches (work in progress) to Fix `make source_archive_complete` for release branches.Mar 9 2022, 4:30 PM
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)

Think it's better if get_blender_version accepted an optional argument for the header path so that the caller is responsible for setting the same relative to itself, instead of the function guessing who's calling it and from where.

For the records, we used this to generate the blender-with-libraries-3.1.0.tar.xz file, but choose to not merge it in the branch. But to get this properly reviewed and committed to master instead (so for 3.2 we can generate this more automatically).

Sybren A. Stüvel (sybren) requested changes to this revision.Mar 15 2022, 3:39 PM

Think it's better if get_blender_version accepted an optional argument for the header path so that the caller is responsible for setting the same relative to itself, instead of the function guessing who's calling it and from where.

I agree with @Ankit Meel (ankitm) here in that it's not so nice to have code that guesses where it can find Blender sources. Don't we have some CMake variable that reliably points to the sources? The single responsibility principle at least suggests we should split "find Blender sources" from "obtain the Blender version from those sources".

This revision now requires changes to proceed.Mar 15 2022, 3:39 PM

This was a temp hack to get the release out of the way, it did it's job, but honestly, i'm not super thrilled about the dependency between the deps builder and the blender cmake macro's, the builder may live in the blender repo, but i still see the builder as a standalone project (it used to be before it was absorbed into the blender tree) and shouldn't be concerned with figuring out the version of a project independent from it.

personally i feel the way to go here is

  1. In the builder have

set(PACKAGE_REPOSITORY "https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/" CACHE STRING "Location of the package repository")
and not worry about trying to figure out where in the release cycle we are or other "smart things"

  1. if any of our make helpers want to do something smart they can figure-out what they want and pass a -DPACKAGE_REPOSITORY="https://anywhere,you.want.it.to.be.org/" to it's cmake invocation

What if ... we simply change the URL the moment we branch out (bcon3), and in the branch?

So while in master we keep:

set(TARGET_URI  https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})

When we branch out we can do:

set(TARGET_URI  https://svn.blender.org/svnroot/bf-blender/tags/blender-3.2-release/lib/packages/${TARGET_FILE})

I'm surprised I didn't think about this earlier since it is by far the simplest option. But I'm glad we can visit this with fresh eyes without the release rush.

What if ... we simply change the URL the moment we branch out (bcon3), and in the branch?

That LGTM. Is there a script that's used for branching out, which can be updated for this? I wouldn't trust a manual checklist for this, it's too easy to miss a step.

There is no script, but a very granular checklist followed by the release team. I think it is good enough this way. And worst case scenario we will have a make source_archive_complete fail.

@Ray Molenkamp (LazyDodo) thoughts?

No complaints from me, personally I'm a huge fan of checklists being actually completed, have a page on the wiki somewhere or a ticket with the checklist for something, and have people place actual check marks in tasks they complete, that's how I run the lib updates, (ie 3.0 update, 3.1 update , 3.2 update) easy for me to see the state of things, easy for others to see the state of things.

What if ... we simply change the URL the moment we branch out (bcon3), and in the branch?

No complaints from me, personally I'm a huge fan of checklists being actually completed, have a page on the wiki somewhere or a ticket with the checklist for something, and have people place actual check marks in tasks they complete, that's how I run the lib updates, (ie 3.0 update, 3.1 update , 3.2 update) easy for me to see the state of things, easy for others to see the state of things.

I'm convinced, that approach LGTM.

From review: Keep changes simple and local

Updated https://wiki.blender.org/wiki/Process/Release_Checklist#III_-_After_Branching

This revision is now accepted and ready to land.Mar 24 2022, 10:56 AM