[TASK] Postman: collections hard-code localhost:8080 instead of {{serverURL}}
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #38240 de @swicken — fusionado
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza en dotcms-postman/src/main/resources/postman/ y encuentra las 17 URL de solicitudes codificadas directamente como localhost:8080; después, inspecciona JobQueueResourceAPITests.postman_collection.json para localizar referencias a baseUrl en las solicitudes y los scripts. Sustituye esas direcciones por {{serverURL}} del entorno, tal como se describe, y conserva los valores indicados fuera del alcance. Comprueba el criterio de aceptación de grep y ejecuta GraphQLTests.json y otra colección afectada con un puerto distinto de 8080.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Some Postman collections hard-code http://localhost:8080 as the request address instead of using the {{serverURL}} environment variable that the rest of the suite uses. Those requests fail whenever dotCMS listens on any port other than 8080, so a local Postman run can't use a different port. That rules out running a second, isolated stack next to another one on the same machine. CI is not affected today because it publishes Tomcat on 8080.
A local run of GraphQLTests.json against a stack on port 28480 stopped at the "Switch Host" request with ECONNREFUSED 127.0.0.1:8080.
Part of epic #34645 (CI/CD pipeline stability).
Where
All files are under dotcms-postman/src/main/resources/postman/.
- There are 17 request URLs written as
"raw": "http://localhost:8080/...", withhost: ["localhost"]andport: "8080". Find them withgrep -n '"raw": "http://localhost:8080' *.json. The count per file is:UserResource.postman_collection.json: 6PagesResourceTests.json: 3Workflow_Resource_Tests.json: 3Template_Resource.postman_collection.json: 2GraphQLTests.json: 1 ("Switch Host")Integrity_Checker_JWT_Token_Test.postman_collection.json: 1NavResourceTests.json: 1
JobQueueResourceAPITests.postman_collection.jsonsets its own collection variablebaseUrltohttp://localhost:8080. 38 requests use it as{{baseUrl}}, and 3 scripts read it withpm.collectionVariables.get("baseUrl").
Fix
- Each of the 17 requests should use
{{serverURL}}/...withhost: ["{{serverURL}}"]and noport, matching the requests next to it. - In JobQueueResourceAPITests, the requests and scripts should use the environment's
serverURLinstead of the hard-codedbaseUrl.
Out of scope
- Collection variables named
serverURLwhose value islocalhost:8080. The runner (index.js) passesserverURLas an environment variable, which overrides them. Originheader values oflocalhost:8080. These are header values, not request addresses.- The note in
dotcms-postman/pom.xmlabout ApiToken_Resource needing the external port to equal the internal one. That is a server-side matter.
Acceptance Criteria
grep -n 'localhost:8080' dotcms-postman/src/main/resources/postman/*.jsonfinds only the out-of-scope collection-variable andOriginheader entries.- Each affected collection passes when run locally against a stack on port 8080, as before.
GraphQLTests.json, and at least one other affected collection, pass when run locally against a stack on a port other than 8080.
- Lenguaje dominante
- Java
- Estrellas
- 972
- Forks
- 489
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 199
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 dotCMS/core
-
Escape the Binary field hint in the legacy content editor so an apostrophe doesn't break the fieldAbiertoOKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
dotCMS : Permissions OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
dotCMS : UVE OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dotCMS/core#38260 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Enable the Add to Bundle action in the Pages portlet row menu (hard-coded disabled since PR 34715)AbiertodotCMS : Push Publishing OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 2 días
Todos los issues de dotCMS/core
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aws/context-ontology-accelerator#325 ·
Los mantenedores suelen responder en 1 día
-
The README tells to run `mvn jeo:disassemble`, which fails with `No plugin found for prefix 'jeo'`Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
objectionary/jeo-maven-plugin#1938 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oVirt/ovirt-engine#1219 ·
Los mantenedores suelen responder en 1 día
-
pending:code-area pending:issue-category to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
area:core bug priority:p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aomarai/minecraft-mcp#247 ·
Los mantenedores suelen responder en 1 día