Incoming request with Trace/SpanId does not create a new span

Hello,
I'm using 2.0.0.M5. According Sproing Cloud Sleuth documentation sleuth created a new span after receiving the parent span. For example service 2 creates span C after receiving span B.
But according to the logs a new span is only created after using annotation @NewSpan:

2018-02-12 14:34:02.056+0000 DEBUG [repository-application,,,] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.a.coyote.http11.Http11InputBuffer      : Received [GET /api/repository/v1/apps/MDE/snapshots HTTP/1.1
Host: localhost:10080
...
x-b3-traceid:<PHONE_NUMBER>0000000000000000000001
x-b3-spanid:<PHONE_NUMBER>000001
...
]
...
2018-02-12 14:34:02.060+0000 DEBUG [repository-application,,,] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.TraceFilter  : Received a request to uri [/api/repository/v1/apps/MDE/snapshots] that should not be sampled [false]
2018-02-12 14:34:02.061+0000 DEBUG [repository-application,,,] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.TraceFilter  : Found a parent span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true] in the request
2018-02-12 14:34:02.061+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.cloud.sleuth.log.Slf4jSpanLogger     : Continued span: [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.061+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.trace.SpanContextHolder     : Setting current span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.061+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.TraceFilter  : Parent span is [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.062+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.b.w.s.f.OrderedRequestContextFilter  : Bound request context to thread: org.apache.catalina.connector.RequestFacade@3ee75d6d
...
2018-02-12 14:34:02.204+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] d.k.c.u.w.p.s.KnowisUserTokenConverter   : no claim found in token [claimNamespace=http://cp-knowis/claims/roles]
2018-02-12 14:34:02.205+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] d.k.c.u.w.p.s.KnowisUserTokenConverter   : no claim found in token [claimNamespace=http://cp-knowis/claims/permissions]
...
2018-02-12 14:34:02.239+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] s.w.s.m.m.a.RequestMappingHandlerMapping : Found 1 matching mapping(s) for [/api/repository/v1/apps/MDE/snapshots] : [{[/api/repository/v1/apps/{app}/snapshots],methods=[GET],produces=[application/json;charset=UTF-8]}]
...
2018-02-12 14:34:02.248+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] d.k.cp.util.web.context.LocaleContext    : Set language [language=en]
...
2018-02-12 14:34:02.249+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.i.web.TraceHandlerInterceptor    : Handling span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.249+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.i.web.TraceHandlerInterceptor    : Adding a method tag with value [getSnapshotArtifacts] to a span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.249+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.i.web.TraceHandlerInterceptor    : Adding a class tag with value [RepositoryController] to a span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
...
2018-02-12 14:34:02.254+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] .w.s.m.m.a.ServletInvocableHandlerMethod : Invoking 'de.knowis.cp.repository.provider.RepositoryController.getSnapshotArtifacts' with arguments [MDE]
2018-02-12 14:34:02.255+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.provider.RepositoryController    : #T_TRACE# - Start [method 'RepositoryController.getSnapshotArtifacts(..)']
2018-02-12 14:34:02.255+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.provider.RepositoryController    : #M_TRACE# - Start [method 'RepositoryController.getSnapshotArtifacts(..)'] with [parameters '[MDE]']
...
2018-02-12 14:34:02.385+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.annotation.DefaultSpanCreator    : For the class [class de.knowis.cp.repository.consumer.RepositoryService] method [listArtifacts] will name the span [list-artifacts]
2018-02-12 14:34:02.386+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : Starting span: [Trace:<PHONE_NUMBER>0000000000000000000001, Span: e154034e084f76aa, Parent:<PHONE_NUMBER>000001, exportable:true]
2018-02-12 14:34:02.386+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : With parent: [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:02.387+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : Continued span: [Trace:<PHONE_NUMBER>0000000000000000000001, Span: e154034e084f76aa, Parent:<PHONE_NUMBER>000001, exportable:true]
2018-02-12 14:34:02.387+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.sleuth.trace.SpanContextHolder     : Setting current span [Trace:<PHONE_NUMBER>0000000000000000000001, Span: e154034e084f76aa, Parent:<PHONE_NUMBER>000001, exportable:true]
2018-02-12 14:34:02.389+0000 DEBUG [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.consumer.RepositoryService       : #T_TRACE# - Start [method 'RepositoryService.listArtifacts(..)']
2018-02-12 14:34:02.402+0000 DEBUG [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] uration$$EnhancerBySpringCGLIB$$f7cc75da : #T_TRACE# - Start [method 'CloudStorageConfiguration.getBucket()']
2018-02-12 14:34:02.402+0000  INFO [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] uration$$EnhancerBySpringCGLIB$$f7cc75da : #T_TRACE# - End [method 'CloudStorageConfiguration.getBucket()'] [duration 0 ms]
...
2018-02-12 14:34:03.127+0000  INFO [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.consumer.RepositoryService       : #T_TRACE# - End [method 'RepositoryService.listArtifacts(..)'] [duration 738 ms]
2018-02-12 14:34:03.127+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : Stopped span: [Trace:<PHONE_NUMBER>0000000000000000000001, Span: e154034e084f76aa, Parent:<PHONE_NUMBER>000001, exportable:true]
2018-02-12 14:34:03.127+0000 TRACE [repository-application,10000000000000000000000000000001,e154034e084f76aa,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : With parent: [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:03.127+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : Stopped span: [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:03.128+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.cloud.sleuth.log.Slf4jSpanLogger     : With parent: [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true]
2018-02-12 14:34:03.128+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.provider.RepositoryController    : #M_TRACE# - Exception [method 'RepositoryController.getSnapshotArtifacts(..)'] : de.knowis.cp.util.web.exception.NotFoundException: Not found [app=MDE, message=null]
2018-02-12 14:34:03.128+0000  INFO [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.provider.RepositoryController    : #T_TRACE# - Exception [method 'RepositoryController.getSnapshotArtifacts(..)'] [duration 873 ms] with exception: de.knowis.cp.util.web.exception.NotFoundException: Not found [app=MDE, message=null]
2018-02-12 14:34:03.128+0000  INFO [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.provider.RepositoryController    : #T_TRACE# - End [method 'RepositoryController.getSnapshotArtifacts(..)'] [duration 873 ms]
...
2018-02-12 14:34:03.135+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.instrument.web.TraceWebAspect    : Marking span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true] for closure by Trace Filter
...
2018-02-12 14:34:03.137+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] .w.s.m.m.a.ServletInvocableHandlerMethod : Invoking 'de.knowis.cp.repository.provider.exception.GlobalExceptionHandler.handleNotFoundException' with arguments [SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@3ee75d6d]], de.knowis.cp.util.web.exception.NotFoundException: Not found [app=MDE, message=null]]
2018-02-12 14:34:03.138+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.p.e.GlobalExceptionHandler       : #T_TRACE# - Start [method 'GlobalExceptionHandlerBase.handleNotFoundException(..)']
2018-02-12 14:34:03.138+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.p.e.GlobalExceptionHandler       : #M_TRACE# - Start [method 'GlobalExceptionHandlerBase.handleNotFoundException(..)'] with [parameters '[SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@3ee75d6d]], de.knowis.cp.util.web.exception.NotFoundException: Not found [app=MDE, message=null]]']
2018-02-12 14:34:03.149+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.u.w.p.e.GlobalExceptionHandlerBase : Not found [method=GET, requestUrl=http://localhost:10080/api/repository/v1/apps/MDE/snapshots]
...
2018-02-12 14:34:03.154+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.p.e.GlobalExceptionHandler       : #M_TRACE# - End [method 'GlobalExceptionHandlerBase.handleNotFoundException(..)'] with [result '<404 Not Found,NotFoundError(super=Error(super=de.knowis.cp.util.web.provider.exception.model.NotFoundError@75356d1c, detailMessage=Resource not found. [name=app, value=MDE], errorId=0000000000000001, message=Resource not found., type=NotFoundError), fieldName=app, fieldValue=MDE),{Content-Type=[application/json;charset=UTF-8]}>']
2018-02-12 14:34:03.155+0000  INFO [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] d.k.c.r.p.e.GlobalExceptionHandler       : #T_TRACE# - End [method 'GlobalExceptionHandlerBase.handleNotFoundException(..)'] [duration 17 ms]
2018-02-12 14:34:03.155+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] .w.s.m.m.a.ServletInvocableHandlerMethod : Method [de.knowis.cp.repository.provider.exception.GlobalExceptionHandler.handleNotFoundException] returned [<404 Not Found,NotFoundError(super=Error(super=de.knowis.cp.util.web.provider.exception.model.NotFoundError@75356d1c, detailMessage=Resource not found. [name=app, value=MDE], errorId=0000000000000001, message=Resource not found., type=NotFoundError), fieldName=app, fieldValue=MDE),{Content-Type=[application/json;charset=UTF-8]}>]
201...
8-02-12 14:34:03.163+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:mde] o.s.c.s.instrument.web.TraceWebAspect    : Marking span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true] for closure by Trace Filter
..
2018-02-12 14:34:03.167+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.TraceFilter  : Trying to send the parent span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true] to Zipkin
2018-02-12 14:34:03.167+0000 TRACE [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.SsLogSetter  : Span was already annotated with SS, will not do it again
2018-02-12 14:34:03.168+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'defaultSpanReporter'
2018-02-12 14:34:03.168+0000 DEBUG [repository-application,10000000000000000000000000000001,0000000000000001,true] 32652 --- [io-10080-exec-2] [MID:,RID:,SNID:,USER:] o.s.c.sleuth.instrument.web.TraceFilter  : Will close span [Trace:<PHONE_NUMBER>0000000000000000000001, Span:<PHONE_NUMBER>000001, Parent: null, exportable:true] since some component marked it for closure

As far i understand the documentation and also experience the OpenTracing implementation, the o.s.c.sleuth.instrument.web.TraceFilter should have started a new span and used the "continued" span as parent span.

I don't understand the problem. A new span is created in most cases when someone creates it either via an annotation or the API. We try to continue spans as often as possible. What seems to be the problem then?

Hi!
thanks for your fast response!
Service A create a span

trace id<PHONE_NUMBER>0000000000000000000001
span id<PHONE_NUMBER>000001

it calls via HTTP/REST service B (spring boot/sleuth):

Service B uses the given span id, and does not creates a new span and links that new span to the given span<PHONE_NUMBER>000001

According to the documentation and the OpenTracing behaviour it should create a new span if the request comes in, shouldn't it?

According to the documentation and the OpenTracing behaviour it should create a new span if the request comes in, shouldn't it?

It's up to the user to create spans whenever they are needed. So you can create a span yourself whenever it seems to make sense for the user.

Hi!
Perhaps I misinterpret also this picture of the Spring Cloud Sleuth documentation:

But I thought, that each service create a new span after receiving the parent span.

It's just a simulation. It's up to you if yoh do it. Notice that in service 1 there is no additional span

Okay. Thanks a lot. I was really mislead by the picture. Service 1 has to create a span, as none exists.


Empty input in Script runner fails Pydantic validation

Pre-bug-report checklist
1. This bug can be reproduced using YAML

[Sort of] Yes 👉 Please report a bug to the Argo Workflows GitHub 👈
[] No

2. This bug occurs when...

[ ] running Hera code without submitting to Argo (e.g. when exporting to YAML)
[x] running Hera code and submitting to Argo

Bug report
Describe the bug
When using the Script runner feature, passing an empty string as an input argument fails at runtime. I believe this has something to do with how the inputs are passed through the source field here, or how argo itself evaluates the {{inputs.parameters}} expression when parameters are empty.  The same issue does not occur when using the inline script constructor.
Error log if applicable:
W
Traceback (most recent call last):
  File "/opt/bb/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/bb/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/layers/com.bloomberg.ds.buildpacks.pip/requirements/lib/python3.9/site-packages/hera/workflows/runner.py", line 127, in <module>
    _run()
  File "/layers/com.bloomberg.ds.buildpacks.pip/requirements/lib/python3.9/site-packages/hera/workflows/runner.py", line 120, in _run
    result = _runner(args.entrypoint, kwargs_list)
  File "/layers/com.bloomberg.ds.buildpacks.pip/requirements/lib/python3.9/site-packages/hera/workflows/runner.py", line 105, in _runner
    return function(**kwargs)
  File "/layers/com.bloomberg.ds.buildpacks.pip/requirements/lib/python3.9/site-packages/hera/workflows/runner.py", line 27, in inner
    return f(**filtered_kwargs)
  File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
  File "pydantic/decorator.py", line 133, in pydantic.decorator.ValidatedFunction.call
  File "pydantic/decorator.py", line 130, in pydantic.decorator.ValidatedFunction.init_model_instance
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Echo
message
  field required (type=value_error.missing)
time="2023-06-24T19:42:03 UTC" level=info msg="sub-process exited" argo=true error="<nil>"
Error: exit status 1

To Reproduce
Runner constructor fails.  Replacing runner with inline works.
from hera.workflows import Workflow, Script, script, Steps
from hera.shared import global_config

global_config.set_class_defaults(Script, constructor="runner")
global_config.experimental_features["script_runner"] = True

@script(constructor="runner")
def echo(message: str) -> None:
    print(message)

with Workflow(
        name="hera-playground",
        entrypoint="steps",
    ) as w:
        with Steps(name="steps"):
            echo(arguments={"message": ""})
        return w

Expected behavior
I expect the Workflow to not fail and accept the empty string as input.
Environment

OS: iOS
Browser: chrome
Version of Hera: 5.5.0
Version of Argo: 3.4.8

Additional context
Add any other context about the problem here.

@samj1912 @elliotgunton

@mshatkhin script runner only supports keyword args. You will need to either set a default value for message in the function or use * before message to indicate that it's a kwarg.

This is solved by: https://github.com/argoproj-labs/hera/commit/0c7d0504bfc10ce87bb45a6d0c684e559bca0675
Thanks @samj1912 !

This is solved by: https://github.com/argoproj-labs/hera/commit/0c7d0504bfc10ce87bb45a6d0c684e559bca0675
Thanks @samj1912 !


JS/TS auto-import is not as good as Webstorm's

TS Template added by @mjbvz
TypeScript Version: 3.7.5
Search Terms

auto import
auto imports

VSCode Version: 1.42.0
OS Version: Arch Linux amd64

Steps to Reproduce:

npm install graphql-tools
Try to auto-import makeExecutableSchema

It will say No code actions available, but if you manually import it then it works:
import { makeExecutableSchema } from 'graphql-tools';

The same function gets automatically imported in Webstorm.
Some auto-imports do work in vscode, like join:
import { join } from 'path';

but not all of them.

Does this issue occur when all extensions are disabled?: Yes

Here's what I see in VS Code insiders in a new project:

Do auto import suggestions work for you? Is it just the lightbulb that doesn't? The lightbulb for auto imports are only enabled if you enable semantic checking in your JavaScript

@mjbvz in this particular example you're right: makeExecutableSchema gets the import suggestion when you type it, but it was taking so much time to display it that I didn't notice.
BUT other imports still don't get the suggestion, like for example MikroORM.
If you kindly help vscode adding the following to the beginning of your file
import {} from 'mikro-orm';

then it will manage to suggest MikroORM when you type it, otherwise it will display no suggestions at all.

Duplicate of #36042


fix(linter): panic on invalid lang in a11y/lang.

#4630  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rzvxa and the rest of your teammates on  Graphite


[Feature]: Multiple Email addresses in Email address input

Is there an existing issue for this?

[X] I have searched the existing issues

Summary
Allow multiple email addresses in email address input. Have an option to allow the input to accept multiple email addresses separated by comma or semicolon.
Why should this be worked on?
It's very common to need to input multiple emails address when accepting data for TO, CC, and BCC fields. There is no easy way to currently do this. This should also be easy to implement. Currently, using an input field and doing validation via JS.

@MichaelLeeHobbs I think this should be a new widget. Sort of like a tag widget that allows users to add items to it with validation for email

Hey @MichaelLeeHobbs apologies for the delayed response, have you checked if you can use JSON form widget to solve this problem?
Here's a sample app - https://app.appsmith.com/app/json-form/email-collector-62c7ba0b01213a676a34945f


Add Mesh to Building

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

20 of 21 (95.24%)  changed or added relevant lines in 3 files are covered.
5 unchanged lines in 1 file lost coverage.
Overall coverage increased (+1.9%) to 93.462%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

building3d/display/plot_mesh.py
6
7
85.71%

Files with Coverage Reduction
New Missed Lines
%

display/plot_mesh.py
5
77.36%

Totals

Change from base Build<PHONE_NUMBER>:
1.9%

Covered Lines:
3488

Relevant Lines:
3732

💛  - Coveralls


Try to move to stable when rust 1.39 releases

As we make heavy use of async -- we have been on a nightly compiler for some time. Fortunately, async is getting stabilized and so it would be nice if could move to a stable rust version.

Fixed with #57 closing.


Using CLI tools to request service with mkcert certs does not work (macOS)

E.g. if I make requests to my local container (Traefik + mkcert generated certs) with Httpie. Note that these certs work when accessing the site with Chrome or Firefox. I use macOS Big Sur atm.
$ http --headers https://portainer.docker.sh

Will end up with following error:
http: error: SSLError: HTTPSConnectionPool(host='portainer.docker.sh', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) while doing a GET request to URL: https://portainer.docker.sh/

Original issue from our tool:
https://github.com/druidfi/stonehenge/issues/47

Is there some extra step I'm missing?
Or is this a known issue?

Same problem with httpie on bare metal Big Sur, although curl works normally:
$ http -phb https://localhost:8443

http: error: SSLError: HTTPSConnectionPool(host='localhost', port=8443): Max retries exceeded with url: / (Caused by
SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) while doing a GET request to URL: https://localhost:8443/
$

But:
$ curl -I  https://localhost:8443
HTTP/2 200
content-type: text/plain; charset=utf-8
content-length: 34
date: Wed, 03 Mar 2021 08:42:33 GMT
$

Related discussion on httpie https://github.com/httpie/httpie/issues/768

And https://github.com/httpie/httpie/issues/480#issuecomment-673568555

So I would conclude that it's problem with a certain cli tool and not mkcert.

FYI this works:
export REQUESTS_CA_BUNDLE="$(mkcert -CAROOT)/rootCA.pem"
https localhost


{{ somethinglikeFuntion() }}Update filters.md

Note
This repository is for Vue 1.x and 2.x only. Issues and pull requests related to 3.x are managed in the v3 doc repo: https://github.com/vuejs/docs-next.

Please DO NOT abuse pull requests. Do experiments in your own repo. Thanks.


simple annotator to validate using predicate or expression and a bit of cleanup

@davsclaus Looks nice. 👍


dns/dnscrypt-proxy: change log directory, go stable

Time to go stable ... setup.sh needs chmod as usual :)

I added to this also allow privileged mode so it can run on port 53 natively, this also closes #1014
Now it's ready for merge (after review) :)

Merged, thanks!


Fix dynamic tab perf

This works on top of #751
I tried multiple things to improve the performance, but I think the main issue was multiple calls to setState in onLayout of <TabBarItem/>. This PR only sets state once when all onLayouts have been fired by using a private variable which is cleared later. I could see visible perf improvement and the initial scroll animation of TabBarItems happens in a jiffy!
I earlier tried to delay rendering the indicator as well as tab bar items after the current tab but it didn't have any visible improv.
Please see 06f66d1 for changes.
PS: I'm totally new to react-native and also haven't used this lib before, so I'm not privy to the internal workings. Let me know if this approach doesn't abide by the theme/structure of this codebase!
cc: @Taylor123 @satya164

Most of it is done by @Taylor123 I'll try to answer as much as I can!

This works straight out of the box! Great work @ankeetmaini. I have forked this PR and run it on a iOS  simulator. It works perfectly and very smooth. The Indicator grows and shrinks seamlessly when switching tabs. Amazing! Address the review @satya164 has requested please so we can get this merged into master.

@ankeetmaini i cleaned up getScrollAmount on this branch if you want to pull in that latest commit to this PR https://github.com/Taylor123/react-native-tab-view/tree/fix-dynamic-tab-perf
It would let me submit a PR to your branch even though i pulled from your repo

@satya164 I've seen this, will work on this and update (this weekend, mostly).

@ankeetmaini Thank you. Take your time :)

@satya164 I think I'm almost there! I've incorporated all the reviews removed dynamicWidth prop altogether.
I have two doubts, in getTabwidth in TabBar.tsx I am not sure what happens if scroll is enabled?
Also I animated the width property but it just blips while animating. I am not sure how to animate it smoothly. Can you help?

I'll try to do it tomorrow.

@ankeetmaini

I have two doubts, in getTabwidth in TabBar.tsx I am not sure what happens if scroll is enabled?

We don't need separate logic for that. The previous logic calculated a width so that half of a tab would be visible only when scrollEnabled is true. With width: 'auto', we don't need to calculate custom width.

Also I animated the width property of TabBarIndicator but it just blips while animating. I am not sure how to animate it smoothly.

This was only on Android, right? I think this was because the animated node was getting recreated every render. I have fixed the memoization to avoid it and it seems to animate smoothly now.
I have made some improvements in https://github.com/react-native-community/react-native-tab-view/pull/837. You can see what in the PR description.
The only thing I'm not satisfied about is the logic determining how much to scroll the tab. Currently it doesn't center the active item (for example, in the example, the chat tab item doesn't get centered even if there's scrollable space available). I'll try to fix it when I get time, but if you want to help with it, it'll be awesome too.

Ok, I have updated my branch. This should fix the logic for determining center distance (it was an off-by-one error XD). Take a look when you have time :)

Closing in favor of #823

This is #823 :(

This is #823 :(

It's #837


Can't access context.env on vercel edge runtime

What version of Hono are you using?
3.5.8
What runtime/platform is your app running on?
Vercel
What steps can reproduce the bug?
On vercel edge runtime, context.env isn't a thing.
Env variables can be accessed via process.env - Or - using import { env } from 'hono/adapter'
The vercel adaptor needs a fix, and should have this baked in so ctx.env should work as documented here https://hono.dev/api/context#env
Sample code below:
app.get('/', async function (c) {
  console.log(c.env, process.env);
  return c.json({ message: 'Hello Hono!' });
});

What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response

Hi @kevbook
This is not a bug. c.env is only for Cloudflare Workers / Pages. Please use the env imported from the hono/adapter. Thanks.


OnResume and OnLaunch never triggered[Android]

Hi There,
I am facing issue with firebase_messaging methods never triggered, but I am receiving the notification on my android device without the problem:
_firebaseMessaging.configure(
onLaunch: (Map<String, dynamic> message) async {
debugPrint('#### onLaunch');
},
onMessage: (Map<String, dynamic> message) async {
debugPrint('#### onMessage');
},
onResume: (Map<String, dynamic> message) async {
debugPrint('#### onResume');
});
Here is the output of my flutter doctor:
$ flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E266, locale en-RS)
• Flutter version 1.12.13+hotfix.9 at /Users/lazarjovicic/flutter
• Framework revision f139b11009 (9 days ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/lazarjovicic/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4, Build version 11E146
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.0.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.43.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.1
[✓] Connected device (1 available)
• SM G970F • RF8M728WTMP • android-arm64 • Android 10 (API 29)
• No issues found!
I have followed the instruciton from here https://pub.dev/packages/firebase_messaging#-readme-tab-.
My Manifest:
package="myPackageId">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="flutterappnotifications"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
        <intent-filter>
            <action android:name="FLUTTER_NOTIFICATION_CLICK" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
</application>

Can somebody help me to understand why this is not working? Did I ommited something?
Also, if I add Application.java file, the application is crashing during the instalation.
I managed to print onMessage, but onLanuch and onResume still not working
Please let me know if you need any additional information.
THanks

Hi @lazarvgd
Please take a look at this possible solution
Thank you

@TahaTesser I saw this, but I do not see this field in Firebase console where I can add this map  click_action: 'FLUTTER_NOTIFICATION_CLICK'. Can you please pint me in right direction?

@TahaTesser I saw this, but I do not see this field in Firebase console where I can add this map click_action: 'FLUTTER_NOTIFICATION_CLICK'. Can you please pint me in right direction?

This still doesn't work. Notification is shown but onResume and onLaunch logic is never fired, and I need to save the notification received on shared preferences.

I'm having the same issue, the workaround proposed by @4tKnight works, but I supposed that this click action was being added automatically by the plugin when publishing the local notification in the system tray.
Shouldn't be this explanation included in the plugin readme?

@thearaks it is mentioned in the readme here

Closing in favour of trying the latest messaging version which has been been heavily reworked, along with documentation, since this issue was raised: https://firebase.flutter.dev/docs/messaging/overviewIf you still have a problem please raise a new GitHub issue with up to date information and code snippets if possible. Thanks.


Lucene upgrade, bug fixes, and general cleanup

Description of Change
Upgraded Apache Lucene to the newest version compiled with Java 7 (version 5.5.5), fixed tokenizing/filtering pipeline to correctly handle URLs (should create fewer FP on any CPEs that contain http), and general code cleanup.
Have test cases been added to cover the new functionality?
yes

Can one of the admins verify this patch?