text:
Update Container.php

add support for php7.4

Coverage increased (+0.01%) to 93.322% when pulling ddf48b89ae6e9edf2f766cc1c09547c2536fdf61 on php74-support into 673ba6606ca0a78e4cb1889dca5ba83bd6785ef7 on master.

authors: coveralls vvval

repo: spiral/common


text:
Issue connecting Snapcast

Hello I have Mopidy and Snapcast running in docker and wanted to get this LedFx container setup to work with them but am having a couple of issues.
My Mopidy has an audio output that is
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! filesink location=/tmp/snapfifo
From what i can tell this LedFx container is looking for an output in a file called stream. So if i change the Mopidy out to
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S32LE ! filesink location=/tmp/stream
LedFx can access that, however that then renders my snapcast unavailable as it is wanting snapfifo.
So my question is how would i get this all working together, what files do i need to edit to have this all work in sync. If this is a mopidy config file setting, and someone has an example i can look at that would be great. I'm just a little confused at how this all works together.

You dont need to edit any file just pass the ip address of your snapcastserver like environment variable to the container and the container will connect to the running snapcastserver reading from the fifo file is other option you can use to get the audio for the container so this simple docker-compose.yml need to work
version: '3'

services:
  ledfx-virt:
    image: spirocekano/ledfx-virt:beta
    container_name: ledfx-virt
    hostname: ledfx-virt
    environment:
      - HOST=192.168.xxx.yyy
    ports:
      - 8888:8888
    volumes:
      - ./ledfx-config:/root/.ledfx
      ```

@spiro-c  Thanks for the information.
Under Ledfx Audio setting, what would I choose for that snapcast server?
The options I see are
ALSA, pulse, and default.

the default need to be fine ..and you need to see LedFx connection in your snapcastserver

Ok so i am not seeing an LedFx connection in snapcast.
My snapcast server is on 10.0.0.33
I have added this IP to the ledfx docker container under the environment variable HOST.
In the Snapcast server logs i see the test phone connection but no LedFx connection

Scatch that.
Found the issue.
Both the Mopdiy and Snapcast Server were running on a custom Docker Network.
As soon as I changed the ledfx docker container to the same custom docker network i saw the handshake.
Thanks

source: gharchive/issue

repo: spiro-c/LedFxDocker-Virtual

license: MIT

license_type: permissive

license_source: github-api


text:
CollectionView Shifted down in iOS 11

Collection view is shifted when a header is not included in iOS 11 Beta. It also happens in the demo app where all the content is shifted down around 50 pixels?
setting automatically manage top content inset fixes the issue
    func viewControllerShouldAutomaticallyManageTopContentInset(_ viewController: HUBViewController) -> Bool {         return false     }

The Hub Framework is being phased out at Spotify, and therefore we will not be maintaining it further.

authors: JensAyton mattcee

repo: spotify/HubFramework

license_source: bigquery


text:
docker-client couldn't find local image

I am using docker-client plugin to launch docker container build by dockerfile-maven plugin
When I run mvn verify, integration test throws following error
This test method should be run
com.spotify.docker.client.exceptions.ImageNotFoundException: Image not found: rohitbarnwal7/presto_log_updated:0.0.1
at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:1268)
at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:1235)
at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:1229)
at IntegrationTestIT.checkForQueryInFile(IntegrationTestIT.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.run(TestNG.java:1024)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/images/create?fromImage=rohitbarnwal7%2Fpresto_log_updated&tag=0.0.1: 404, body: {"message":"pull access denied for rohitbarnwal7/presto_log_updated, repository does not exist or may require 'docker login'"}
at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2641)
at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:1258)
... 33 more

Caused by: javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1008)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773)
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198)
at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79)
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.927 sec
Line 48 of IntegrationTestIT.java:
        docker.pull("rohitbarnwal7/presto_log_updated:0.0.1");

Any help here please?

Sounds like there is a mismatch between the versions used of the various Jackson libraries on your project's classpath: https://github.com/FasterXML/jackson-annotations/issues/119

I have different issue, I no more have mismatch issue.

If the docker daemon / docker-client reports a 404 not found, then as the error message says either the image does not exist in Docker Hub or you need to authenticate to pull the private image:
$ docker pull rohitbarnwal7/presto_log_updated:0.0.1
Error response from daemon: pull access denied for rohitbarnwal7/presto_log_updated, repository does not exist or may require 'docker login'

Is there any way to pick the local image from my host machine.
Docker images
docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
rohitbarnwal7/presto_log_updated   0.0.1               eb8add1b658c        About an hour ago   2.03GB
openjdk                            8                   7c57090325cc        8 weeks ago         737MB

If you do a docker pull, it will always try to pull from the remote server. It needs to check if there are updates to the image.
If you know the image is there locally, and can't be found on a remote server, why is your test trying to pull it? Maybe it would be better for your test to do something like assume(someMethodWhereYouCheckIfTheImageExists, is(true));. If the image isn't there for some reason, the test would not fail but would just be skipped. Or include the image's Dockerfile in your test resources and build it before running any tests; that way you can be 100% sure it is there.

Yes, that resolved my case. Thanks.

authors: RohitBarnwal johnflavin mattnworb

repo: spotify/docker-client


text:
Update sbt-pack to 0.16

Updates org.xerial.sbt:sbt-pack from 0.14 to 0.16.
GitHub Release Notes - Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.xerial.sbt", artifactId = "sbt-pack" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "org.xerial.sbt", artifactId = "sbt-pack" }
}]

labels: sbt-plugin-update, commit-count:1

Superseded by #600.

source: gharchive/pull-request

repo: spotify/ratatool


text:
Rules can not be updated when Dynamic Rule DataSource load empty data for the first time

It won't be updated rules data after datasource push data when there is no data for the first time loading.
But it is ok when the data is loaded for the first time.
Dynamic Rule DataSource includes: zk, nacos, apollo.

Maybe we should add a new configuration rule-type in  AbstractDataSourceProperties.


text:
ANY_DATE pattern invalid date

Describe the bug
Error in generated date using RegexPatterns.ANY_DATE. Regex could generate invalid dates, in this example the date is 31 of April.
Version: 2.2.2
Sample
Contract.make {   request {     method('GET')     urlPath('/data') {       queryParameters {         parameter('search',value(regex("created\\>" + RegexPatterns.ANY_DATE + ",created\\<" + RegexPatterns.ANY_DATE)))       }     }
Regex generate a 1037-04-31 -> But April has not 31 days.

We can't do much about that date. I mean if there are any regex experts out there then we're more than happy to accept PRs ;) For now I'm closing this.

authors: aaguila marcingrzejszczak

repo: spring-cloud/spring-cloud-contract


text:
Spring Data Docker deploy matches SCS

added -exec extension to spring cloud data jar for consistency with SCS
updated the Dockerfile so that it will search for -exec.jar instead of the hardcoded snapshot jar
moved Dockerfile into the code.
updated data-admin pom to include docker plugin

rebased and merged as https://github.com/spring-cloud/spring-cloud-data/commit/84b275ea15a7f40e0f049e985d090743b2bce744

authors: cppwfs markfisher

repo: spring-cloud/spring-cloud-data


text:
Failed to start application due to 'Error creating bean with name 'functionBindingRegistrar''

Describe the bug
When start an application enabling zipkin and sleuth without spring.cloud.function.definition, application failed to start due to 'Error creating bean with name 'functionBindingRegistrar''
Sample
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.6.6</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.example</groupId>
	<artifactId>demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>demo</name>
	<description>Demo project for Spring Boot</description>
	<properties>
		<java.version>11</java.version>
		<spring-cloud.version>2021.0.1</spring-cloud.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-function-context</artifactId>
			<version>3.2.6</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-zipkin</artifactId>
			<version>2.2.8.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream</artifactId>
			<scope>test</scope>
			<classifier>test-binder</classifier>
			<type>test-jar</type>
		</dependency>
	</dependencies>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>

application.yml
server:
  port: 8080
spring:
  sleuth:
    sampler:
      probability: 1.0
  zipkin:
    sender:
      type: web
    base-url: https://www.baidu.com

DemoApplication.java
package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

}

I have the same issue.... Does it give you the same issue if you put spring-cloud-function-context to 3.2.5?

I have the same issue.... Does it give you the same issue if you put spring-cloud-function-context to 3.2.5?

No, only 3.2.6 of it would have this issue.

I also have the same problem. I'm currently using this workaround (in Kotlin):
@Bean
fun fixSpringBug() = Consumer<JsonNode> {}

I think the bug happens because Spring is looking for all functions, then taking the first one without actually checking there are any.
Unfortunately, I am not sure where I would put the bean. I put it on top of the other bean definition for Consumer. It doesn't work thought.....

Thank you so much. It worked flawlessly!
Hopefully, spring-cloud-function-context comes with a patch soon...

So, if I understand correctly, you don't really intend to use s-c-function, since your DemoApplication provides no function beans, but by adding zipkin some other functions gets registered. Is that correct?

I don't know for the person who created this issue but, I am not using s-c-function really but it's still needed as a dependency in order to run my application. It would be nice if that could be corrected as my application can only run with the fix you can see commented above in this issue. Thank you for taking the time to fix this issue.

This is what I don't understand. You are saying you are not using s-c-function, but you need it as a dependency. What do you mean by that.
At this point all I am suspecting is that you have s-c-function as a dependency that you are not using, but because it comes with it's own auto-configuration it searches for functions. If there is only one function it attempts to bootstrap it. It seems like that function may be brought it by zipkin. Adding dummy function ensures that there is no unique function so nothing wil be bootstrapped without spring.cloud.function.definition property.
I need more context as to what is the issue

I will be honest, I am not so sure. I am curently trying to support an API and version 3.2.5 of spring-cloud-function-core/context were vulnerable. Updating to 3.2.6 broke the ApplicationContext of my API by 'not being able to create a bean'.
Here is my dependency tree if it helps:
org.springframework.cloud:spring-cloud-stream-binder-rabbit:jar:3.2.4:compile
[INFO] | +- org.springframework.cloud:spring-cloud-stream-binder-rabbit-core:jar:3.2.3:compile
[INFO] | | +- org.springframework.integration:spring-integration-amqp:jar:5.5.12:compile
[INFO] | | - com.rabbitmq:http-client:jar:2.1.0.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-stream:jar:3.2.4:compile
[INFO] | | +- org.springframework.integration:spring-integration-core:jar:5.5.12:compile
[INFO] | | - org.springframework.cloud:spring-cloud-function-context:jar:3.2.6:compile
[INFO] | |  +- net.jodah:typetools:jar:0.6.2:compile
[INFO] | |  +- org.springframework.cloud:spring-cloud-function-core:jar:3.2.6:compile

Hello, do you think this issue willl be fixed in the future since my team and I are trying to find a way to not use the dummy bean created at the main application level since it's not very clean? I would like to participate in the fixing of this issue if needed.

I do not know what the issue is. I can not reproduce it.
If you can provide steps to reproduce or create a small application somewhere in github that reproduces the issue soe we can look that would be ideal.
Also. . .
You can try setting spring.cloud.stream.function.autodetect=false, that is kind of a back door to disable auto-discovery of functions

@Funnyadd  have you tried the setting spring.cloud.stream.function.autodetect=false?

Yes it worked, sorry we finished testing firday and everything seems to be working properly, thank you so much!

Ok, I am closing this as it appears to be the result of auto-discovery feature that you can now disable with spring.cloud.stream.function.autodetect property.

I encountered this problem. Reason - in application.yaml : spring.cloud.function.definition - must be only consumer.
I deleted Producer from definition and it's work well.

authors: Funnyadd LiuZHolmes SemenovRustam jurgc11 olegz

repo: spring-cloud/spring-cloud-function


text:
Does spring cloud gateway support spring cloud security?

See https://github.com/spring-cloud/spring-cloud-security/issues/141

thanks

repo: spring-cloud/spring-cloud-gateway


text:
Modified Response Body is Truncated

I have noticed a couple of related issues filed which are closed (referenced below), but there is no standing issue for a feature request/ bug for modification of a response body.
This could be helpful for a couple of reasons that I can think of.  Currently, status code modification is allowed, but if a user is unauthorized, it would be nice to provide body content as to why.  If an exception is thrown, it could also be helpful to be able to modify the body as needed.  Or if we are wrapping a request that is SOAP, for example.  We'd like to be able to make the request to the SOAP service get the response and then modify it.  More general case would be if the service responds only in xml and we want to convert it to json.
I've created a GatewayFilter that decorates the response, but the buffer is always fixed to the size of the originating response.  So if the response that I intend to send is larger, it gets truncated.
public class ModifyBodyGatewayFilterImpl implements GatewayFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {

        logger.info("\n\nexchange.getAttributes():\n {}\n\n", exchange.getAttributes());

        ServerHttpResponse response = exchange.getResponse();
        DataBufferFactory dataBufferFactory = response.bufferFactory();

        ServerHttpResponseDecorator decoratedResponse = new ServerHttpResponseDecorator(response) {

            @Override
            public Mono<Void> writeWith(Publisher<? extends DataBuffer> body) {

                Flux<? extends DataBuffer> flux = (Flux<? extends DataBuffer>) body;

                Flux<? extends DataBuffer> f = flux.flatMap( dataBuffer  -> {

                    byte[] origRespContent = new byte[dataBuffer.readableByteCount()];
                    dataBuffer.read(origRespContent);

                    System.out.println("content::: " + (new String(origRespContent)));

                    //alocating a new buffer size does not help.
                    DataBuffer b = dataBufferFactory.allocateBuffer(256);
                    b.write("0123456789abcdefg".getBytes());

                    return Flux.just(b);
                });

                return super.writeWith(f);
            }
        };

        ServerWebExchange swe = exchange.mutate().response(decoratedResponse).build();
        return chain.filter(swe);
    }
}

I've posted this question on StackOverflow:
https://stackoverflow.com/questions/48470030/spring-cloud-gateway-modified-response-body-is-truncated
Related:
#47 Allow modification of the response body
#113 How to modify request / response body?

Hey @forGitMeNotPlease
Please check my answer here. It works for me to be able to make some actions on received response(wrap it in xml)

@malinovskiy-alex Did you use this within the Spring Cloud Gateway itself as a GatewayFilter, or did you test in an isolated test?  I'm still seeing that the response is truncated with your suggestion.

@spencergibb How could we use weirdbob filter in a route declaration? It needs to run with order -2 but if added in a route declaration its order cannot be a negative number

@samtonyclarke
It should look smth like this:
...
.route(r -> r
    ...
    .filters(f ->
        ...
        .filter(yourRequestChangeBodyFilter(), Integer.MIN_VALUE)
        .filter(yourResponseChangeBodyFilter(), NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER - 1)
    )
)

Some later I'm going to commit some API for request/response body modification.

@samtonyclarke  You should be able to add a route programmatically.  I am passing a bean for this filter directly.
@re6exp Do you see any issues with what I'm doing in this issue?  Any idea why the response is being truncated?
    @Bean
    public RouteLocator customRouteLocator(RouteLocatorBuilder builder,
                                           @Qualifier("modifyBodyGatewayFilter")
                                                   ModifyBodyGatewayFilterImpl modifyBodyGatewayFilterImpl) {

        RouteLocator routeLocator = builder.routes()
                .route(r -> r.path("/test")
                        .filter(modifyBodyGatewayFilterImpl, NETTY_WRITE_RESP_FILTER_ORDER - 1)
                        .uri("http://localhost:8000")
                )
                .build();

        return routeLocator;
    }

@re6exp @forGitMeNotPlease
I mean if we are declaring the filters using the text definition of the route (example: https://github.com/spring-cloud/spring-cloud-gateway/blob/master/spring-cloud-gateway-core/src/test/resources/application.yml) then how can we control the order?
Filters are ordered in the order they appear starting at 0.
In other words https://github.com/spring-cloud/spring-cloud-gateway/blob/master/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinition.java doesn't support full ordering of the filters?

@samtonyclarke  Unfortunately, I don't believe that it's supported via config for the time being.  I still use config for some filters, but for this one I had to do it programmatically.

@samtonyclarke
Try to use dataBufferFactory from your wrapped response inside your writeWith method.
DataBufferFactory bufferFactory = super.bufferFactory();

See spring-web and spring-core sources, there are many code examples you can find usefull.

@re6exp using parent class' DataBufferFactory doesn't help.  Including a test that may help to replicate.
Also, see my other test above that tests the code in isolation (removed from the Gateway codebase).  That works just fine.  Seems to be an issue only when passing via ServerWebExchange.
    @Test
    public void testModifyBodyGatewayFilter() throws Exception {

        String url = "/test";

        EntityExchangeResult<byte[]> result = webTestClient
                .get()
                .uri(url)
                .exchange()
                .expectStatus().isEqualTo(HttpStatus.OK)
                .expectBody().returnResult();

        String respBod = new String(result.getResponseBody());
        System.out.println("RESPONSE BODY: " + respBod);
    }

Thanks @re6exp @forGitMeNotPlease
Given that any sort of body manipulation might take some non trivial amount of time, then I assume we want to do the processing outside of the netty event thread. Is it possible?

Yes, it can be done. Just need to have the fluxBody publish on a scheduler.
fluxBody.publishOn(Schedulers.elastic()).map(dataBuffer ->

@samtonyclarke Did you test this in the gateway?  With your suggestion I'm still seeing that the response is the same amount of bytes in the original reponse:
Original resp:  99999
New buffer   : 0123456789abcdefg
Modified res : 012345

Hey @forGitMeNotPlease
If you check my solution there I needed to wrap my response in some format - add custom json node to the start and to the end. So I was able to do that using buffer() method. In that way all the chunks from response would be added to the buffer and when we get latest chunk then some event would be initiated and we can add some custom information to the start and to the end after merging list of DataBuffers. You can find example here.

@malinovskiy-alex I get the same result with that approach.

I've added a sample project demonstrating this.  It uses your approach @malinovskiy-alex.
https://github.com/forGitMeNotPlease/truncatedBodySCG

@spencergibb Any further guidance on this?  Appears that the problem is way upstream and solution not easily achievable. The http client is setting the content-length and creating the buffer to the original response size. This is in the Netty code. I don’t see a way around it without some serious modifications to the SCG codebase.
The example git project that I provide demonstrates the problem.
If anyone has any ideas on how to solve this problem it would be hugely helpful to this project.  I know it's still a relatively new code base but it's an important feature to have on any gateway.

@forGitMeNotPlease - If i understand your problem correctly, possibly you could try ByteOutputStream to collect all buffers - For example -
`
public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) {
ServerHttpResponse originalResponse = exchange.getResponse();
DataBufferFactory bufferFactory = originalResponse.bufferFactory();
ServerHttpResponseDecorator decoratedResponse =
    new ServerHttpResponseDecorator(originalResponse) {
      @Override
      public Mono<Void> writeWith(Publisher<? extends DataBuffer> body) {
        if (body instanceof Flux) {
          Flux<? extends DataBuffer> flux = (Flux<? extends DataBuffer>) body;
          return super.writeWith(
              flux.buffer()
                  .map(
                      dataBuffers -> {
                        ByteOutputStream outputStream = new ByteOutputStream();
                        dataBuffers.forEach(
                            i -> {
                              byte[] array = new byte[i.readableByteCount()];
                              i.read(array);
                              outputStream.write(array);
                            });
                        // Do whatever you want to do with outputStream.getBytes() and then

                        return bufferFactory.wrap(outputStream.getBytes());
                      }));
        }

        return super.writeWith(body); // if body is not a flux. never got there.
      }
    };
return chain.filter(
    exchange.mutate().response(decoratedResponse).build()); // replace response with decorator

}
`

There is more efficient way - using encoders/decoders and/or readers/writers from Spring itself.
By the way, I wrote filters that change request/response body, see post here.
If you are interested, please vote to show team that we need this feature.
If this feature will been voted by many people, may be, spring team will come to decision to add it. In this case I am going to continue to port last readers/writers to cover all possible situations.

@forGitMeNotPlease Has the problem been solved?

@forGitMeNotPlease Has the problem been solved?

@forGitMeNotPlease @yangdd1205  have you reolved these problem ? wait for approach.

modify the response header "Content-Length"

Gateway has a filter that modifies the response body.
https://github.com/spring-cloud/spring-cloud-gateway/blob/eb950389527b7902ae117b0ad65adbfcf2e25a86/spring-cloud-gateway-sample/src/main/java/org/springframework/cloud/gateway/sample/GatewaySampleApplication.java#L98-L107
By using the webflux encoders/decoder the content length is set automatically.

@spencergibb Hello,I come from China. I want to set Content-Length in response header，this is my code：
f.modifyResponseBody(Object.class, Object.class,(exchange, object) -> {
 f.setRequestHeader(HttpHeaders.CONTENT_LENGTH,String.valueOf(String.valueOf(object).getBytes().length));
  return Mono.just(object);
});

However, some requests will report an exception.：
{
    "timestamp": "2019-07-12T06:17:05.375+0000",
    "path": "/v1/app",
    "status": 500,
    "error": "Internal Server Error",
    "message": "Content type 'text/html;charset=utf-8' not supported for bodyType=java.lang.Object"
}

Please help me, thank you.

See https://cloud.spring.io/spring-cloud-static/Greenwich.SR2/single/spring-cloud.html#_addresponseheader_gatewayfilter_factory

authors: HuangDayu forGitMeNotPlease leiyazhen malinovskiy-alex nilavalagansugumaran re6exp ryanjbaxter samtonyclarke spencergibb woxinqidai yangdd1205


text:
gcp-pubsub-subscriber thread starts on PubSubTemplate creation; never stops

This is a continuation of #1503. There is also a similar (but unrelated, as Spring Cloud GCP creates its own SubscriberStub) issue in the client library googleapis/google-cloud-java#6570.
PubSubSubscriberTemplate constructor creates a SubscriberStub, which starts at least one thread. The SubscriberStub is never closed. For a web application, this is not noticeable, but for a terminal app that expects JVM to close normally when its work is done, the result is a hanging app.
I thought we've fixed this in #1503, but now I don't know how that solution (making schedulers spring managed beans) ever worked. Spring's bean destruction happens when on JVM shutdown hook, and JVM won't shut down while there is still a non-daemon thread running.
There are solutions of varying invasiveness to this:

Document the need to shut down the executor manually, as in this comment.
For sure at least call this.subscriberStub.close() in the destroy() method in PubSubSubscriberTemplate, so it cleans up properly for a web app.
(this one needs thought and analysis of how/when these threads are created) Work with the client library to avoid starting the threads unless .subscribe() is called. Are the threads created only for the streaming pull? Or are they also used for blocking operations?

I think the problem is that PubSubSubscriberTemplate.subscriberStub is not a Spring-managed bean. So, it's not automatically closed when the context shuts down.
The simplest (and proper) thing to do would be to call this.subscriberStub.close() in the destroy() method in PubSubSubscriberTemplate. Exactly as you're suggesting in (2).

authors: elefeint meltsufin

repo: spring-cloud/spring-cloud-gcp


text:
Eureka Client is not picking up server.port defined in application.yml or bootstrap.yml

Describe the bug
I have two applications on my local, one runs on 8080 and another runs on 9090. both port is defined in application.yml. they both register themself to a eureka server.
however the app runs on 9090 will always register itself running on port 8080 on eureka server. I put a breakpoint in class EurekaClientAutoConfiguration https://github.com/spring-cloud/spring-cloud-netflix/blob/aee83fb1132f33ae4bb798536c6e0cabf368c880/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.java#L140 and find that the serverport is always falling back to 8080. I then try to move the port setting to bootstrap.yml and it's no luck. I have to fix it by passing the server.port from running command or hardcoding System.setProperty("port", "9090"); in main method. then it changes to 9090.
On the other hand, the app running on port 8080, I can easily change its port registering on eureka server by just change the server.port property of application.yml.
Is this a bug or did I do something wrong?
Sample
The settings:
Application8080.java:
@EnableEurekaClient
public class Application8080 {

    public static void main(String[] args) {
        SpringApplication.run(Application8080.class, args);
    }
}

application.yml:
server:
  port: 8080
eureka:
  client:
    enabled: true
    serviceUrl:
      defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
  instance:
    preferIpAddress: true
    lease-renewal-interval-in-seconds: 10

for Application8080, it is also using LoadBalancer
Application9090.java is the same
application.yml:
eureka:
  client:
    enabled: true
    serviceUrl:
      defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
  instance:
    preferIpAddress: true
    instance-id: ${spring.cloud.client.hostname}:${spring.application.name}:${spring.application.instance_id:${server.port}}

bootstrap.yml:
server:
  port: 9090

found the reason. if you have the same issue, check if somewhere in your code defines an Environment bean. this will wipe all environment variables that eureka need to initialize the bean. so everything fallback to default: 8080.

repo: spring-cloud/spring-cloud-netflix


text:
fix prefix header

When multiple Zuul routers are placed in series they all add x-forwarded-xxx headers. Most headers are seperated by comma's but the prefix header is just plainly concatenated resulting in useless values.
This patch adds the missing comma.
For example:
Header: 'x-forwarded-server' = '123.123.122.188, tst.abc.nl'
Header: 'x-forwarded-prefix' = '/rest/abc/v1/facades/recipes/search,/mobile-services/recipes'
Header: 'x-forwarded-port' = '80,8080'
Header: 'x-forwarded-host' = 'test.abc.nl,gateway:8080'
Header: 'x-forwarded-for' = '123.123.223.203, 123.123.67.20'

The comma in the x-forwarded-prefix value was missing
Why?
I have two Zuul proxies in series with rules like this:
zuul:
  routes:
    proxy1:
      path: /legacy/path/to/rest/search/**
      url: http://proxy2.abc.nl/new/path/to/rest/search

In the next proxy I have something like this:
zuul:
  routes:
    proxy2:
      path: /new/path/to/rest/search/**
      url: http://search.services.abc.nl/search

And the rest service in the search controller listens to /search?query=cheese
The search service must also return hateaos links and so needs to know the original link the request was sent to. In this case: https://api.abc.nl/legacy/path/to/rest/search?query=cheese
But when the prefixes are just concatenated that would result in: /legacy/path/to/rest/search/new/path/to/rest/search?query=cheese and so is completely useless.
I do need to know the original request.
Another thing is that I can't think of a situation that concatenating the prefixes is of any use...
Issue with my pull request is that if somebody relies on this behaviour it would fail after the merge...

@MilovdZee Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@MilovdZee Thank you for signing the Contributor License Agreement!

Codecov Report

Merging #2939 into master will decrease coverage by 5.94%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2939      +/-   ##
============================================
- Coverage     65.49%   59.54%   -5.95%
+ Complexity     1420      856     -564
============================================
  Files           182      129      -53
  Lines          6694     4529    -2165
  Branches        806      457     -349
============================================
- Hits           4384     2697    -1687
+ Misses         2005     1660     -345
+ Partials        305      172     -133

Impacted Files
Coverage Δ
Complexity Δ

...etflix/zuul/RibbonCommandFactoryConfiguration.java

...rk/cloud/netflix/zuul/filters/pre/DebugFilter.java

...tflix/sidecar/LocalApplicationHealthIndicator.java

...oud/netflix/zuul/filters/post/SendErrorFilter.java

...ud/netflix/zuul/metrics/DefaultCounterFactory.java

...ework/cloud/netflix/sidecar/SidecarController.java

.../cloud/netflix/zuul/util/ZuulRuntimeException.java

...cloud/netflix/zuul/metrics/EmptyTracerFactory.java

...cloud/netflix/zuul/filters/ProxyRequestHelper.java

...ework/cloud/netflix/sidecar/SidecarProperties.java

... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c71f9b...b5ea2f7. Read the comment docs.

Can you explain why you think this is wrong? we made up X-Forwarded-Prefix

The if-then-else:
if (prefix.endsWith("/") && route.getPrefix().startsWith("/")) {
Only makes sense if the prefixes are appended without the comma. What would be the use case for that??? When would appending the prefixes be useful? And besides that. It is not in sync with the behaviour of other x-forwarded headers.

Is there any progress? I see the label "for team discussion" but any estimate on when that will take place?

I'll add it to the schedule

Sorry for the delay here. I'm going to check to see if adding the comma breaks other spring projects integration with this header.

Unfortunately, this breaks existing functionality in Spring Framework:
See https://github.com/spring-projects/spring-framework/blob/5e0cd9fb6074e73a7bd7909c56d9637d329ba0ed/spring-web/src/main/java/org/springframework/web/server/adapter/ForwardedHeaderTransformer.java#L129-L140
If you want to open an issue there and get that changed, we can revist here.

authors: MilovdZee codecov-io pivotal-issuemaster spencergibb


text:
Change response codes to confrom to OSB API spec

Fixes #211
In order to see clearly the picture of what responses there are now and which there should be, I created tables, which can be seen below. Those current responses, which needed to be (and has been) changed are marked with bold in tables.
For some cases the specification does not explisitly state what response codes there should be (marked as unspecified in table). Fixing the issue, I tried to conform to the current desing decisions. So, for those unspecified response codes I've left current 422, that's why I've made ServiceInstanceBindingDoesNotExistException to be mapped to 422 by default (see /last_operation in table 3).
Table 1. Endpoint: service_instances/<not_existing_instance_id>

Request
Response By SPEC
Current Response
Exception

GET
404
422
ServiceInstanceDoesNotExistException

PATCH
unspecified
422
ServiceInstanceDoesNotExistException

DELETE
410
422
ServiceInstanceDoesNotExistException

GET /last_operation
unspecified
422
ServiceInstanceDoesNotExistException

Table 2. Endpoint: service_instances/<not_existing_instance_id>/service_bindings/<some_binding_id>

Request
Response By SPEC
Current Response
Exception

PUT
unspecified
422
ServiceInstanceDoesNotExistException

GET
unspecified
422
ServiceInstanceDoesNotExistException

DELETE
unspecified
422
ServiceInstanceDoesNotExistException

GET /last_operation
unspecified
422
ServiceInstanceDoesNotExistException

Table 3. Endpoint: service_instances/<some_existing_instance_id>/service_bindings/<not_existing_binding_id>

Request
Response By SPEC
Current Response
Exception

GET
404
500
ServiceInstanceBindingDoesNotExistException (it's not mapped)

DELETE
410
410
ServiceInstanceBindingDoesNotExistException

GET /last_operation
unspecified
500
always UnsupportedOperationException (see  #213 )

@ilyavy thanks for the PR and the detailed explanation!

authors: ilyavy royclarkson


text:
Trace information is missing when exception is thrown from Scheduled methods

When an exception is thrown from a method annotated with @Scheduled all trace information is lost when it reaches the any implementation of error handler.
Spring boot 2.3.3,  Sleuth connected via dependencyManagement - spring-cloud-dependencies Hoxton.SR8
link for demo project
I think same problem as in 1663 and  1660

Can you please write this application in Java so that we're able to isolate the issue? I want to be sure that it's not related to Kotlin.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

I'm reopening this: I created a Java example where I was able to repro the issue: https://github.com/jonatan-ivanov/sleuth-gh-1729.  It seems this has the same cause as the ones in the description, the error handling happens after the Span is closed.
This is where the tracing instrumentation happens: TraceSchedulingAspect.java#L69-L74
And this is where the error handling takes place: TaskUtils.java#L93-L97 through /DelegatingErrorHandlingRunnable.java#L56-L61

I'm closing this in favor of https://github.com/spring-projects/spring-framework/issues/26533

authors: jonatan-ivanov marcingrzejszczak spring-issuemaster sting2804

repo: spring-cloud/spring-cloud-sleuth


text:
TraceContext not propgate to ErrorPage

i custom a 500 errorpage
 private static class CustomerErrorPageRegistrar implements ErrorPageRegistrar {

        // Register your error pages and url paths.
        @Override
        public void registerErrorPages(ErrorPageRegistry registry) {
            ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/error401");
            ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/error404");
            ErrorPage error412Page = new ErrorPage(SignatureVerifyException.class, "/error403");
            ErrorPage error500Page = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error");

            registry.addErrorPages(error401Page, error404Page, error412Page, error500Page);
        }

}

when i access tracer in ErrorPage controller
private String getTraceId() {
        final Tracer tracer = this.tracer.getIfAvailable();
        if (tracer != null) {
            return tracer.currentSpan().context().traceIdString();
        }
        return null;
}

then current span context report null.
with: spring-cloud-sleuth-core:2.0.0.M9

we don't have a test like this in brave.. possibly we need to address it
there in the brave-instrumentation-spring-webmvc project
On Wed, Apr 18, 2018 at 9:14 AM, yungoo notifications@github.com wrote:

i custom a 500 errorpage
` private static class CustomerErrorPageRegistrar implements
ErrorPageRegistrar {
// Register your error pages and url paths.
@Override
public void registerErrorPages(ErrorPageRegistry registry) {
    ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/error401");
    ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/error404");
    ErrorPage error412Page = new ErrorPage(SignatureVerifyException.class, "/error403");
    ErrorPage error500Page = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error");

    registry.addErrorPages(error401Page, error404Page, error412Page, error500Page);
}

}`
when i access tracer in ErrorPage controller
private String getTraceId() { final Tracer tracer =
this.tracer.getIfAvailable(); if (tracer != null) { return
tracer.currentSpan().context().traceIdString(); } return null; }
tracer.currentSpan().context() is null
with: spring-cloud-sleuth-core:2.0.0.M9
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/spring-cloud/spring-cloud-sleuth/issues/948, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD617-qeDy3-K49VhYvTbjXOFMSFrT9ks5tppNogaJpZM4TZRYk
.

the unsuccessful request maybe redirect to error page, i think new scope should be created.
spring-cloud-sleuth-core:2.0.0.M8 works fine. Since TraceHandlerInterceptor will create a scope for it:
	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
			Object handler) throws Exception {
		String spanName = spanName(handler);
		boolean continueSpan = getRootSpanFromAttribute(request) != null;
		Span span = continueSpan ? getRootSpanFromAttribute(request) :
				httpTracing().tracing().tracer().nextSpan().name(spanName).start();
		try (Tracer.SpanInScope ws = httpTracing().tracing().tracer().withSpanInScope(span)) {
			if (log.isDebugEnabled()) {
				log.debug("Handling span " + span);
			}
			addClassMethodTag(handler, span);
			addClassNameTag(handler, span);
			setSpanInAttribute(request, span);
			if (!continueSpan) {
				setNewSpanCreatedAttribute(request, span);
			}
		}
		return true;
	}

but M9 no module will do this work.
Thanks for your great works. Best regards!

This bug should probably be marked with milestone RC2 since it was fixed by https://github.com/spring-cloud/spring-cloud-sleuth/pull/962

authors: adriancole goober yungoo


text:
React to consumer rebalance

From @janoskranczler on June 28, 2017 12:14
Hi guys,
Is there any way I can react on a consumer rebalance (Kafka), if autoRebalanceEnabled is set to false? In Kafka client there is ConsumerRebalanceListener, but how can I listen on rebalance in SCS?
(And if I can, what is the simplest way to determine the partition count before and after the rebalance?)
Copied from original issue: spring-cloud/spring-cloud-stream#1004

Hi @janoskranczler ,
For tracking this better, please create Kafka binder related issues here: https://github.com/spring-cloud/spring-cloud-stream-binder-kafka
I will move this now.

@janoskranczler,
Configuring ConsumerRebalanceListener feature has been added in spring-kafka 2.0.0.M1: https://github.com/spring-projects/spring-kafka/commit/e857c248eb88116bfd28ccf05671e5be13741f96 .
I think the Kafka binder can make use of this feature by setting the user provided ConsumerRebalanceListener to KafkaMessageListenerContainer once we update to spring-kafka 2.x.

Thanks, for your answer. Yes, it is a Kafka related question, sorry.

@janoskranczler No problem at all; thank you for the suggestion! If you would like to contribute this feature as a PR (once spring-kafka 2.x is updated), that would be great!

Is there still interest in a PR for this? I'd like to do it but might need some pointers.

@neilg Sure, if the user provided ConsumerRebalanceListener needs to be used, binder changes are required. Feel free to send a PR and we can review it. This is the main class for the Kafka biner implementation: https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/blob/master/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java

Apologies if this is answered elsewhere, or if there's a more appropriate place to ask. Are there some IDE settings I can import for code style, etc? I'm using IntelliJ.

This commit introduced the ability for apps to provide custom rebalance listener. Closing the issue.

authors: ilayaperumalg janoskranczler neilg sobychacko


text:
Serde inference issues with multiple functions

In Kafka Streams binder, when there are multiple functions present with different outbound target types, there is an issue of one function overriding the target type of a previous function. This causes Serde interference when the binder tries to infer the Serde.
See this StackOverflow issue for more details.

This issue is fixed now. See the commit referenced above.


text:
Spring cloud reactive steam's (SCF) Processor is not working with ParallelFlux and Schedulers

In our reactive stream Processor app, when we try parallel processing with Schedulers. The Flux gets stuck after some seconds.
Whereas the parallel processing with Schedulers works fine in Source and Sink apps.
Could you please check on this. Here is the sample code
@SpringBootApplication
@EnableBinding(Processor.class)
public class ParallelProcessorApplication {

    public static void main(String[] args) {
        SpringApplication.run(ParallelProcessorApplication.class,
                "--spring.cloud.stream.function.definition=process");
    }

    @Bean
    public Function<Flux<Long>, ParallelFlux<Long>> process() {
        return longFlux ->
                longFlux.parallel(4)
                        .runOn(Schedulers.elastic())
                        .doOnNext(i -> System.out.println(Thread.currentThread().getName() + " -> " + i));
    }

}

Here is the working code from the Source application. In source application, it works as expected.
@SpringBootApplication
@EnableBinding(Source.class)
public class ParallelSourceApplication {

    public static void main(String[] args) {
        SpringApplication.run(ParallelSourceApplication.class,
                "--spring.cloud.stream.function.definition=emit");
    }

    @Bean
    public Supplier<ParallelFlux<Long>> emit() {
        return () -> Flux.interval(Duration.ofMillis(1))
                         .parallel(4)
                         .runOn(Schedulers.parallel())
                         .doOnNext(i -> System.out.println(Thread.currentThread().getName() + " -> " + i));
    }

}

@olegz
If require more details, will push my sample projects to gitHub. Thank you in advance!
P.S
There is another issue with Processor and Sink apps. If I chose Schedulers.parallel() instead of Schedulers.elastic(). Then parallel processing not works. It does not spawn multiple threads. Whereas the same works fine with Source app fine. Kindly check below processor code for this issue:
The sample code is here
@Bean
    public Function<Flux<Long>, ParallelFlux<Long>> process() {
        return longFlux ->
                longFlux.parallel(4)
                        .runOn(Schedulers.parallel())
                        .doOnNext(i -> System.out.println(Thread.currentThread().getName() + " -> " + i));
    }

In the ouput logs, you can see only parallel-1 for all the emitted elements. Whereas the expected behavior is. I should see parallel-1 parallel-2 parallel-3 parallel-4 etc.
parallel-1 -> 1
2019-04-23 16:00:39.261  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(1)
parallel-1 -> 2
2019-04-23 16:00:39.263  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(2)
parallel-1 -> 3
2019-04-23 16:00:39.272  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(3)
parallel-1 -> 4
2019-04-23 16:00:39.286  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(4)
parallel-1 -> 5
2019-04-23 16:00:39.308  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(5)
parallel-1 -> 6
2019-04-23 16:00:39.320  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(6)
parallel-1 -> 7
2019-04-23 16:00:39.336  INFO 32457 --- [     parallel-1] reactor.Flux.ConcatMap.1                 : onNext(7)
parallel-1 -> 8

I think both issue are related. Kindly do let us know If different issue needed for the same. Thank you!

So, I am not sure at the moment that using ParallelFlux in the context of spring-cloud-stream handler is a good idea. Let me explain:
While we provide a support for reactive abstractions  we internally create a delegation model from MessageListener to reactive listener. Which means in the end you are still at the mercy of MessageListening Container, task executor and so on.
So if you do want to parallelise i would simply increase concurrency settings on consumer binding spring.cloud.stream.bindings.input.consumer.concurrency=3, otherwise there could be unintended consequences and potential loss of messages

@olegz Thanks for letting us know the internal handling details. Still, it would be better to handle this hanging error in some ways. In this case, we should through some exceptions back to the message handler/processor. So that user can be aware of the root cause for the hang/stuck after processing a few messages.
Nevertheless, as you suggested, will give a try parallelizing by the below config. Thanks for the suggestion!

spring.cloud.stream.bindings.input.consumer.concurrency=3

In case, if ParallelFlux is not supported or not a good idea. Still, as a user, I would like to use ParallelFlux for internal business logic for some intensive method. And while returning to the MessageListener,  I can covert parallelFlux to the sequential Flux like parallelFlux.sequential().
In this case, below code should work but this also hangs in between...
For example:
@Bean
    public Function<Flux<Long>, Flux<Long>> process() {
        return longFlux ->
                longFlux.parallel(4)
                        .runOn(Schedulers.parallel())
                        .doOnNext(i -> System.out.println(Thread.currentThread().getName() + " -> " + i))
                        .doOnNext(i -> someIntensiveOperation())
                        .sequential();
    }

Could you please check if it makes a sense. Your thoughts on this. Thank you very much!

@olegz I am doing some intensive regex matches on the large collection/flux internally. Hence this bug fix is immensely important for us. Could you please check on this.
It's totally OK if not works on the message-handler level. But at least it should allow using in any of the methods for some business logic internally. Your thoughts on this. Thank you in advance!

@msshitole  We won't be documenting it for reactive module as we are fading it away in favor of spring-cloud-function native flux support and at some point in the near future we'll write a section about what you should expect when using flux with non-reactive binders such as Rabbit and Kafka as well as what one should and should not do .
Feel free to raise another issue for documentation around usage of flux and its implications, but there is nothing we can/should do here and I think I've already explained that parallelisation in your case would cause more complexity.

authors: msshitole olegz

repo: spring-cloud/spring-cloud-stream


text:
[Alternative to #687]Add the package of Schema to the EntityPackageScanner

Fixes #686

LGTM, merging.

Squashed, rebased and merged as 6c9976b

authors: ilayaperumalg mbogoevici


text:
Nav attributes

Add a nav attributes extension so that we can attach additional data to the nav tree.
This PR also includes a couple of additional commits that could be cherry-picked to main.

It turns out there's an existing Antora issue for this. We think we should put this PR on hold until there's clarity around that. If we can align on the nav item attribute names it will make future upgrade easier.

We're going to go another way and try to create an extension that will allow us to use roles from the nav adoc files.

repo: spring-io/antora-extensions


text:
Update TeamService.java

Two lines are duplicated

@Zmorn Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@Zmorn Thank you for signing the Contributor License Agreement!

authors: Zmorn pivotal-issuemaster

repo: spring-io/sagan


text:
Add env configuration git repo for config server

add GIT_REPO env for setup for other git repo

Hi @yanickxia. Thank you for your contribution.
Could you explain us what is the usage of your change? To uses your own config repository?

No news since 2 years. I will close this PR. Feel free to repon.

authors: arey yanickxia


text:
support for docker and podman build on mac silicon

This makes it possible to run the container builds on MacOS with silicon chips as well as other platforms that have either podman or docker installed.
To use:
unchanged: ./mvnw clean install -PbuildDocker
or if you prefer podman:
./mvnw clean install -PbuildDocker -Dcontainer.executable=podman

#180

Thank you for your contribution René

Hi @zubcevic
I recovered these changes. Building docker image on my Intel Macbook and Docker Machine is working.
But I've got the follwing error while starting the discovery-server
arey:~$docker-compose up
grafana-server is up-to-date
prometheus-server is up-to-date
config-server is up-to-date
tracing-server is up-to-date
Starting discovery-server ... error

ERROR: for discovery-server  Cannot start service discovery-server: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./dockerize": stat ./dockerize: no such file or directory: unknown

Do you have any idea?

Fixed by https://github.com/spring-petclinic/spring-petclinic-microservices/pull/246

authors: arey zubcevic


text:
Automatic generation of controller tags

Similar to the issue discussed here: https://github.com/springfox/springfox/issues/1257
The generated spec has a tag element that is generated based on the controller name:
MetaController becomes meta-controller with a description of "Meta Controller"
For example:
swagger: "2.0",
info: {..},
basePath: "/",
**tags: [{
name: "meta-controller",
description: "Meta Controller"
}],**
paths: {...}

I'd like to stop that auto-generation or at least create an overide with a plugin but I was hoping you could give some guidance. I tried using the OperationBuilderPlugin but the only tags I could access were the operation tags and not the api level tags.
Any help would be greatly appreciated! Thanks for your great work!

@ejgreenwald You can annotate your controller with @ApiController(tag= {'Custom Tag'}) to override

@dilipkrish thanks so much for your fast reply. I don't have the @ApicCntroller tag, i jist have @Api and then i can manually configure the tag name. Id like to remove the tag completely though.

Sorry My bad.. It is the Api annotation.

@dilipkrish but is there a way to get rid of the auto generated tag? Plugin? If i leave tags empty or set tag to "" it still generates a tag. My methods have tags and the spec would be totally fine without the auto generated controller tags. Thanks!

Yes there is, don't annotate your classes, and you could create an OperationBuilderPlugin that updates the tags yourself.
See here for an example
https://github.com/springfox/springfox/blob/11c3f2254d20a050964465262523c62747f589f0/springfox-swagger-common/src/main/java/springfox/documentation/swagger/readers/operation/SwaggerOperationTagsReader.java#L54-L62

@dilipkrish I'm sorry to keep bothering you but i tried creating an operationbuilderplugin and i gave it the right order but it looks like the controller tags are already there in the context and I don't see a way to get rid of them.

Make sure your plugin order is set and it loads before the swaggeroperationsreader plugin has had a chance to run

@dilipkrish I think the problem is not just about operation tags. it is about global tags of each docket, which means that tags parsed from the controller simple class name are always displayed in global tags array of generated swagger file even we do override operation tags like SwaggerOperationTagsReader.
@ejgreenwald I make a workaround of this problem and I hope it would be a little helpful if you have the similar scenarios.
scenario 1
@Api(tags="Inventory")
public class Foo {
    @ApiOperation(tags="Analysis")
    @RequestMapping(...)
    public String bar (...) { ... }
}

if you don't want Inventory or foo shown, only you need to do is to make Api level tags same as Operation level tags, here, @Api(tags="Analysis").
scenario 2
@Api(tags={"Analysis", "Other"})
public class Foo {
    @ApiOperation(tags="Analysis")
    @RequestMapping(...)
    public String bar (...) { ... }

    @ApiOperation(tags="Other")
    @RequestMapping(...)
    public String buzz (...) { ... }
}

if you have multiple tags in one controller, do the same as above.
And then write a plugin to handle
@Component
@Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER + 1) // lower priority than SwaggerOperationTagsReader
public class DisableAutoGeneratedTagsPlugin implements OperationBuilderPlugin {
    ...
    @Override
    public void apply(OperationContext context) {
        Set<String> tasgOnController = controllerTags(context);
        boolean multipleTagsAtOneController = tasgOnController.size() > 1;

        if(multipleTagsAtOneController) {
            context.operationBuilder().tags(operationTags(context)); // replace controller tags with operation tags for redundant Api level tags declaration.
        } else {
            context.operationBuilder().tags(tagsOnController); // handle only one tag in @Api, that means all operations in this @Api are the same tags.
        }
    }
}

@dilipkrish I don't know why you think the custom tag plugin should load before. But in my point of view, the custom tag plugin should have lower priority than SwaggerOperationTagsReader and then it is able to override SwaggerOperationTagsReader's  behaviour.

@qianyan thanks for your workaround. Unfortunately it's not working for me. My goal is to not have the description autogenerated for the controller tags - I'm getting the name of the controller as the description. Trying your workaround didn't stop that...

@ejgreenwald did you have configured global tags as below:
@Bean
....
Docket docket = new Docket(DocumentationType.SWAGGER_2)
     .apiInfo(apiInfo)
     .tags(new Tag("Analysis", "analysis description"))
...

this can override autogenerated description of Controller while you tagged it as Analysis.

@qianyan

I don't know why you think the custom tag plugin should load before.

You're right. It can load afterwards since tags does an update/replace.
https://github.com/springfox/springfox/blob/6b9cdd361fd44a3dc87fb080a792e988217ce4f9/springfox-core/src/main/java/springfox/documentation/builders/OperationBuilder.java#L246-L255

Thats awesome @ejgreenwald. Thanks for reporting back! Closing as answered

authors: dilipkrish ejgreenwald qianyan

repo: springfox/springfox


text:
Typo in create_load_balancer_listeners for ELB client

It seems that here:
https://github.com/spulec/moto/blob/074ff68bf12f4ea9efd4a80de7ef84dedcd3e380/moto/elb/models.py#L271
sslcertificate_id should be ssl_certificate_id
or am I missing something perhaps?

Yup, a typo. Thanks!

authors: spulec sterago

repo: spulec/moto


text:
Moto breaking on travis

  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/moto/__init__.py", line 9, in <module>
    from .autoscaling import mock_autoscaling  # flake8: noqa
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/moto/autoscaling/__init__.py", line 2, in <module>
    from .models import autoscaling_backends
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/moto/autoscaling/models.py", line 2, in <module>
    from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/boto/__init__.py", line 1216, in <module>
    boto.plugin.load_plugins(config)
AttributeError: module 'boto' has no attribute 'plugin'

Ideas?

What version of boto or moto are you running?

@esc Can you link to the failing Travis build?

It's a private build and I don't have the issue when using sudoe: false.

authors: JackDanger esc spulec


text:
Error occured while using Inspect current object(Ctrl+I) on Editor but works fine on console

Description
What steps will reproduce the problem?

When pressed (Ctrl+I) on any object in the editor gives following error :

- Message window title: Help

- Message Content :
    The following error occured when calling Sphinx 2.2.0
    Incompatible Sphinx version or doc string decoding failed

    Error message:
    Paths don't have the same drive

Traceback
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 858, in toggle_plain_text
    self.force_refresh()
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 765, in force_refresh
    self.set_object_text(None, force_refresh=True)
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 780, in set_object_text
    found = self.show_help(text, ignore_unknown=ignore_unknown)
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 994, in show_help
    self.set_plain_text(hlp_text, is_code=is_code)
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 689, in set_plain_text
    self.plain_text.set_text(full_text, is_code)
  File "F:\ANACONDA3\lib\site-packages\spyder\plugins\help.py", line 247, in set_text
    self.editor.set_text(text)
  File "F:\ANACONDA3\lib\site-packages\spyder\widgets\sourcecode\codeeditor.py", line 1595, in set_text
    self.setPlainText(text)
TypeError: setPlainText(self, str): argument 1 has unexpected type 'bool'

Versions

Spyder version: 3.3.6
Python version: 3.7.4
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies
pyflakes >=0.6.0  :  2.1.1 (OK)
pycodestyle >=2.3 :  2.5.0 (OK)
pygments >=2.0    :  2.4.2 (OK)
sphinx >=0.6.6    :  2.2.0 (OK)
rope >=0.9.4      :  0.14.0 (OK)
jedi >=0.9.0      :  0.15.1 (OK)
nbconvert >=4.0   :  5.6.0 (OK)
pandas >=0.13.1   :  0.25.1 (OK)
numpy >=1.7       :  1.16.5 (OK)
sympy >=0.7.3     :  1.4 (OK)
cython >=0.21     :  0.29.13 (OK)
qtconsole >=4.2.0 :  4.5.5 (OK)
IPython >=4.0     :  7.8.0 (OK)
matplotlib >=2.0.0:  3.1.1 (OK)
pylint >=0.25     :  2.4.2 (OK)

Message window title: Help

Message Content :
The following error occured when calling Sphinx 2.2.0
Incompatible Sphinx version or doc string decoding failed
Error message:
Paths don't have the same drive

Unfortunately Spyder 3 is no longer maintained. So you need to update to 4.0.1, where this error is no longer present.
I understand if you don't want to update, but if that's your decision, please don't report this error.

repo: spyder-ide/spyder


text:
Process lingers after restarting kernel when running different interpreter and Qt5 backend

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[x] Could not reproduce inside jupyter qtconsole (if console-related)
[x] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[x] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
When closing the console using the cross on the tab (ctrl-dot often does not work), the python process is not killed, but lingers around, until Spyder gets restarted. This issue only occurs when you use the Qt5 graphics backend and choose a different interpreter from the default Spyder one.
Both by setting the graphics interpreter to inline or installing Spyder in the same environment will alleviate the problem (but is not a solution).
This could (for instance) result into issues when hardware connections are made, as the addresses are not freed up, and reconnection is not possible until Spyder is restarted.
What steps reproduce the problem?

Set Qt5 graphics backend in Spyder.
Start a kernel in a non-default interpreter (different conda env).
Restart kernel by clicking the cross.

What is the expected output? What do you see instead?
Expected: underlying python thread is killed.
Instead: it stays alive
A way to visualise this, would be to initiate a Tk window. You'll see it stays alive after restarting the kernel. NOTE: this is NOT a prerequisite to have the issue occur, just a way to illustrate it.
Paste Traceback/Error Below (if applicable)
None
Versions

Spyder version: 5.2.0 (confirmed issue is also there in 5.1.5)

Tried both the standalone version and the conda version. No difference.

Python version: 3.9.7
Operating System name/version: Windows 10

Hi @NicoHendrickx,
Thanks for reporting, can you explain to me what do you mean by "restart the kernel by clicking the cross"? The cross in the tab of the console will close it, but it won't restart it.

I closed in a bit on the issue. It's the combination of the non-default interpreter and the Qt5 graphics backend! When setting the inline graphics backend, this issue does not arise. Would that give a hint as to where the issue might arise?

@impact27, do you know why this is hapenning?

That is strange, the kernel should be killed after 10 seconds if I am not mistaken. How do you start the kernel exactly?

@impact27 Thanks for taking a look at this.
So, what I do is the following:

Create fresh environment running python 3.9.7 and spyder-kernels, let's call it test
Install pyqt5 in this environment.
Run Spyder (5.2.0, but tried also 5.1.5) in either a different env, or standalone
Select test python as interpreter in Spyder.
Set graphics backend to Qt5
Just to show the issue: start a tk window (the real issue I have is with hardware connections not freeing up)
Close the terminal by clicking the cross on the tab.
A new kernel will spawn automatically.
Old process will stay alive, as can be seen by the presence of the tk window.

Now, when I try this by installing Spyder in the test environment, the issue does not show up, but I would prefer to keep Spyder separated (to avoid pyqt5 version collisions).
Note, I also tried restarting using ctrl+. but this often does not work at all. Just shows Traceback (most recent call last):.

Hey @NicoHendrickx, thanks a lot for the detailed steps you posted above! With them I was able to reproduce this problem (it seems it only happens on Windows though) and find a solution for it, which will be in our next version.


text:
Spyder 6.0a1 - Pandas error crashes console

Hi - quick bug.  It seems like when you get a pandas error, like this one, it kills the Spyder iPython console:

Here is a reproducible example.
import pandas as pd

data = range(5)
index = range(3)
cols = range(4)

df = pd.DataFrame(data = data, columns = cols, index = index)

Hey @mg3146, thanks for reporting. Are you getting these errors when using Spyder 5?

I can't even get Spyder 5 to launch anymore, so I've just been using 6.  This wasn't a problem for me in Spyder 5 though when I was using it.     Are you not able to reproduce?

maybe its something to do with this corrupted environment of mine that's causing issues with Spyder 5.  When I try to launch Spyder 5 from the anaconda powershell prompt I get the following traceback before it crashes:

If you have Spyder 5 and 6 in the same env, I think that should be the cause. Please create a new env for Spyder 6 and report back if you're still having this problem.

Took a look into that.  Spyder 6 I used your standalone installer.  For the console, I had originally been using an environment that Spyder 5 installed in it (via conda install spyder).  I created a new environment without Spyder 5 installed, and I'm still getting the same crash / bug.
Here is a conda list of the environment I'm using for the console.
aiofiles                  22.1.0           py39haa95532_0
aiohttp                   3.8.4                    pypi_0    pypi
aiosignal                 1.2.0              pyhd3eb1b0_0
aiosqlite                 0.18.0           py39haa95532_0
anyio                     3.5.0            py39haa95532_0
appdirs                   1.4.4              pyhd3eb1b0_0
argon2-cffi               21.3.0             pyhd3eb1b0_0
argon2-cffi-bindings      21.2.0           py39h2bbff1b_0
arrow                     1.2.3                    pypi_0    pypi
astroid                   2.14.2           py39haa95532_0
asttokens                 2.0.5              pyhd3eb1b0_0
async-timeout             4.0.2            py39haa95532_0
attrs                     23.1.0                   pypi_0    pypi
autopep8                  1.6.0              pyhd3eb1b0_1
babel                     2.11.0           py39haa95532_0
backcall                  0.2.0              pyhd3eb1b0_0
bcrypt                    3.2.0            py39h2bbff1b_1
beanie                    1.18.0                   pypi_0    pypi
beautifulsoup4            4.12.0           py39haa95532_0
bidict                    0.21.2             pyhd3eb1b0_0
black                     23.3.0           py39haa95532_0
blas                      1.0                         mkl
bleach                    4.1.0              pyhd3eb1b0_0
blpapi                    3.19.3                   pypi_0    pypi
boost-cpp                 1.73.0              h2bbff1b_12
boto3                     1.26.137                 pypi_0    pypi
botocore                  1.29.137                 pypi_0    pypi
bottleneck                1.3.5            py39h080aedc_0
brotli                    1.0.9                h2bbff1b_7
brotli-bin                1.0.9                h2bbff1b_7
brotlipy                  0.7.0           py39h2bbff1b_1003
bs4                       4.12.0           py38hd3eb1b0_0
ca-certificates           2023.05.30           haa95532_0
cachetools                5.3.0                    pypi_0    pypi
cairo                     1.16.0               haedb8bc_5
certifi                   2023.5.7         py39haa95532_0
cffi                      1.15.1           py39h2bbff1b_3
charset-normalizer        3.1.0                    pypi_0    pypi
click                     8.1.3                    pypi_0    pypi
cloudpickle               2.2.1            py39haa95532_0
colorama                  0.4.6            py39haa95532_0
comm                      0.1.2            py39haa95532_0
contourpy                 1.0.7                    pypi_0    pypi
convertdate               2.3.2              pyhd3eb1b0_0
cryptography              41.0.1                   pypi_0    pypi
cycler                    0.11.0             pyhd3eb1b0_0
debugpy                   1.5.1            py39hd77b12b_0
decorator                 5.1.1              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd3eb1b0_0
dill                      0.3.6            py39haa95532_0
docstring-to-markdown     0.11             py39haa95532_0
docutils                  0.18.1           py39haa95532_3
entrypoints               0.4              py39haa95532_0
exceptiongroup            1.1.1                    pypi_0    pypi
executing                 0.8.3              pyhd3eb1b0_0
expat                     2.4.9                h6c2663c_0
flake8                    6.0.0            py39haa95532_0
font-ttf-dejavu-sans-mono 2.37                 hd3eb1b0_0
font-ttf-inconsolata      2.001                hcb22688_0
font-ttf-source-code-pro  2.030                hd3eb1b0_0
font-ttf-ubuntu           0.83                 h8b1ccd4_0
fontconfig                2.14.1               h9c4af85_2
fonts-anaconda            1                    h8fa9717_0
fonts-conda-ecosystem     1                    hd3eb1b0_0
fonttools                 4.25.0             pyhd3eb1b0_0
fqdn                      1.5.1                    pypi_0    pypi
freetype                  2.12.1               ha860e81_0
fribidi                   1.0.10               h62dcd97_0
frozenlist                1.3.3            py39h2bbff1b_0
getopt-win32              0.1                  h2bbff1b_0
giflib                    5.2.1                h8cc25b3_3
gitdb                     4.0.7              pyhd3eb1b0_0
gitpython                 3.1.30           py39haa95532_0
glib                      2.69.1               h5dc1a3c_2
gprof2dot                 2022.7.29                pypi_0    pypi
graphite2                 1.3.14               hd77b12b_1
graphviz                  2.50.0               h7eca76f_1
greenlet                  2.0.1            py39hd77b12b_0
grpcio                    1.53.0                   pypi_0    pypi
gst-plugins-base          1.18.5               h9e645db_0
gstreamer                 1.18.5               hd78058f_0
gts                       0.7.6                h63ab5a1_3
harfbuzz                  4.3.0                hb646838_1
hijri-converter           2.2.2              pyhd3eb1b0_0
holidays                  0.18             py39haa95532_0
icc_rt                    2022.1.0             h6049295_2
icu                       58.2                 ha925a31_3
idna                      3.4              py39haa95532_0
importlib-metadata        6.0.0            py39haa95532_0
importlib_metadata        6.0.0                hd3eb1b0_0
importlib_resources       5.2.0              pyhd3eb1b0_1
iniconfig                 2.0.0                    pypi_0    pypi
intel-openmp              2021.4.0          haa95532_3556
ipykernel                 6.19.2           py39hd4e2768_0
ipynb-py-convert          0.4.6              pyh9f0ad1d_0    conda-forge
ipython                   8.14.0                   pypi_0    pypi
ipython_genutils          0.2.0              pyhd3eb1b0_1
ipywidgets                8.0.4            py39haa95532_0
isoduration               20.11.0                  pypi_0    pypi
isort                     5.9.3              pyhd3eb1b0_0
jedi                      0.18.1           py39haa95532_1
jinja2                    3.1.2            py39haa95532_0
jmespath                  0.10.0             pyhd3eb1b0_0
jpeg                      9e                   h2bbff1b_1
json5                     0.9.6              pyhd3eb1b0_0
jsonpointer               2.4                      pypi_0    pypi
jsonschema                4.18.2                   pypi_0    pypi
jsonschema-specifications 2023.6.1                 pypi_0    pypi
jupyter                   1.0.0            py39haa95532_8
jupyter_client            8.1.0            py39haa95532_0
jupyter_console           6.6.3            py39haa95532_0
jupyter_core              5.3.0            py39haa95532_0
jupyter_events            0.6.3            py39haa95532_0
jupyter_server            2.5.0            py39haa95532_0
jupyter_server_fileid     0.9.0            py39haa95532_0
jupyter_server_terminals  0.4.4            py39haa95532_1
jupyter_server_ydoc       0.8.0            py39haa95532_1
jupyter_ydoc              0.2.4            py39haa95532_0
jupyterlab                3.6.3            py39haa95532_0
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_server         2.22.0           py39haa95532_0
jupyterlab_widgets        3.0.5            py39haa95532_0
kaleido                   0.2.1                    pypi_0    pypi
kiwisolver                1.4.4            py39hd77b12b_0
korean_lunar_calendar     0.2.1              pyhd3eb1b0_0
krb5                      1.19.4               h5b6d351_0
lazy-model                0.0.5                    pypi_0    pypi
lazy-object-proxy         1.6.0            py39h2bbff1b_0
lcms2                     2.12                 h83e58a3_0
lerc                      3.0                  hd77b12b_0
libboost                  1.73.0              h6c2663c_12
libbrotlicommon           1.0.9                h2bbff1b_7
libbrotlidec              1.0.9                h2bbff1b_7
libbrotlienc              1.0.9                h2bbff1b_7
libclang                  14.0.6          default_hb5a9fac_1
libclang13                14.0.6          default_h8e68704_1
libcurl                   8.1.1                h86230a5_1
libdeflate                1.17                 h2bbff1b_0
libffi                    3.4.4                hd77b12b_0
libgd                     2.3.3                hd77b12b_2
libiconv                  1.16                 h2bbff1b_2
libogg                    1.3.5                h2bbff1b_1
libpng                    1.6.39               h8cc25b3_0
libsodium                 1.0.18               h62dcd97_0
libssh2                   1.10.0               hcd4344a_2
libtiff                   4.5.0                h6c2663c_2
libvorbis                 1.3.7                he774522_0
libwebp                   1.2.4                hbc33d0d_1
libwebp-base              1.2.4                h2bbff1b_1
libxml2                   2.10.3               h0ad7f3c_0
libxslt                   1.1.37               h2bbff1b_0
lxml                      4.9.2            py39h2bbff1b_0
lz4-c                     1.9.4                h2bbff1b_0
mako                      1.2.3            py39haa95532_0
markupsafe                2.1.1            py39h2bbff1b_0
matplotlib                3.7.1            py39haa95532_1
matplotlib-base           3.7.1            py39hf11a4ad_1
matplotlib-inline         0.1.6            py39haa95532_0
mccabe                    0.7.0              pyhd3eb1b0_0
mistune                   0.8.4           py39h2bbff1b_1000
mkl                       2021.4.0           haa95532_640
mkl-service               2.4.0            py39h2bbff1b_0
mkl_fft                   1.3.1            py39h277e83a_0
mkl_random                1.2.2            py39hf11a4ad_0
motor                     3.1.2                    pypi_0    pypi
multidict                 6.0.2            py39h2bbff1b_0
munkres                   1.1.4                      py_0
mypy_extensions           0.4.3            py39haa95532_1
nbclassic                 0.5.5            py39haa95532_0
nbclient                  0.5.13           py39haa95532_0
nbconvert                 6.5.4            py39haa95532_0
nbformat                  5.7.0            py39haa95532_0
nest-asyncio              1.5.6            py39haa95532_0
networkx                  2.8.4            py39haa95532_1
notebook                  6.5.3            py39haa95532_0
notebook-shim             0.2.2            py39haa95532_0
numexpr                   2.8.4            py39h5b0cc5e_0
numpy                     1.23.5           py39h3b20f71_0
numpy-base                1.23.5           py39h4da318b_0
openai                    0.27.4                   pypi_0    pypi
openjpeg                  2.4.0                h4fc8c34_0
openssl                   1.1.1u               h2bbff1b_0
packaging                 23.0             py39haa95532_0
pandas                    1.5.3            py39hf11a4ad_0
pandocfilters             1.5.0              pyhd3eb1b0_0
pango                     1.50.7               h78c2152_0
paramiko                  2.11.0                   pypi_0    pypi
parso                     0.8.3              pyhd3eb1b0_0
pathspec                  0.10.3           py39haa95532_0
pcre                      8.45                 hd77b12b_0
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    9.4.0            py39hd77b12b_0
pip                       23.1.2           py39haa95532_0
pixman                    0.40.0               h2bbff1b_1
platformdirs              2.5.2            py39haa95532_0
pluggy                    1.0.0            py39haa95532_1
ply                       3.11             py39haa95532_0
pooch                     1.4.0              pyhd3eb1b0_0
poppler                   22.12.0              h268424c_0
poppler-data              0.4.11               haa95532_1
powershell_shortcut       0.0.1                         3
prometheus_client         0.14.1           py39haa95532_0
prompt-toolkit            3.0.36           py39haa95532_0
prompt_toolkit            3.0.36               hd3eb1b0_0
protobuf                  4.22.1                   pypi_0    pypi
psutil                    5.9.0            py39h2bbff1b_0
pure_eval                 0.2.2              pyhd3eb1b0_0
pycodestyle               2.10.0           py39haa95532_0
pycountry                 22.3.5                   pypi_0    pypi
pycparser                 2.21               pyhd3eb1b0_0
pydantic                  1.10.7                   pypi_0    pypi
pydocstyle                6.3.0            py39haa95532_0
pydot                     1.4.1            py39haa95532_0
pyflakes                  3.0.1            py39haa95532_0
pygments                  2.15.1           py39haa95532_1
pylint                    2.16.2           py39haa95532_0
pymeeus                   0.5.11             pyhd3eb1b0_1
pynacl                    1.5.0            py39h8cc25b3_0
pyopenssl                 23.0.0           py39haa95532_0
pyparsing                 3.0.9            py39haa95532_0
pyqt                      5.15.7           py39hd77b12b_0
pyqt5-sip                 12.11.0          py39hd77b12b_0
pyrsistent                0.18.0           py39h196d8e1_0
pysftp                    0.2.9              pyhd3eb1b0_1
pyside6                   6.5.0                    pypi_0    pypi
pyside6-addons            6.5.0                    pypi_0    pypi
pyside6-essentials        6.5.0                    pypi_0    pypi
pysocks                   1.7.1            py39haa95532_0
pytest                    7.2.2                    pypi_0    pypi
python                    3.9.16               h6244533_2
python-dateutil           2.8.2              pyhd3eb1b0_0
python-fastjsonschema     2.16.2           py39haa95532_0
python-json-logger        2.0.7            py39haa95532_0
python-lsp-black          1.2.1            py39haa95532_0
python-lsp-jsonrpc        1.0.0              pyhd3eb1b0_0
python-lsp-server         1.7.1            py39haa95532_0
pytoolconfig              1.2.5            py39haa95532_1
pytz                      2022.7           py39haa95532_0
pywin32                   305              py39h2bbff1b_0
pywinpty                  2.0.10           py39h5da7b33_0
pyxll                     5.6.4                    pypi_0    pypi
pyxll-jupyter             0.4.1                    pypi_0    pypi
pyyaml                    6.0              py39h2bbff1b_1
pyzmq                     25.1.0           py39hd77b12b_0
qt-main                   5.15.2               he8e5bd7_8
qt-webengine              5.15.9               hb9a9bb5_5
qtconsole                 5.4.2            py39haa95532_0
qtpy                      2.2.0            py39haa95532_0
qtwebkit                  5.212                h2bbfb41_5
referencing               0.29.1                   pypi_0    pypi
requests                  2.29.0           py39haa95532_0
rfc3339-validator         0.1.4            py39haa95532_0
rfc3986-validator         0.1.1            py39haa95532_0
rope                      1.7.0            py39haa95532_0
rpds-py                   0.8.10                   pypi_0    pypi
s3transfer                0.6.0            py39haa95532_0
scipy                     1.10.1           py39h321e85e_0
send2trash                1.8.0              pyhd3eb1b0_1
setuptools                67.8.0           py39haa95532_0
shiboken6                 6.5.0                    pypi_0    pypi
sip                       6.6.2            py39hd77b12b_0
six                       1.16.0             pyhd3eb1b0_1
smmap                     4.0.0              pyhd3eb1b0_0
snakeviz                  2.1.1                    pypi_0    pypi
sniffio                   1.2.0            py39haa95532_1
snowballstemmer           2.2.0              pyhd3eb1b0_0
soupsieve                 2.4              py39haa95532_0
spyder-kernels            3.0.0b1                  pypi_0    pypi
sqlalchemy                1.4.39           py39h2bbff1b_0
sqlite                    3.41.2               h2bbff1b_0
stack_data                0.2.0              pyhd3eb1b0_0
tenacity                  8.0.1            py39haa95532_1
terminado                 0.17.1           py39haa95532_0
texttable                 1.6.4              pyhd3eb1b0_0
tinycss2                  1.2.1            py39haa95532_0
tk                        8.6.12               h2bbff1b_0
toml                      0.10.2             pyhd3eb1b0_0
tomli                     2.0.1            py39haa95532_0
tomlkit                   0.11.1           py39haa95532_0
tornado                   6.2              py39h2bbff1b_0
tqdm                      4.65.0                   pypi_0    pypi
traitlets                 5.7.1            py39haa95532_0
typing-extensions         4.6.3            py39haa95532_0
typing_extensions         4.6.3            py39haa95532_0
tzdata                    2023c                h04d1e81_0
ujson                     5.4.0            py39hd77b12b_0
uri-template              1.3.0                    pypi_0    pypi
urllib3                   1.26.15          py39haa95532_0
vc                        14.2                 h21ff451_1
vf-core                   2.5                      pypi_0    pypi
vs2015_runtime            14.27.29016          h5e58377_2
wcwidth                   0.2.5              pyhd3eb1b0_0
webcolors                 1.13                     pypi_0    pypi
webencodings              0.5.1            py39haa95532_1
websocket-client          0.58.0           py39haa95532_4
whatthepatch              1.0.2            py39haa95532_0
wheel                     0.38.4           py39haa95532_0
widgetsnbextension        4.0.5            py39haa95532_0
win_inet_pton             1.1.0            py39haa95532_0
winpty                    0.4.3                         4
wrapt                     1.14.1           py39h2bbff1b_0
xmltodict                 0.12.0             pyhd3eb1b0_0
xz                        5.4.2                h8cc25b3_0
y-py                      0.5.9            py39hb6bf4ef_0
yaml                      0.2.5                he774522_0
yapf                      0.31.0             pyhd3eb1b0_0
yarl                      1.8.1            py39h2bbff1b_0
ypy-websocket             0.8.2            py39haa95532_0
zeromq                    4.3.4                hd77b12b_0
zipp                      3.11.0           py39haa95532_0
zlib                      1.2.13               h8cc25b3_0
zstd                      1.5.5                hd43e919_0

No worries, I tested on Windows and I was able to reproduce this problem with the code you provided above. We'll try to fix it for alpha2.

@impact27, this is a very serious bug and it doesn't happen on 5.x, which means it should be related to the many changes you did to the way we handle kernels.
Could you take a look at it? Thanks!

This is a tricky one. For some reason inspecting a frame while a pandas object is being created crashes python. This also means that debugging this would crash python. The problem here is that when a traceback is created in Spyder 6, the frames are inspected to provide helpful information about the crash. We could remove this but the underlying issue, which is probably a pandas issue, would still be there.

Can you check if https://github.com/spyder-ide/spyder-kernels/pull/464 fixes this issue?

To reproduce, from a terminal:
% ipython
Python 3.10.8 (main, Oct 13 2022, 09:48:40) [Clang 14.0.0 (clang-1400.0.29.102)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pandas as pd

In [2]: data = range(5)
   ...: index = range(3)
   ...: cols = range(4)

In [3]: %debug pd.DataFrame(data = data, columns = cols, index = index)
NOTE: Enter 'c' at the ipdb>  prompt to continue execution.
> <string>(1)<module>()

ipdb> s
--Call--
> /opt/homebrew/lib/python3.10/site-packages/pandas/core/frame.py(608)__init__()
    606     # Constructors
    607
--> 608     def __init__(
    609         self,
    610         data=None,

ipdb> self.anythingatall
*** RecursionError: maximum recursion depth exceeded while calling a Python object
ipdb>

On macOS, I get a "RecursionError", on windows, python crashes.

Should I open a bug in pandas? It is not clear this is really an issue unless you are debugging, in which cas you are interfering with the program flow. I think we should probably not get the traceback locals as this might get triggered.

Should I open a bug in pandas?

Yeah, please do.

It is not clear this is really an issue unless you are debugging, in which case you are interfering with the program flow. I think we should probably not get the traceback locals as this might get triggered.

I saw that you already did that, but I agree.