data_drain 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +34 -0
- data/CLAUDE.md +3 -1
- data/README.md +3 -2
- data/docs/IMPROVEMENT_PLAN.md +1417 -0
- data/docs/execution/archive/v0.2.0.agente-review.md +125 -0
- data/docs/execution/archive/v0.2.0.md +812 -0
- data/docs/execution/v0.2.2.md +891 -0
- data/docs/glue_pyspark_example.py +60 -0
- data/lib/data_drain/configuration.rb +49 -5
- data/lib/data_drain/engine.rb +1 -0
- data/lib/data_drain/file_ingestor.rb +1 -0
- data/lib/data_drain/glue_runner.rb +22 -10
- data/lib/data_drain/observability.rb +4 -2
- data/lib/data_drain/record.rb +2 -1
- data/lib/data_drain/storage/s3.rb +33 -37
- data/lib/data_drain/version.rb +1 -1
- data/skill/SKILL.md +1 -0
- data/skill/references/antipatrones.md +21 -4
- data/skill/references/api-detallada.md +18 -5
- data/skill/references/eventos-telemetria.md +5 -0
- data/skill/references/postgres-tuning.md +129 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce021179463aeff31239f3bba35fc8b663633bfd648a2584a723b64b5d444387
|
|
4
|
+
data.tar.gz: b41a91f9a7792f952402c7ac2c9dc981e8372178df200c66e9d7fd8c63753c9c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a23130f9892dfc34dfa748a50de6de5f768135d9b3bf012da0f648d322be6b11d0b20bbaf7e783d92a189cfc6e459cb7dc885800ea436f10d177f434e084e018
|
|
7
|
+
data.tar.gz: acbe4ed9caf168c7519881bce74c8ca90d8392bc8ee1f3718af600e64cfdacd3991f8860691db2b2ad9bb0c949aa88f0015f21e847f540030489951ba81f9ef0
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.2.2] - 2026-04-14
|
|
4
|
+
|
|
5
|
+
### Security
|
|
6
|
+
- `Observability#safe_log` filtra secretos con regex `/password|passwd|pass|secret|token|api_key|apikey|auth|credential|private_key/i` — ahora captura variantes como `db_password`, `aws_secret_access_key`, `bearer_token`, `private_key`, `*credential*`. (item 9)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
- `GlueRunner.run_and_wait` acepta `max_wait_seconds:` para evitar bloqueo indefinido. Default `nil` (sin límite, backward-compatible). Emite `glue_runner.timeout` y levanta `DataDrain::Error` cuando excede. (item 7)
|
|
10
|
+
- `Configuration#validate!` y `Configuration#validate_for_engine!` invocados automáticamente en `Engine`, `FileIngestor` y `GlueRunner`. Falla rápido con errores descriptivos si falta configuración. (item 8)
|
|
11
|
+
|
|
12
|
+
### Docs
|
|
13
|
+
- `skill/references/postgres-tuning.md`: guía de tuning Postgres por tamaño de tabla — índices, VACUUM post-purga, particionamiento, diagnóstico. (item 11a)
|
|
14
|
+
|
|
15
|
+
### Cleanups (review PR #6)
|
|
16
|
+
- Fix typo `依赖` en CHANGELOG v0.2.1 (A1).
|
|
17
|
+
- Comment explicativo en `Record.disconnect!` rescue (A2).
|
|
18
|
+
- Cobertura real string-keys vs symbol-keys en `Record.build_query_path` (A3).
|
|
19
|
+
- Cerrar conn+db en `record_spec.rb#before(:all)` para evitar memory leak en suite (A4).
|
|
20
|
+
- Reorder `public`/`private` en `storage/s3.rb` (B1).
|
|
21
|
+
|
|
22
|
+
### BREAKING (preventivo)
|
|
23
|
+
- `Engine.new` / `FileIngestor.new` / `GlueRunner.run_and_wait` ahora levantan `DataDrain::ConfigurationError` en el boot si la configuración está incompleta. Antes fallaban tarde con errores oscuros. La gema aún no está en uso en producción — no hay impacto real.
|
|
24
|
+
|
|
25
|
+
## [0.2.1] - 2026-04-13
|
|
26
|
+
|
|
27
|
+
### Correcciones
|
|
28
|
+
- CI: Descarga binario pre-compilado de DuckDB en vez de depender del sistema (`libduckdb-dev`). Soporta Ruby 3.4.4 en GitHub Actions.
|
|
29
|
+
- CI: Opt-in a Node.js 24 (`FORCE_JAVASCRIPT_ACTIONS_TO_NODE24`).
|
|
30
|
+
- CI: Ejecuta solo specs en CI (RuboCop vía local) para evitar 48 ofensas pre-existentes en specs.
|
|
31
|
+
- PR feedback: Test `aws_region` con comillas, `minimum_coverage` 80%, antipatrón 12 actualizado.
|
|
32
|
+
|
|
33
|
+
### Mantenimiento
|
|
34
|
+
- `.gitignore`: Agregados `.agents/`, `.env`, `skills.lock`, `skills.yml`.
|
|
35
|
+
- `docs/IMPROVEMENT_PLAN.md`: Items 1-4 (P0) marcados como completados.
|
|
36
|
+
|
|
3
37
|
## [0.2.0] - 2026-04-13
|
|
4
38
|
|
|
5
39
|
### Security
|
data/CLAUDE.md
CHANGED
|
@@ -59,7 +59,7 @@ La telemetría debe ser estructurada (KV) para ser procesada por `exis_ray`.
|
|
|
59
59
|
- **Automatización:** El campo `source` lo inyecta automáticamente `exis_ray` — no incluirlo manualmente.
|
|
60
60
|
- **DEBUG:** Siempre en forma de bloque: `logger.debug { "k=#{v}" }`.
|
|
61
61
|
- **Duraciones:** Usar siempre `Process.clock_gettime(Process::CLOCK_MONOTONIC)`.
|
|
62
|
-
- **Sensibilidad:**
|
|
62
|
+
- **Sensibilidad:** `Observability#safe_log` filtra claves con regex `/password|passwd|pass|secret|token|api_key|apikey|auth|credential|private_key/i` → `[FILTERED]`.
|
|
63
63
|
|
|
64
64
|
## Código Ruby
|
|
65
65
|
|
|
@@ -79,3 +79,5 @@ bin/console # REPL de desarrollo
|
|
|
79
79
|
|
|
80
80
|
- `limit_ram` y `tmp_directory` en la configuración evitan OOM en contenedores
|
|
81
81
|
- DuckDB usa spill-to-disk automáticamente cuando `tmp_directory` está seteado
|
|
82
|
+
- Ver `skill/references/postgres-tuning.md` para guía de tuning por tamaño de tabla:
|
|
83
|
+
índices, VACUUM post-purga, y particionamiento declarativo para tablas >100GB
|
data/README.md
CHANGED
|
@@ -51,6 +51,9 @@ DataDrain.configure do |config|
|
|
|
51
51
|
config.limit_ram = '2GB' # evita OOM en contenedores
|
|
52
52
|
config.tmp_directory = '/tmp/duckdb_work' # spill-to-disk (preferir SSD/NVMe)
|
|
53
53
|
|
|
54
|
+
# Tuning de Postgres: ver skill/references/postgres-tuning.md
|
|
55
|
+
# Índices para DELETE, VACUUM post-purga, particionamiento para tablas >100GB
|
|
56
|
+
|
|
54
57
|
config.logger = Rails.logger
|
|
55
58
|
end
|
|
56
59
|
```
|
|
@@ -124,8 +127,6 @@ DataDrain::Engine.new(
|
|
|
124
127
|
).call
|
|
125
128
|
```
|
|
126
129
|
|
|
127
|
-
Script PySpark de referencia: [`docs/glue_pyspark_example.py`](docs/glue_pyspark_example.py).
|
|
128
|
-
|
|
129
130
|
### Consultar el Data Lake (Record)
|
|
130
131
|
|
|
131
132
|
```ruby
|