Pricing guide documents a custom file path that the loader ignores
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation
Hướng nghiên cứu
Mở docs/compute/pricing.rst và xem lại các phần “Using a custom pricing file” và “Updating pricing” được nêu trong issue. Sửa đường dẫn giá tùy chỉnh cho khớp với loader, đồng thời điều chỉnh mô tả nguồn tải xuống theo mặc định hiện tại được ghi trong issue. Hoàn thành khi cả ba tham chiếu đường dẫn và mô tả nguồn đã lỗi thời đều phản ánh chính xác các mặc định đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 2.1k
- Fork
- 935
- Merge trung bình
- 5 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/libcloud
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Local range download leaves an output file after source-read failure despite delete_on_failure=TrueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
apache/libcloud#2215 · 3 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/libcloud
Issue tương tự
-
Email validation accepts a trailing newlineCó thể đã có người làm @marcello-pichini đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Contributing instructionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dbt-labs/spark-utils#51 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vendrabuck/HERD#1419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày