Closed Bug 1181331 Opened 9 years ago Closed 9 years ago

archiver client should support default or a tag as a revision and fall back to hgmo if archiver fails

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlund, Unassigned)

References

Details

Attachments

(3 files, 1 obsolete file)

this will help: - release based factories that use mozharness but are not tied to a particular gecko repo/rev - releng services (vcs-sync, mapper, etc) that just care about deploying the latest and greatest of mozharness
I tested this in buildbot staging on a linux and windows slave. you can verify locally with: # where $SOME_WORK_DIR can be relative or abs path python $BUD/tools_jlund/buildfarm/utils/archiver_client.py mozharness --repo mozilla-central --rev default --destination $SOME_WORK_DIR --debug --staging # negative test. should behave as before python $BUD/tools_jlund/buildfarm/utils/archiver_client.py mozharness --repo mozilla-central --rev ffa83d153080 --destination $SOME_WORK_DIR2 --debug
Attachment #8630715 - Flags: review?(dustin)
Comment on attachment 8630715 [details] [diff] [review] 150707_bug_1181331_archiver_client_accepts_default_as_rev-tools.patch I am going to change this slightly first to support release specific jobs too
Attachment #8630715 - Flags: review?(dustin)
Comment on attachment 8630715 [details] [diff] [review] 150707_bug_1181331_archiver_client_accepts_default_as_rev-tools.patch Review of attachment 8630715 [details] [diff] [review]: ----------------------------------------------------------------- ::: buildfarm/utils/archiver_client.py @@ +257,5 @@ > + cmd = ['hg', 'id', '-r', 'default', 'https://hg.mozilla.org/%s' % (options.repo,)] > + log.info('"default" was passed as the revision. Querying remote repository for ' > + 'corresponding rev hash of current default tip with cmd: %s', cmd) > + options.rev = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].strip() > + log.info('default revision being used: %s', options.rev) I like this technique!
Summary: archiver client should support default as a revision to get the latest tip based mozharness checkout → archiver client should support default or a tag as a revision to get a mozharness archive
interdiff from last patch http://people.mozilla.org/~jlund/150708_bug_1181331_archiver_client_accepts_default_and_tag_as_rev-tools-interdiff.patch what's changed: - you can now pass a tag instead of a rev. This will be required for releases. how to use: # same as before for default rev python $BUD/tools_jlund/buildfarm/utils/archiver_client.py mozharness --repo mozilla-central --rev default --destination $SOME_WORK_DIR --debug --staging # and for tag > python $BUD/tools_jlund/buildfarm/utils/archiver_client.py mozharness --repo releases/mozilla-beta --tag FIREFOX_40_0b2_RELEASE --destination $SOME_WORK_DIR --debug --staging
Attachment #8631077 - Flags: review?(dustin)
Comment on attachment 8631077 [details] [diff] [review] 150708_bug_1181331_archiver_client_accepts_default_and_tag_as_rev-tools.patch Review of attachment 8631077 [details] [diff] [review]: ----------------------------------------------------------------- ::: buildfarm/utils/archiver_client.py @@ +208,5 @@ > parser = OptionParser(__doc__) > parser.add_option("--repo", dest="repo", default='mozilla-central', > help="The repository the archive is based on.") > + parser.add_option("--rev", dest="rev", help="The revision the archive is based on.") > + parser.add_option("--tag", dest="tag", help="The tag the archive is based on.") Might want to mention that this only works for mozharness
Attachment #8631077 - Flags: review?(dustin) → review+
Comment on attachment 8631077 [details] [diff] [review] 150708_bug_1181331_archiver_client_accepts_default_and_tag_as_rev-tools.patch thanks http://hg.mozilla.org/build/tools/rev/cceda7e95687
Attachment #8631077 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8635617 - Flags: review?(rail)
Comment on attachment 8635617 [details] [diff] [review] 150717_archiver_client_fallsback_to_hgmo_directly.patch A nit. Can you also pass timeout=NN (30-60s should be ok) to urlopen()?
Attachment #8635617 - Flags: review?(rail) → review+
Summary: archiver client should support default or a tag as a revision to get a mozharness archive → archiver client should support default or a tag as a revision and fall back to hgmo if archiver fails
r=rail - carrying forward. adding timeouts to urlopen
Attachment #8635617 - Attachment is obsolete: true
Attachment #8635625 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: