Merge pull request #1286 from JulienMalka/fix-hydra-eval-jobs-dot

hydra-eval-jobs: fix jobs containing a dot being dropped
This commit is contained in:
Janne Heß 2023-05-08 14:48:33 +02:00 committed by GitHub
commit 13ef4e3c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,7 +245,7 @@ static void worker(
StringSet ss;
for (auto & i : v->attrs->lexicographicOrder(state.symbols)) {
std::string name(state.symbols[i->name]);
if (name.find('.') != std::string::npos || name.find(' ') != std::string::npos) {
if (name.find(' ') != std::string::npos) {
printError("skipping job with illegal name '%s'", name);
continue;
}
@ -416,7 +416,11 @@ int main(int argc, char * * argv)
if (response.find("attrs") != response.end()) {
for (auto & i : response["attrs"]) {
auto s = (attrPath.empty() ? "" : attrPath + ".") + (std::string) i;
std::string path = i;
if (path.find(".") != std::string::npos){
path = "\"" + path + "\"";
}
auto s = (attrPath.empty() ? "" : attrPath + ".") + (std::string) path;
newAttrs.insert(s);
}
}