Closed Bug 894072 Opened 8 years ago Closed 8 years ago

gaia-unit-tests not being run against the correct gaia commit


(Release Engineering :: General, defect)

Not set


(Not tracked)



(Reporter: jgriffin, Assigned: jgriffin)




(1 file, 1 obsolete file)

The gaia-unit-test mozharness script is always syncing the tip revision of gaia, instead of the one passed to it in buildprops.json.
Actually we don't pass the gaia commit in buildprops.json.  Is there a way to get this, or should we just read gaia.json from hgweb?
Flags: needinfo?(aki)
Hm. I would be wary about adding this on the buildbotcustom side, since [done properly,] it will affect every single sendchange for all builds, desktop/mobile/b2g, depend/nightly/release/try.

Does the hgweb solution look palatable?
Flags: needinfo?(aki)
Sure, that's fine.  gaia-unit-tests is the only job that needs this, AFAICT, since it's the only job that needs to do something with a gaia repo.
Works locally, although I can't test it in exactly the same environment as is used by buildbot.
Attachment #776833 - Flags: review?(aki)
Comment on attachment 776833 [details] [diff] [review]
Sync gaia to the commit specified in gaia.json,

>+        if self.config.get('properties'):

I think you mean self.buildbot_config, no?
You might want |if self.buildbot_config is not None| or an |if isinstance(self.buildbot_config, dict)| here.

>+            # get gaia commit via hgweb
>+            revision = self.config.get('properties')['revision']
>+            repo_path = self.config.get('properties')['repo_path']

The .get() doesn't necessarily make sense here... you've checked for it in the |if| above.
self.buildbot_config['properties']['revision'], or self.buildbot_config.get('properties', {}).get('revision')... with the latter construct you could verify that revision and repo_path are not None before proceeding.

>+            url = "{repo_path}/raw-file/{rev}/b2g/config/gaia.json".format(
>+                repo_path=repo_path,
>+                rev=revision)

We may want this url to be configurable, rather than hardcoded, but that's easy enough to change later and shouldn't be a blocker here.

>+            contents = self.retry(self.load_json_from_url, args=(url,))

We may want to verify that contents is a dict before proceeding to the repos.append(), so we can throw an appropriate error message.

How do you want to proceed here?  Are you comfy with a quick Cedar pass on default once the above is addressed, or did you want some other testing?
Addressed review comments.  Yes, I think a run on cedar against the default branch is sufficient testing.
Attachment #776857 - Flags: review?(aki)
Attachment #776833 - Attachment is obsolete: true
Attachment #776833 - Flags: review?(aki)
Attachment #776857 - Flags: review?(aki) → review+
Comment on attachment 776857 [details] [diff] [review]
Sync gaia to the commit specified in gaia.json,

Will trigger a run on cedar to make sure nothing is broken.
Attachment #776857 - Flags: checked-in+
Comment on attachment 776857 [details] [diff] [review]
Sync gaia to the commit specified in gaia.json,

cedar looked good, so merged to production
Closed: 8 years ago
Resolution: --- → FIXED
Product: → Release Engineering
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.