Closed Bug 999660 Opened 8 years ago Closed 8 years ago

[Tarako] 1.3T builds are configured with incorrect update server URL

Categories

(Release Engineering :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:1.3T+, b2g-v1.3T fixed)

VERIFIED FIXED
blocking-b2g 1.3T+
Tracking Status
b2g-v1.3T --- fixed

People

(Reporter: tchung, Assigned: seinlin)

References

Details

Attachments

(1 file, 2 obsolete files)

When doing a full flash of tarako.zip from the 1.3T pvtbuilds repo, the update server is pointing to the wrong path.

It's looking at http://update.boot2gecko.org/release-spreadtrum/update.xml, instead of http://update.boot2gecko.org/tarako/1.3.0t/nightly/update.xml

Logcat: 
04-22 13:23:01.197: I/Gecko(84): *** AUS:SVC Checker: checkForUpdates, force: true
04-22 13:23:01.197: E/GeckoConsole(84): AUS:SVC Checker: checkForUpdates, force: true
04-22 13:23:01.237: I/Gecko(84): *** AUS:SVC Checker:getUpdateURL - update URL: http://update.boot2gecko.org/release-spreadtrum/update.xml?force=1
04-22 13:23:01.237: E/GeckoConsole(84): AUS:SVC Checker:getUpdateURL - update URL: http://update.boot2gecko.org/release-spreadtrum/update.xml?force=1
04-22 13:23:01.237: I/Gecko(84): *** AUS:SVC gCanCheckForUpdates - able to check for updates
04-22 13:23:01.237: E/GeckoConsole(84): AUS:SVC gCanCheckForUpdates - able to check for updates
04-22 13:23:01.277: I/Gecko(84): *** AUS:SVC Checker:checkForUpdates - sending request to: http://update.boot2gecko.org/release-spreadtrum/update.xml?force=1
04-22 13:23:01.277: E/GeckoConsole(84): AUS:SVC Checker:checkForUpdates - sending request to: http://update.boot2gecko.org/release-spreadtrum/update.xml?force=1
04-22 13:23:06.807: I/Gecko(84): *** AUS:SVC Checker:onLoad - request completed downloading document
04-22 13:23:06.817: E/GeckoConsole(84): AUS:SVC Checker:onLoad - request completed downloading document
04-22 13:23:06.857: I/Gecko(84): *** AUS:SVC Checker:_updates get - unexpected node name!
04-22 13:23:06.867: E/GeckoConsole(84): AUS:SVC Checker:_updates get - unexpected node name!
04-22 13:23:06.867: I/Gecko(84): *** AUS:SVC Checker:onLoad - there was a problem checking for updates. Exception: Error: Unexpected node name, expected: updates, got: parsererror
04-22 13:23:06.867: E/GeckoConsole(84): AUS:SVC Checker:onLoad - there was a problem checking for updates. Exception: Error: Unexpected node name, expected: updates, got: parsererror
04-22 13:23:06.867: I/Gecko(84): *** AUS:SVC Checker:onLoad - request.status: 404
04-22 13:23:06.867: E/GeckoConsole(84): AUS:SVC Checker:onLoad - request.status: 404
04-22 13:23:06.897: I/Gecko(84): *** AUS:SVC getStatusTextFromCode - transfer error: Update XML file not found (404), code: 404
04-22 13:23:06.917: E/GeckoConsole(84): AUS:SVC getStatusTextFromCode - transfer error: Update XML file not found (404), code: 404
04-22 13:23:07.057: I/Gecko(84): *** AUS:SVC Creating UpdateService
04-22 13:23:07.057: E/GeckoConsole(84): AUS:SVC Creating UpdateService
04-22 13:23:07.067: I/Gecko(84): *** AUS:SVC UpdateService:onError - error during background update. error code: 1404, status text: Update XML file not found (404)
04-22 13:23:07.067: E/GeckoConsole(84): AUS:SVC UpdateService:onError - error during background update. error code: 1404, status text: Update XML file not found (404)

REpro:
1) flash tarako.zip onto Tarako device from 1.3T pvtbuilds location:  
--2014-04-22 12:02:58--  https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2gotoro/nightly/mozilla-b2g28_v1_3t-tarako/latest/tarako.zip

2) launch settings app, enable wifi, check for updates
3) Verify the URL path is incorrect when checking updates  

Expected:
- configured to: http://update.boot2gecko.org/tarako/1.3.0t/nightly/update.xml

