Feign mixing up two separate request/response within the same client
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java, spring-boot
Línea de trabajo
Comienza con la interfaz Feign PlaceholderResource y FeignConfiguration; después, compara los registros de solicitudes concurrentes, las URL y los identificadores de correlación que se muestran en el informe. Se considera terminado cuando se haya reproducido la mezcla de respuestas entre solicitudes y se haya identificado el componente o la configuración de Feign responsable de devolver la respuesta de una llamada a la API a otra.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi
I have been using feign for calls from one spring boot application to another in an infrastructure which has a large volume of API calls. Recently I have been getting an intermittent issue which says that the response received to one of the feign client calls cannot be resolved to the Object that it expects. Upon further debugging, I saw that the response received on this feign call is an unexpected response as it is supposed to be received on a completely different feign call.
Feign logs:
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] ---> GET http://placeholder-url.com/v5/getplaceholdertype/123/type/1234 HTTP/1.1
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] X-MM-CORRELATION-ID: correlation-id-1
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] ---> END HTTP (0-byte body)
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] <--- HTTP/1.1 200 OK (0ms)
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] content-type: application/json
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] link: <http://placeholder-url.com/v5/api/getplaceholderobject/123/user/123123/placeholderobject?param1=123123¶m2=true¶m3=false&page=-1&size=100>; rel="last" <http://placeholder-url.com/v5/api/getplaceholderobject/123/user/123123/placeholderobject?param1=123123¶m2=true¶m3=false&page=-1&size=100>; rel="first"
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] vary: accept-encoding
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] x-mm-correlation-id: correlation-id-2
Jul 5, 2023 @ 18:33:44.518 [PlaceholderResource#getPlaceholderType] date: Wed 05 Jul 2023 14:33:34 GMT
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] x-total-count: 0
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] x-result-count: 0-0/0
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] []
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType] <--- END HTTP (2-byte body)
Jul 5, 2023 @ 18:33:44.519 [PlaceholderResource#getPlaceholderType]
The URL returned in the link header is sent back from a different URL used for getPlaceholderObjects API and not the getPlaceholderType API
This [] response is expected for the getPlaceholderObjects API. Even the correlation ID header we're receiving is for a different API call which is supposed to be running in a different thread.
Feign interface:
@FeignClient(
name = "placeholderResource",
url = "${placeholder.api.url}")
@Headers("Content-Type: application/json")
public interface PlaceholderResource {
/**
* Get placeholder type
*/
@GetMapping(
value = "/getplaceholdertype/{referrerId}/type/{placeholderTypeId}")
PlaceholderType getPlaceholderType(@PathVariable("referrerId") final Integer referrerId,
@PathVariable("placeholderTypeId") final Long placeholderTypeId);
/**
* Get placeholder object(s)
*/
@GetMapping(
value = "/getplaceholderobject/{referrerId}/user/{userId}/placeholderobject")
PlaceholderObject[] getPlaceholderObjects(@PathVariable("referrerId") final Integer referrerId,
@PathVariable("userId") final Long userId,
@RequestParam("param1") final List<Long> param1,
@RequestParam("param2") final String param2,
@RequestParam("param3") final Boolean param3);
}
Feign configuration:
/**
* Configuration class for feign client(s).
*/
@Configuration
@EnableDiscoveryClient
public class FeignConfiguration {
@Bean
public FeignClientEncodingProperties feignClientEncodingProperties() {
return new FeignClientEncodingProperties();
}
@Bean
public ErrorDecoder feignErrorDecoder() {
return new CustomFeignErrorDecoder();
}
}
- Lenguaje dominante
- Java
- Estrellas
- 9.8k
- Forks
- 2k
- Merge medio
- 1 h 23 min
- PR fusionados (30 d)
- 31
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenFeign/feign
-
DefaultAsyncClient never completes the returned future when Client throws ErrorPosiblemente ocupada @hutiefang76 la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Response.charset ignores charset after another Content-Type parameterPosiblemente ocupada @hutiefang76 la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
UriUtils ignores allowReservedCharacters=false when the input has no percent tripletPosiblemente ocupada @hutiefang76 la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Java11 Http2Client loses response header value order and duplicate occurrencesPosiblemente ocupada @hutiefang76 la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Java11 Http2Client rejects documented zero connect and read timeoutsPosiblemente ocupada @hutiefang76 la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de OpenFeign/feign
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
wpilibsuite/SystemcoreTesting#446 ·
Los mantenedores suelen responder en 1 día
-
frontend quality-assurance
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#212 ·
Los mantenedores suelen responder en 1 día
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Docs: AGENTS.md agent/ module-map bullet missing AgentWriteRules — the deny-by-default write gateAbiertodocumentation hermes-queue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
chrisalunlloyd2-sudo/mindpalace#334 ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días