Skip to content

Commit a874611

Browse files
Fixing enabled task types bug
1 parent cfcdb7b commit a874611

File tree

6 files changed

+8
-17
lines changed

6 files changed

+8
-17
lines changed

docs/reference/esql/esql-process-data-with-dissect-grok.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ include::{esql-specs}/docs.csv-spec[tag=dissectAppendWithOrderModifier-result]
178178
====== Named skip key (`?`)
179179
include::../ingest/processors/dissect.asciidoc[tag=named-skip-key]
180180
This can be done with a named skip key using the `{?name}` syntax. In the
181-
following query, `ident` and `authorization` are not added to the output table:
181+
following query, `ident` and `auth` are not added to the output table:
182182

183183
[source.merge.styled,esql]
184184
----

docs/reference/watcher/actions/email.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ killed by firewalls or load balancers in-between.
149149
means, by default watcher tries to download a dashboard for 10 minutes,
150150
forty times fifteen seconds). The setting `xpack.notification.reporting.interval`
151151
can be configured globally to change the default.
152-
| `authorization` | Additional auth configuration for the request, see
152+
| `auth` | Additional auth configuration for the request, see
153153
{kibana-ref}/automating-report-generation.html#use-watcher[use watcher] for details
154-
| `proxy` | Additional proxy configuration for the request. See <<http-input-attributes>>
154+
| `proxy` | Additional proxy configuration for the request. See <<http-input-attributes>>
155155
on how to configure the values.
156156
|======
157157

@@ -257,7 +257,7 @@ messages can contain basic HTML tags. You can control which groups of tags are
257257
allowed by <<email-html-sanitization, Configuring HTML Sanitization Options>>.
258258

259259
You configure the accounts {watcher} can use to send email in the
260-
`xpack.notification.email` namespace in `elasticsearch.yml`.
260+
`xpack.notification.email` namespace in `elasticsearch.yml`.
261261
The password for the specified SMTP user is stored securely in the
262262
<<secure-settings, {es} keystore>>.
263263

docs/reference/watcher/actions/webhook.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ the values serve as the header values:
165165
| `params` | no | - | The URL query string parameters. The parameter values can be
166166
static text or include Mustache <<templates,templates>>.
167167

168-
| `authorization` | no | - | Authentication related HTTP headers. Currently, only basic
168+
| `auth` | no | - | Authentication related HTTP headers. Currently, only basic
169169
authentication is supported.
170170

171171
| `body` | no | - | The HTTP request body. The body can be static text or include

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.elasticsearch.search.fetch.subphase.highlight.Highlighter;
4747
import org.elasticsearch.search.rank.RankBuilder;
4848
import org.elasticsearch.search.rank.RankDoc;
49-
import org.elasticsearch.tasks.Task;
5049
import org.elasticsearch.threadpool.ExecutorBuilder;
5150
import org.elasticsearch.threadpool.ScalingExecutorBuilder;
5251
import org.elasticsearch.threadpool.ThreadPool;
@@ -125,7 +124,6 @@
125124
import org.elasticsearch.xpack.inference.services.mistral.MistralService;
126125
import org.elasticsearch.xpack.inference.services.openai.OpenAiService;
127126
import org.elasticsearch.xpack.inference.telemetry.InferenceStats;
128-
import org.elasticsearch.xpack.inference.telemetry.TraceContext;
129127

130128
import java.util.ArrayList;
131129
import java.util.Collection;
@@ -330,13 +328,6 @@ public Collection<?> createComponents(PluginServices services) {
330328
return List.of(modelRegistry, registry, httpClientManager, stats);
331329
}
332330

333-
private TraceContext getCurrentTraceInfo() {
334-
var traceParent = threadPoolSetOnce.get().getThreadContext().getHeader(Task.TRACE_PARENT);
335-
var traceState = threadPoolSetOnce.get().getThreadContext().getHeader(Task.TRACE_STATE);
336-
337-
return new TraceContext(traceParent, traceState);
338-
}
339-
340331
@Override
341332
public void loadExtensions(ExtensionLoader loader) {
342333
inferenceServiceExtensions = loader.loadExtensions(InferenceServiceExtension.class);

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ public ElasticInferenceService(
103103
enabledTaskTypes = EnumSet.noneOf(TaskType.class);
104104
configuration = new Configuration(enabledTaskTypes);
105105

106-
getAuth();
106+
getAuthorization();
107107
}
108108

109-
private void getAuth() {
109+
private void getAuthorization() {
110110
try {
111111
ActionListener<ElasticInferenceServiceAuthorization> listener = ActionListener.wrap(this::setEnabledTaskTypes, e -> {
112112
// we don't need to do anything if there was a failure, everything is disabled by default

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public void getAuth(ActionListener<ElasticInferenceServiceAuthorization> listene
8282
results.getClass().getSimpleName()
8383
)
8484
);
85+
listener.onResponse(ElasticInferenceServiceAuthorization.newDisabledService());
8586
}
86-
listener.onResponse(ElasticInferenceServiceAuthorization.newDisabledService());
8787
}, e -> {
8888
Throwable exception = e;
8989
if (e instanceof ElasticsearchWrapperException wrapperException) {

0 commit comments

Comments
 (0)