Skip to content

Commit 09b7b31

Browse files
committed
Merge branch '7.3' of github.com:gchq/stroom
2 parents 7542bb5 + def50f8 commit 09b7b31

File tree

469 files changed

+7136
-7743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+7136
-7743
lines changed

Diff for: .github/workflows/build_and_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: |
7474
"${ACTIONS_SCRIPTS_DIR}/echo_variables.sh" \
7575
"docker version" "$(docker --version)" \
76-
"docker-compose version" "$(docker-compose --version)" \
76+
"docker compose version" "$(docker compose version)" \
7777
"git version" "$(git --version)" \
7878
"GITHUB_WORKSPACE" "$GITHUB_WORKSPACE" \
7979
"GITHUB_REF" "$GITHUB_REF" \

Diff for: BREAKING_CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [v7.3]
10+
* StroomQL `vis as` keyword combination replaced with `show`.
11+
912
## [v7.2]
1013

1114
* Quoted strings in dashboard table expressions can now be expressed with single and double quotes. As part of this change apostrophes in text are no longer escaped with `''` but instead require a leading `\` before them if they are in a single quoted string. In many cases it is preferable to use double quotes if the string in question has an apostrophe. Note that the use of `\` as an escape character also means that any existing `\` characters will need to be escaped with a preceding `\` so `\` must now become `\\`.

Diff for: CHANGELOG.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
1313
~~~
1414

1515

16+
## [v7.3-beta.13] - 2024-03-18
17+
18+
* Issue **#4051** : Fix search extraction for Elastic indexes.
19+
20+
* Issue **#4159** : Fix StroomQL vis params.
21+
22+
* Issue **#4149** : Format results based on real result value types rather than expected expression return type.
23+
24+
* Issue **#4093** : Fix value type for stored values.
25+
26+
27+
## [v7.3-beta.12] - 2024-03-11
28+
29+
* Issue **#4152** : Fix date time formatter always showing `Z` when it should show actual timezone.
30+
31+
* Issue **#4150** : StroomQL `vis as` keyword replaced with `show` plus added validation to parameters.
32+
33+
1634
## [v7.3-beta.11] - 2024-03-01
1735

1836
* Issue **#4132** : Add tooltips to the copy/open hover buttons on table cell values.
@@ -363,7 +381,9 @@ eval EventId = first(EventId)`, `evt` => `eval EventId = first(EventId)` and `st
363381
* Issue **#3830** : Add S3 data storage option.
364382

365383

366-
[Unreleased]: https://github.com/gchq/stroom/compare/v7.3-beta.11...HEAD
384+
[Unreleased]: https://github.com/gchq/stroom/compare/v7.3-beta.13...HEAD
385+
[v7.3-beta.13]: https://github.com/gchq/stroom/compare/v7.3-beta.12...v7.3-beta.13
386+
[v7.3-beta.12]: https://github.com/gchq/stroom/compare/v7.3-beta.11...v7.3-beta.12
367387
[v7.3-beta.11]: https://github.com/gchq/stroom/compare/v7.3-beta.10...v7.3-beta.11
368388
[v7.3-beta.10]: https://github.com/gchq/stroom/compare/v7.3-beta.9...v7.3-beta.10
369389
[v7.3-beta.9]: https://github.com/gchq/stroom/compare/v7.3-beta.8...v7.3-beta.9

Diff for: ci_build.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ LATEST_SUFFIX="-LATEST"
4646
# This is the branch containing the current stable release of stroom
4747
# It is used to determine which releases we push the swagger ui to ghpages for
4848
# As 7 is still in beta, this is currently 6.1
49-
CURRENT_STROOM_RELEASE_BRANCH="6.1"
5049
# The version of stroom-resources used for running the DB
51-
STROOM_RESOURCES_GIT_TAG="stroom-stacks-v7.0-beta.192-2"
50+
STROOM_RESOURCES_GIT_TAG="stroom-stacks-v7.3-beta.12-proxy-v7.0.32-2"
5251
SWAGGER_UI_GIT_TAG="v3.49.0"
5352
doDockerBuild=false
5453
STROOM_RESOURCES_DIR="${BUILD_DIR}/stroom-resources"
@@ -330,7 +329,7 @@ releaseToDockerHub() {
330329
--build-arg GIT_TAG="${BUILD_TAG:-${SNAPSHOT_FLOATING_TAG}}" \
331330
"${contextRoot}"
332331

333-
if [[ ! -n "${LOCAL_BUILD}" ]]; then
332+
if [[ -z "${LOCAL_BUILD}" ]]; then
334333
echo -e "Pushing the docker image to ${GREEN}${dockerRepo}${NC} with" \
335334
"tags: ${GREEN}${allTagArgs[*]}${NC}"
336335
docker \
@@ -486,11 +485,10 @@ echo -e "BUILD_BRANCH: [${GREEN}${BUILD_BRANCH}${NC}]"
486485
echo -e "BUILD_TAG: [${GREEN}${BUILD_TAG}${NC}]"
487486
echo -e "BUILD_IS_PULL_REQUEST: [${GREEN}${BUILD_IS_PULL_REQUEST}${NC}]"
488487
echo -e "BUILD_VERSION: [${GREEN}${BUILD_VERSION}${NC}]"
489-
echo -e "CURRENT_STROOM_RELEASE_BRANCH: [${GREEN}${CURRENT_STROOM_RELEASE_BRANCH}${NC}]"
490488
echo -e "STROOM_RESOURCES_GIT_TAG: [${GREEN}${STROOM_RESOURCES_GIT_TAG}${NC}]"
491489
echo -e "LOCAL_BUILD: [${GREEN}${LOCAL_BUILD}${NC}]"
492490
echo -e "docker version: [${GREEN}$(docker --version)${NC}]"
493-
echo -e "docker-compose version: [${GREEN}$(docker-compose --version)${NC}]"
491+
echo -e "docker-compose version: [${GREEN}$(docker compose version)${NC}]"
494492
echo -e "git version: [${GREEN}$(git --version)${NC}]"
495493

496494
# Normal commit/PR/tag build

Diff for: settings.gradle

-6
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@ include 'stroom-proxy:stroom-proxy-repo'
208208
include 'stroom-proxy:stroom-proxy-repo-db-jooq'
209209
include 'stroom-proxy:stroom-proxy-remote-api'
210210

211-
// Query Field
212-
include 'stroom-query:stroom-query-field-api'
213-
include 'stroom-query:stroom-query-field-impl'
214-
include 'stroom-query:stroom-query-field-impl-db'
215-
include 'stroom-query:stroom-query-field-impl-db-jooq'
216-
217211
// Query
218212
include 'stroom-query:stroom-query-api'
219213
include 'stroom-query:stroom-query-common'

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AbstractAnalyticFieldListConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void acceptFieldValues(final List<FieldValue> fieldValues) {
5555
// We have a match so pass the values on to the receiver.
5656
final Val[] values = new Val[fieldIndex.size()];
5757
for (final FieldValue fieldValue : fieldValues) {
58-
final Integer index = fieldIndex.getPos(fieldValue.field().getFieldName());
58+
final Integer index = fieldIndex.getPos(fieldValue.field().getFldName());
5959
if (index != null) {
6060
values[index] = fieldValue.value();
6161
}

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AnalyticFields.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package stroom.analytics.impl;
22

3-
import stroom.datasource.api.v2.DateField;
43
import stroom.datasource.api.v2.QueryField;
5-
import stroom.datasource.api.v2.TextField;
64
import stroom.docref.DocRef;
75

86
import java.util.ArrayList;
@@ -28,19 +26,19 @@ public class AnalyticFields {
2826
private static final Map<String, QueryField> FIELD_MAP;
2927

3028
// Times
31-
public static final DateField TIME_FIELD = new DateField(TIME);
29+
public static final QueryField TIME_FIELD = QueryField.createDate(TIME);
3230

33-
public static final TextField NAME_FIELD = new TextField(NAME);
34-
public static final TextField UUID_FIELD = new TextField(UUID);
35-
public static final TextField VALUE_FIELD = new TextField(VALUE);
31+
public static final QueryField NAME_FIELD = QueryField.createText(NAME);
32+
public static final QueryField UUID_FIELD = QueryField.createText(UUID);
33+
public static final QueryField VALUE_FIELD = QueryField.createText(VALUE);
3634

3735
static {
3836
FIELDS.add(TIME_FIELD);
3937
FIELDS.add(NAME_FIELD);
4038
FIELDS.add(UUID_FIELD);
4139
FIELDS.add(VALUE_FIELD);
4240

43-
FIELD_MAP = FIELDS.stream().collect(Collectors.toMap(QueryField::getName, Function.identity()));
41+
FIELD_MAP = FIELDS.stream().collect(Collectors.toMap(QueryField::getFldName, Function.identity()));
4442
}
4543

4644
public static List<QueryField> getFields() {

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AnalyticHelper.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -127,30 +127,30 @@ public List<Meta> findMeta(final ExpressionOperator expression,
127127
final int length) {
128128
// Don't select deleted streams.
129129
final ExpressionOperator statusExpression = ExpressionOperator.builder().op(Op.OR)
130-
.addTerm(MetaFields.STATUS, Condition.EQUALS, Status.UNLOCKED.getDisplayValue())
131-
.addTerm(MetaFields.STATUS, Condition.EQUALS, Status.LOCKED.getDisplayValue())
130+
.addDateTerm(MetaFields.STATUS, Condition.EQUALS, Status.UNLOCKED.getDisplayValue())
131+
.addDateTerm(MetaFields.STATUS, Condition.EQUALS, Status.LOCKED.getDisplayValue())
132132
.build();
133133

134134
ExpressionOperator.Builder builder = ExpressionOperator.builder()
135135
.addOperator(expression);
136136
if (minMetaId != null) {
137-
builder = builder.addTerm(MetaFields.ID, Condition.GREATER_THAN_OR_EQUAL_TO, minMetaId);
137+
builder = builder.addIdTerm(MetaFields.ID, Condition.GREATER_THAN_OR_EQUAL_TO, minMetaId);
138138
}
139139

140140
if (minMetaCreateTimeMs != null) {
141-
builder = builder.addTerm(MetaFields.CREATE_TIME,
141+
builder = builder.addDateTerm(MetaFields.CREATE_TIME,
142142
Condition.GREATER_THAN_OR_EQUAL_TO,
143143
DateUtil.createNormalDateTimeString(minMetaCreateTimeMs));
144144
}
145145
if (maxMetaCreateTimeMs != null) {
146-
builder = builder.addTerm(MetaFields.CREATE_TIME,
146+
builder = builder.addDateTerm(MetaFields.CREATE_TIME,
147147
Condition.LESS_THAN_OR_EQUAL_TO,
148148
DateUtil.createNormalDateTimeString(maxMetaCreateTimeMs));
149149
}
150150
builder = builder.addOperator(statusExpression);
151151

152152
final FindMetaCriteria findMetaCriteria = new FindMetaCriteria(builder.build());
153-
findMetaCriteria.setSort(MetaFields.ID.getName(), false, false);
153+
findMetaCriteria.setSort(MetaFields.ID.getFldName(), false, false);
154154
findMetaCriteria.obtainPageRequest().setLength(length);
155155

156156
return metaService.find(findMetaCriteria).getValues();

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AnalyticsNodeSearchTaskHandler.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public TableResultConsumer errors(final List<String> errors) {
331331
public TableResultConsumer columns(final List<Column> columns) {
332332
this.columns = columns;
333333
fieldIndex = new FieldIndex();
334-
columns.forEach(field -> fieldIndex.create(field.getName()));
334+
columns.forEach(column -> fieldIndex.create(column.getName()));
335335
return this;
336336
}
337337

@@ -358,10 +358,10 @@ public TableResultConsumer addRow(final Row row) {
358358
final String value = sb.toString();
359359

360360
final Map<String, Object> attributeMap = new HashMap<>();
361-
attributeMap.put(AnalyticFields.NAME_FIELD.getName(), analyticRuleDoc.getName());
362-
attributeMap.put(AnalyticFields.UUID_FIELD.getName(), analyticRuleDoc.getUuid());
363-
attributeMap.put(AnalyticFields.TIME_FIELD.getName(), time);
364-
attributeMap.put(AnalyticFields.VALUE_FIELD.getName(), value);
361+
attributeMap.put(AnalyticFields.NAME_FIELD.getFldName(), analyticRuleDoc.getName());
362+
attributeMap.put(AnalyticFields.UUID_FIELD.getFldName(), analyticRuleDoc.getUuid());
363+
attributeMap.put(AnalyticFields.TIME_FIELD.getFldName(), time);
364+
attributeMap.put(AnalyticFields.VALUE_FIELD.getFldName(), value);
365365

366366
if (expressionMatcher.match(attributeMap, expression)) {
367367
hitCount.increment();

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AnalyticsSearchProvider.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
package stroom.analytics.impl;
1919

20-
import stroom.datasource.api.v2.DateField;
21-
import stroom.datasource.api.v2.FieldInfo;
2220
import stroom.datasource.api.v2.FindFieldInfoCriteria;
21+
import stroom.datasource.api.v2.QueryField;
2322
import stroom.docref.DocRef;
2423
import stroom.explorer.api.HasDataSourceDocRefs;
2524
import stroom.expression.api.DateTimeSettings;
@@ -37,7 +36,6 @@
3736
import stroom.query.common.v2.SearchProvider;
3837
import stroom.search.impl.FederatedSearchExecutor;
3938
import stroom.search.impl.FederatedSearchTask;
40-
import stroom.security.api.SecurityContext;
4139
import stroom.util.shared.ResultPage;
4240

4341
import jakarta.inject.Inject;
@@ -66,7 +64,7 @@ public AnalyticsSearchProvider(final CoprocessorsFactory coprocessorsFactory,
6664
}
6765

6866
@Override
69-
public ResultPage<FieldInfo> getFieldInfo(final FindFieldInfoCriteria criteria) {
67+
public ResultPage<QueryField> getFieldInfo(final FindFieldInfoCriteria criteria) {
7068
return FieldInfoResultPageBuilder.builder(criteria).addAll(AnalyticFields.getFields()).build();
7169
}
7270

@@ -81,7 +79,7 @@ public DocRef fetchDefaultExtractionPipeline(final DocRef dataSourceRef) {
8179
}
8280

8381
@Override
84-
public DateField getTimeField(final DocRef docRef) {
82+
public QueryField getTimeField(final DocRef docRef) {
8583
return AnalyticFields.TIME_FIELD;
8684
}
8785

Diff for: stroom-analytics/stroom-analytics-rule-impl/src/main/java/stroom/analytics/rule/impl/AnalyticRuleProcessors.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ private List<Processor> getProcessor(final AnalyticRuleDoc analyticRuleDoc) {
7777
if (docRef != null) {
7878
// First try to find the associated processors
7979
final ExpressionOperator processorExpression = ExpressionOperator.builder()
80-
.addTerm(
80+
.addTextTerm(
8181
ProcessorFields.PROCESSOR_TYPE,
8282
Condition.EQUALS,
8383
ProcessorType.STREAMING_ANALYTIC.getDisplayValue())
84-
.addTerm(
84+
.addDocRefTerm(
8585
ProcessorFields.ANALYTIC_RULE,
8686
Condition.IS_DOC_REF,
8787
docRef)
@@ -93,11 +93,11 @@ private List<Processor> getProcessor(final AnalyticRuleDoc analyticRuleDoc) {
9393

9494
private ResultPage<ProcessorFilter> getProcessorFilters(final Processor processor) {
9595
final ExpressionOperator filterExpression = ExpressionOperator.builder()
96-
.addTerm(
96+
.addIdTerm(
9797
ProcessorFilterFields.PROCESSOR_ID,
9898
ExpressionTerm.Condition.EQUALS,
9999
processor.getId())
100-
.addTerm(
100+
.addBooleanTerm(
101101
ProcessorFilterFields.DELETED,
102102
Condition.EQUALS,
103103
false)

Diff for: stroom-annotation/stroom-annotation-api/src/main/java/stroom/annotation/api/AnnotationFields.java

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package stroom.annotation.api;
22

3-
import stroom.datasource.api.v2.DateField;
4-
import stroom.datasource.api.v2.IdField;
53
import stroom.datasource.api.v2.QueryField;
6-
import stroom.datasource.api.v2.TextField;
74

85
import java.util.Arrays;
96
import java.util.List;
@@ -29,19 +26,19 @@ public interface AnnotationFields {
2926
String COMMENT = ANNOTATION_FIELD_PREFIX + "Comment";
3027
String HISTORY = ANNOTATION_FIELD_PREFIX + "History";
3128

32-
IdField ID_FIELD = new IdField(ID);
33-
// AbstractField STREAM_ID_FIELD = new IdField(IndexConstants.STREAM_ID);
34-
// AbstractField EVENT_ID_FIELD = new IdField(IndexConstants.EVENT_ID);
35-
DateField CREATED_ON_FIELD = new DateField(CREATED_ON);
36-
TextField CREATED_BY_FIELD = new TextField(CREATED_BY);
37-
DateField UPDATED_ON_FIELD = new DateField(UPDATED_ON);
38-
TextField UPDATED_BY_FIELD = new TextField(UPDATED_BY);
39-
TextField TITLE_FIELD = new TextField(TITLE);
40-
TextField SUBJECT_FIELD = new TextField(SUBJECT);
41-
TextField STATUS_FIELD = new TextField(STATUS);
42-
TextField ASSIGNED_TO_FIELD = new TextField(ASSIGNED_TO);
43-
TextField COMMENT_FIELD = new TextField(COMMENT);
44-
TextField HISTORY_FIELD = new TextField(HISTORY);
29+
QueryField ID_FIELD = QueryField.createId(ID);
30+
// AbstractField STREAM_ID_FIELD = QueryField.createId(IndexConstants.STREAM_ID);
31+
// AbstractField EVENT_ID_FIELD = QueryField.createId(IndexConstants.EVENT_ID);
32+
QueryField CREATED_ON_FIELD = QueryField.createDate(CREATED_ON);
33+
QueryField CREATED_BY_FIELD = QueryField.createText(CREATED_BY);
34+
QueryField UPDATED_ON_FIELD = QueryField.createDate(UPDATED_ON);
35+
QueryField UPDATED_BY_FIELD = QueryField.createText(UPDATED_BY);
36+
QueryField TITLE_FIELD = QueryField.createText(TITLE);
37+
QueryField SUBJECT_FIELD = QueryField.createText(SUBJECT);
38+
QueryField STATUS_FIELD = QueryField.createText(STATUS);
39+
QueryField ASSIGNED_TO_FIELD = QueryField.createText(ASSIGNED_TO);
40+
QueryField COMMENT_FIELD = QueryField.createText(COMMENT);
41+
QueryField HISTORY_FIELD = QueryField.createText(HISTORY);
4542

4643
List<QueryField> FIELDS = Arrays.asList(
4744
ID_FIELD,
@@ -58,5 +55,5 @@ public interface AnnotationFields {
5855
COMMENT_FIELD,
5956
HISTORY_FIELD);
6057
Map<String, QueryField> FIELD_MAP = FIELDS.stream()
61-
.collect(Collectors.toMap(QueryField::getName, Function.identity()));
58+
.collect(Collectors.toMap(QueryField::getFldName, Function.identity()));
6259
}

Diff for: stroom-annotation/stroom-annotation-impl/src/main/java/stroom/annotation/impl/AnnotationService.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
import stroom.annotation.shared.EventLink;
99
import stroom.annotation.shared.SetAssignedToRequest;
1010
import stroom.annotation.shared.SetStatusRequest;
11-
import stroom.datasource.api.v2.DateField;
12-
import stroom.datasource.api.v2.FieldInfo;
1311
import stroom.datasource.api.v2.FindFieldInfoCriteria;
12+
import stroom.datasource.api.v2.QueryField;
1413
import stroom.docref.DocRef;
1514
import stroom.entity.shared.ExpressionCriteria;
1615
import stroom.query.api.v2.ExpressionOperator;
@@ -59,7 +58,7 @@ public DocRef getDocRef() {
5958
}
6059

6160
@Override
62-
public ResultPage<FieldInfo> getFieldInfo(final FindFieldInfoCriteria criteria) {
61+
public ResultPage<QueryField> getFieldInfo(final FindFieldInfoCriteria criteria) {
6362
return FieldInfoResultPageBuilder.builder(criteria).addAll(AnnotationFields.FIELDS).build();
6463
}
6564

@@ -69,7 +68,7 @@ public Optional<String> fetchDocumentation(final DocRef docRef) {
6968
}
7069

7170
@Override
72-
public DateField getTimeField() {
71+
public QueryField getTimeField() {
7372
return AnnotationFields.UPDATED_ON_FIELD;
7473
}
7574

Diff for: stroom-app-gwt/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,4 +484,4 @@ tasks.register('gwtClean') {
484484
}
485485

486486
tasks.clean.dependsOn(tasks.gwtClean)
487-
487+
tasks.copySources.mustRunAfter(tasks.gwtClean)

Diff for: stroom-app/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ dependencies {
149149
implementation project(':stroom-query:stroom-query-language')
150150
implementation project(':stroom-query:stroom-query-language-api')
151151
implementation project(':stroom-query:stroom-query-api')
152-
implementation project(':stroom-query:stroom-query-field-impl')
153-
implementation project(':stroom-query:stroom-query-field-impl-db')
154-
implementation project(':stroom-query:stroom-query-field-impl-db-jooq')
155152
implementation project(':stroom-query:stroom-query-common')
156153
implementation project(':stroom-query:stroom-query-impl')
157154
implementation project(':stroom-suggestions:stroom-suggestions-api')

0 commit comments

Comments
 (0)