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

Staging fixes #56

Merged
merged 13 commits into from
Feb 14, 2025
Merged

Staging fixes #56

merged 13 commits into from
Feb 14, 2025

Conversation

wlandau
Copy link
Member

@wlandau wlandau commented Feb 11, 2025

  • Detect source failures as issues.
  • Flag R-multiverse packages whose CRAN versions from the day of the Staging freeze are higher than the current versions in R-multiverse.
  • Use the whole R version in propose_snapshot() so downstream automation can grep the snapshot URL for the version instead of needing to install R and the rversions package.

c.f. r-multiverse/help#129

@wlandau wlandau requested a review from shikokuchuo February 11, 2025 18:14
@wlandau wlandau self-assigned this Feb 11, 2025
@wlandau
Copy link
Member Author

wlandau commented Feb 12, 2025

Also addsconfig.json in Staging to, c.f. r-universe-org/help#562

Copy link
Member

@shikokuchuo shikokuchuo left a comment

Choose a reason for hiding this comment

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

Looks good! Just some minor comments.

X = seq_len(nrow(meta)),
FUN = function(index) {
utils::compareVersion(
a = meta$version[index],
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI this is something I subscribe to: https://style.tidyverse.org/syntax.html#function-calls omitting the names of (compulsory) data arguments.

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 keep that in mind for the future.

Comment on lines +25 to +26
json$url <- json[["_failure"]]$buildurl %||% rep(NA_character_, nrow(json))
success_source <- is.na(json$url)
Copy link
Member

Choose a reason for hiding this comment

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

Seems a roundabout way of reading successes?

Copy link
Member Author

Choose a reason for hiding this comment

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

On source failure, the correct URL (with the error logs) comes from _failure$buildurl and not the top-level _buildurl. These few lines just say to start with _failure$buildurl and then fill in with _buildurl when needed. The success_source variable just makes it clearer what exactly is.na(json$url) is trying to achieve.

},
FUN.VALUE = logical(1L)
)
meta[[repo]][!conflict] <- NA_character_
Copy link
Member

Choose a reason for hiding this comment

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

Is there any advantage to using NA_character_ vs. NA (globally)?

Copy link
Member Author

@wlandau wlandau Feb 14, 2025

Choose a reason for hiding this comment

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

I like NA_character_ for the sake of defensive programming. NA is actually a logical type, but the element is supposed to be a character. I can never predict when a difference in types will cause a subtle bug.

@wlandau wlandau merged commit f00e40d into r-multiverse:main Feb 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants