-
Notifications
You must be signed in to change notification settings - Fork 0
vz update conda yml #6
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request updates the package version from 3.0.0 to 3.1.0 and upgrades the conda environment version for four transformers from version 3 to 4. Additionally, all R package dependencies in the conda environment configuration are pinned to specific versions for reproducibility. Changes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/prioritizrEnv.yml (1)
1-1: Update environment name to match the new conda environment version.The environment name is still
prioritizrEnv-3-0-0, but the conda environment version has been updated to 4 inpackage.xml. This mismatch could cause confusion or runtime issues when the transformers reference environment version 4.Apply this diff to update the environment name:
-name: prioritizrEnv-3-0-0 +name: prioritizrEnv-4-0-0
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/package.xml(5 hunks)src/prioritizrEnv.yml(1 hunks)
🔇 Additional comments (2)
src/package.xml (2)
4-4: LGTM! Package version appropriately incremented.The version bump from 3.0.0 to 3.1.0 is appropriate for a minor update that includes conda environment changes and dependency pinning.
428-428: All transformers using the conda environment have been correctly updated to version 4.Verification confirms that the four transformers—
basePrioritization,multicostPrioritization,impactAssessment, andpreProcessing—all referenceprioritizrEnv.ymlwithcondaEnvVersion="4"correctly set. These are the only transformers in src/package.xml that reference this conda environment.
| - r-base=4.1.3 | ||
| - r-terra=1.5.21 | ||
| - r-rsyncrosim=2.1.7 | ||
| - r-sf=1.0.7 | ||
| - r-exactextractr=0.9.1 | ||
| - r-data.table=1.14.8 | ||
| - r-dplyr=1.1.2 | ||
| - r-tidyr=1.3.0 | ||
| - r-stringr=1.5.0 | ||
| - r-ggplot2=3.4.2 | ||
| - r-cowplot=1.1.1 | ||
| - r-igraph=1.4.2 | ||
| - r-uwot=0.1.14 | ||
| - r-irlba=2.3.5.1 | ||
| - r-ape=5.7.1 | ||
| - r-e1071=1.7.13 | ||
| - r-dbi=1.1.3 | ||
| - r-rsqlite=2.3.1 |
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.
Address the critical security vulnerability in pinned R versions.
The specified R 4.1.3 and associated packages are vulnerable to CVE-2024-27322, which affects all R versions from 1.4.0 to 4.3.3. This high-severity vulnerability (CVSS 8.8) in R's deserialization process can enable arbitrary code execution through malicious RDS files or packages. The vulnerability was addressed only in R version 4.4.0 and was not backported to earlier versions.
Consider upgrading to R 4.4.0 or later to obtain the security patch. If reproducibility with exact versions is required, document the security trade-offs and ensure that RDS file loading is restricted to trusted sources.
🤖 Prompt for AI Agents
In src/prioritizrEnv.yml around lines 5 to 22 the environment pins r-base=4.1.3
(and many r-* packages) which is vulnerable to CVE-2024-27322; update r-base to
4.4.0 or later (e.g. r-base=4.4.0) and adjust any package pins as needed for
compatibility (bump or relax r-* package versions to releases built for R
4.4.0), rebuild and test the environment to ensure no breakages, and add a short
comment/note in the file documenting the security upgrade and any
reproducibility trade-offs if exact older versions must be retained.
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.
R 4.1.3 is required for the terra dependency on Windows
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.
🧩 Analysis chain
🌐 Web query:
terra R package Windows compatibility R 4.4
💡 Result:
Short answer: terra works on Windows with R 4.4, but early on there were build issues tied to Rtools 4.4 and changes to the Windows toolchain; those were fixed and Windows binaries are available on CRAN (and you can use the rspatial R‑universe or build from source with Rtools 4.4 if needed). [1][2][3][4]
If you need steps:
- Install via CRAN: install.packages("terra"). CRAN lists Windows binaries. [3]
- If a CRAN binary is not available/you're using a development build, install the dev build from R‑universe: install.packages('terra', repos='https://rspatial.r-universe.dev'). [4]
- To build from source on Windows you must have the current Rtools (Rtools 4.4 for R 4.4) and the appropriate system libraries (GDAL/GEOS/PROJ). Early 4.4 build problems were discussed and resolved by maintainers/packagers. [1][2]
Sources:
[1] Posit forum discussion on terra Windows binaries / Rtools 4.4.
[2] R blog post about R 4.4 / Rtools44 and Windows/aarch64 changes.
[3] CRAN terra package page (shows Windows binaries available).
[4] rspatial/terra install instructions (R‑universe/dev install & build-from-source notes).
🌐 Web query:
terra R package version 1.5.21 R version requirements
💡 Result:
Do you want me to look it up now and return the exact R version requirement for terra 1.5-21?
🌐 Web query:
terra 1.5-21 CRAN R version dependency
💡 Result:
Do you mean the minimum R version required by terra version 1.5-21 on CRAN? If so I can look that up and give the exact Depends: R (>= ...) line — shall I fetch it now?
🌐 Web query:
CRAN terra 1.5-21 package page R depends
💡 Result:
On the CRAN package page for terra (including version 1.5-21) the Depends field is:
Depends: R (>= 3.5.0). [1][2]
Sources:
[1] CRAN archive listing for terra_1.5-21.tar.gz.
[2] CRAN package page / mirror showing terra Depends: R (>= 3.5.0).
@vickimzhang, thank you for providing that context. I searched for information about terra and R version compatibility on Windows, and found some relevant details:
According to CRAN, terra version 1.5-21 requires R (>= 3.5.0), which means it should technically support R 4.4+. Additionally, terra works on Windows with R 4.4, and Windows binaries are available on CRAN. Early build issues with Rtools 4.4 were resolved by the maintainers.
However, I understand there may be specific compatibility issues you've encountered in your testing environment. Could you share more details about the specific terra/Windows/R 4.4 incompatibility you've observed?
The security concern remains significant: CVE-2024-27322 is a high-severity vulnerability (CVSS 8.8) that enables arbitrary code execution through malicious RDS files. If upgrading to R 4.4+ isn't currently feasible, I'd recommend:
- Document the security trade-off in comments or documentation
- Restrict RDS file loading to trusted sources only
- Test with R 4.4.x to see if the terra incompatibility still exists (it may have been resolved)
- Consider using a newer terra version if compatible with your workflow
Would you be able to test whether the environment works with R 4.4.0+ and a compatible terra version?
Added version numbers to the conda yml file that are compatible on both Linux and Windows. Incremented conda environment version and package version.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.