Skip to content

Commit

Permalink
create default config on create schema
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Nov 7, 2023
1 parent 5f38b63 commit db2e871
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [23.09/1.8.3] 2023-11-07
### fixed
- ingest default config to raw keyspace on create to avoid problems.

## [23.09/1.8.2] 2023-10-24
### fixed
- catch error on coinmarketcap problems

## [23.09/1.8.1] 2023-10-06
### fixed
- handle zcash shielded inputs in import
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL := /bin/bash
PROJECT := graphsense-lib
VENV := venv
RELEASE := 'v23.09'
RELEASESEM := 'v1.8.2'
RELEASESEM := 'v1.8.3'

all: format lint test build

Expand Down
12 changes: 12 additions & 0 deletions src/graphsenselib/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,18 @@ def create_keyspace_if_not_exist(self, env, currency, keyspace_type):
f"with replication config {replication_config}."
)

if not keyspacedb.is_configuration_populated():
config_defaults = (
config.get_keyspace_config(env, currency)
.keyspace_setup_config[keyspace_type]
.data_configuration
)
logger.warning(
"Config table in transformed not populated."
f" Setting default values {config_defaults}."
)
keyspacedb.ingest("configuration", [config_defaults])

def create_new_transformed_ks_if_not_exist(self, env, currency, suffix=None):
keyspace_type = "transformed"
with DbFactory().from_config(env, currency) as db:
Expand Down

0 comments on commit db2e871

Please sign in to comment.