Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various issues from e2e testing: #591

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions splitgraph/cloud/project/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ def generate_splitgraph_yml(
"metadata": CM(
{
"description": "Sample dbt model",
"readme": "## Sample dbt model\n\n"
"This is an autogenerated model referencing data from:\n\n"
+ "\n".join(f" * [/{r}](/{r})" for r in repository_names),
"readme": {
"text": "## Sample dbt model\n\n"
"This is an autogenerated model referencing data from:\n\n"
+ "\n".join(f" * [/{r}](/{r})" for r in repository_names)
},
}
),
}
Expand Down
6 changes: 4 additions & 2 deletions splitgraph/cloud/project/github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def generate_job(
steps.append(
{
"name": "Set up dbt Git URL",
"run": 'echo "$CREDENTIALS_YML" > splitgraph.credentials.yml'
+ '\nsed -i "s|\\$THIS_REPO_URL|https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY|g" splitgraph.credentials.yml',
"run": [
'echo "$CREDENTIALS_YML" > splitgraph.credentials.yml',
'sed -i "s|\$THIS_REPO_URL|https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY|g" splitgraph.credentials.yml',
],
"shell": "bash",
"env": {
"CREDENTIALS_YML": "${{secrets.SPLITGRAPH_CREDENTIALS_YML}}",
Expand Down
10 changes: 0 additions & 10 deletions splitgraph/cloud/project/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@
# if you are running a local Splitgraph engine and are developing this dbt model against it.
profile: 'splitgraph_template'

# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ config-version: 2
# if you are running a local Splitgraph engine and are developing this dbt model against it.
profile: 'splitgraph_template'

# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ jobs:
splitgraph_api_key: ${{ secrets.SPLITGRAPH_API_KEY }}
splitgraph_api_secret: ${{ secrets.SPLITGRAPH_API_SECRET }}
- name: Set up dbt Git URL
run: "echo \"$CREDENTIALS_YML\" > splitgraph.credentials.yml\nsed -i \"s|\\\
$THIS_REPO_URL|https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY|g\"\
\ splitgraph.credentials.yml"
run:
- echo "$CREDENTIALS_YML" > splitgraph.credentials.yml
- sed -i "s|\$THIS_REPO_URL|https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY|g"
splitgraph.credentials.yml
shell: bash
env:
CREDENTIALS_YML: ${{secrets.SPLITGRAPH_CREDENTIALS_YML}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ config-version: 2
# if you are running a local Splitgraph engine and are developing this dbt model against it.
profile: 'splitgraph_template'

# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,6 @@ repositories:
tables: {}
metadata:
description: Sample dbt model
readme: "## Sample dbt model\n\nThis is an autogenerated model referencing data\
\ from:\n\n * [/myns/postgres_fdw](/myns/postgres_fdw)\n * [/myns/airbyte-postgres](/myns/airbyte-postgres)"
readme:
text: "## Sample dbt model\n\nThis is an autogenerated model referencing data\
\ from:\n\n * [/myns/postgres_fdw](/myns/postgres_fdw)\n * [/myns/airbyte-postgres](/myns/airbyte-postgres)"