Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CRAN check with r-devel when releasing a new version & daily #5777

Merged
merged 12 commits into from
Apr 28, 2022

Conversation

harupy
Copy link
Member

@harupy harupy commented Apr 26, 2022

Signed-off-by: harupy hkawamura0130@gmail.com

What changes are proposed in this pull request?

  • Run the CRAN check with r-devel when releasing a new version.
  • Run the CRAN check with r-devel daily to catch issues as early as possible.

How is this patch tested?

By manually confirming r-devel is used on a release branch, and not used on a non-release branch.

Does this PR change the documentation?

  • No. You can skip the rest of this section.
  • Yes. Make sure the changed pages / sections render correctly by following the steps below.
  1. Check the status of the ci/circleci: build_doc check. If it's successful, proceed to the
    next step, otherwise fix it.
  2. Click Details on the right to open the job page of CircleCI.
  3. Click the Artifacts tab.
  4. Click docs/build/html/index.html.
  5. Find the changed pages / sections and make sure they render correctly.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy harupy changed the base branch from master to branch-9.99 April 26, 2022 06:59
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Apr 26, 2022
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy harupy changed the base branch from branch-9.99 to master April 26, 2022 10:47
@harupy harupy closed this Apr 26, 2022
@harupy harupy reopened this Apr 26, 2022
@@ -106,6 +107,9 @@ jobs:
Rscript -e 'install.packages("h2o", repos="http://cran.r-project.org")'
- name: Build package
run: |
# Use r-devel on a release branch to run the same submission checks as CRAN.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we need rocker in order to test development versions of R, then we need to update r-devel to use rocker. However, our internal CI is incompatible with rocker, so we would then have to update internal CI to use another image. But, Dockerfile.dev also uses rocker, so we'd need to change Dockerfile.dev to use r-base, right?

Copy link
Member Author

@harupy harupy Apr 27, 2022

Choose a reason for hiding this comment

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

@dbczumar Thanks for the comment!

our internal CI is incompatible with rocker.

Yep, can we do the following?

  • In our internal CI, use rocker/r-ver:4.2.0 (which uses ubuntu 20.04) and just build the package without running submission checks. We should be able to build the package as long as devtools works. We don't need ubuntu 22.04 or the latest version of R.
  • In GitHub Actions, run submission checks using rocker/r-ver:devel. We can add a stage for confirmation in our Spinnaker pipeline.

Copy link
Member Author

@harupy harupy Apr 27, 2022

Choose a reason for hiding this comment

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

Will rocker/r-ver:4.2.0 switch to ubuntu 22.04 in the future? rocker-org/rocker-versioned2#282 (comment) says:

Base images for R versions released before 2022-07-19 (i.e. 4.1.3, 4.2.0) will remain ubuntu:focal and will not switch.

Copy link

@eitsupi eitsupi Apr 27, 2022

Choose a reason for hiding this comment

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

Hi, I am a member of the Rocker project.
I found this issue because there was a link to the issue I was looking at.

Note that if you want to try a development version of R (R 4.3.0 now), you can also use rocker/r-ver:devel, which is built daily using the same script as rocker/r-ver:4.2.0.
https://github.com/rocker-org/rocker-versioned2#tags
https://github.com/rocker-org/rocker-versioned2/blob/6c11d8486b83bf3d0be0cbc32a176716891d299a/.github/workflows/devel.yml

Will rocker/r-ver:4.2.0 switch to ubuntu 22.04 in the future?

Due to compatibility, the base image of rocker/r-ver:4.2.0 will not be upgraded.
However, as noted in that comment, the base image will switch to ubuntu:jammy for R 4.2.X images released after 2022-07-20.
Also, the base image for rocker/r-ver:devel is already Ubuntu 22.04 because ubuntu:latest is specified.
https://github.com/rocker-org/rocker-versioned2/blob/6c11d8486b83bf3d0be0cbc32a176716891d299a/dockerfiles/r-ver_devel.Dockerfile

Copy link
Member Author

Choose a reason for hiding this comment

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

@eitsupi Thanks for the comment! Is there any other image than rocker/r-ver:devel that provides a development version of R?

Copy link

Choose a reason for hiding this comment

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

The Rocker project have rocker/r-devel and rocker/drd.
https://github.com/rocker-org/r-devel
https://github.com/rocker-org/drd

However, these are only built once a week, so if you want to try a newer version, rocker/r-ver:devel, which is built daily, is a good choice, I think.

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Comment on lines +12 to +14
schedule:
# Run this workflow daily at 7:00 UTC
- cron: "0 7 * * *"
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add a badge on README later in a follow-up PR.

Signed-off-by: harupy <hkawamura0130@gmail.com>
Comment on lines +62 to +68
elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
# Use r-devel on a pull request targeted to a release branch
USE_R_DEVEL=$([[ $GITHUB_BASE_REF =~ branch-[0-9]+\.[0-9]+$ ]] && echo true || echo false)
else
# Use r-devel on a push to a release branch
USE_R_DEVEL=$([[ $GITHUB_REF_NAME =~ branch-[0-9]+\.[0-9]+$ ]] && echo true || echo false)
fi
Copy link
Member Author

@harupy harupy Apr 28, 2022

Choose a reason for hiding this comment

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

Uses r-devel when releasing a new version. For example, a PR for bumping the package versions sets USE_R_DEVEL to true and runs the CRAN check with r-devel.

Copy link
Member Author

@harupy harupy Apr 28, 2022

Choose a reason for hiding this comment

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

Do we still need a manual confirmation stage for the CRAN check with r-devel?

@harupy harupy changed the title Use r-devel on a release branch to run the same submission checks as CRAN Run CRAN check with r-devel when releasing a new version & daily Apr 28, 2022
@harupy harupy requested a review from dbczumar April 28, 2022 05:03
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @harupy !

@harupy harupy merged commit 7be6451 into mlflow:master Apr 28, 2022
@harupy harupy deleted the use-r-devel-on-release-branch branch April 28, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants