-
Notifications
You must be signed in to change notification settings - Fork 282
met.process: ensure host arg is passed on as a list #3492
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
Conversation
|
Thanks for looking into this. However, after applying both of the changes suggested by @infotroph and @Sweetdevil144, the issue still persists. few Observations from my side --- While executing: settings <- PEcAn.workflow::do_conversions(settings)I encountered the same issue again. Upon logging Temporary Fix in RStudioTo resolve this in RStudio, I applied the following fix: if (!is.list(settings$host)) {
settings$host <- list(name = settings$host)
}So I think adding this if statement will fix it. @infotroph any insights on this will be helpful. |
|
@AritraDey-Dev Thanks for testing! I see that But! Processing of soil and IC ("initial conditions") data don't usually happen in simple workflows -- they require a fair amount of extra configuration. If you don't already know you're using one of those, I would instead check whether your test run really used the patched version of met.process. |
|
Oh, and regarding |
As there were multiple instances, I already changed it in both places. that doesn't work too. |
it didn't fix the issue for running workflow in web...but while working on this PR #3486 it did fix it(for a rmd template). |
| username <- ifelse(is.null(input_met$username), "pecan", input_met$username) | ||
| machine.host <- ifelse(host == "localhost" || host$name == "localhost", PEcAn.remote::fqdn(), host$name) | ||
|
|
||
| if (length(host) == 1 && !hasName(host, "name")) { |
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.
| if (length(host) == 1 && !hasName(host, "name")) { | |
| if (length(host) == 1 && !("name" %in% names(host))) { |
Would help bypass the make check errors without changing the NAMESPACE
…ny existing utils:: calls...)
7a21152


Description
The immediate bug, reported by @AritraDey-Dev in Slack: When passing a whole settings$host block in to
met.process, R >=4.3 fails because we put a condition with length >1 into a scalar||operator. Fixed by refactoring to only look at the element we care about.Potential issue addressed while I was here: When
hostisn't specified,met.processdefaults to the bare string "localhost", which is fine in this file but is then passed along to some downstream functions that are documented to expect a named list. Fixed by wrapping bare strings ashost <- list(name = host)before passing it along.Motivation and Context
Review Time Estimate
Types of changes
Checklist: