Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
75c7890
first draft
paleolimbot Nov 18, 2022
f9aff01
some clarifications
paleolimbot Nov 22, 2022
cd73564
update the R section of the release guide
paleolimbot Nov 22, 2022
62d4a33
Update r/PACKAGING.md
paleolimbot Nov 22, 2022
9386274
Update r/PACKAGING.md
paleolimbot Nov 22, 2022
8ae4993
apply review suggestions
paleolimbot Nov 22, 2022
14f7af2
copy wiki content
paleolimbot Nov 22, 2022
a58be68
updates
paleolimbot Nov 29, 2022
6c23b74
ignore badges
paleolimbot Nov 29, 2022
62a65f0
a few more updates
paleolimbot Nov 29, 2022
a2a4ac1
Update r/PACKAGING.md
paleolimbot Nov 29, 2022
f982caa
qualify the tweet thread bullet
paleolimbot Nov 29, 2022
d302439
Update r/PACKAGING.md
paleolimbot Nov 29, 2022
5e4fd7a
fix url
paleolimbot Nov 29, 2022
282e78b
Update r/PACKAGING.md
paleolimbot Nov 29, 2022
780ec18
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
ab41e71
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
dca9b36
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
36bd3e5
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
97b350e
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
afe23c2
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
567ee14
Update r/PACKAGING.md
paleolimbot Nov 30, 2022
4e9c0b3
edits for Neal's review
paleolimbot Nov 30, 2022
ce003a9
Update packageing
paleolimbot Nov 30, 2022
148b471
clarify the `make build` step
paleolimbot Dec 1, 2022
9cce455
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
d2edb6e
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
528541f
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
1b9b843
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
1ec8b91
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
3f8d2b5
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
a981190
Update r/PACKAGING.md
paleolimbot Dec 1, 2022
6fd9d40
Update r/PACKAGING.md
paleolimbot Dec 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion docs/source/developers/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,39 @@ Be sure to go through on the following checklist:
:class-title: sd-fs-5
:class-container: sd-shadow-md

TODO: Move from https://cwiki.apache.org/confluence/display/ARROW/Release+Management+Guide#ReleaseManagementGuide-UpdatingRpackages
To publish the R package on CRAN, there are a few steps we need to do first
in order to ensure that binaries for Windows and macOS are available to CRAN.
Jeroen Ooms <jeroenooms@gmail.com> maintains several projects that build C++
dependencies for R packages for macOS and Windows. We test copies of these
same build scripts in our CI, and at release time, we need to send any
changes we have and update the versions/hashes upstream.

When the release candidate is made, make draft pull requests to each
repository using the rc, updating the version and SHA, as well as any cmake
build changes from the corresponding files in apache/arrow. Jeroen may
merge these PRs before the release vote passes, build the binary artifacts,
and publish them in the right places so that we can do pre-submission checks
(see below). After the release candidate vote passes, update these PRs
to point to the official (non-rc) URL and mark them as ready for review.
Comment on lines +502 to +503

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where would I find this official URL?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they are embedded in the hombrew files (there are links to the homebrew scripts in the checklist). I think there will be a number of specific additions after we get through this release and I wonder if we could use the release issue itself as a place to collect additions that would be useful?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of these scripts has the official and rc URLs in them, and it's a matter of updating the versions and (un)commenting to enable one or the other.

Jeroen will merge, build the binary artifacts, and publish them in the
right places. See the
`packaging checklist <https://github.com/apache/arrow/blob/master/r/PACKAGING.md>`_.
for a precise list of pull requests that must be made prior to submission
to CRAN.

Once these binary prerequisites have been satisfied, we can submit to CRAN.
Given the vagaries of the process, it is best if the R developers on the
project verify the CRAN-worthiness of the package before submitting.
Our CI systems give us some coverage for the things that CRAN checks, but
there are a couple of final tests we should do to confirm that the release
binaries will work and that everything runs on the same infrastructure that
CRAN has, which is difficult/impossible to emulate fully on Travis or with
Docker. For a precise list of checks, see the
`packaging checklist <https://github.com/apache/arrow/blob/master/r/PACKAGING.md>`_.

