text:
Support for dashes in profiles broken

I think this might be related to #384:
I've got an application 'foo' which supports two profiles: 'profile1' and 'pro-file2'.
Configuration is served by a configuration-server (Springboot v2.0.3) but this only works without the dash:

http://localhost:9001/config/foo-default.json (/)
http://localhost:9001/config/foo-profile1.json (/)
http://localhost:9001/config/foo-pro-file2.json (x) serves the same as -default.

I build a demo project which demonstrates the issue:
https://github.com/deveth0/spring-boot-config-dash
Do I miss something here or are dashes in profiles currently a problem?
Thanks

The fix for #384 only ended up adding support for dashes in the application name not the profile name.  So support for dashes in the profile name was never added.  (just to clarify this works fine when fetching the configuration just a problem with the json/yml/properties endpoints)

Thanks for this info, as I really like the option to debug config by direct access to the config-server, I think we'll go for underscores in our profiles.

repo: spring-cloud/spring-cloud-config


text:
Service dynamically determines the profile to use

I have a use case where a service has to dynamically determine the profile to use without having to initiate a new request to the Config Server.
For example, Service A handles requests from both mobile and desktop users. For each http request, if the request is originated from a mobile device, certain configurations will be used (e.g. Mobile profile, serviceA-mobile.yml, key1=abc). For desktop requests,  a different set of values will be used for the same configurations (e.g. Desktop profile, serviceA-desktop.yml, key1=xyz).
How can serviceA dynamically determines the value for "key1" without having to reload any data from the Config. Server?
If I activate both profiles (mobile and desktop) as show below, configurations (e.g. key1) will be consumed from the desktop profile during application startup.
spring.profiles.active=mobile,desktop
Does the Config Server support such functionality?  Is it possible to load both profiles and use expressions to determine which profile to consume?
Thanks!

Config server doesn't have that functionality. Why not have mobile.key1 and desktop.key1?

It doesn't really sound like a config server feature anyway since you are describing features in an application, not the server itself. It's basically a feature switch.  I think you probably have to  either deploy 2 separate apps, or else look at dispatching the requests using content negotiation (or maybe a custom RequestMapping).

I'm going to close this one because it's not really config related. If you are still interested, put a new feature request in Spring Cloud Commons.

@spencergibb It is not just mobile and desktop, there could be more hierarchies to address. Could be something like, level 1 -> level 2 -> level 3 -> level 4
If a property can be found in level 4, return it. If not, check level 3 and return if there is a value and so on which is the way the config client works if multiple profiles are enabled (spring.profiles.active=level1,level2,level3,level4). However, in my case, the order of the hierarchy (active profiles) is dynamically determined and the number of levels involved in the hierarchy is also dynamically determined (based on the http request).
@dsyer I don’t think it is a feature switch as I am not switching between features. I am executing the same feature (same code) but with different configurations.
After looking at the config client code, I can achieve what I described above with some custom coding on top of the config client library.
The Config client builds a collection of MapPropertySource where each MapPropertySource represents an active profile. When calling environment.getProperty(key), the code loops through the collection of MapPropertySource and returns the first value found. I just have to write some code to control the order in which these MapPropertySource are checked. I will try that soon.
Thank you for looking into the question.

source: gharchive/issue

authors: dsyer leb1 spencergibb

license_type: permissive

license_source: bigquery


text:
task 'contracts' is not available in gradle plugin

Describe the bug
contracts task does not seem to exist in org.springframework.cloud.contract:3.1.3 gradle plugin
Sample
This is the full build.gradle

build.gradle - click to expand
plugins {
	id 'org.springframework.boot' version '2.7.0'
	id 'io.spring.dependency-management' version '1.0.11.RELEASE'
	id 'org.springframework.cloud.contract' version '3.1.3'
	id 'java'
}

group = 'com.bwgjoseph'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
}

ext {
	set('springCloudVersion', "2021.0.3")
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testImplementation 'org.springframework.cloud:spring-cloud-starter-contract-verifier'
}

dependencyManagement {
	imports {
		mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
	}
}

tasks.named('contracts') {
	testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
}

tasks.named('contractTest') {
	useJUnitPlatform()
}

tasks.named('test') {
	useJUnitPlatform()
}

Faced with this

I removed the contracts task and ran ./gradlew tasks and I have all these tasks but contracts is definitely not one of them.
Application tasks
-----------------
bootRun - Runs this project as a Spring Boot application.

Build tasks
-----------
assemble - Assembles the outputs of this project.
bootBuildImage - Builds an OCI image of the application using the output of the bootJar task
bootJar - Assembles an executable jar archive containing the main classes and their dependencies.
bootJarMainClassName - Resolves the name of the application's main class for the bootJar task.
bootRunMainClassName - Resolves the name of the application's main class for the bootRun task.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
contractTestClasses - Assembles contract test classes.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code.

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'scc-provider'.
dependencies - Displays all dependencies declared in root project 'scc-provider'.
dependencyInsight - Displays the insight into a specific dependency in root project 'scc-provider'.
dependencyManagement - Displays the dependency management declared in root project 'scc-provider'.
help - Displays a help message.
javaToolchains - Displays the detected java toolchains.
outgoingVariants - Displays the outgoing variants of root project 'scc-provider'.
projects - Displays the sub-projects of root project 'scc-provider'.
properties - Displays the properties of root project 'scc-provider'.
tasks - Displays the tasks runnable from root project 'scc-provider'.

Verification tasks
------------------
check - Runs all checks.
contractTest - Runs the contract tests
copyContracts - Copies contracts to the output folder
generateClientStubs - Generate client stubs from the contracts
generateContractTests - Generate server tests from the contracts
publishStubsToScm - The generated stubs get committed to the SCM repo and pushed to origin
test - Runs the test suite.
verifierStubsJar - Creates the stubs JAR task

Was it removed from the latest plugin? Or did I configure something wrongly?
Thanks!

I'm not a Gradle expert - I didn't know that contracts {} is actually a task, I thought that it's an extension... Anyways, it's still there - https://github.com/spring-cloud/spring-cloud-contract/blob/main/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/main/java/org/springframework/cloud/contract/verifier/plugin/SpringCloudContractVerifierGradlePlugin.java#L94

I'm not an expert by any means, too. If it's there, why would Gradle then complain that it isn't? And even listing the tasks list doesn't show the contracts task

ping @shanman190

So like @marcingrzejszczak mentioned, there hasn't ever been a contracts task. However, there is a contracts extension. It appears that Spring Initializer has a bug specifically with how it's trying to configure the extension and is accidentally using the task configuration instead which isn't valid.
The correct configuration for build.gradle would be:
contracts {
    testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
}

I've filed spring-io/start.spring.io gh-938 to get the issue resolved.

Thanks for the clarification.
Wasn't aware of extensions until now. And that extensions is used to provide input to the tasks.

Also, I re-configured to this and I am able to build now
contracts {
	testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
	failOnNoContracts = false
}

tasks.named('contractTest') {
	useJUnitPlatform()
}

@bwgjoseph, if you feel like we have solved your issue, I think we can close this issue and rely on the linked issue to Spring Initializer.

Yes, sure. Thank you for both your help!

So I am not  generating this locally:
plugins {
  id 'java'
  id 'org.springframework.boot' version '2.7.5'
  id 'io.spring.dependency-management' version '1.0.15.RELEASE'
  id 'org.springframework.cloud.contract' version '3.1.5'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

repositories {
  mavenCentral()
}

ext {
  set('springCloudVersion', "2021.0.5")
}

dependencies {
  implementation 'org.springframework.boot:spring-boot-starter'
  testImplementation 'org.springframework.boot:spring-boot-starter-test'
  testImplementation 'org.springframework.cloud:spring-cloud-starter-contract-verifier'
}

dependencyManagement {
  imports {
    mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  }
}

tasks.named('contractTest') {
  useJUnitPlatform()
}

tasks.named('test') {
  useJUnitPlatform()
}

contracts {
  testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
}

Which fails with
Spring Cloud Contract Verifier Plugin: Falling back to legacy contracts directory in 'test' source set. Please switch to 'contractTest' source set as this will be removed in a future release.

> Task :copyContracts FAILED
Spring Cloud Contract Verifier Plugin: Falling back to legacy contracts directory in 'test' source set. Please switch to 'contractTest' source set as this will be removed in a future release.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':copyContracts'.
> Contracts could not be found: [/Users/snicoll/Downloads/demo-cv2/src/test/resources/contracts]
  Please make sure that the contracts were defined, or set the [failOnNoContracts] flag to [false]

A Maven-based project doesn't fail the same way so I am not keen to proceed. If anyone can help crafting the  correct build definition, that would be helpful. cc @marcingrzejszczak

authors: bwgjoseph marcingrzejszczak shanman190 snicoll

repo: spring-cloud/spring-cloud-contract

license_source: github-api


text:
Custom port not set for modules

When deploying a stream module with a custom --port parameter the CF deployment needs to include this port

See https://github.com/spring-cloud/spring-cloud-stream-modules/issues/106

Changed the description of this issue, as the actual problem is that if one sets a port (via --server.port) if conflicts with the auto-configuration and prevents the app from deploying correctly

authors: ericbottard trisberg


text:
ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information

public class GlobalRequestLogFilter implements GlobalFilter, Ordered {
//	private final WebEndpointProperties endpointProperties;
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
	ServerHttpRequest request = exchange.getRequest();
	// 打印请求路径
	String path = request.getPath().pathWithinApplication().value();

	// 忽略 endpoint 请求

//		String endpointBasePath = endpointProperties.getBasePath();
String endpointBasePath = "";
if (StringUtils.isNotBlank(endpointBasePath) && path.startsWith(endpointBasePath)) {
return chain.filter(exchange);
}
	String requestUrl = RequestProvider.getOriginalRequestUrl(exchange);

	// 构建成一条长 日志，避免并发下日志错乱
	StringBuilder beforeReqLog = new StringBuilder(300);
	// 日志参数
	List<Object> beforeReqArgs = new ArrayList<>();
	beforeReqLog.append("\n\n================ Gateway Request Start  ================\n");
	// 打印路由
	beforeReqLog.append("===> {}: {}\n");
	// 参数
	String requestMethod = request.getMethodValue();
	beforeReqArgs.add(requestMethod);
	beforeReqArgs.add(requestUrl);

	// 打印请求头
	HttpHeaders headers = request.getHeaders();
	headers.forEach((headerName, headerValue) -> {
		beforeReqLog.append("===Headers===  {}: {}\n");
		beforeReqArgs.add(headerName);

//			if (true) {
//				String value = headerValue.get(0);
//
//
//				beforeReqLog.append("===Headers===  {}: {}\n");
//				beforeReqArgs.add(headerName.concat("-original"));
//				beforeReqArgs.add(StringUtils.join(headerValue.toArray()));
//			} else {
//				beforeReqArgs.add(StringUtils.join(headerValue.toArray()));
//			}
beforeReqArgs.add(StringUtils.join(headerValue.toArray()));
});
	beforeReqLog.append("================  Gateway Request End  =================\n");
	// 打印执行时间
	log.info(beforeReqLog.toString(), beforeReqArgs.toArray());
	return chain.filter(exchange);
}

@Override
public int getOrder() {
	return Ordered.LOWEST_PRECEDENCE;
}

}
public class GlobalResponseLogFilter implements GlobalFilter, Ordered {
//	private final WebEndpointProperties endpointProperties;
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
	ServerHttpRequest request = exchange.getRequest();
	// 打印请求路径
	String path = request.getPath().pathWithinApplication().value();
	// 忽略 endpoint 请求

//		String endpointBasePath = endpointProperties.getBasePath();
String endpointBasePath = "";
if (StringUtils.isNotBlank(endpointBasePath) && path.startsWith(endpointBasePath)) {
return chain.filter(exchange);
}
return chain.filter(exchange).then(
Mono.fromRunnable(() -> {
MultiValueMap<String, String> queryParams = request.getQueryParams();
String requestUrl = UriComponentsBuilder.fromPath(path).queryParams(queryParams).build().toUriString();
			// 构建成一条长 日志，避免并发下日志错乱
			StringBuffer responseLog = new StringBuffer(300);
			// 日志参数
			List<Object> responseArgs = new ArrayList<>();
			responseLog.append("\n\n================ Gateway Response Start  ================\n");
			ServerHttpResponse response = exchange.getResponse();
			// 打印路由 200 get: /api/xxx/xxx
			responseLog.append("<=== {} {}: {}\n");
			// 参数
			String requestMethod = request.getMethodValue();
			responseArgs.add(response.getStatusCode().value());
			responseArgs.add(requestMethod);
			responseArgs.add(requestUrl);

			// 打印请求头
			HttpHeaders headers = response.getHeaders();
			headers.forEach((headerName, headerValue) -> {
				responseLog.append("===Headers===  {}: {}\n");
				responseArgs.add(headerName);
				responseArgs.add(StringUtils.join(headerValue.toArray()));
			});

			responseLog.append("================  Gateway Response End  =================\n");
			// 打印执行时间
			log.info(responseLog.toString(), responseArgs.toArray());
		})
	);
}

@Override
public int getOrder() {
	return Ordered.HIGHEST_PRECEDENCE;
}

}

I got a similar error on mine as well I have tracked it down to a GRPC routing cal.  I am trying to extract the code away from my gateway codenase to see if I can isolate it futher.
You can get this more frequently and predictable when you set the spring.netty.leak-deection to PARANOID.

