Skip to content

Commit

Permalink
use pwd
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Feb 3, 2025
1 parent 8e482fe commit c695362
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build_prod_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# NOTE: this only tests building, there is no good way to test
# runtime functionality in prod without using pytest
name: Test Prod Build

on:
workflow_dispatch: # Allows manual triggering of the workflow
push:
Expand All @@ -21,3 +22,7 @@ jobs:

- name: Launch Docker Compose
run: python3 main.py prod --detach

- name: Debug Docker Containers
shell: bash
run: docker ps -a
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"args": ["dev"],
"subProcess": true,
"env": {
"DAGSTER_POSTGRES_HOST": "0.0.0.0"
"DAGSTER_POSTGRES_HOST": "0.0.0.0",
"DAGSTER_HOME": "$PWD"
}
}
]
}
}
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main():
"DAGSTER_POSTGRES_HOST=dagster_postgres docker compose --profile localInfra --profile production -f Docker/Docker-compose.yaml down"
)
elif args.command == "dagster-dev":
run_subprocess("DAGSTER_POSTGRES_HOST=0.0.0.0 dagster dev")
run_subprocess("DAGSTER_POSTGRES_HOST=0.0.0.0 DAGSTER_HOME=$PWD dagster dev")
elif args.command == "dev":
up(profiles=["localInfra"], build=args.build, detach=args.detach)
elif args.command == "prod":
Expand All @@ -144,4 +144,7 @@ def main():


if __name__ == "__main__":
assert os.path.dirname(os.path.abspath(__file__)) == os.getcwd(), (
"Please run this script from the root of the repository"
)
main()
4 changes: 1 addition & 3 deletions userCode/lib/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ def strict_env(key: str):
LAKEFS_ACCESS_KEY_ID = strict_env("LAKEFS_ACCESS_KEY_ID")
LAKEFS_SECRET_ACCESS_KEY = strict_env("LAKEFS_SECRET_ACCESS_KEY")

DAGSTER_YAML_CONFIG = os.path.join(
os.path.dirname(__file__), "..", "..", "dagster.yaml"
)
DAGSTER_YAML_CONFIG = os.path.join(strict_env("DAGSTER_HOME"), "dagster.yaml")
assert os.path.exists(DAGSTER_YAML_CONFIG), (
f"the dagster.yaml file does not exist at {DAGSTER_YAML_CONFIG}"
)

0 comments on commit c695362

Please sign in to comment.