Pricing guide documents a custom file path that the loader ignores
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- documentation
Línea de trabajo
Abre docs/compute/pricing.rst y revisa las secciones “Using a custom pricing file” y “Updating pricing” citadas en la issue. Corrige la ruta de precios personalizada para que coincida con el cargador y ajusta la descripción del origen de descarga al valor predeterminado actual indicado en la issue. El trabajo estará terminado cuando las tres referencias a rutas y la descripción obsoleta del origen reflejen correctamente esos valores predeterminados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 2.1k
- Forks
- 935
- Merge medio
- 5 d 3 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- 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 apache/libcloud
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Local range download leaves an output file after source-read failure despite delete_on_failure=TrueAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
apache/libcloud#2215 · 3 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/libcloud
Issues similares
-
Email validation accepts a trailing newlinePosiblemente ocupada @marcello-pichini la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Contributing instructionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dbt-labs/spark-utils#51 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
vendrabuck/HERD#1419 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día