return s.listWorkflowExecutions(ctx, request)
}
}
Frontier kind: Joint frontier
unlabeled · c_747c5eba8c5d
1 test · 44979 LOC · 761 files · introduces 1 test · 171 LOC · 15 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/empty_datago.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/empty_listgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/json_nullgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/non-empty_list_of_intsgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/non-empty_list_of_stringsgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/non-empty_list_with_single_elementgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/scalar_intgo.temporal.io/server/common/searchattribute/TestIsNonEmptyListValues/scalar_string_containing_bracketEvery collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
15 files ranked by introduced lines: 171 introduced LOC across 49 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
return s.listWorkflowExecutions(ctx, request)
}
}
ctx context.Context,
request *manager.ListWorkflowExecutionsRequestV2,
return s.listExecutionsInternalLegacy(ctx, &listExecutionsRequestInternal{
NamespaceID: request.NamespaceID,
Namespace: request.Namespace,
Query: request.Query,
PageSize: request.PageSize,
NextPageToken: request.NextPageToken,
ChasmMapper: nil,
ArchetypeID: chasm.UnspecifiedArchetypeID,
})
}
func (s *VisibilityStore) listExecutionsInternalLegacy(
ctx context.Context,
request *listExecutionsRequestInternal,
saTypeMap, err := s.searchAttributesProvider.GetSearchAttributes(s.GetIndexName(), false)
if err != nil {
return nil, err
}
saMapper, err := s.searchAttributesMapperProvider.GetMapper(request.Namespace)
visibility_store.go
if err != nil {
return nil, err
}
s.GetName(),
request.Namespace,
request.NamespaceID,
saTypeMap,
saMapper,
request.Query,
request.ChasmMapper,
request.ArchetypeID,
)
selectFilter, err := converter.BuildSelectStmt(request.PageSize, request.NextPageToken)
if err != nil {
// Convert ConverterError to InvalidArgument and pass through all other errors (which should be only mapper errors).
var converterErr *query.ConverterError
}
if err != nil {
return nil, convertSQLError("ListWorkflowExecutions operation failed.", err)
}
return &store.InternalListExecutionsResponse{}, nil
}
for i, row := range rows {
infos[i], err = s.rowToInfo(&row, request.ChasmMapper)
if err != nil {
return nil, err
}
}
if len(rows) == request.PageSize {
lastRow := rows[len(rows)-1]
closeTime := maxDatetime
}
}
Executions: infos,
NextPageToken: nextPageToken,
}, nil
}
}
if row.SearchAttributes != nil && len(*row.SearchAttributes) > 0 {
encodedSAs, err := s.encodeRowSearchAttributes(*row.SearchAttributes, chasmMapper)
if err != nil {
return nil, err
}
}
if row.CloseTime != nil {
rowSearchAttributes sqlplugin.VisibilitySearchAttributes,
chasmMapper *chasm.VisibilitySearchAttributesMapper,
saTypeMap, err := s.searchAttributesProvider.GetSearchAttributes(s.GetIndexName(), false)
if err != nil {
return nil, serviceerror.NewUnavailable(
fmt.Sprintf("Unable to read search attributes types: %v", err))
}
registeredSearchAttributes := sqlplugin.VisibilitySearchAttributes{}
// Fix SQLite keyword list handling (convert string to []string for keyword lists)
for name, value := range rowSearchAttributes {
tp, err := combinedTypeMap.GetType(name)
if err != nil {
if errors.Is(err, sadefs.ErrInvalidName) {
continue
return nil, err
}
if tp == enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST {
switch v := value.(type) {
case []string:
// no-op
case string:
// Encode all search attributes together
encodedSAs, err := searchattribute.Encode(registeredSearchAttributes, &combinedTypeMap)
visibility_store.go
if err != nil {
return nil, err
}
}
chasmMapper *chasm.VisibilitySearchAttributesMapper,
archetypeID chasm.ArchetypeID,
return newQueryConverterInternal(
&sqliteQueryConverter{},
namespaceName,
namespaceID,
saTypeMap,
saMapper,
queryString,
chasmMapper,
archetypeID,
)
}
func (c *sqliteQueryConverter) getDatetimeFormat() string {
pageSize int,
token *pageTokenLegacy,
var whereClauses []string
var queryArgs []any
whereClauses = append(
whereClauses,
fmt.Sprintf("%s = ?", sadefs.GetSqlDbColName(sadefs.NamespaceID)),
)
queryArgs = append(queryArgs, namespaceID.String())
if len(queryString) > 0 {
whereClauses = append(whereClauses, queryString)
}
whereClauses = append(
whereClauses,
}
return fmt.Sprintf(
`SELECT %s
FROM executions_visibility
WHERE %s
ORDER BY %s DESC, %s DESC, %s
LIMIT ?`,
strings.Join(sqlplugin.DbFields, ", "),
strings.Join(whereClauses, " AND "),
sqlparser.String(c.getCoalesceCloseTimeExpr()),
sadefs.GetSqlDbColName(sadefs.StartTime),
sadefs.GetSqlDbColName(sadefs.RunID),
), queryArgs
}
pageSize int,
nextPageToken []byte,
token, err := deserializePageTokenLegacy(nextPageToken)
if err != nil {
return nil, err
}
if err != nil {
return nil, err
}
return nil, query.NewConverterError("%s: 'GROUP BY' clause", query.NotSupportedErrMessage)
}
c.namespaceID,
qp.queryString,
pageSize,
token,
)
return &sqlplugin.VisibilitySelectFilter{Query: queryString, QueryArgs: queryArgs}, nil
}
defer stop()
} else {
// Before we forward, ask task validator. This will happen every BacklogTaskForwardTimeout
// to the head of the backlog, which is what taskValidator expects.
maybeValid := tm.validator.maybeValidate(task.event.AllocatedTaskInfo, tm.fwdr.partition.TaskType())
if !maybeValid {
// consider this task expired while processing.
task.finish(taskFinishResult{dropReason: getDroppedTaskExpiryReason(task)})
// Add a timeout for forwarding.
// Note that this does not block local match of other local backlog tasks.
ctx, cancel = context.WithTimeout(tm.tqCtx, tm.config.BacklogTaskForwardTimeout())
pri_matcher.go
defer cancel()
}
return syncMatchSuccess, nil
}
}
// TODO(pri): can we just always do this on the parent and simplify this to:
}
if res.ctxErr != nil {
return syncMatchNoPoller, res.ctxErr
}
if !softassert.That(tm.logger, res.poller != nil, "expeced poller from match") {
pri_matcher.go
return syncMatchNoPoller, nil
}
}
case time.Time:
finalSearchAttributes[name] = v.Format(time.RFC3339Nano)
finalSearchAttributes[name] = v
}
}
}
if row.SearchAttributes != nil {
switch typedSaValue := saValue.(type) {
case string:
if strings.Contains(typedSaValue, keywordListSeparator) {
// If the string contains the keywordListSeparator, then we need to split it
// into a list of keywords.
(*row.SearchAttributes)[saName] = strings.Split(typedSaValue, keywordListSeparator)
}
default:
// no-op
}
if unaliasedSas != attr.GetSearchAttributes() {
// Create a copy of the `attr` to avoid modification of original `attr`,
workflow_task_completed_handler.go
// which can be needed again in case of retry.
newAttr := common.CloneProto(attr)
newAttr.SearchAttributes = unaliasedSas
attr = newAttr
}
// valid search attributes for upsert
var DbFields = getDbFields()
if src == nil {
return nil
}
case []byte:
return json.Unmarshal(v, &vsa)
return json.Unmarshal([]byte(v), &vsa)
default:
return fmt.Errorf("unsupported type for VisibilitySearchAttributes: %T", v)
chasmMapper *chasm.VisibilitySearchAttributesMapper,
archetypeID chasm.ArchetypeID,
switch pluginName {
case mysql.PluginName:
return newMySQLQueryConverter(namespaceName, namespaceID, saTypeMap, saMapper, queryString, chasmMapper, archetypeID)
case postgresql.PluginName, postgresql.PluginNamePGX:
return newPostgreSQLQueryConverter(namespaceName, namespaceID, saTypeMap, saMapper, queryString, chasmMapper, archetypeID)
return newSqliteQueryConverter(namespaceName, namespaceID, saTypeMap, saMapper, queryString, chasmMapper, archetypeID)
default:
return nil
customSAs = &commonpb.SearchAttributes{IndexedFields: make(map[string]*commonpb.Payload)}
for name, payloadValue := range searchAttributes.GetIndexedFields() {
chasmSAs.IndexedFields[name] = payloadValue
customSAs.IndexedFields[name] = payloadValue
}
}
return
// GetDefaultNamespace returns the randomly generated namespace which has been pre-registered with the test server.
return ts.defaultTestNamespace
}
// GetFrontendHostPort returns the host:port for this server.
err := c.cc.Invoke(ctx, MatchingService_AddWorkflowTask_FullMethodName, in, out, opts...)
if err != nil {
}
return out, nil
}
entry, ok = c.clients[clientKey]
if ok {
}
client, release, err := c.clientProvider(clientKey)
func (res taskResponse) err() error {
if res.forwarded {
}
return res.startErr
}