Closed Bug 1390693 Opened 7 years ago Closed 7 years ago

Add tags for different rtd versions

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: liuche, Assigned: gps)

References

Details

Attachments

(9 files)

Specifically on Mobile, some partners would like to have documentation for specific versions Firefox. Currently, we just show "latest".

What would it take to have versions of the docs tagged to each release?
Dustin: how should we do this in a TaskCluster world?
Flags: needinfo?(dustin)
Maybe as part of the release process?  That could upload to a different prefix of the same bucket, or to a different bucket.
Flags: needinfo?(dustin)
Path prefix in the bucket would be doable. We could put the central-based docs at / then have the beta and release repos deposit docs to /releases/<channel>/<version>/ or something. Last write wins. But that should be fine.
You might also put a redirect from / to /latest or something, just to avoid one upload being a subdir of another (and avoiding the risk of an upload overwriting a release)
(In reply to Chenxia Liu [:liuche] from comment #0)
> Specifically on Mobile, some partners would like to have documentation for
> specific versions Firefox. Currently, we just show "latest".

Just to clarify, I think it would be helpful to have documentation tagged by release for our own purposes. The ability to better respond to partner questions is an additional benefit. :)
Assuming we don't do any docs updates after central (which is probably fair because I can't think of any situation where we'd update docs on a release branch and not on central because to do would mean docs on central aren't correct), then docs generation on central can look at config/milestone.txt and upload to that path (stripping the "a1" so we have a straight version number).
Comment on attachment 8900890 [details]
Bug 1390693 - Run documentation generation everywhere;

https://reviewboard.mozilla.org/r/172322/#review178072
Attachment #8900890 - Flags: review?(dustin) → review+
Comment on attachment 8900891 [details]
Bug 1390693 - Indent code to make linter happy;

https://reviewboard.mozilla.org/r/172324/#review178074
Attachment #8900891 - Flags: review?(dustin) → review+
Comment on attachment 8900892 [details]
Bug 1390693 - Use separate variable for the base output directory;

https://reviewboard.mozilla.org/r/172326/#review178076
Attachment #8900892 - Flags: review?(dustin) → review+
Comment on attachment 8900893 [details]
Bug 1390693 - Generate docs archive within mach command;

https://reviewboard.mozilla.org/r/172328/#review178080
Attachment #8900893 - Flags: review?(dustin) → review+
Comment on attachment 8900897 [details]
Bug 1390693 - Upload docs to project and version specific locations;

https://reviewboard.mozilla.org/r/172336/#review178082

::: tools/docs/mach_commands.py:156
(Diff revision 1)
> +        s3_upload(files, key_prefix='%s/latest' % project)
> +        if version:
> +            s3_upload(files, key_prefix='%s/%s' % (project, version))

We /may/ want to put the version first. Since the hostname is in the context of Firefox source tree docs, then "version" is a more important hierarchical component than "project."
Comment on attachment 8900894 [details]
Bug 1390693 - Move S3 upload logic to standalone module;

https://reviewboard.mozilla.org/r/172330/#review178084
Attachment #8900894 - Flags: review?(dustin) → review+
Comment on attachment 8900895 [details]
Bug 1390693 - Use distribution_files() for finding files to upload;

https://reviewboard.mozilla.org/r/172332/#review178086
Attachment #8900895 - Flags: review?(dustin) → review+
Comment on attachment 8900896 [details]
Bug 1390693 - Fold `mach doc-upload` into `mach doc`;

https://reviewboard.mozilla.org/r/172334/#review178088
Attachment #8900896 - Flags: review?(dustin) → review+
Comment on attachment 8900898 [details]
Bug 1390693 - Use thread pool for S3 uploads;

https://reviewboard.mozilla.org/r/172338/#review178094
Attachment #8900898 - Flags: review?(dustin) → review+
Comment on attachment 8900897 [details]
Bug 1390693 - Upload docs to project and version specific locations;

https://reviewboard.mozilla.org/r/172336/#review178092

What will this leave at the root?

Note that you can upload "redirect" objects (empty objects with header website-redirect-location), so it might be good to link / -> /main and /main -> /main/latest or something like that.
Attachment #8900897 - Flags: review?(dustin) → review+
Comment on attachment 8900897 [details]
Bug 1390693 - Upload docs to project and version specific locations;

https://reviewboard.mozilla.org/r/172336/#review178092

The main docs will still be available at root.

Thinking about this more, I think we should land this now and deal with any refactoring to the hierarchy in a follow-up. (Why let good patches go to waste?) I'd like to retroactively generate docs for old versions, purge the S3 bucket, and start from a clean slate with the new naming schema, including support for redirects.

We can hash that out in another bug.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0180878e6feb
Run documentation generation everywhere; r=dustin
https://hg.mozilla.org/integration/autoland/rev/9fe542a58029
Indent code to make linter happy; r=dustin
https://hg.mozilla.org/integration/autoland/rev/85ae0d0798be
Use separate variable for the base output directory; r=dustin
https://hg.mozilla.org/integration/autoland/rev/c1d7fe990f07
Generate docs archive within mach command; r=dustin
https://hg.mozilla.org/integration/autoland/rev/ed802f889444
Move S3 upload logic to standalone module; r=dustin
https://hg.mozilla.org/integration/autoland/rev/c74c6ded8370
Use distribution_files() for finding files to upload; r=dustin
https://hg.mozilla.org/integration/autoland/rev/974718bfc596
Fold `mach doc-upload` into `mach doc`; r=dustin
https://hg.mozilla.org/integration/autoland/rev/c0b6cbecee95
Upload docs to project and version specific locations; r=dustin
https://hg.mozilla.org/integration/autoland/rev/7f3526c6c5d7
Use thread pool for S3 uploads; r=dustin
Blocks: 1394074
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: