Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 435671 - checksum links are not correct for promoted builds
Summary: checksum links are not correct for promoted builds
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.4 RC4   Edit
Assignee: David Williams CLA
QA Contact:
URL:
Whiteboard: routine releng
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-23 14:07 EDT by David Williams CLA
Modified: 2014-05-30 13:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2014-05-23 14:07:34 EDT
When moving, recently, to absolute URL/path to "checksum" I used "build_id" as part of the URL ... but that doesn't work after being "promoted". 

For an I-build, the "build_id" is the same as the "build_dir", such as 
I20140522-1330 for both. 

But after promotion, build_id is, for example, "4.4RC2" but what's needed in URL is "build_dir" which is something like S-4.4RC2-201405221330

Similar for "equinox", but its "build_dir" is, for example, S-LunaRC2-201405221330

Many variables, such as "BUILD_ID" are provided to "index.php" file via the buildproperties.php file ... but, so far, there is no "build_dir" variable there. 

Will need to decide if better to add "build_dir" to properties file ... or, compute it from other data. 

I have fixed the RC2 links "by hand".
Comment 1 David Williams CLA 2014-05-24 17:05:44 EDT
http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=baaee81b889c69f849bcf2c2b653fc7e04d6e6b5

I decided to go the route of adding "build_dir" and "eq_build_dir" variables, instead of "computing" it from known values ... simply because I think that will be easier for others to understand (or myself!) if reading 6 months from now. 

I'll be optimistic and mark "fixed" but will take some testing (both for regular builds and "promotion"). The promote scripts might almost work the way they are ... since already some logic in there to change "dir name" that we copy to, but ... one thing to watch out for is that we may do "equinox" first, and then that might cause "eclipse" not to "match". The place we do those "substitutions" in in "rename.sh" which is not even with the other promote scripts ... but is directly under 'sdk' ... for historical reasons: 
.../production/sdk/renameBuild.sh

I do local test build to make sure its close to correct, but won't be in "build.eclipse" build until Sunday's 8 PM build.
Comment 2 David Williams CLA 2014-05-24 19:52:20 EDT
Not even close (to done). 

Major thinks I've learned so far: 

In some places I'd changed php "buildLabel" variables to "build_dir", but on first run realized (re-discovered) some of the places "buildlabel" is used is from our custom "index" ant tasks ... not worth touching that at this point, so changed back to "buildLabel=$EQ_BUILD_DIR at top of php file. 

Learned that $BUILD_DIR is already used in some points to mean the full absolute path to "build directory", so changed these new variables to 
$BUILD_DIR_SEG, and 
$EQ_BUILD_DIR_SEG to make it a little clearer, they refer to only one (last) segment of build directory path. 

Fixes done in several steps, so suggest interested parties can query log/cGit with "Bug 435671" to find all changes.
Comment 3 David Williams CLA 2014-05-25 19:24:31 EDT
Changes like this are way too hard! Too many places that "change pages" I guess. 
We really need better separation of "data" and the "web ui" that displays it. 

http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/log/?qt=grep&q=Bug+435671
Comment 4 David Williams CLA 2014-05-30 10:48:35 EDT
Still not right for equinox, in RC3.
Comment 5 David Williams CLA 2014-05-30 10:56:19 EDT
The links provided (on current RC3) download page are 

http://download.eclipse.org/equinox/drops/S-4.4RC3-201405282000/checksum/...

but should be 


http://download.eclipse.org/equinox/drops/S-LunaRC3-201405282000/checksum/...

From inspecting buildproperties.php, is appears EQ_BUILD_DIR_SEG is wrong: 

$EQ_BUILD_DIR_SEG = "S-4.4RC3-201405282000";

As least easy to fix that by hand :\
Comment 6 David Williams CLA 2014-05-30 11:16:13 EDT
(In reply to David Williams from comment #5)

> 
> As least easy to fix that by hand :\

I did fix RC3 "by hand" ... but, haven't looked at "promotion scripts" yet.
Comment 7 David Williams CLA 2014-05-30 13:24:18 EDT
(In reply to David Williams from comment #6)
> ... but, haven't looked at "promotion scripts" yet.

According to "promote log", the "replacement values" are correct: 

replaceDirCommand: s!BUILD_DIR_SEG = "I20140528-2000"!BUILD_DIR_SEG = "S-4.4RC3-201405282000"!g

replaceDirCommand: s!EQ_BUILD_DIR_SEG = "I20140528-2000"!EQ_BUILD_DIR_SEG = "S-LunaRC3-201405282000"!g

But after staring at it long enough, I see that "BUILD_DIR_SEG" not only matches "BUILD_DIR_SEG" but also matches - the end of - "EQ_BUILD_DIR_SEG",  so by the time second replacement is done, the "value" no longer matches, and it's left with the Elcipse BUILD_DIR_SEG value.  

There might be a way to fix it by tying to "beginnng of line", or similar, but doesn't always literally start at beginning of line ... so I think easiest solution it to reverse the order and match/replace longest string first, and then do shortest. (which will no longer match the "I2014..." value part, so all should end well. 

http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=7e40d6a2263021ce62f50784129672121d031eb8