Pricing guide documents a custom file path that the loader ignores
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
docs/compute/pricing.rst を開き、issue で挙げられている「Using a custom pricing file」と「Updating pricing」の各セクションを確認してください。カスタム価格ファイルのパスをローダーに一致するよう修正し、ダウンロード元の説明を issue に記載されている現在のデフォルトに合わせてください。3 つすべてのパス参照と古いダウンロード元の説明が、それらのデフォルトを正確に反映したら完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
The pricing guide tells users to put custom pricing in ~/.libcloud.pricing.json, but Libcloud reads ~/.libcloud/pricing.json. Following the documented setup leaves the custom data unused.
At current trunk 8a0ef6260680625d54fce5093d2315e0926a7dc9, the incorrect path appears twice under Using a custom pricing file and once under Updating pricing in docs/compute/pricing.rst.
Detailed Information
Reproduced with Python 3.12 on Linux using unchanged Libcloud 4.0.0.dev0. This uses temporary directories and fresh subprocesses, so an existing home-directory file or in-memory pricing cache does not affect the result. No cloud service or pricing-data download is involved.
import json
import os
import subprocess
import sys
import tempfile
from pathlib import Path
probe = '''
from libcloud import pricing
path = pricing.get_pricing_file_path()
print("selected", "custom" if path == pricing.CUSTOM_PRICING_FILE_PATH else "bundled")
try:
print("price", pricing.get_size_price("compute", "local_probe", "small"))
except KeyError:
print("custom driver unavailable")
'''
with tempfile.TemporaryDirectory() as tmp:
home = Path(tmp)
content = json.dumps({"compute": {"local_probe": {"small": 0.125}}, "storage": {}})
(home / ".libcloud.pricing.json").write_text(content)
env = dict(os.environ, HOME=tmp)
subprocess.run([sys.executable, "-c", probe], env=env, check=True)
# selected bundled
# custom driver unavailable
(home / ".libcloud").mkdir()
(home / ".libcloud" / "pricing.json").write_text(content)
subprocess.run([sys.executable, "-c", probe], env=env, check=True)
# selected custom
# price 0.125
The expected documentation path is ~/.libcloud/pricing.json, matching CUSTOM_PRICING_FILE_PATH, get_pricing_file_path() and the existing upgrade notes. With the documented dot-separated path, the loader silently falls back to bundled data; for this synthetic custom-only driver the lookup then raises KeyError.
The Updating pricing paragraph also says the default download source is the git repository, while the function currently defaults to DEFAULT_FILE_URL_S3_BUCKET; the preceding section already describes that S3 service. It would be useful to bring that paragraph into line with the current defaults at the same time.
This is a documentation report, not a change to actual prices or a claim about provider billing. No full test suite or live download was run.
- 主要言語
- Python
- スター
- 2.1k
- フォーク
- 935
- 平均マージ
- 5日 3時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/libcloud のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Local range download leaves an output file after source-read failure despite delete_on_failure=Trueオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
apache/libcloud#2215 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
apache/libcloud の issue をすべて見る
似ている issue
-
Email validation accepts a trailing newline対応中かも @marcello-pichini が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dbt-labs/spark-utils#51 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
vendrabuck/HERD#1419 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信