[TASK] Postman: collections hard-code localhost:8080 instead of {{serverURL}}
メンテナーはふだん 2 日以内に返信
関連するプルリクエストがすでにマージされています。
- #38240 @swicken による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
dotcms-postman/src/main/resources/postman/から始めて、localhost:8080がハードコードされた17個のリクエストURLを見つけます。次に、JobQueueResourceAPITests.postman_collection.jsonを調べ、リクエストとスクリプト内のbaseUrl参照を確認します。説明に従ってこれらのアドレスを環境の{{serverURL}}に置き換え、対象外として列挙された値はそのままにします。grepの受け入れ基準を確認し、GraphQLTests.jsonと、影響を受ける別のcollectionを8080以外のポートで実行します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 972
- フォーク
- 489
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 188
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotCMS/core のほかの issue
-
dotCMS : UVE OKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dotCMS/core#38260 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Enable the Add to Bundle action in the Pages portlet row menu (hard-coded disabled since PR 34715)オープンdotCMS : Push Publishing OKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
[TASK] Postman and Karate test stacks sleep 3 s after every write対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンTeam : Platform Type : Test Automation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
dotCMS/core#38225 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
OKR : Customer Support Team : Falcon Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oracle/graalvm-reachability-metadata#11472 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
objectionary/hone-maven-plugin#1353 ·
メンテナーはふだん 9 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
Update samples to Citrus 5.1.0対応中かも @asuruceanu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/doris#69863 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信