ActuaL:
- configured to: 
http://update.boot2gecko.org/release-spreadtrum/update.xml
This might be an in-repo issue, I'm not sure where these channels are configured though.
Component: Release Automation → General Automation
QA Contact: bhearsum → catlee
This should be nomed for 1.3T, not 1.3.
blocking-b2g: 1.3? → 1.3T?
ni? kli for further comments
Flags: needinfo?(kli)
Attached patch device_update_channel.diff (obsolete) — Splinter Review
James, Can you configure update channel to "tarako/1.3.0t/nightly"?
Flags: needinfo?(kli) → needinfo?(james.zhang)
commit 53f0354f9527c57296823824c94932eccc24f0e6
Author: james.zhang <james.zhang@spreadtrum.com>
Date:   Wed Apr 23 21:31:06 2014 +0800

    Bug#269156 mozilla Bug 999660 - [Tarako] 1.3T builds are configured with incorrect update server URL
    
    [bug number  ]
    [root cause  ]
    [changes     ]
    [side effects]
    [self test   ] yes
    [reviewers   ]
    
    Change-Id: Ibb864493a9ac886c772f17fd0434cf78ebeee85f
Flags: needinfo?(james.zhang)
blocking-b2g: 1.3T? → 1.3T+
patch landed today.  QAWanted to retest FOTA/OTA for tomorrow's build.
Flags: needinfo?(nhirata.bugzilla)
Keywords: qawanted
Flags: needinfo?(nhirata.bugzilla) → needinfo?(jhammink)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #6)
> patch landed today.  QAWanted to retest FOTA/OTA for tomorrow's build.

where's the patch uplift?  i dont see it in this bug yet.
It's in spreadtrum device/sprd git repo.
ni? James, can you let us know what changes you made in your repo?

this is more for mozilla internal testing. we do not want this change to be in your repo for your commercial builds. so this change should be on mozilla side. Thanks
Flags: needinfo?(james.zhang)
Patch in attachment 8410944 [details] [diff] [review] was merged into device/sprd.
After patch is merged, update server url is as Expected in comment 0:
- configured to: http://update.boot2gecko.org/tarako/1.3.0t/nightly/update.xml

If we need this only for internal test purpose, I suggest to push the url into phone and do not have this change in code. 

