Skip to content

Commit

Permalink
Added missing file_type param in one of MultiProjectManager object cr…
Browse files Browse the repository at this point in the history
…eation. Fixed wrong defaults for MultiProjectManager (#183)
  • Loading branch information
riccamini authored Nov 28, 2024
1 parent 51f44eb commit 78154e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions brickflow/cli/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def has_projects(self) -> bool:
class MultiProjectManager:
def __init__(
self,
config_file_name: str = BrickflowProjectConstants.DEFAULT_MULTI_PROJECT_CONFIG_FILE_NAME.value,
file_type: ConfigFileType = ConfigFileType.YAML,
config_file_name: str = f"{BrickflowProjectConstants.DEFAULT_MULTI_PROJECT_CONFIG_FILE_NAME.value}."
f"{BrickflowProjectConstants.DEFAULT_CONFIG_FILE_TYPE.value}",
file_type: ConfigFileType = BrickflowProjectConstants.DEFAULT_CONFIG_FILE_TYPE,
) -> None:
self.file_type = file_type
self._config_file: Path = Path(config_file_name)
Expand Down
5 changes: 4 additions & 1 deletion brickflow/codegen/databricks_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
ctx,
get_brickflow_version,
get_bundles_project_env,
get_config_file_type,
)
from brickflow.bundles.model import (
Bundle,
Expand Down Expand Up @@ -462,8 +463,10 @@ def adjust_file_path(self, file_path: str) -> str:
]
).replace("//", "/")

brickflow_root = str(get_brickflow_root())
multi_project_manager = MultiProjectManager(
config_file_name=str(get_brickflow_root())
config_file_name=brickflow_root,
file_type=get_config_file_type(brickflow_root),
)
bf_project = multi_project_manager.get_project(self.project.name)

Expand Down

0 comments on commit 78154e4

Please sign in to comment.