scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

Nightly publishing of Scaladoc has been broken for, like, ages #759

Closed SethTisue closed 2 years ago

SethTisue commented 3 years ago

at https://docs.scala-lang.org/api/all.html we link to e.g. https://www.scala-lang.org/files/archive/nightly/2.13.x/api/2.13.x/ but it hasn't refreshed since February 2018, it's still some 2.13.0-pre- version 🙀

SethTisue commented 3 years ago

okay, everyone watching this repo, WHERE WERE YOU ON THE NIGHT OF FEBRUARY 1, 2018, you better have a good alibi

martijnhoekstra commented 3 years ago

I was updating my ruby env

SethTisue commented 3 years ago

@martijnhoekstra @som-snytt okay, I'll have the sheriff let you guys out of the hoosegow.

There is nothing suspicious looking in the Git history around that time. The master criminal who perpetrated this covered their tracks well.

Oh hmm though, there's this from just a month later: https://github.com/scala/scala/pull/6390 ("Move to Travis CI for building releases/nightlies")

Perhaps something broke in February, and then nightlies publishing stopped altogether, and then a month later Adriaan moved everything to Travis-CI rather than fix it on Jenkins, and nobody noticed that the Scaladoc angle wasn't considered. That seems likely.

As for how to fix it...

Perhaps we can crib from scripts/travis-publish-spec.sh, which is doing something very similar, but for the language spec rather than the Scaladoc.

I looked through the https://github.com/scala/scala/pull/6390 diffs to see if I could find the code that used to publish the Scaladoc, and I don't see it.

Was it handled by https://scala-ci.typesafe.com/job/scala-2.13.x-release-website-archives/ ? Which ran scripts/jobs/release/website/archives -- which I cannot find anywhere in the Git history? Oh, aha, it's not in scala/scala, this is scala/scala-dist stuff: https://github.com/scala/scala-dist/blob/2.13.x/scripts/jobs/release/website/archives

Okay, that's enough investigation for one day

SethTisue commented 3 years ago

our detective's attention now turns to the scala-dist repo 🕵️

in .travis.yml there, we see

# Available modes:
#  - `release` to build native packages and upload them to S3
#  - `archives` to copy archives to chara (for scala-lang.org)
#  - `update-api` to update the scaladoc api symlinks

at https://travis-ci.org/github/scala/scala-dist/builds I see only jobs run with mode=release

it is part of our release steps to manually trigger archive and update-api jobs, but it appears we don't have anything that runs them more often than that (nightly or mergely)

and although one should never simply believe comments in code, this seems confirmed by the comment at the top of .travis.yml:

# The scala/scala travis job triggers a build of scala/scala-dist with `mode=release`. For
# the other modes (see below), use the web UI to trigger a build.

so it looks like next steps here would be:

1) attempt to update the nightly API by manually triggering runs 2) if that works, go on and set up automatic triggering

SethTisue commented 3 years ago

triggered: https://travis-ci.org/github/scala/scala-dist/builds/750961297 with: before_script: export version=2.13.5-bin-cc06c08 scala_sha=cc06c086ff6c085f6f394bace9da63efa7cbd591 mode=archives

triggered: https://travis-ci.org/github/scala/scala-dist/builds/750961482 with: same, except mode=update-api

SethTisue commented 3 years ago

well so far so good afaict, but I think they won't actually go live until the next time https://scala-webapps.epfl.ch/jenkins/view/All/job/production_scala-lang.org-scala-dist-archive-sync/ runs

tune in next episode

SethTisue commented 3 years ago

the manual triggering worked; https://www.scala-lang.org/files/archive/nightly/2.13.x/api/2.13.x/ did update

so now I "just" need to make it happen automatically

SethTisue commented 3 years ago

at https://github.com/scala/docs.scala-lang/pull/1954 @martijnhoekstra removed the dead links, but once this is fixed, we should bring them back

SethTisue commented 3 years ago

further dead-link-removal at scala/scala-lang@aef524d5d3d368d83d210261f930ca025b45fe42 (I'm a bit puzzled work was needed in both website repos; I wonder if one of the pages is actually unreferenced/dead?)

SethTisue commented 2 years ago

I've concluded this isn't worth the trouble.