Please reference this for how to change update url: https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/change_ota_url.sh
(In reply to Joe Cheng [:jcheng] from comment #9)
> ni? James, can you let us know what changes you made in your repo?
> 
> this is more for mozilla internal testing. we do not want this change to be
> in your repo for your commercial builds. so this change should be on mozilla
> side. Thanks

I landed Kaizhen's patch in device/sprd git repo.


commit 53f0354f9527c57296823824c94932eccc24f0e6
Author: james.zhang <james.zhang@spreadtrum.com>
Date:   Wed Apr 23 21:31:06 2014 +0800

    Bug#269156 mozilla Bug 999660 - [Tarako] 1.3T builds are configured with incorrect update server URL
    
    [bug number  ]
    [root cause  ]
    [changes     ]
    [side effects]
    [self test   ] yes
    [reviewers   ]
    
    Change-Id: Ibb864493a9ac886c772f17fd0434cf78ebeee85f

diff --git a/sp6821a_gonk/prod_sp6821a.mk b/sp6821a_gonk/prod_sp6821a.mk
index c4093d8..bdd2e08 100644
--- a/sp6821a_gonk/prod_sp6821a.mk
+++ b/sp6821a_gonk/prod_sp6821a.mk
@@ -87,4 +87,4 @@ export LOCALE_BASEDIR=$(PWD)/gaia-l10n/
 export LOCALES_FILE=$(PWD)/device/sprd/sp6821a_gonk/languages.json
 export GAIA_DEFAULT_LOCALE=en-US
 export GAIA_KEYBOARD_LAYOUTS=en,bn-Avro,bn-Probhat
-export B2G_UPDATE_CHANNEL=release-spreadtrum
+export B2G_UPDATE_CHANNEL=tarako/1.3.0t/nightly
Flags: needinfo?(james.zhang)
James, would this affect SPRD's repo as well?  We would want the channel ( release-spreadtrum ) for your production builds.
Flags: needinfo?(james.zhang)
I'm confuse. I will discuss with thomas.
Flags: needinfo?(james.zhang) → needinfo?(ttsai)
FWIW, the channel now points to the  update URL requested here:


E/GeckoConsole(   84): AUS:SVC Checker:getUpdateURL - update URL: http://update.boot2gecko.org/tarako/1.3.0t/nightly/update.xml?force=1

Gaia      3771067de006633df690a590a97b4d28c44ef8b2
Gecko     https://hg.mozilla.org/releases/mozilla-b2g28_v1_3t/rev/51a4e4d35e30
BuildID   20140423164005
Flags: needinfo?(jhammink)
Naoki, What VARIANT is used in PVT build? 

If the VARIANT used is different to production build, may be we can use it. For example
when VARIANT==userdebug
export B2G_UPDATE_CHANNEL=tarako/1.3.0t/nightly
when VARIANT=user
export B2G_UPDATE_CHANNEL=release-spreadtrum
Flags: needinfo?(ttsai) → needinfo?(nhirata.bugzilla)
I think another method which can work for both our PVT build and partner build is 

- we can export channel in .userconfig for PVT build, export B2G_UPDATE_CHANNEL=tarako/1.3.0t/nightly

- in device/sprd/sp6821a_gonk/prod_sp6821a.mk, it will check if there is no B2G_UPDATE_CHANNEL and then export B2G_UPDATE_CHANNEL=release-spreadtrum
I am not sure the best method.  I put a patch for my version of the change ota channel:
https://github.com/nhirata/B2G-flash-tool/blob/add_tarako_channel/change_ota_channel_pref.sh
This updates to the channel as an override when updates.js is placed : /system/b2g/defaults/pref

I think your option would work too...  It would eliminate the need for using scripts to change the channel or updates url.  

FYI, for Socorro, we detect if it's an eng build by the channel being set to default, if it's a user build from pvt based on <device>/<version>/nightly and a commercial build via their own channel name:
example of our build see Release Channel here : https://crash-stats.mozilla.com/report/index/fbec02e8-bfc0-4f0d-8d60-548972140419
Flags: needinfo?(nhirata.bugzilla)
Tony, is using scripts to change the channel or updates url good in practice? 
If it is not, I think we need to choose a method form comment 16 and comment 17. And request partner to update the change into device/sprd/sp6821a_gonk/prod_sp6821a.mk.
Flags: needinfo?(tchung)
Can't we just add this configuration at mozilla pvtbuilds build time?    ni? aki, catlee to comment.
Flags: needinfo?(tchung)
Flags: needinfo?(catlee)
Flags: needinfo?(aki)
The release channel names with "/" in them should IMHO only be used in builds created by Mozilla. We are working on getting rid of them with the switch to a new update server, but we are starting this as Flame-only for now. That said, release channels with "/" in them should not be proliferated elsewhere.
Duplicate of this bug: 1001068
I'm not sure what the ask is here. We've got two sources for these builds, and they should have different update URLs, no?
Flags: needinfo?(catlee)
We already set the channel for nightly Tarako builds.
If you look at a nightly build log (e.g. https://tbpl.mozilla.org/php/getParsedLog.php?id=38696654&tree=Mozilla-B2g28-v1.3t&full=1 ), you see the env var B2G_UPDATE_CHANNEL=tarako/1.3.0t/nightly

However, something in the source is not letting us set this, and overrides it with release-spreadtrum, aiui.
Flags: needinfo?(aki)
Attached patch device_update_channel.diff (obsolete) — Splinter Review
James, per comment 24, B2G_UPDATE_CHANNEL is exported in pvt build. Could you merge this patch? Thanks!
Attachment #8410944 - Attachment is obsolete: true
Flags: needinfo?(james.zhang)
(In reply to Aki Sasaki [:aki] from comment #24)
> We already set the channel for nightly Tarako builds.
> If you look at a nightly build log (e.g.
> https://tbpl.mozilla.org/php/getParsedLog.php?id=38696654&tree=Mozilla-B2g28-
> v1.3t&full=1 ), you see the env var B2G_UPDATE_CHANNEL=tarako/1.3.0t/nightly
> 
> However, something in the source is not letting us set this, and overrides
> it with release-spreadtrum, aiui.

After attachment 8414948 [details] [diff] [review] get merged in partner side, env var B2G_UPDATE_CHANNEL will take affect as expected.
Please see these configure for pvt build. I think B2G_UPDATE_CHANNEL need 'strip', right?


ifeq ($(strip $(MOZILLA_MLS_KEY_FILE)),)
export MOZILLA_MLS_KEY_FILE=$(ANDROID_BUILD_TOP)/$(BOARDDIR)/mls.key
endif

ifeq ($(B2G_UPDATE_CHANNEL),)
export B2G_UPDATE_CHANNEL=release-spreadtrum
endif
Flags: needinfo?(ttsai)
Flags: needinfo?(kli)
Flags: needinfo?(james.zhang)
James, I try locally, with and without strip does work as expected. I am not sure what will happen without strip on pvt build. Let's follow MOZILLA_MLS_KEY_FILE and have strip for this condition check.
Attachment #8414948 - Attachment is obsolete: true
Flags: needinfo?(kli)
to Kli since kli has been working on this. thanks
Assignee: nobody → kli
can this bug be "fixed", because the patch is committed?
Flags: needinfo?(ttsai)
hi Tony, is this still a valid bug? thanks
Flags: needinfo?(tchung)
(In reply to Joe Cheng [:jcheng] from comment #31)
> hi Tony, is this still a valid bug? thanks

I need someone to confirm that mozilla tarako builds are configured correctly with the committed patch.  As i understand from Comment 24, things should "just work" on today's build.  going to ni? nhirata to confirm this.
Flags: needinfo?(tchung) → needinfo?(nhirata.bugzilla)
Partner has merged the patch in their repo. If this is confirmed fixed, let's close this bug.
Mozilla releng build has the proper build : tarako/1.3.0t/nightly
I also looked at the repo after syncing and I found the change Kai-Zhen mentioned.
I made my own build without the variable defined and got "default"
With the variable defined, I still ran into the issue of getting "default" instead of the release-spreadtrum
ie I placed export "B2G_UPDATE_CHANNEL=" in the .userconfig


Maybe I need to clobber for the last part?  Or maybe I did something wrong...
Flags: needinfo?(kli)
Naoki, in my build do not export B2G_UPDATE_CHANNEL or export an empty B2G_UPDATE_CHANNEL will get "release-spreadtrum". 

I think you'll need to rm -rf objdir-gecko, and then build and flash gecko.
Flags: needinfo?(kli)
Currently, it points to the following URL:  (it points to default, not 'nightly')

: *** AUS:SVC Checker: checkForUpdates, force: true
E/GeckoConsole(   86): AUS:SVC Checker: checkForUpdates, force: true
I/Gecko   (   86): *** AUS:SVC Checker:getUpdateURL - update URL: http://update.boot2gecko.org/tarako/1.3.0t/default/update.xml?force=1
E/GeckoConsole(   86): AUS:SVC Checker:getUpdateURL - update URL: http://update.boot2gecko.org/tarako/1.3.0t/default/update.xml?force=1
I/Gecko   (   86): *** AUS:SVC gCanCheckForUpdates - able to check for updates
E/GeckoConsole(   86): AUS:SVC gCanCheckForUpdates - able to check for updates
I/Gecko   (   86): *** AUS:SVC Checker:checkForUpdates - sending request to: http://update.boot2gecko.org/tarako/1.3.0t/default/update.xml?force=1
E/GeckoConsole(   86): AUS:SVC Checker:checkForUpdates - sending request to: http://update.boot2gecko.org/tarako/1.3.0t/default/update.xml?force=1
I/GeckoDump(   86): XXX FIXME : Got a mozContentEvent: force-update-check
E/GeckoConsole(   86): [JavaScript Error: "syntax error" {file: "http://update.boot2gecko.org/tarako/1.3.0t/default/update.xml?force=1" line: 1 column: 50 source: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">"}]

Version info:
Gaia      c067cc717c4a3bb8b412f28f37d224eb84b639df
Gecko     https://hg.mozilla.org/releases/mozilla-b2g28_v1_3t/rev/8eebf8120dbd
BuildID   20140505164002
Version   28.1
ro.build.version.incremental=252
ro.build.date=Sat Apr 26 13:25:50 CST 2014
Above result was because eng build was loaded.  when the user build was loaded to tarako, correct URL was used for the update and the update check finished successfully.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Hi No-jun, did you make your own build or test the pvtbuild?  I was also testing the build with making my own build to see what ends up being placed in the if the B2G_UPDATE_CHANNEL is not set.

When it's not set, it's still showing default for me even after clobbering ( rm -rf objdir-gecko ).
Flags: needinfo?(npark)
Flags: needinfo?(nhirata.bugzilla)
Flags: needinfo?(kli)
Flags: needinfo?(nhirata.bugzilla)
Khai-Zhen : here is the build command I am using : 

variant=user GAIA_MEMORY_PROFILE=low ROCKETBAR=0 MOZILLA_OFFICIAL=1 NOFTU=1 ./build.sh -j1
Flags: needinfo?(nhirata.bugzilla)
Naoki:

VARIANT should be in capital letter, VARIANT=user, but this won't affect the B2G_UPDATE_CHANNEL. 

Can your check your .config file? You should clobber the dir which is assigned to GECKO_OBJDIR before build.

A simple method the debug this issue is add an error message at the end of "device/sprd/sp6821a_gonk/prod_sp6821a.mk" and try ./build.sh again. You'll see what is used for B2G_UPDATE_CHANNEL. 
--
$(error B2G_UPDATE_CHANNEL=$(B2G_UPDATE_CHANNEL))
--

If B2G_UPDATE_CHANNEL used is correct, clobber GECKO_OBJDIR and remove this error message and then build again.
Flags: needinfo?(kli)
Hi Naoki, I downloaded the latest 1.3t in pvtbuild for the tarako
Flags: needinfo?(npark)
I'm not sure Kai-Zhen, I think it might have made a difference in that the channel wasn't overwritten by default this time.

Anyhow, I verified with making my own build that the change works.  Thanks for your help.
Status: RESOLVED → VERIFIED
Keywords: qawanted
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.