收到，谢谢，我这边尝试下！
------------------ 原始邮件 ------------------
发件人: "Archimedes @.>;
发送时间: 2022年9月6日(星期二) 中午1:07
收件人: @.>;
抄送: @.>; @.>;
主题: Re: [spring-cloud/spring-cloud-gateway] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information (Issue #2722)
I got a similar error on mine as well I have tracked it down to a GRPC routing cal.  I am trying to extract the code away from my gateway codenase to see if I can isolate it futher.
You can get this more frequently and predictable when you set thespring.netty.leak-deectiontoPARANOID.
—
Reply to this email directly,view it on GitHub, orunsubscribe.
You are receiving this because you authored the thread.Message @.***与>

authors: linuxdf trajano

repo: spring-cloud/spring-cloud-gateway


text:
Datastore stores id as as seperate field

I am using spring-cloud-gcp-starter-data-datastore:1.1.2.RELEASE. I have a simple object like this
@Entity
@Data
public class WishlistLine {
    @Id
    private Long id;
    @Field(name = "item_id")
    private String itemId;
    @Unindexed
    private BigDecimal quantity;
    @Unindexed
    private String comment;
}

When I insert a record it stores entities  like this.
{
   "__key__":{
      "path":[
         {
            "kind":"WishlistLine",
            "id":"4785074604081152"
         }
      ],
      "partitionId":{
         "namespaceId":"test"
      }
   },
   "id":4785074604081152,
   "item_id":"A",
   "quantity":"1"
}

It is duplicating id as another field. I will only prefer to store id under the key.
Is this expected behavior? Is there any way to prevent this?

Duplicate of #1677.
The fix is only available in version 1.2.0.BUILD-SNAPSHOT.

Thanks. What is the estimated release date?

This would be part of the "Hoxton" Spring Cloud release train. The date is currently set to October 17, but can potentially move. The milestones and release candidates will come before then.
See: https://github.com/spring-cloud/spring-cloud-release/milestones

authors: meltsufin ormanli

repo: spring-cloud/spring-cloud-gcp


text:
adding dynamic route to zuul

not sure if this one is currently supported.
need to add (maybe also remove, or update) existing routes to a running zuul proxy.
is this currently possible? if not - any ideas on how we might achieve the same without really restarting your app and updating mapping in a properties file?
thanks

https://github.com/spring-cloud/spring-cloud-netflix/issues/706

@aivans
how to dynamic route and add route info not start app
@RequestMapping("/reDirect")
public String reDirect(HttpServletRequest request) {
ZuulRoute route_cy=new ZuulRoute();
route_cy.setId("erp_cy");
route_cy.setPath("/erp_cy/");
route_cy.setUrl("http://169.254.50.169:8081");
discoveryClientRouteLocator.addRoute(route_cy);
ZuulRoute route_gwzx=new ZuulRoute();
route_gwzx.setId("erp_gwzx");
route_gwzx.setPath("/erp_gwzx/");
route_gwzx.setUrl(" http://localhost:9000");
discoveryClientRouteLocator.addRoute(route_gwzx);
String id=request.getSession().getId();
return "redirect:/erp_gwzx/";

@aivans
first ,i use ui gateway to offer one point endpoint services ,at the same time ,the backends service machine can't be access by the Internet, when users open the browser the ui server route to the sso system,when login success,the sso server redirect to the ui gateway ,the ui gateway according to the session id get user info from redis ,now the requirements is according to the userID, the ui gateway route to different pc get ui pages.
the first problem is how i get zuul route config info from database
the second is how ui gateway according to userid add route to zuul and zuul route to diff pc,(because some service such as http://192.168.1.22, there not the context, at the same time can't use http Re-direct 302, ) ,dynamic add the zuul route and bypass to the diff pc get ui page

Duplicates #706 & #705

Is there any way to add dynamic path variable routing. Scenario:
application.properties
zuul.routes.books.url=http://localhost:8090
zuul.routes.books.path=/mybook/*
Zuul proxy is running on localhost:8080.
For incoming request http://localhost:8080/mybook/avaiable
I'd like to send it to url http://localhost:8090/avaiable/123
All I need is to add path variable at the end of url.

authors: 625096233 aivans nmorado pchlebda spencergibb

repo: spring-cloud/spring-cloud-netflix


text:
Rename modules to match project name

spring-cloud-vault-* instead of spring-cloud-vault-config-*.

Modules related to config interaction could remain with config. Non-config related modules (such spring-cloud-vault-dependencies, spring-cloud-vault-parent) are already named as expected.
Changed repository names in pom.xml with 13232b3.

repo: spring-cloud/spring-cloud-vault


text:
Spring cloud config server - encrypt/decrypt endpoints not working with spring native

I am trying to build a spring cloud config server instance to run in native mode, using sping native.
According to the documentation https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/, "Spring Native 0.11.3 has been tested against Spring Cloud 2021.0.1" and is compatible with spring-cloud- config-server
The documentation also states "Spring Cloud Bootstrap is no longer supported."
My pom.xml is as follows
<?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.3</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>es.luis</groupId>
	<artifactId>spring-config-server</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>spring-config-server</name>
	<description>Probando spring cloud server</description>
	<properties>
		<java.version>11</java.version>
		<spring-cloud.version>2021.0.0</spring-cloud.version>
		<spring-native.version>0.11.2</spring-native.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
              <exclusions>
                 <exclusion>
                    <groupId>io.micrometer</groupId>
                    <artifactId>micrometer-core</artifactId>
                 </exclusion>
              </exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-config-server</artifactId>
		</dependency>
		<dependency>
		  <groupId>org.springframework.boot</groupId>
		  <artifactId>spring-boot-starter-security</artifactId>
		</dependency>
        <dependency>
          <groupId>org.springframework.experimental</groupId>
          <artifactId>spring-native</artifactId>
          <version>0.11.2</version>
        </dependency>
		<dependency>
		    <groupId>org.springframework.boot</groupId>
		    <artifactId>spring-boot-starter-web</artifactId>
		</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>
				<configuration>
					<classifier>${repackage.classifier}</classifier>
					<image>
						<builder>paketobuildpacks/builder:tiny</builder>
						<env>
							<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
						</env>
					</image>
				</configuration>
			</plugin>
        <plugin>
            <groupId>org.springframework.experimental</groupId>
            <artifactId>spring-aot-maven-plugin</artifactId>
            <version>0.11.2</version>
            <executions>
                <execution>
                    <id>generate</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
			<plugin>
               <groupId>org.eclipse.jkube</groupId>
               <artifactId>openshift-maven-plugin</artifactId>
               <version>1.6.0</version>
            </plugin>
		</plugins>
	</build>

<repositories>
    <!-- ... -->
    <repository>
        <id>spring-release</id>
        <name>Spring release</name>
        <url>https://repo.spring.io/release</url>
    </repository>
</repositories>

<pluginRepositories>
    <!-- ... -->
    <pluginRepository>
        <id>spring-release</id>
        <name>Spring release</name>
        <url>https://repo.spring.io/release</url>
    </pluginRepository>
</pluginRepositories>

	<profiles>
		<profile>
			<id>native</id>
			<properties>
				<repackage.classifier>exec</repackage.classifier>
				<native-buildtools.version>0.9.3</native-buildtools.version>
			</properties>
			<dependencies>
				<dependency>
					<groupId>org.graalvm.buildtools</groupId>
					<artifactId>junit-platform-native</artifactId>
					<version>${native-buildtools.version}</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.graalvm.buildtools</groupId>
						<artifactId>native-maven-plugin</artifactId>
						<version>${native-buildtools.version}</version>
						<executions>
							<execution>
								<id>test-native</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
							</execution>
							<execution>
								<id>build-native</id>
								<phase>package</phase>
								<goals>
									<goal>build</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>

And my application.yml is:
server:
  port: 8888
spring:
  cloud:
    config:
      server:
        git:
          cloneOnStart: false
          uri: https://github.com/luidoc/spring-cloud-config-repo
          default-label: master
  security:
    user:
      name: root
      password: password
encrypt:
  key: asdfajazdfjalasdfasdf

I have enabled endpoint encrypt and decrypt
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Override
    public void configure(HttpSecurity http) throws Exception {
        http.csrf()
          .ignoringAntMatchers("/encrypt/**")
          .ignoringAntMatchers("/decrypt/**");

        super.configure(http);
    }
}

I manage to compile the project without problems and it runs correctly.
./spring-config-server
2022-02-28 15:52:45.628  INFO 16415 --- [           main] o.s.nativex.NativeListener               : AOT mode enabled

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.3)

2022-02-28 15:52:45.793  INFO 16415 --- [           main] e.l.c.s.SpringConfigServerApplication    : Starting SpringConfigServerApplication v0.0.1-SNAPSHOT using Java 11.0.13 on xxxx with PID 16415 (/mnt/d/Users/xxx/desarrollo/spring-config-server-master/target/spring-config-server started by luis in /mnt/d/Users/xx/desarrollo/spring-config-server-master/target)
2022-02-28 15:52:45.793  INFO 16415 --- [           main] e.l.c.s.SpringConfigServerApplication    : No active profile set, falling back to default profiles: default
2022-02-28 15:52:46.141  INFO 16415 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8888 (http)
2022-02-28 15:52:46.148  INFO 16415 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-02-28 15:52:46.148  INFO 16415 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.56]
2022-02-28 15:52:46.186  INFO 16415 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-02-28 15:52:46.186  INFO 16415 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 393 ms
2022-02-28 15:52:46.644  INFO 16415 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3726654a, org.springframework.security.web.context.SecurityContextPersistenceFilter@176abef0, org.springframework.security.web.header.HeaderWriterFilter@12ba60af, org.springframework.security.web.csrf.CsrfFilter@2163465, org.springframework.security.web.authentication.logout.LogoutFilter@26dfd51b, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@2db9b9e, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@20a83784, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@4b25d06d, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@50b9b5a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1d25be6c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@442be013, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@60ddf67a, org.springframework.security.web.session.SessionManagementFilter@7310aaa1, org.springframework.security.web.access.ExceptionTranslationFilter@1605e9d0, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@1ac1fbca]
2022-02-28 15:52:47.650  INFO 16415 --- [           main] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname
2022-02-28 15:52:47.695  INFO 16415 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2022-02-28 15:52:47.714  INFO 16415 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8888 (http) with context path ''
2022-02-28 15:52:48.715  INFO 16415 --- [           main] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname
2022-02-28 15:52:48.716  INFO 16415 --- [           main] e.l.c.s.SpringConfigServerApplication    : Started SpringConfigServerApplication in 4.901 seconds (JVM running for 5.462)
2022-02-28 15:53:26.101  INFO 16415 --- [nio-8888-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-02-28 15:53:26.101  INFO 16415 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2022-02-28 15:53:26.102  INFO 16415 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms

However when I run the binary I try to use endpoint encrypt and decrypt doesn't work, I get the error:
curl -u root:password localhost:8888/encrypt --data-urlencode any_text
{"description":"No key was installed for encryption service","status":"NO_KEY"}
If I run the project in non-native mode, enpoint encrypt and decrypt work.
Any idea.

Please share a repro project.

https://github.com/luidoc/spring-config-server-master.git

@OlgaMaciaszek Could you please take care of this one?

@sdeleuze , sure, will take a look.

I was able to reproduce the issue. Verifying.

Have created a PR with the fix in Spring Cloud Config: https://github.com/spring-cloud/spring-cloud-config/pull/2065

Closing in favour of https://github.com/spring-cloud/spring-cloud-config/pull/2065

Testing with spring-cloud version 2021.0.2-SNAPSHOT.
The problem persists:
./spring-config-server
2022-03-31 13:30:05.745  INFO 19367 --- [           main] o.s.nativex.NativeListener               : AOT mode enabled

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.5)

2022-03-31 13:30:05.749  INFO 19367 --- [           main] e.l.c.s.SpringConfigServerApplication    : Starting SpringConfigServerApplication v0.0.1-SNAPSHOT using Java 11.0.14 on fedora with PID 19367 (/root/desarrollo/spring-config-server-master/target/spring-config-server started by root in /root/desarrollo/spring-config-server-master/target)
2022-03-31 13:30:05.749  INFO 19367 --- [           main] e.l.c.s.SpringConfigServerApplication    : No active profile set, falling back to 1 default profile: "default"
2022-03-31 13:30:05.776  INFO 19367 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8888 (http)
2022-03-31 13:30:05.776  INFO 19367 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-03-31 13:30:05.776  INFO 19367 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.60]
2022-03-31 13:30:05.785  INFO 19367 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-03-31 13:30:05.785  INFO 19367 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 36 ms
2022-03-31 13:30:05.878  INFO 19367 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Will not secure any request
2022-03-31 13:30:05.915  INFO 19367 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2022-03-31 13:30:05.942  INFO 19367 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8888 (http) with context path ''
2022-03-31 13:30:05.943  INFO 19367 --- [           main] e.l.c.s.SpringConfigServerApplication    : Started SpringConfigServerApplication in 0.218 seconds (JVM running for 0

curl -u root:password localhost:8888/encrypt --data-urlencode any_text
{"description":"No key was installed for encryption service","status":"NO_KEY"}

Had to remove the changes as they caused a regression. Further analysis is required and changes might be needed in AOT to provide bootstrap context beans support.

Spring Native is now superseded by Spring Boot 3 official native support, see the related reference documentation for more details.
As a consequence, I am closing this issue, and recommend trying your use case with latest Spring Boot 3 version. If you still experience the issue reported here, please open an issue directly on the related Spring project (Spring Framework, Data, Security, Boot, Cloud, etc.) with a reproducer.
Thanks for your contribution on the experimental Spring Native project, we hope you will enjoy the official native support introduced by Spring Boot 3.

authors: OlgaMaciaszek luidoc sdeleuze


text:
Remove dirt deps

This removes direct dependencies on spring-xd-dirt and provides the minimum classses needed for the tests to pass.  Classes copied from dirt are kept in o.s.xd.dirt... to be easily identified.  A modified codec.xml is provided which removes the TupleCodec. This could be added back to support Tuple payloads, currently not used in the tests. This would require a dependency on spring-xd-tuple. Codec config will need to be redone soon anyway.  Also, dirt provides a number of ModuleOptionsMetadata classes needed to use common modules that are now missing. Module options is another area to revisit.

Merged in spring-cloud-streams

source: gharchive/pull-request

authors: dsyer dturanski

repo: spring-projects/spring-bus


text:
KafkaTemplate is reporting 2 errors to observation

Back-port issue for: https://github.com/spring-projects/spring-kafka/issues/2817

Closed by 1304168dd

authors: artembilan garyrussell

repo: spring-projects/spring-kafka


text:
No method found for class when using @Nonnull annotation

When using @Nonnull (javax.annotation.Nonnull) on the parameter of the KafkaHandler, kafka can`t find the method: "org.springframework.kafka.KafkaException: No method found for class".
Same happens using the annotation @CheckForNull.
Without the annotation everything works fine.
@KafkaListener(topics = "someTopic")
@Component
public class KafkaListener{

    @KafkaHandler
    public void receive(@Nonnull final SomeObject object) {
        //DoSomething
    }
}

Interesting - it also fails the same way with import org.springframework.lang.NonNull.
It works if I move the listener to the method...
	public class Listener {

		@KafkaListener(topics = "gh485", groupId = "gh485")
		public void listen (@NonNull final String in) {
			System.out.println(in);
		}

	}

So that might be a workaround - unless you need the multimethod listener feature.

It's because we're explicitly looking for no annotation or @Payload to find the candidate handler method.

authors: Undestor garyrussell


text:
Resource bundle not included in native image

The resource bundle was not included in the native hints which would cause the text to not be displayed in the right language.

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

@DuncanCasteleyn Thank you for signing the Contributor License Agreement!

The messages resource is a weird one - I believe it works if you remove devtools, so it's really a problem in Spring Boot, and may already be fixed.

The resource bundle  issue is still in Spring Boot 3.0.1 - Looking forward to testing it with 3.0.2

Follow this for updates: https://github.com/spring-projects/spring-boot/issues/32853

Unless I miss something, this resource bundle is not included because by design Boot include only resources with recognized path and messages/messages is a custom resource bundle from the application. I had to include a similar hint here as well (my version does not use Devtools).

I added a PR #1157 to fix native image generation because the native plugin is also missing. Even start.spring.io adds it to the generated sources.

I'm happy to merge this if the conflict is resolved.

Closed in cc46671

authors: DuncanCasteleyn dsyer patbaumgartner pivotal-cla sdeleuze

repo: spring-projects/spring-petclinic


text:
Fully automate dev setup with Gitpod

This commit implements a fully-automated development setup using Gitpod.io, an
online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.
This makes it easy for anyone to get a ready-to-code workspace for any branch,
issue or pull request almost instantly with a single click.

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

Accidental pull request.

authors: jeffersonparke pivotal-issuemaster


text:
OAuth2ClientConfiguration should not expose session-scoped OAuth2ClientContext in non-webapps

OAuth2ClientConfiguration exposes a session-scoped OAuth2ClientContext:
@Configuration
protected static class OAuth2ClientContextConfiguration {

	@Resource
	@Qualifier("accessTokenRequest")
	private AccessTokenRequest accessTokenRequest;

	@Bean
	@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
	public OAuth2ClientContext oauth2ClientContext() {
		return new DefaultOAuth2ClientContext(accessTokenRequest);
	}
}

But, this doesn't make sense in a non-webapp, where there is no session scope.
This bean should be conditionally wired in web applications only.
Note that this is related to https://github.com/spring-projects/spring-security-oauth2-boot/issues/78

we have the same situation outside the tests if we want to use client logins (grant type client_credentials) e.g. via security.oauth2.client.grant-type=client_credentials

authors: RicoApfelbeck jzheaux

repo: spring-projects/spring-security-oauth


text:
spring-social-showcase-boot misses application.properties

A commit 6 days ago removed application.properties from spring-social-showcase-boot witch made application unable to start.

For anyone who's looking for this, here's the content for 'spring-social-showcase-boot/src/main/resources/application.properties
' file:
spring.social.facebook.app-id={{SEE README}}
spring.social.facebook.app-secret={{SEE README}}
facebook.appNamespace={{SEE README}}
spring.social.linkedin.app-id={{SEE README}}
spring.social.linkedin.app-secret={{SEE README}}
spring.social.twitter.appId={{SEE README}}
spring.social.twitter.appSecret={{SEE README}}

I made changes and requested for Pull; once they pull in the code, it would be back in place.

authors: muzeebullah yuricus

repo: spring-projects/spring-social-samples


text:
SwaggerConfig class break my Unit and integration tests

                        <!--Swagger-->
	<dependency>
	    <groupId>io.springfox</groupId>
	    <artifactId>springfox-swagger2</artifactId>
	    <version>2.9.2</version>
	</dependency>

	<dependency>
	    <groupId>io.springfox</groupId>
	    <artifactId>springfox-swagger-ui</artifactId>
	    <version>2.9.2</version>
	</dependency>

in app-context.xml:
<mvc:resources location="classpath:/META-INF/resources/" mapping="swagger-ui.html"/>
<mvc:resources location="classpath:/META-INF/resources/webjars/" mapping="/webjars/**"/>
<bean id="swagger2Config" class="springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration"/>

Config class
@Configuration
@EnableSwagger2
public class SwaggerConfig extends WebMvcConfigurationSupport{
   /**
 * For for swagger configuration
 * @return Docket
 *
 */

@Bean
public Docket newsApi() {
   // TypeResolver newRuletypeResolver;
	return new Docket(DocumentationType.SWAGGER_2).groupName("Email").apiInfo(apiInfo())
			.select()
    		.apis(RequestHandlerSelectors.basePackage("com...."))
    		.paths(PathSelectors.ant("/**")).build()
    		.genericModelSubstitutes(ResponseEntity.class);
}

private ApiInfo apiInfo() {
    return new ApiInfoBuilder().title("Email Service").description("Overview of Polling Procedure\r\n" +
    		"\r\n" +
    		"On a configurable basis (i.e. once every 60 seconds), the pre-established list of email boxes are polled by this service.\r\n" +

    		"")
            .termsOfServiceUrl("/swagger-ui.html#/")
            .version("1.0").build();
}

}

When remove @configuration, Unit test works but integration test not

Did you ever get a resolution for this? I am experiencing the same problem with Spring boot 2.6 and Swagger 3.0.

I am also facing similar issues, all my integration test are failing. Any resolution?

authors: Kaushik27 pagmaae tsposato

repo: springfox/springfox


text:
How to make a dashed or dotted curved line

I am creating map using leaflet. I am able to draw solid curve line but could not draw dashed or dotted curve line.
Any leads would be appreciated

This is outside the scope of arc.js, which only does the math to compute an arc. What you're looking for is the Leaflet documentation, specifically the Path options that you can provide as the second argument to the Polyline constructor.

authors: prateekgng tmcw


text:
🛑 Terminalserver is down

In 5b1122b, Terminalserver ($URL_TS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Terminalserver is back up in 1dbee49.

repo: spschweiz/status

license: MIT


text:
Unable deploy AWS API Gateway v2 in server mode

I am using moto in server mode deploy lambda, s3, apigatewayv2
moto_server
 * Running on http://127.0.0.1:5000 (Press CTRL+C to quit)

I am using terraform CDKTF to create the stage code in tyhpescript
http://localhost:5000/restapis/axl0ydav4s/mylambda/_user_request_/sayhello
how can I invoke the URL in this format ?

Hi @dickensas, are you unable to deploy this, or do you make a HTTP request to the mocked gateway?
The latter is not yet supported for APIGatewayv2. I'll mark it as an enhancement, but this would be quite an undertaking, so it would take a while before this is implemented.
Have you looked into LocalStack? Their functionality is similar to Moto, but with much better integration between APIGateway and Lambda. The downside is that is much more resource-heavy, but if the integration is absolutely necessary, that may be a good alternative.
https://docs.localstack.cloud/aws/apigatewayv2/

Hi
I went through API Gateway V2 in localstack, it is only available in pro version.
So as per your comment if it is not implemented yet, that answers my question
But if it cannot be invoked vi URL, is it possible to invoke via python or any other language? I don't want to invoke the lamba but I want to invoke the api gateway via code so that my testing will be completed without skipping the API gateway

Hi I went through API Gateway V2 in localstack, it is only available in pro version.

Ah, my bad, I didn't realize that.

But if it cannot be invoked vi URL, is it possible to invoke via python or any other language? I don't want to invoke the lamba but I want to invoke the api gateway via code so that my testing will be completed without skipping the API gateway

No, that's not possible at all at the moment. The only way to test the gateway is via the implemented boto3-methods.

Great may be I will put effort and implement it for you as a contribution

authors: bblommers dickensas

repo: spulec/moto


text:
Implemented S3 get/put_notification_configuration

Implements get_bucket_notification_configuration and put_bucket_notification_configuration.
Supports SNS, SQS, and Lambda. I don't check for the existence of the Queues, Topics, or Functions -- I assume that is already there.
This does check that the event names are correct, that the notification target is in the same region as the bucket, and that the ARN is "correct".
closes #973

Coverage increased (+0.01%) to 92.544% when pulling a99af283b37294ae1a6a77a3254a490b75754445 on mikegrima:bucketnotifications into 35d69759ef71b8dcb93ee8f1477554d469e8b5cd on spulec:master.

Coverage increased (+0.01%) to 92.544% when pulling a99af283b37294ae1a6a77a3254a490b75754445 on mikegrima:bucketnotifications into 35d69759ef71b8dcb93ee8f1477554d469e8b5cd on spulec:master.

This is great @mikegrima! Thanks for adding this (and for the great comments in your code).

authors: JackDanger coveralls mikegrima


text:
Implement SSM Parameter Store filters support (GetParametersByPath API)

This PR implements #1517.
I have added support for the ParameterFilters argument of the GetParametersByPath API.

Nice work, @alexcasalboni! This will be really helpful to so many people. Welcome to Moto!

authors: JackDanger alexcasalboni


text:
SES - Validate domain before sending raw email

Fixes #2959

Coverage remained the same at 94.228% when pulling 691e2068541f6fab161daddbfe8b3e17418f0f80 on bblommers:ses_validate_raw_email into ff23489f82dc42280c9880be01624d21aad34a05 on spulec:master.

Thanks!

authors: bblommers coveralls spulec


text:
Applicants Multiple Select Checkbox

Unable to update the status of multiple customers who are currently active to inactive.

Hi @spurtcmsdeveloper-192 ,we will check that above issue. and will fix the issue shortly.

I happy to say that  above issue was fixed. Please check this.

Thank you.This feature is useful

repo: spurtcms/spurtcms


text:
PR: new b command

b [go to beginning of previous word]

@pwoosam, could you review this one? Thanks :-)

Works as it should. Merging now 👍

repo: spyder-ide/spyder-vim


text:
The usage of https://github.com/spyder-ide/spyder/blob/master/requirements/tests.txt

Hi,
What's the usage of https://github.com/spyder-ide/spyder/blob/master/requirements/tests.txt?

We use that file to install the dependencies needed to run Spyder tests (either locally or in the CI). Those are only needed for running tests and not running spyder.

authors: goanpeca hongyi-zhao

repo: spyder-ide/spyder


text:
Editor: Ctrl+F shortcut does not always work

From pierre.raybaut on 2010-04-13T00:21:20Z
Sometimes I have to focus on another widget and give focus back to the editor
for the Ctrl+F shortcut to work.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=197

From pierre.raybaut on 2010-04-19T07:03:54Z
Status: Fixed


text:
fonction récursive dépassant sans doute la pile.

Description
What steps will reproduce the problem?

J'appelle une fonctionr récursive qui dépasse sans doute la taille max de la pile, mais spyder plante et il est impossible de redémarrer le noyau.
Traceback
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\qtconsole\manager.py", line 27, in poll
    super().poll()
  File "C:\Anaconda3\lib\site-packages\jupyter_client\restarter.py", line 143, in poll
    self.kernel_manager.restart_kernel(now=True, newports=newports)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 26, in wrapped
    raise e
  File "C:\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 23, in wrapped
    return loop.run_until_complete(future)
  File "C:\Anaconda3\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
    return f.result()
  File "C:\Anaconda3\lib\asyncio\futures.py", line 178, in result
    raise self._exception
  File "C:\Anaconda3\lib\asyncio\tasks.py", line 280, in __step
    result = coro.send(None)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 525, in _async_restart_kernel
    await ensure_async(self.shutdown_kernel(now=now, restart=True))
  File "C:\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 26, in wrapped
    raise e
  File "C:\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 23, in wrapped
    return loop.run_until_complete(future)
  File "C:\Anaconda3\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
    return f.result()
  File "C:\Anaconda3\lib\asyncio\futures.py", line 178, in result
    raise self._exception
  File "C:\Anaconda3\lib\asyncio\tasks.py", line 280, in __step
    result = coro.send(None)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 79, in wrapper
    raise e
  File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 71, in wrapper
    out = await method(self, *args, **kwargs)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 484, in _async_shutdown_kernel
    await ensure_async(self._kill_kernel())
  File "C:\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\utils\manager.py", line 92, in _kill_kernel
    self.kill_proc_tree(self.kernel.pid)
AttributeError: 'SpyderKernelManager' object has no attribute 'kernel'

Versions

Spyder version: 5.0.5
Python version: 3.8.12
Qt version: 5.9.7
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  8.1.1 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  4.4.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.4.0 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=1.0                  :  2.12.2 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2;<0.4.0    :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.1.0             :  5.3.1 (OK)
qtpy >=1.5.0                  :  2.0.1 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=39.0.0           :  61.2.0 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.0.4;<2.1.0 :  2.0.5 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  0.29.28 (OK)
matplotlib >=2.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.20.3 (OK)
pandas >=1.1.1                :  1.4.1 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  1.9 (OK)

Hey @petitbeuh, thanks for reporting. This problem is also fixed in our latest version available in Anaconda (5.3.3). Please update by closing Spyder, opening the Anaconda Prompt and running there the commands mentioned in our documentation.


text:
Spyder 5.5.6 release

New/updated dependencies:

[ ] Python-lsp-server >=1.12.0,<1.13.0 (pending release)
[ ] Spyder-kernels >=2.5.3,<2,6 (pending release)

@ccordoba12 https://github.com/spyder-ide/spyder/pull/21539 should be merged as part of this release, right?

Right, I totally forgot about that PR.

@dalthviz, new dependencies are ready for the release.


text:
Cannot change PEP8 settings to ignore tabs instead of 4 spaces (W191)

Description of your problem
What steps will reproduce the problem?

Insert a tab instead of the four spaces indent.
Do a style guide analysis.
PEP8 warning W191 shows up:

What is the expected output? What do you see instead?
I looked for an option to disable this (or any other) warning. Something similar to running pep8 --ignore=W191 script.py. There seems to have been a discussion about this a while ago but I couldn't find whether the option had finally been implemented.
Please provide any additional information below
Versions and main components

Spyder Version: 3.2.4
Python Version: 3.6.3
Qt Version: 5.6.2
PyQt Version: 5.6
Operating system: Windows 10

Dependencies
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

This relates to pep8/pycodestyle, not Spyder, but a quick Google revealed [this page](https://pep8.readthedocs.io/en/latest/intro.html#configuration] that discusses exactly how to make pylint ignore any given error: just create edit the .pycodestyle file in your home directory, so it reads
[pycodestyle]
ignore = W191

and it should work like a charm. Just tested it with a few warnings (blank space at end of line/on blank line) that I wanted it to ignore, and it did the trick. In any case, would therefore suggest this issue be closed.

It shouldn't be hard to implement, but we don't have time to do it right now, sorry.

@CAMGerlach-Baron  - I meant that I can't change the settings of the PEP8 style checker in Python. It looks like pycodestyle is a separate package. Will it integrate inside Spyder's editor?

Since our 3.2 version, we use pycodestyle instead of pep8. That's because pep8 was renamed to pycodestyle.

@ccordoba12 Thanks for clarifying. So @paragrastogi are you asking for a GUI option in the preferences, or is just adding it in the .pycodestylerc file line any other exclusion, similar to the same with pylint for static analysis fine for you?

@CAMGerlach-Baron : GUI option is better for noobs like me, but I just implemented your suggestion and it works! Thanks all for your help.

@ccordoba12 Someone related: Given the transition to pycodestyle, I'm curious as to why the "Real-time code style analysis" checkbox apparently in both master and 3.x checks for the presence of pep8 (is_pep8 = get_checker_executable("pep8")) and not pycodestyle; the former is not listed in requirements.txt for Spyder in either branch, and thus the user cannot enable pep8 checking unless they separately install pep8 for get_checker_executable to find it. However, this may be erroneous, as when I modified the relevant line in the file plugins/editor.py in master to read get_checker_executable("pycodestyle"), the option's checkbox was enabled, and pep8 checking worked fine. Is this a bug?

@grandslammer It's quite easy to do already—see my comment above—and its ultimately the responsibility of a third-party package (Pycodestyle), not Spyder, so as an all-volunteer community busy maintaining Spyder 3, developing a number of major new features in Spyder 4, revamping a number of plugins, and overhauling our docs, we really don't have the bandwidth to do this at the moment.
However, since Spyder is both a Python IDE and written in Python itself, you're welcome to add it and we'd be glad to review a PR to include it in Spyder for everyone. It shouldn't be too hard at all, and we can give you some guidance on what you need to change if you're interested. Thanks!

authors: CAM-Gerlach CAMGerlach-Baron ccordoba12 paragrastogi


text:
Spyder - blank screen

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\spyder\plugins_init_.py", line 511, in
toggled=lambda checked: self.toggle_view(checked),
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 713, in toggle_view
self.create_new_client(give_focus=False)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1009, in create_new_client
self.connect_client_to_kernel(client)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1035, in connect_client_to_kernel
stderr_file)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1440, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\My_Temp\Continuum\anaconda3\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)

Please post the output of running in a terminal (cmd.exe)
conda list

Closing because of lack of response.


text:
Console font preferences don't stick first time round.

From stefan.r...@gmail.com on 2011-03-11T01:53:26Z
What steps will reproduce the problem?

Change console font size in Preference settings and apply
Observe how font has changed (as expected)
Type any expression in the console What is the expected output? What do you see instead? 4. I expect the Font size to stay to what I set it to. Font reverts back to its startup value. In other words, if you now exit the session and restart spyder, the Preference that you set will take effect. What version of the product are you using? On what operating system? Spyder 2.0.8 on Mac OS X 10.5 (EPD). Also observed on same spyder version under ubuntu linux 10.04

Please provide any additional information below
. This is not a problem for Editor or other plugins.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=582

From pierre.raybaut on 2011-03-11T13:53:34Z
This issue was closed by revision 703b9d15ad .
Status: Fixed

From pierre.raybaut on 2011-03-11T07:45:07Z
Status: Started

From pierre.raybaut on 2011-04-24T07:38:30Z
This issue was closed by revision 703b9d15ad70 .


text:
Using Tensorflow Backend and Kernel died, restarting

Issue Report Checklist

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

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

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

Problem Description
I just write "from keras.models import MinMaxScaler" and the console says "Using TensorFlow backend. Kernel died, restarting"
What steps reproduce the problem?

try to run the python file with only one piece of command

What is the expected output? What do you see instead?
there should be no output
but the kernel died
Paste Traceback/Error Below (if applicable)

runfile('C:/Users/Charles/.spyder-py3/temp.py', wdir='C:/Users/Charles/.spyder-py3')
Using TensorFlow backend.

Kernel died, restarting

 Populating the interactive namespace from numpy and matplotlib

runfile('C:/Users/xxx/.spyder-py3/temp.py', wdir='C:/Users/xxx/.spyder-py3')
Using TensorFlow backend.

Kernel died, restarting

Versions

Spyder version: 3.2.3
Python version: 3.6.2
Qt version: 5.6.2
PyQt version: 5.6.0
Operating System name/version: Windows 10

Dependencies

IPython >=4.0    :  6.1.0 (OK)
cython >=0.21    :  None (NOK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  5.2.1 (OK)
numpy >=1.7      :  1.13.1 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.7.2 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
sympy >=0.7.3    :  None (NOK)

Does your code run in the Jupyter notebook?

No.
I have change the python version from 3.6 to 3.5, and the problem has disappeared. I do not know the reason.

Glad to know you were able to sort this problem out.

is that any approach can solve this problem except lower 3.6 to 3.5?

No. I have change the python version from 3.6 to 3.5, and the problem has disappeared. I do not know the reason.

My code still doesn't run even after lowering the version to 3.5. Help me if you found any solution for this.


text:
PR: Update py2app to 0.28 (Mac app)

Description of Changes
Update py2app to version 0.28.
This includes a new recipe for black, updated recipe for pyqt, and fixes for egg handling.
Some additions to the setup call brings the build into compliance with setuptools>60.10.0.
Issue(s) Resolved

Fixes #17609
Fixes #17551
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @mrclary

Hello @mrclary! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file installers/macOS/setup.py:

Line 32:8: E221 multiple spaces before operator
Line 33:8: E221 multiple spaces before operator
Line 34:9: E221 multiple spaces before operator

@mrclary, our Mac app is failing to be built due to the release of Py2app 0.28. So, is there something else you need to finish here? Or can we merge it to fix our tests?

I was waiting to ensure that these CI tests to pass. Should be good to go now.


text:
🛑 Client Website - your80s.co.uk is down

In a4f9e48, Client Website - your80s.co.uk (https://your80s.co.uk) was down:

HTTP code: 404
Response time: 341 ms

Resolved: Client Website - your80s.co.uk is back up in 3324268 after 10 minutes.

repo: sqbxmediagroup/status


text:
Security Benchmarks commands

Summary of new feature
We were able to get the CIS benchmarks results mostly through individual dbatools commands. Please check if it would be worth adding a separate section for Security benchmarks. Few auditors have tools to generate report(eg. CIS CAT Pro) though they dont have the flexibility like PowerShell.
Proposed technical details (if applicable)
https://www.cisecurity.org/benchmark/microsoft_sql_server/
http://www.itsecure.hu/library/image/CIS_Microsoft_SQL_Server_2016_Benchmark_v1.0.0.pdf
Attached our script prepared using few other modules for taking these benchmarks.
CIS_SQLServer.txt
Latest version of dbatools as of writing
1.0.21

@g-kannan you can check sqlcollaborative/dbachecks as CIS is being implemented in that module for building reports and performing the scans.
This project is being used to directly track that progress. https://github.com/sqlcollaborative/dbachecks/projects/1

authors: g-kannan wsmelton

repo: sqlcollaborative/dbatools


text:
Clear-DbaSqlConnectionPool

Is this a feature OR bug:
feature
Details
Simple as hell, just [System.Data.SqlClient.SqlConnection]::ClearAllPools() on $env:computername by default or remotely using -ComputerName and Invoke-Command, support Credential. It's useful for troubleshooting mostly.
With docs
ClearAllPools resets (or empties) the connection pool. If there are connections in use at the time of the call, they are marked appropriately and will be discarded (instead of being returned to the pool) when Close is called on them.
from https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools(v=vs.110).aspx

Fixed by #717 when it's approved


text:
Adjust Copy-SqlDatabaseMail to enable DBMail on destination

Fixes #868
Changes proposed in this pull request:

Added code to first check if DBMail is enabled on source (1) but not enabled on dest (0, zero) server. If not it will enable DBMail on destination server. (Could not use the Get/Set-DbaSpConfigure commands since the dynamic parameter issue...did add a comment to-do that once this is fixed the section of code can be updated).
Added/Replaced in the messaging system
Applied most of the format rules we've decided on.

How to test this code:

[ ]
[ ]

Has been tested on minimum requirements:

[ ]  Powershell 3
[ ]  Windows 7
[ ]  SQL Server 2000

Has been tested on maximum requirements:

[ ]  SQL Server vNext
[ ]  Windows 10
[ ]  Azure Database

Tests for tester:

[ ] Working/useful help content, including link to command on dbatools web site
[ ] All examples work as advertised
[ ] Does not contain template content
[ ] Does not contain excessive/unnecessary amounts of comments
[ ] Works remotely
[ ] Works locally
[ ] Works on lower versions or throws error specifying version not supported
[ ] Works with named instances
[ ] Works with clustered instances
[ ] Handles offline/read only databases
[ ] Supports multiple servers (at the command line or piped from Get-SqlRegisteredServerName)
[ ] No un-handled errors which stop the command working with multiple servers

Dude, you're on a frikken roll! Can't tell you how much I appreciate it. Merging & testing.
btw, Lu is gonna be in Paris this weekend, so I'll get to those dynamic params for you 🙇

Works, hayle yeahhh

Btw, the ultimate output will be a pscustomobject with some info like Source, Destination, Name, Status (and anything else you deem relevant, a timestamp perhaps?)- no write outputs. If you will be working on many of the copy- commands, that will be a necessity by 1.0 and would be awesome to have sooner!

Would this be a status for each "step" of the process or just for overall status?
e.g. Copying database mail means copying profiles, accounts, and system settings. Is that a custom object that shows something like:
Source    Destination    Name            Status
Server1   Server2       Accounts        complete
Server1   Server2       Profiles           complete
Server1   Server2       System Settings complete

authors: potatoqualitee wsmelton


text:
[bug] If proxy authentication user or password are wrong, on HTTPS, current thread blocks in an infinite loop.

If one tries to navigate to a HTTPS page using a proxy authentication, and the user or password for the proxy are wrong, infinite loop occurs. The code to duplicate this is simple:
`	package testOKHTTP;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;

import okhttp3.Authenticator;
import okhttp3.Call;
import okhttp3.Credentials;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Route;

public class testok
{
  void run(String url) throws IOException {
    String proxy = "137.74.248.8";
    int port = 3128;
    final String user = "blabla";
    final String password = "titimimi";

    Authenticator proxyAuthenticator = new Authenticator() {
      public Request authenticate(Route route, Response response) throws IOException {
           String credential = Credentials.basic(user, password);
           return response.request().newBuilder()
               .header("Proxy-Authorization", credential)
               .header("User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0")
               .build();
      }
    };

    OkHttpClient client = new OkHttpClient.Builder()
        .protocols(Arrays.asList(Protocol.HTTP_2, Protocol.HTTP_1_1, Protocol.SPDY_3))
        .connectTimeout(20, TimeUnit.SECONDS)
        .writeTimeout(20, TimeUnit.SECONDS)
        .readTimeout(20, TimeUnit.SECONDS)
        .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxy, port)))
        .proxyAuthenticator(proxyAuthenticator)
        .build();

    Request request = new Request.Builder()
        .url(url)
        .header("User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0")
        .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
        .header("Accept-Language", "en-US,en;q=0.5")
        .header("Accept-Encoding", "gzip, deflate")
        .header("Cookie", "NID=77=tJ2mqhkopJG8tterOLf9RoQT5wIXF76XgEsmUgc4UnRbEktrsG4UOPKIeWhu58nkQPaQDoRNucdJAhCeTQoBmsaUJusiPrSlN5mwPltG7iM01tb2__RITDwGrBK1wC5BGsF8ibXa_r7zhg;")
        .header("Connection", "keep-alive")
        .build();

    final Call call = client.newCall(request);

    Response response = call.execute();

    System.out.println("XXXXXXXXXXXXXXXXXXXX response: " + response.code());
  }

  public static void main(String[] args) throws IOException {
    System.out.println(System.getProperty("java.runtime.version"));
    System.out.println(System.getProperty("java.endorsed.dirs"));

    testok example = new testok();

    example.run(
        //"http://localhost/phpinfo.php"
        //"https://www.google.com/"
        "https://www.advancedwebranking.com/"
        /*"https://whatsmyuseragent.com/"*/);
  }

}

`
This fills the proxy server log with 407
1498207186.367      0 82.79.222.141 TCP_DENIED/407 4275 CONNECT www.advancedwebranking.com:443 blabla HIER_NONE/- text/html
1498207186.416      0 82.79.222.141 TCP_DENIED/407 4275 CONNECT www.advancedwebranking.com:443 blabla HIER_NONE/- text/html
1498207186.465      0 82.79.222.141 TCP_DENIED/407 4275 CONNECT www.advancedwebranking.com:443 blabla HIER_NONE/- text/html
And the thread is blocked forever in a loop reading from socket (see profiler attached picture)

I will take a look at the code, maybe I can break the loop and get the 407 response.

https://github.com/square/okhttp/wiki/Recipes#handling-authentication explains how to avoid infinite retries no?

@Tolriq Thank you! I have fixed it like this.
`
Authenticator proxyAuthenticator = new Authenticator() {
public Request authenticate(Route route, Response response) throws IOException {
if (response != null && response.code() == 407)
{
return null;
}
           String credential = Credentials.basic(user, password);
           return response.request().newBuilder()
               .header("Proxy-Authorization", credential)
               .header("User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0")
               .build();
      }
    };

`
This throws java.io.IOException: Failed to authenticate with proxy.

authors: Tolriq smatei

repo: square/okhttp


text:
[for discussion] Call cancellation.

#fixes https://github.com/square/okhttp/issues/7164

This form is safer than supporting some blocking operation, since a call may never actually get executed or cancelled.

I won't try to rush this in, but I'll create some tests with the current code so as we discuss the right options we can see how it affects those.

We could also support it now but minimise the blast radius, by putting it on Chain.onCancel(), so it's Jvm only.

@swankjesse what do you think about minimising the blast radius of the change, a new method on chain, would be usable for Interceptors, without a new public API for call cancellations for all clients.
Most clients can use the Callback.onFailure to check for cancellation.


text:
Replacing ConcurrentLinkedQueue with LinkedList

We won't have any concurrency issue here since it's in a thread local

Switch this back to an ArrayDeque? Ain't nobody got time for pre-9.
EPIC PR REVIVAL FROM THE DEAD!

I don't read GitHub notifications.

authors: JakeWharton pyricau

repo: square/otto


text:
Make ObjectQueue implement Iterable.

This also lets ObjectQueue provide a default implementation for
peek(n).

Almost want to use burst to verify the iterator behaviour for FileObjectQueue, InMemoryObjectQueue and QueueFile.

I was going to suggest making a parameterized runner for all file vs memory methods.

lgtm

I'll do the parameterized test runner as a follow up.

repo: square/tape


text:
🛑 MetaGer is down

In 50f1af5, MetaGer (https://metager.org) was down:

HTTP code: 503
Response time: 561 ms

Resolved: MetaGer is back up in e847120.

repo: sraaronrock/upptime


text:
Schema introspection (SHOW FULL COLUMNS ...) became very slow

In gitbase 0.20 schema introspection is fast and full.
MySQL Connector/J JDBC metadata call that gets all columns for all tables at once
metaData.getColumns("gitbase", "", "%", "%")
is converted to calls like the following for each table
SHOW FULL COLUMNS FROM `commit_trees` FROM `gitbase` LIKE '%'"
In 0.23 and 0.24-rc the above queries are very slow (several minutes) and even fail for some tables completely in 0.23 (0.24 seems to fix that).
The above prevents from using gitbase in DB tools like JetBrains DataGrip.

Thank you for the report, @gregsh! We'll take a look as soon as we can.

I'm introspecting gitbase schema using soon to be released version of DataGrip and Mysql Connector/J 8.0.15.
Here's the part of log, the ending quote does not belong to the query.
DEBU[31609] executing query                               query="/* ApplicationName=DataGrip 2019.3 Snapshot */ SHOW FULL COLUMNS FROM `blobs` FROM `gitbase` LIKE '%'" INFO[31609] audit trail                                   action=authorization address="127.0.0.1:58216" connection_id=15 permission=read pid=79 query="/* ApplicationName=DataGrip 2019.3 Snapshot */ SHOW FULL COLUMNS FROM `blobs` FROM `gitbase` LIKE '%'" success=true system=audit user=guest INFO[31609] audit trail                                   action=query address="127.0.0.1:58216" connection_id=15 duration="972.847µs" pid=79 query="/* ApplicationName=DataGrip 2019.3 Snapshot */ SHOW FULL COLUMNS FROM `blobs` FROM `gitbase` LIKE '%'" success=true system=audit user=guest

I have found that it depends on the size of a repository. On a small one (~70MB .git) it is fast, but on a large one (~ 9GB .git) it is extremely slow.

I just tried with the linux kernel and pytorch and it still takes milliseconds. Introspection never touches the repositories, so it should not depend on them.
Do you have indexes created in gitbase? Perhaps it's the indexes checksum when starting the server.

authors: agarciamontoro erizocosmico gregsh

repo: src-d/gitbase


text:
[WIP] Improve performance of buildIndex

A but chunk or time from a clone is spent building pack index. In current code the decoder is used to create the index but an specific method to build indexes may be used.
I am testing a two pass system where in the first pass the hashes for non delta objects and hierarchy of objects children are generated. In the delta objects hashes are computed and the index generated. Here are the flame graphs of the index building process with the previous code and the new test.
The test was done cloning git://github.com/numpy/numpy.git code from a local server.

Previous code (11.90s):

New code (9.52s):

There is still lots of time used in reading/decompressing/creating crc from the pack file as some objects are read twice and there is a significant time used in PatchDelta growing slice.
I am changing the code to add a cache that may decrease reading some objects twice and making PatchDelta objects bigger so they don't need to be grown. This issue will be updated with new findings.

Related: https://github.com/src-d/go-git/issues/719 but not the same.

Adding cache made the second part read and decompress less objects and made it faster (7 seconds). Overall memory consumption was increased 3x.

The algorithm was changed to create the dependency tree in the first pass and resolve the objects that had their resolved parents in the cache. The second pass resolves all the delta trees in order keeping only the needed bases in memory. This reduces memory consumption to previous levels and makes each object read twice at most. For small/medium repos it is slower than the current method (12.25s) but it's faster is bigger repositories (around 30% for a 500Mb repo).

authors: ajnavarro jfontan

repo: src-d/go-git


text:
fix crash when generating a unified diff with a small ending equal-chunk

Signed-off-by: Mechiel Lukkien mechiel@ueber.net
note: i'm not familiar with the code base. please review fix, and whether needs fixing in other places.
to reproduce, first create a git repo with a commit that has a small trailing equals-chunk:
mkdir git-test-repo
cd git-test-repo/
git init
yes | head -n10 >test.txt
git add test.txt
git commit -m test
(yes | head -n8; echo n; echo y) >test.txt
git commit -m test test.txt

now run the test program at the bottom, and observe the crash:
$ go run main.go -- git-test-repo/
2018/02/14 18:22:25 patch between commit
commit beccfaa9484487c5adad075ac96308ed9ab897d2
Author: Mechiel Lukkien <mechiel@ueber.net>
Date:   Wed Feb 14 18:10:24 2018 +0100

    test

and
commit c408553d8c54d91bf197fad054541722d16d471e
Author: Mechiel Lukkien <mechiel@ueber.net>
Date:   Wed Feb 14 18:10:24 2018 +0100

    test

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
gopkg.in/src-d/go-git.v4/plumbing/format/diff.(*hunksGenerator).processEqualsLines(0xc4200edd00, 0xc4201b4540, 0x1, 0x2, 0x3)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/diff/unified_encoder.go:265 +0x59d
gopkg.in/src-d/go-git.v4/plumbing/format/diff.(*hunksGenerator).Generate(0xc4200edd00, 0xc42005bdc0, 0x4, 0x4)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/diff/unified_encoder.go:180 +0x3f2
gopkg.in/src-d/go-git.v4/plumbing/format/diff.(*UnifiedEncoder).encodeFilePatch(0xc4200d6400, 0xc420124770, 0x1, 0x1, 0x1, 0xc4200d6400)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/diff/unified_encoder.go:85 +0x208
gopkg.in/src-d/go-git.v4/plumbing/format/diff.(*UnifiedEncoder).Encode(0xc4200d6400, 0x1612a00, 0xc42013e7b0, 0x13e40e0, 0x101)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/diff/unified_encoder.go:68 +0x65
gopkg.in/src-d/go-git.v4/plumbing/object.(*Patch).Encode(0xc42013e7b0, 0x160e980, 0xc4201b23f0, 0xc4200ede70, 0x10cb200)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/object/patch.go:107 +0x7c
gopkg.in/src-d/go-git.v4/plumbing/object.(*Patch).String(0xc42013e7b0, 0x1f, 0xc4200edf50)
	/Users/mjl/go/src/gopkg.in/src-d/go-git.v4/plumbing/object/patch.go:116 +0x5a
main.main()
	/Users/mjl/go/src/test/go-git-diff-bug/main.go:51 +0x3d8
exit status 2

then apply the patch in this pull request, and see the expected patch:
$ go run main.go -- git-test-repo/
2018/02/14 18:12:35 patch between commit
commit beccfaa9484487c5adad075ac96308ed9ab897d2
Author: Mechiel Lukkien <mechiel@ueber.net>
Date:   Wed Feb 14 18:10:24 2018 +0100

    test

and
commit c408553d8c54d91bf197fad054541722d16d471e
Author: Mechiel Lukkien <mechiel@ueber.net>
Date:   Wed Feb 14 18:10:24 2018 +0100

    test

2018/02/14 18:12:35 diff --git a/test.txt b/test.txt
index db7cbfc682f6343bb0e71e0cf774ba7a1ca1a37b..67c82c94116850ddfcf70fd43ae4ab2eb2242503 100644
--- a/test.txt
+++ b/test.txt
@@ -6,5 +6,5 @@ y
 y
 y
 y
-y
+n
 y

and the attached program that triggers the bug:
package main

import (
	"flag"
	"log"

	"gopkg.in/src-d/go-git.v4"
	"gopkg.in/src-d/go-git.v4/plumbing/object"
)

func check(err error, msg string) {
	if err != nil {
		log.Fatalf("%s: %s\n", msg, err)
	}
}

func main() {
	flag.Parse()
	args := flag.Args()
	if len(args) != 1 {
		log.Fatalf("pass git repo directory as parameter")
	}
	dir := args[0]
	repo, err := git.PlainOpen(dir)
	check(err, "plainopen")

	iter, err := repo.CommitObjects()
	check(err, "commitobjects")

	c0, err := iter.Next()
	check(err, "commit1")
	c1, err := iter.Next()
	check(err, "commit2")

	commits := []*object.Commit{c0, c1}
	if len(commits[0].ParentHashes) != 0 {
		commits = []*object.Commit{c1, c0}
	}

	t0, err := repo.TreeObject(commits[0].TreeHash)
	check(err, "treeobject first commit")
	t1, err := repo.TreeObject(commits[1].TreeHash)
	check(err, "treeobject second commit")

	p, err := t0.Patch(t1)
	check(err, "patch")

	log.Printf("patch between commit\n%s\nand\n%s\n", commits[0], commits[1])

	diff := p.String() // crashes

	log.Print(diff)
}

test has been added.

fyi, PR and comments are showing up as created by "ghost" because i turned my company github user account i was using into an organization.

authors: irias mjl-


text:
transition to open-source

Let's discuss what parts to simplify (if any) before making this repo public.
Some issues to address:

The README contains a lot of balena-related info, perhaps less focus on that
Some of the compose files contain balena-specific flags and variables and need to contain specific paths when built on non-balena operating systems
See if some parts of the code need improvement in terms of naming, refactoring, and comments
Decide if the code should be split into smaller modules
What parts to test and how to test them, e.g. flashing the firmware and onboarding the egw using the configurator(?)
Decide open-source license

I guess most of this stuff has been taken care of or already decided. closing...

repo: srcfl/srcful-gateway


text:
Problem unzipping large .ZIP files on Windows Explorer

I have a problem that large ZIP files generated using the normal Java ZipOutputStream causes the .ZIP files to throw an error when unzipping the .ZIP file using Windows Explorer. This is the error:

I am therefore hopeful that this library zip4j might help provide a solution to this problem.
So I would like to move from using Java ZipOutputStream to zip4j.
I wonder if the ZIP64 stuff in the Java ZipOutputStream is relevant for the problem I have:
/**
 * Whether to use ZIP64 for zip files with more than 64k entries.
 * Until ZIP64 support in zip implementations is ubiquitous, this
 * system property allows the creation of zip files which can be
 * read by legacy zip implementations which tolerate "incorrect"
 * total entry count fields, such as the ones in jdk6, and even
 * some in jdk7.
 */
private static final boolean inhibitZip64 =
 Boolean.parseBoolean(
 GetPropertyAction.privilegedGetProperty("jdk.util.zip.inhibitZip64"));

Would it be possible for zip4j to provide an API for setting and getting this ZIP64 variable?
Do you think the problem is related to ZIP64?

Zip4j automatically takes care of the Zip64 stuff for you, so you don't have to handle such cases manually. Just add your files to the zip, and zip4j takes care of managing the appropriate zip64 headers.

Thank you

authors: andreasrosdal srikanth-lingala


text:
Make it possible to use a mock process runner

this will allow us to create some basic end-to-end tests.
http://pimple.sensiolabs.org/ is probably an adequate DI container

the DI part is done, and we're now in a position where we can talk about testing.

repo: sroze/dock-cli

license: mit


text:
application:bug when applying

Default Current DateTime гирифтаниш дарокор , ман пештар базаба хамин чиза сет карда мемондам

repo: srp-internships/MRA-Jobs


text:
Support for limit on parallel task runs

We use this plugin (an older version) to execute npm scripts in our builds and with Gradle parallel run enabled. npm script we execute spawn multiple node.exe processes resulting very high CPU usage, which in turn slows down task execution.
Would it be possible to have limit on parallel NpmTask runs ?

Maybe a shared build service with limits on concurrent access could work?
But this repository is as far as I know abandoned, see https://github.com/srs/gradle-node-plugin/issues/315 for the history and the maintained fork

@deepy
I'll try shared build service approach.
This repo is indeed abandoned and I missed to check that.
Thank you (y)

authors: deepy iamrakesh

repo: srs/gradle-node-plugin


text:
🛑 Keycloak is down

In e56d28a, Keycloak (https://sso.srueg.ch/health) was down:

HTTP code: 502
Response time: 1000 ms

Resolved: Keycloak is back up in 84b502e.

repo: srueg/upptime


text:
Implement the SearchBox component

Implement the SearchBox component
Closes #77

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
1
❗

❗ storybook/utility-responsive-image--responsive-image__[w1920px]:

Before
After

Shot Type
Count
Status

Added
6
🟡

Deleted
0
❌

Regression
7
❗

🟡 custom/widgets-searchbox--cross-icon__[w900px] (click to expand)

Image

🟡 custom/widgets-searchbox--search-icon__[w900px] (click to expand)

Image

🟡 storybook/widgets-search-box--default__[w1440px] (click to expand)

Image

🟡 storybook/widgets-search-box--default__[w1920px] (click to expand)

Image

🟡 storybook/widgets-search-box--default__[w390px] (click to expand)

Image

🟡 storybook/widgets-search-box--default__[w900px] (click to expand)

Image

❗ custom/widgets-meal-nutrients--hint-opened__[w1920px] (click to expand)

Before
After

❗ custom/widgets-meal-nutrients--hint-opened__[w390px] (click to expand)

Before
After

❗ custom/widgets-navbar-opened__[w1440px] (click to expand)

Before
After

❗ custom/widgets-navbar-opened__[w1920px] (click to expand)

Before
After

❗ storybook/widgets-heart-rate--default__[w1440px] (click to expand)

Before
After

❗ storybook/widgets-heart-rate--default__[w1920px] (click to expand)

Before
After

❗ storybook/widgets-heart-rate--default__[w390px] (click to expand)

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
4
❗

❗ custom/widgets-meal-nutrients--hint-opened__[w1920px]:

Before
After

❗ custom/widgets-navbar-opened__[w1920px]:

Before
After

❗ custom/widgets-searchbox--cross-icon__[w900px]:

Before
After

❗ storybook/widgets-heart-rate--default__[w390px]:

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
3
❗

❗ custom/widgets-meal-nutrients--hint-opened__[w1440px]:

Before
After

❗ custom/widgets-meal-nutrients--hint-opened__[w1920px]:

Before
After

❗ storybook/widgets-heart-rate--default__[w390px]:

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
2
❗

❗ storybook/utility-responsive-image--responsive-image__[w1440px]:

Before
After

❗ storybook/utility-responsive-image--responsive-image__[w1920px]:

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
1
❗

❗ storybook/widgets-heart-rate--default__[w390px]:

Before
After

repo: ssagroup/ui-kit


text:
Popover issue fix

Closes #119

Shot Type
Count
Status

Added
8
🟡

Deleted
0
❌

Regression
1
❗

🟡 storybook/components-popover--interactions-enabled-on-hover__[w1440px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover__[w1920px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover__[w390px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover__[w900px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover-and-click__[w1440px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover-and-click__[w1920px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover-and-click__[w390px] (click to expand)

Image

🟡 storybook/components-popover--interactions-enabled-on-hover-and-click__[w900px] (click to expand)

Image

❗ storybook/utility-responsive-image--responsive-image__[w1440px]:

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
4
❗

❗ custom/widgets-collapsiblenavbar-opened__[w899px]_menu_opened:

Before
After

❗ custom/widgets-user-profile--is-opened__[w1920px]:

Before
After

❗ storybook/widgets-user-profile--default__[w1920px]:

Before
After

❗ storybook/widgets-user-profile--default__[w390px]:

Before
After


text:
训练数据的格式问题

请问这种场景可以吗？
fine tune时只有q没有a，比如我就想让模型读N篇论文，训练时没有问题和答案给它。每篇论文当作一个只有q没有a的训练数据。
然后训练好了模型以后，想问模型关于这N篇论文相关的问题，模型能解答嘛？

可以如下设置 q= [""] , a=“文本”  ，  修改下data_utils.py  'strategy': DataStrategy.doublesliding, 可以满足你这个需求。

感谢感谢，我去试试