-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix devtools::check_built failure
failure
#5053
Conversation
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
# Disable CRAN incoming feasibility check within a week after the latest release because it fails. | ||
# | ||
# Relevant code: | ||
# https://github.com/wch/r-source/blob/4561aea946a75425ddcc8869cdb129ed5e27af97/src/library/tools/R/QC.R#L8005-L8008 | ||
install.packages(c("xml2", "rvest")) | ||
library(xml2) | ||
library(rvest) | ||
|
||
url <- "https://cran.r-project.org/web/packages/mlflow/index.html" | ||
html <- read_html(url) | ||
xpath <- '//td[text()="Published:"]/following-sibling::td[1]/text()' | ||
published_date <- as.Date(html_text(html_nodes(html, xpath=xpath))) | ||
today <- Sys.Date() | ||
days_since_last_release <- difftime(today, published_date, units="days") | ||
remote <- as.numeric(days_since_last_release) > 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hacky but I could not find another way.
@@ -4,5 +4,21 @@ package <- parent_dir[grepl("mlflow_", parent_dir)] | |||
library(reticulate) | |||
use_condaenv(mlflow:::mlflow_conda_env_name()) | |||
|
|||
devtools::check_built(path = package, remote = TRUE, error_on = "note", args = "--no-tests") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we just do error_on="warning"
.
According to https://devtools.r-lib.org/reference/check.html
Passing R CMD check is essential if you want to submit your package to CRAN: you must not have any ERRORs or WARNINGs, and you want to ensure that there are as few NOTEs as possible.
So it's acceptable to have one or more notes. According to https://stackoverflow.com/a/23831508/12165968, the maintainer note is safe to ignore.
The downside of my proposal is that we might be less alerted if other notes show up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment! In the mlflow 1.21.0 release, one note (about an invalid URL on README) blocked the package publication (not submission).
- Remove codecov badges from readmes #5046 fixed the note and we successfully released mlflow 1.21.0.
- Set
remote
fordevtools::check_built
toTrue
to detect invalid URLs #5047 made the check more strict to avoid encountering issues after submitting a new package to CRAN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. It's frustrating that CRAN also categorizes blocking issues as a note besides non-blocking ones...
Do we know whether disabling the CRAN incoming feasibility check will miss blocking issues? I didn't understand what exactly CRAN incoming feasibility check does and why setting the 7 days threshold resolves the issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know whether disabling the CRAN incoming feasibility check will miss blocking issues?
I think disabling the CRAN incoming feasibility check will miss blocking issues.
I didn't understand what exactly CRAN incoming feasibility check does.
It performs a bunch of checks. You can take a look at this file:
https://github.com/wch/r-source/blob/4561aea946a75425ddcc8869cdb129ed5e27af97/src/library/tools/R/QC.R#L8005-L8008
why setting the 7 days threshold resolves the issue.
── R CMD check results ────────────────────────────────────── mlflow 1.21.1 ────
Duration: 52.7s
❯ checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Matei Zaharia <matei@databricks.com>’
Days since last update: 0
0 errors ✔ | 0 warnings ✔ | 1 note ✖
This note basically means it's been 0 days since the last release. It's too early
. The code I attached indicates that the threshold is 7 days. It looks like there is no option to disable this recency check so we just disable the entire feasibility check by setting remote
to FALSE
within a week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I previously thought checking CRAN incoming feasibility ... NOTE Maintainer: ‘Matei Zaharia <matei@databricks.com>’
just means a complaint about the maintainer.
So, as long as we don't release two versions within 7 days, it would run through the same checks as it was before this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this issue! (I'm not very confident about this PR so you can decide whether you want another reviewer to take a look.)
Thanks for the review and comments! To be honest, I'm not 100% confident about the 7 days threshold but I'll merge this PR and see what happens in 7 days :) |
Signed-off-by: harupy hkawamura0130@gmail.com
What changes are proposed in this pull request?
Fix
devtools::check_built failure
failure caused by the latest MLflow R release:https://github.com/mlflow/mlflow/runs/4175272472?check_suite_focus=true#step:14:138
How is this patch tested?
Make sure the R check passes.
Does this PR change the documentation?
ci/circleci: build_doc
check. If it's successful, proceed to thenext step, otherwise fix it.
Details
on the right to open the job page of CircleCI.Artifacts
tab.docs/build/html/index.html
.Release Notes
Is this a user-facing change?
(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 loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingInterface
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportLanguage
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesIntegrations
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrationsHow should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes