diff options
17 files changed, 80 insertions, 30 deletions
diff --git a/client/go/Makefile b/client/go/Makefile index 08f88960e4a..7f24d4ad479 100644 --- a/client/go/Makefile +++ b/client/go/Makefile @@ -29,7 +29,7 @@ all: test checkfmt install # $ git checkout vX.Y.Z # $ make dist-homebrew dist-homebrew: dist-version - brew bump-formula-pr --tag v$(VERSION) vespa-cli + brew bump-formula-pr --version $(VERSION) vespa-cli # Create a GitHub release draft for all platforms. Note that this only creates a # draft, which is not publicly visible until it's explicitly published. diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ActivationConflictException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ActivationConflictException.java index 8dac35616f0..c548add8ddf 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/ActivationConflictException.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ActivationConflictException.java @@ -1,5 +1,5 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.config.server; +package com.yahoo.config.provision.exception; /** * Exception used when activation cannot be done because activation is for @@ -9,7 +9,9 @@ package com.yahoo.vespa.config.server; * @author hmusum */ public class ActivationConflictException extends RuntimeException { - public ActivationConflictException(String s) { - super(s); - } + + public ActivationConflictException(String message) { super(message); } + + public ActivationConflictException(String message, Throwable cause) { super(message, cause); } + } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java index 368324fa843..e0629a2e5db 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java @@ -22,6 +22,7 @@ import com.yahoo.config.provision.RegionName; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.TenantName; import com.yahoo.config.provision.Zone; +import com.yahoo.config.provision.exception.ActivationConflictException; import com.yahoo.container.jdisc.HttpResponse; import com.yahoo.container.jdisc.SecretStoreProvider; import com.yahoo.container.jdisc.secretstore.SecretStore; @@ -486,7 +487,7 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye // Config generation is equal to session id, and config generation must be a monotonically increasing number static void checkIfActiveIsNewerThanSessionToBeActivated(long sessionId, long currentActiveSessionId) { if (sessionId < currentActiveSessionId) { - throw new ActivationConflictException("It is not possible to activate session " + sessionId + + throw new ActivationConflictException("Cannot activate session " + sessionId + ", because it is older than current active session (" + currentActiveSessionId + ")"); } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/HttpHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/HttpHandler.java index ea7d0e03812..2dad2c060cc 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/HttpHandler.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/HttpHandler.java @@ -3,19 +3,19 @@ package com.yahoo.vespa.config.server.http; import com.yahoo.config.provision.ApplicationLockException; import com.yahoo.config.provision.CertificateNotReadyException; +import com.yahoo.config.provision.OutOfCapacityException; import com.yahoo.config.provision.ParentHostUnavailableException; +import com.yahoo.config.provision.exception.ActivationConflictException; import com.yahoo.config.provision.exception.LoadBalancerServiceException; import com.yahoo.container.jdisc.HttpRequest; import com.yahoo.container.jdisc.HttpResponse; import com.yahoo.container.jdisc.LoggingRequestHandler; -import java.util.logging.Level; -import com.yahoo.config.provision.OutOfCapacityException; -import com.yahoo.vespa.config.server.ActivationConflictException; import com.yahoo.yolean.Exceptions; import java.io.PrintWriter; import java.io.StringWriter; import java.time.Duration; +import java.util.logging.Level; /** * Super class for http handlers, that takes care of checking valid diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java index 28d50a5396e..133570cc109 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java @@ -17,6 +17,7 @@ import com.yahoo.config.provision.HostSpec; import com.yahoo.config.provision.InstanceName; import com.yahoo.config.provision.NetworkPorts; import com.yahoo.config.provision.TenantName; +import com.yahoo.config.provision.exception.ActivationConflictException; import com.yahoo.container.jdisc.HttpResponse; import com.yahoo.io.IOUtils; import com.yahoo.jdisc.Metric; diff --git a/dist/vespa.spec b/dist/vespa.spec index 7196fe92e20..e6eff61b214 100644 --- a/dist/vespa.spec +++ b/dist/vespa.spec @@ -78,7 +78,7 @@ BuildRequires: glibc-langpack-en BuildRequires: cmake3 BuildRequires: llvm7.0-devel BuildRequires: vespa-boost-devel >= 1.76.0-1 -BuildRequires: vespa-gtest >= 1.8.1-1 +BuildRequires: vespa-gtest = 1.11.0 %define _use_vespa_gtest 1 BuildRequires: vespa-icu-devel >= 65.1.0-1 BuildRequires: vespa-lz4-devel >= 1.9.2-2 @@ -108,7 +108,7 @@ BuildRequires: (llvm-devel >= 10.0.1 and llvm-devel < 11) BuildRequires: vespa-boost-devel >= 1.76.0-1 BuildRequires: vespa-openssl-devel >= 1.1.1l-1 %define _use_vespa_openssl 1 -BuildRequires: vespa-gtest >= 1.8.1-1 +BuildRequires: vespa-gtest = 1.11.0 %define _use_vespa_gtest 1 BuildRequires: vespa-lz4-devel >= 1.9.2-2 BuildRequires: vespa-onnxruntime-devel = 1.7.1 @@ -235,7 +235,7 @@ Requires: llvm7.0 Requires: vespa-telegraf >= 1.1.1-1 Requires: vespa-valgrind >= 3.17.0-1 %endif -Requires: vespa-gtest >= 1.8.1-1 +Requires: vespa-gtest = 1.11.0 %define _vespa_llvm_version 7 %define _extra_link_directory /usr/lib64/llvm7.0/lib;%{_vespa_deps_prefix}/lib64 %define _extra_include_directory /usr/include/llvm7.0;%{_vespa_deps_prefix}/include @@ -250,7 +250,7 @@ Requires: vespa-gtest >= 1.8.1-1 %else %define _vespa_llvm_version 10 %endif -Requires: vespa-gtest >= 1.8.1-1 +Requires: vespa-gtest = 1.11.0 %define _extra_link_directory %{_vespa_deps_prefix}/lib64 %define _extra_include_directory %{_vespa_deps_prefix}/include %endif diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java index 7d98a76dc6e..340f43b4671 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java @@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.node.admin.maintenance; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.DockerImage; import com.yahoo.config.provision.NodeType; import com.yahoo.vespa.hosted.node.admin.component.TaskContext; @@ -82,12 +83,13 @@ public class StorageMaintainer { public boolean syncLogs(NodeAgentContext context, boolean throttle) { Optional<URI> archiveUri = context.node().archiveUri(); if (archiveUri.isEmpty()) return false; + ApplicationId owner = context.node().owner().orElseThrow(); List<SyncFileInfo> syncFileInfos = FileFinder.files(pathOnHostUnderContainerVespaHome(context, "logs/vespa")) .maxDepth(2) .stream() .sorted(Comparator.comparing(FileFinder.FileAttributes::lastModifiedTime)) - .flatMap(fa -> SyncFileInfo.forLogFile(archiveUri.get(), fa.path(), throttle).stream()) + .flatMap(fa -> SyncFileInfo.forLogFile(archiveUri.get(), fa.path(), throttle, owner).stream()) .collect(Collectors.toList()); return syncClient.sync(context, syncFileInfos, throttle ? 1 : 100); diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaLogDumper.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaLogDumper.java index d9a9bdb1c04..24224789877 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaLogDumper.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaLogDumper.java @@ -34,7 +34,7 @@ class VespaLogDumper implements ArtifactProducer { sleeper.sleep(Duration.ofSeconds(3)); } Path vespaLogFile = ctx.pathOnHostFromPathInNode(ctx.pathInNodeUnderVespaHome("logs/vespa/vespa.log")); - Path destination = ctx.pathOnHostFromPathInNode(ctx.outputDirectoryInNode()); + Path destination = ctx.pathOnHostFromPathInNode(ctx.outputDirectoryInNode()).resolve("vespa.log"); if (Files.exists(vespaLogFile)) { uncheck(() -> Files.copy(vespaLogFile, destination)); return List.of( diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaServiceDumperImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaServiceDumperImpl.java index b4f2569c86f..23a6ed2aa8c 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaServiceDumperImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/VespaServiceDumperImpl.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.node.admin.maintenance.servicedump; +import com.yahoo.config.provision.ApplicationId; import com.yahoo.text.Lowercase; import com.yahoo.vespa.hosted.node.admin.configserver.noderepository.NodeAttributes; import com.yahoo.vespa.hosted.node.admin.configserver.noderepository.NodeRepository; @@ -122,12 +123,14 @@ public class VespaServiceDumperImpl implements VespaServiceDumper { private void uploadArtifacts(NodeAgentContext ctx, URI destination, List<Artifact> producedArtifacts, Instant expiry) { + ApplicationId owner = ctx.node().owner().orElseThrow(); List<SyncFileInfo> filesToUpload = producedArtifacts.stream() .map(a -> { Compression compression = a.compressOnUpload() ? Compression.ZSTD : Compression.NONE; Path fileInNode = a.fileInNode().orElse(null); Path fileOnHost = fileInNode != null ? ctx.pathOnHostFromPathInNode(fileInNode) : a.fileOnHost().orElseThrow(); - return SyncFileInfo.forServiceDump(destination, fileOnHost, expiry, compression); + String classification = a.classification().map(Artifact.Classification::value).orElse(null); + return SyncFileInfo.forServiceDump(destination, fileOnHost, expiry, compression, owner, classification); }) .collect(Collectors.toList()); ctx.log(log, Level.INFO, diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfo.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfo.java index 55fc54c7b6d..6d87a8cfc4a 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfo.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfo.java @@ -1,10 +1,14 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.node.admin.maintenance.sync; +import com.yahoo.config.provision.ApplicationId; + import java.net.URI; import java.nio.file.Path; import java.time.Instant; import java.time.temporal.ChronoUnit; +import java.util.HashMap; +import java.util.Map; import java.util.Optional; /** @@ -16,12 +20,15 @@ public class SyncFileInfo { private final URI destination; private final Compression uploadCompression; private final Instant expiry; + private final Map<String, String> tags; - private SyncFileInfo(Path source, URI destination, Compression uploadCompression, Instant expiry) { + private SyncFileInfo(Path source, URI destination, Compression uploadCompression, Instant expiry, + Map<String, String> tags) { this.source = source; this.destination = destination; this.uploadCompression = uploadCompression; this.expiry = expiry; + this.tags = Map.copyOf(tags); } /** Source path of the file to sync */ @@ -42,7 +49,9 @@ public class SyncFileInfo { /** File expiry */ public Optional<Instant> expiry() { return Optional.ofNullable(expiry); } - public static Optional<SyncFileInfo> forLogFile(URI uri, Path logFile, boolean rotatedOnly) { + public Map<String, String> tags() { return tags; } + + public static Optional<SyncFileInfo> forLogFile(URI uri, Path logFile, boolean rotatedOnly, ApplicationId owner) { String filename = logFile.getFileName().toString(); Compression compression; String dir = null; @@ -63,13 +72,24 @@ public class SyncFileInfo { if (dir == null) return Optional.empty(); Instant expiry = Instant.now().plus(30, ChronoUnit.DAYS); return Optional.of(new SyncFileInfo( - logFile, uri.resolve(dir + logFile.getFileName() + compression.extension), compression, expiry)); + logFile, uri.resolve(dir + logFile.getFileName() + compression.extension), compression, expiry, defaultTags(owner))); } - public static SyncFileInfo forServiceDump(URI destinationDir, Path file, Instant expiry, Compression compression) { + public static SyncFileInfo forServiceDump(URI destinationDir, Path file, Instant expiry, Compression compression, + ApplicationId owner, String assetClassification) { String filename = file.getFileName().toString(); URI location = destinationDir.resolve(filename + compression.extension); - return new SyncFileInfo(file, location, compression, expiry); + Map<String, String> tags = defaultTags(owner); + if (assetClassification != null) { + tags.put("vespa:AssetClassification", assetClassification); + } + return new SyncFileInfo(file, location, compression, expiry, tags); + } + + private static Map<String, String> defaultTags(ApplicationId owner) { + var tags = new HashMap<String, String>(); + tags.put("corp:Application", owner.toFullString()); + return tags; } public enum Compression { diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfoTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfoTest.java index 4478a26396e..7130ac54430 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfoTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/sync/SyncFileInfoTest.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.node.admin.maintenance.sync; +import com.yahoo.config.provision.ApplicationId; import com.yahoo.vespa.test.file.TestFileSystem; import org.junit.Test; @@ -64,7 +65,7 @@ public class SyncFileInfoTest { } private static void assertForLogFile(Path srcPath, String destination, SyncFileInfo.Compression compression, boolean rotatedOnly) { - Optional<SyncFileInfo> sfi = SyncFileInfo.forLogFile(nodeArchiveUri, srcPath, rotatedOnly); + Optional<SyncFileInfo> sfi = SyncFileInfo.forLogFile(nodeArchiveUri, srcPath, rotatedOnly, ApplicationId.defaultId()); assertEquals(destination, sfi.map(SyncFileInfo::destination).map(URI::toString).orElse(null)); assertEquals(compression, sfi.map(SyncFileInfo::uploadCompression).orElse(null)); } diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/MaintenanceDeployment.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/MaintenanceDeployment.java index 9cffc361444..ff696e727fa 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/MaintenanceDeployment.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/MaintenanceDeployment.java @@ -6,6 +6,7 @@ import com.yahoo.config.provision.ApplicationLockException; import com.yahoo.config.provision.Deployer; import com.yahoo.config.provision.Deployment; import com.yahoo.config.provision.TransientException; +import com.yahoo.config.provision.exception.ActivationConflictException; import com.yahoo.jdisc.Metric; import com.yahoo.transaction.Mutex; import com.yahoo.vespa.hosted.provision.Node; @@ -95,7 +96,7 @@ class MaintenanceDeployment implements Closeable { if ( ! isValid()) return Optional.empty(); try { return Optional.of(step.get()); - } catch (TransientException e) { + } catch (TransientException | ActivationConflictException e) { metric.add("maintenanceDeployment.transientFailure", 1, metric.createContext(Map.of())); log.log(Level.INFO, "Failed to maintenance deploy " + application + " with a transient error: " + Exceptions.toMessageString(e)); diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp index c3d15cbec2c..8842f426a3b 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp @@ -12,6 +12,7 @@ #include <vespa/searchlib/common/geo_location_parser.h> #include <vespa/searchlib/parsequery/stackdumpiterator.h> #include <vespa/searchlib/queryeval/intermediate_blueprints.h> +#include <vespa/vespalib/util/issue.h> #include <vespa/log/log.h> LOG_SETUP(".proton.matching.query"); @@ -38,6 +39,7 @@ using search::queryeval::IRequestContext; using search::queryeval::SearchIterator; using search::query::LocationTerm; using vespalib::string; +using vespalib::Issue; using std::vector; namespace proton::matching { @@ -89,7 +91,7 @@ GeoLocationSpec parse_location_string(string str) { auto attr_name = PositionDataType::getZCurveFieldName(parser.getFieldName()); return GeoLocationSpec{attr_name, parser.getGeoLocation()}; } else { - LOG(warning, "Location parse error (location: '%s'): %s", str.c_str(), parser.getParseError()); + Issue::report("Location parse error (location: '%s'): %s", str.c_str(), parser.getParseError()); } return empty; } @@ -175,7 +177,7 @@ Query::buildTree(vespalib::stringref stack, const string &location, _query_tree->accept(resolve_visitor); return true; } else { - // TODO(havardpe): log warning or pass message upwards + Issue::report("invalid query"); return false; } } diff --git a/searchlib/src/tests/features/onnx_feature/onnx_feature_test.cpp b/searchlib/src/tests/features/onnx_feature/onnx_feature_test.cpp index f2fd9ad52d6..348331665a0 100644 --- a/searchlib/src/tests/features/onnx_feature/onnx_feature_test.cpp +++ b/searchlib/src/tests/features/onnx_feature/onnx_feature_test.cpp @@ -2,6 +2,7 @@ #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/util/stringfmt.h> +#include <vespa/vespalib/util/issue.h> #include <vespa/searchlib/features/rankingexpressionfeature.h> #include <vespa/searchlib/features/onnx_feature.h> #include <vespa/searchlib/fef/blueprintfactory.h> @@ -18,6 +19,7 @@ using namespace search::fef::test; using namespace search::features; using vespalib::make_string_short::fmt; using vespalib::eval::TensorSpec; +using vespalib::Issue; std::string get_source_dir() { const char *dir = getenv("SOURCE_DIRECTORY"); @@ -153,13 +155,25 @@ TEST_F(OnnxFeatureTest, fragile_model_can_be_evaluated) { EXPECT_EQ(get(3), TensorSpec::from_expr("tensor<float>(d0[2]):[6,15]")); } +struct MyIssues : Issue::Handler { + std::vector<vespalib::string> list; + Issue::Binding capture; + MyIssues() : list(), capture(Issue::listen(*this)) {} + void handle(const Issue &issue) override { list.push_back(issue.message()); } +}; + TEST_F(OnnxFeatureTest, broken_model_evaluates_to_all_zeros) { add_expr("in1", "tensor<float>(x[2]):[docid,5]"); add_expr("in2", "tensor<float>(x[3]):[docid,10,31515]"); add_onnx(OnnxModel("fragile", fragile_model).dry_run_on_setup(false)); EXPECT_TRUE(try_compile(onnx_feature("fragile"))); + MyIssues my_issues; + EXPECT_EQ(my_issues.list.size(), 0); EXPECT_EQ(get(1), TensorSpec::from_expr("tensor<float>(d0[2]):[0,0]")); + EXPECT_EQ(my_issues.list.size(), 1); EXPECT_EQ(get(3), TensorSpec::from_expr("tensor<float>(d0[2]):[0,0]")); + ASSERT_EQ(my_issues.list.size(), 2); + EXPECT_EQ(my_issues.list[0], my_issues.list[1]); } TEST_F(OnnxFeatureTest, broken_model_fails_with_dry_run) { diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp index 14070388f7b..213bbfc3493 100644 --- a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp @@ -620,7 +620,7 @@ public: void visitPredicate(PredicateQuery &query) { const PredicateAttribute *attr = dynamic_cast<const PredicateAttribute *>(&_attr); if (!attr) { - LOG(warning, "Trying to apply a PredicateQuery node to a non-predicate attribute."); + Issue::report("Trying to apply a PredicateQuery node to a non-predicate attribute."); setResult(std::make_unique<queryeval::EmptyBlueprint>(_field)); } else { setResult(std::make_unique<PredicateBlueprint>( _field, *attr, query)); @@ -724,8 +724,8 @@ public: } } void fail_nearest_neighbor_term(query::NearestNeighborTerm&n, const vespalib::string& error_msg) { - LOG(warning, "NearestNeighborTerm(%s, %s): %s. Returning empty blueprint", - _field.getName().c_str(), n.get_query_tensor_name().c_str(), error_msg.c_str()); + Issue::report("NearestNeighborTerm(%s, %s): %s. Returning empty blueprint", + _field.getName().c_str(), n.get_query_tensor_name().c_str(), error_msg.c_str()); setResult(std::make_unique<queryeval::EmptyBlueprint>(_field)); } void visit(query::NearestNeighborTerm &n) override { @@ -800,6 +800,7 @@ AttributeBlueprintFactory::createBlueprint(const IRequestContext & requestContex { const IAttributeVector *attr(requestContext.getAttribute(field.getName())); if (attr == nullptr) { + Issue::report("attribute not found: %s", field.getName().c_str()); return std::make_unique<queryeval::EmptyBlueprint>(field); } try { diff --git a/searchlib/src/vespa/searchlib/features/onnx_feature.cpp b/searchlib/src/vespa/searchlib/features/onnx_feature.cpp index 291e3daf602..dd0215e1d53 100644 --- a/searchlib/src/vespa/searchlib/features/onnx_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/onnx_feature.cpp @@ -10,6 +10,7 @@ #include <vespa/eval/eval/value_codec.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/util/stash.h> +#include <vespa/vespalib/util/issue.h> #include <vespa/log/log.h> LOG_SETUP(".features.onnx_feature"); @@ -28,6 +29,7 @@ using vespalib::eval::FastValueBuilderFactory; using vespalib::eval::value_from_spec; using vespalib::make_string_short::fmt; using vespalib::eval::Onnx; +using vespalib::Issue; namespace search::features { @@ -92,7 +94,7 @@ public: try { _eval_context.eval(); } catch (const Ort::Exception &ex) { - LOG(warning, "onnx model evaluation failed: %s", ex.what()); + Issue::report("onnx model evaluation failed: %s", ex.what()); _eval_context.clear_results(); } } diff --git a/vespalib/src/vespa/vespalib/util/issue.cpp b/vespalib/src/vespa/vespalib/util/issue.cpp index d60423bfa4d..cfbadadd745 100644 --- a/vespalib/src/vespa/vespalib/util/issue.cpp +++ b/vespalib/src/vespa/vespalib/util/issue.cpp @@ -14,7 +14,7 @@ using Link = Issue::Binding::Link; struct LogIssues : Issue::Handler { void handle(const Issue &issue) override { - LOG(warning, "unhandled issue: %s", issue.message().c_str()); + LOG(warning, "%s", issue.message().c_str()); } }; |