Once all checks are clean, we submit to CRAN, which has a web form for
uploading packages. The release process requires email confirmation
from the R package maintainer, currently Neal Richardson.

.. dropdown:: Update vcpkg port
:animate: fade-in-slide-down
Expand Down
1 change: 1 addition & 0 deletions r/.Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ STYLE.md
^cheatsheet$
^revdep$
^vignettes$
^PACKAGING\.md$
128 changes: 128 additions & 0 deletions r/PACKAGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@

<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Packaging checklist for CRAN release

For a high-level overview of the release process see the
[Apache Arrow Release Management Guide](https://arrow.apache.org/docs/developers/release.html#post-release-tasks).

Before the release candidate is cut:

- [ ] [Create a GitHub issue](https://github.com/apache/arrow/issues/new/)
entitled `[R] CRAN packaging checklist for version X.X.X`
and copy this checklist to the issue.
- [ ] Evaluate the status of any failing
[nightly tests and nightly packaging builds](https://lists.apache.org/list.html?builds@arrow.apache.org). These checks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the crossbow dashboard instead?

replicate most of the checks that CRAN runs, so we need them all to be passing
or to understand that the failures may (though won't necessarily) result in a rejection from CRAN.
- [ ] Check [current CRAN check results](https://cran.rstudio.org/web/checks/check_results_arrow.html)
Comment thread
thisisnic marked this conversation as resolved.
Outdated
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
- [ ] Ensure the contents of the README is accurate
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
- [ ] Run `urlchecker::url_check()` on the R directory at the release candidate
commit. Ignore any errors with badges as they will be removed in the CRAN release branch.
- [ ] [Polish NEWS](https://style.tidyverse.org/news.html#news-release) but do **not** update version numbers (this is done automatically later).
- [ ] For major releases, prepare tweet thread highlighting new features

Wait for the release candidate to be cut:

- [ ] Release candidate!

Make pull requests into the [autobrew](https://github.com/autobrew) and
[rtools-packages](https://github.com/r-windows/rtools-packages) repositories
used by the configure script on MacOS and Windows. These pull requests will
use the release candidate as the source.

- [ ] Pull request to modify
[the apache-arrow autobrew formula]( https://github.com/autobrew/homebrew-core/blob/high-sierra/Formula/apache-arrow.rb)
to update the release version, SHA256 checksum of the release source file, and any changes to dependencies and build steps that have changed in the
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
[copy of the formula we have of that formula in the Arrow repo](https://github.com/apache/arrow/blob/master/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb)
- [ ] Pull request to modify
[the apache-arrow-static autobrew formula]( https://github.com/autobrew/homebrew-core/blob/master/Formula/apache-arrow-static.rb)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get a 404 for this URL

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[the apache-arrow-static autobrew formula]( https://github.com/autobrew/homebrew-core/blob/master/Formula/apache-arrow-static.rb)
[the apache-arrow-static autobrew formula]( https://github.com/autobrew/homebrew-cran/blob/master/Formula/apache-arrow-static.rb)

to update the version, SHA, and any changes to dependencies and build steps that have changed in the
[copy of the formula we have of that formula in the Arrow repo](https://github.com/apache/arrow/blob/master/dev/tasks/homebrew-formulae/autobrew/apache-arrow-static.rb)
- [ ] Pull request to modify the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to note that there often are no changes in this script, and that's ok.

[autobrew script](https://github.com/autobrew/scripts/blob/master/apache-arrow)
to include any additions made to
[r/tools/autobrew](https://github.com/apache/arrow/blob/master/r/tools/autobrew).
- [ ] Pull request to modify the
[PKGBUILD script](https://github.com/r-windows/rtools-packages/blob/master/mingw-w64-arrow/PKGBUILD)
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
to reflect changes in
[ci/PKGBUILD](https://github.com/apache/arrow/blob/master/ci/scripts/PKGBUILD),
uncommenting the line that says "uncomment to test the rc".

Prepare and check the .tar.gz that will be released to CRAN.

- [ ] `git fetch upstream && git checkout release-X.X.X-rcXX && git clean -f -d`
- [ ] Unset the `ARROW_HOME` environment variable and then run `make build` (copies Arrow C++ into tools/cpp, prunes some unnecessary components, and runs `R CMD build`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unset ARROW_HOME? (I've never done this.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried it earlier, when I ran make build it used the version of libarrow from ARROW_HOME, which wasn't the one I wanted it to use.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Used" as in used to build against in order to build the vignettes? Generally that will be useful because it will save you time, as long as your local build is up to date. But that doesn't affect what cpp source gets copied into the R package.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neal has a good point...the R CMD build command only builds a source package, so ARROW_HOME is only used for the "installing the package to build the vignettes" step. You can turn off the vignettes step with --no-vignettes or something for the initial check (I don't think we execute any code in our vignettes).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it again and had to unset it as the version of Arrow I have in ARROW_HOME is from the tip of the master branch and not from this one, and they've diverged significantly enough (the C++ backpressure PR is what did it I think) so I couldn't use that one even if it's just for building vignettes, as the R package won't build against it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some clarification here that I hope is helpful...the big picture idea is that whatever libarrow the R package configure script picks up needs to be able to install the rc version. For example, when I ran the reverse dependency checks I rebuilt Arrow C++ from your crossbow PR branch and installed it to ARROW_HOME so that I didn't have to rebuild Arrow every time I installed the R package.

- [ ] `devtools::check_built("arrow_X.X.X.tar.gz")` locally

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're doing make build already, you might as well just collapse these two steps by saying "Run make release"

- [ ] Run reverse dependency checks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bit up in the air. There is a crossbow job that will do hit; however, it times out if you try to run it on a PR. If you run it locally via archery docker run <I forget the exact name> then you need an up-to-date version of docker-compose which doesn't ship on Ubuntu yet (at least the last time I tried it) and it takes several hours. I did it last time using https://gist.github.com/paleolimbot/630fdab1e204d70fea97633d8fa15ccb , which takes ten minutes or so depending on how fast you can rebuild arrow. I have a feeling we can rewrite the crossbow version so that it also takes less time...then it can run nightly and we can just treat it like all the other tests.

I think I just petered out trying to fit that in a bullet point. Any suggestions?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the crossbow job because it would have been a bunch of work to fix the timeout. But I was wondering why revdepcheck was taking SO LONG (even if you take the 2 core gha machines into account). And locally it will still timeout for a different reason ({targets} timesout with multiple workers??).

But I would be fine with reworking the job to use your gist or even the build in function I did not know exists: https://www.r-bloggers.com/2019/04/checking-reverse-dependencies-the-tiny-way/ current docs: https://stat.ethz.ch/R-manual/R-patched/library/tools/html/check_packages_in_dir.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing it locally is a pain as I'm having to install a whole load of system libraries I don't need, to be able to run the gist; please can we rework the crossbow job?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, that gist is way better on MacOS because the binary packages for MacOS are self-sufficient.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we do this later, after we've picked the additional commits across, just in case some weird thing (or a cheeky last minute addition that we've added to the CRAN release) has an impact?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverse dependency checks typically result in cheeky last minute additions of their own. For the last release I ran them early (to find problems) and again after the PRs that fixed those problems had been merged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this will be a nightly/crossbow job soon I think we can remove it anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we tried before and it was not feasible to do revdep checks in crossbow

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the current approach, no, but @assignUser had some ideas and I think we can make it work.


Wait for the official release...

- [ ] Release vote passed!
- [ ] Create a CRAN-release branch from the official release commit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do this at RC time--the commit doesn't change just because the vote passes. That way, all of those checks you're describing below you can do while the vote is open--that's your manual release verification.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense (and rebase if the release vote doesn't pass?)

- [ ] Pick any commits that were made to master since the release commit that
were needed to fix CRAN-related submission issues (e.g., fixed URLs, fixes
to )
- [ ] Remove badges from README.md
- [ ] Run `urlchecker::url_check()` on the R directory
- [ ] Bump the Version in DESCRIPTION to X.X.X
Comment thread
nealrichardson marked this conversation as resolved.
Outdated
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
- [ ] Create a PR entitled `WIP: [R] Verify CRAN release-10.0.1-rc0`. Add
a comment `@github-actions crossbow submit --group r` to run all R crossbow
jobs against the CRAN-specific release branch.
Comment on lines +93 to +95

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, much more clear, thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, wait, what branches are we comparing on the PR? Does it even matter? I made an arbitrary one which branched off the release candidate and made a whitespace change. Should we recommend that here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For crossbow I think we just need any PR to exist as long as "from" is correct. I think a whitespace change is fine for now but we should find a workflow that is less of a hack in the future. I don't have a good answer right now though!

- [ ] Regenerate arrow_X.X.X.tar.gz (i.e., `make build`)

Update autobrew and r-windows PRs to use the *release* instead of the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would note that lately Jeroen has been merging these PRs before the vote closes so that we can test. So this may require new PRs.

Also you can make all of the version bumps in the autobrew formulae in the initial PR now, no need to follow up here. It uses the RC URL as "mirror", so before the vote passes, the release URL will 404 and it falls back to the RC. After, it uses the official release. So it's only the rtools-packages one that needs switching.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let @thisisnic update the language here since they're going through that process now. I imagine we at least need to check those scripts at this stage in case there was a new release candidate since the initial PR.

*release candidate*; ensure linux binary packages are available:

- [ ] PR into autobrew/homebrew-core (apache-arrow autobrew formula)
- [ ] PR into autobrew/homebrew-core (apache-arrow-static autobrew formula)
- [ ] PR into autobrew/scripts
- [ ] PR into r-windows/rtools-packages
- [ ] Ensure linux binaries are available in the artifactory:
https://apache.jfrog.io/ui/repos/tree/General/arrow/r

Check binary Arrow C++ distributions specific to the R package:

- [ ] Upload the .tar.gz to [win-builder](https://win-builder.r-project.org/upload.aspx)
and confirm that the check is clean
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
- [ ] Upload the .tar.gz to [MacBuilder](https://mac.r-project.org/macbuilder/submit.html)
and confirm that the check is clean
- [ ] Check `install.packages("arrow_X.X.X.tar.gz")` on Ubuntu and ensure that the
hosted binaries are used
- [ ] `devtools::check("arrow_X.X.X.tar.gz")` locally one more time (for luck)
Comment thread
paleolimbot marked this conversation as resolved.
Outdated

Submit!

- [ ] Upload arrow_X.X.X.tar.gz to the
[CRAN submit page](https://xmpalantir.wu.ac.at/cransubmit/)
- [ ] Confirm the submission email

Wait for CRAN...

- [ ] Accepted!
- [ ] Tag the tip of the CRAN-specific release branch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag how? This isn't something we've done before

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we don't have to (as long as there is a way to get back to the source at the time of the CRAN release in case we need to patch something?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I've created a branch on my fork called r-10.0.1, but we should probably do something more robust.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paleolimbot Any thoughts on this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now that is OK. For 11.0.0, perhaps we can file an issue or ask on the mailing list what the appropriate branch name would be in the main Arrow repo? There is not currently any equivalent branch on the main repo for the packaging of a component but I imagine this has come up before (patches applied prior to packaging a component).

- [ ] `usethis::use_dev_version()`
Comment thread
paleolimbot marked this conversation as resolved.
Outdated
- [ ] Add a new line to the matrix in the [backwards compatability job](https://github.com/apache/arrow/blob/master/dev/tasks/r/github.linux.arrow.version.back.compat.yml)
Comment thread
thisisnic marked this conversation as resolved.
Comment thread
paleolimbot marked this conversation as resolved.
- [ ] Update the packaging checklist template to reflect any new realities of the
packaging process.
- [ ] Wait for CRAN-hosted binaries on the
[CRAN package page](https://cran.r-project.org/package=arrow) to reflect the
new version
- [ ] Tweet!