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

Codespaces proof-of-concept #208

Merged
merged 17 commits into from
Nov 8, 2023
Merged

Codespaces proof-of-concept #208

merged 17 commits into from
Nov 8, 2023

Conversation

ian-r-rose
Copy link
Member

Fixes #203

Would appreciate feedback from @britt-allen or @matthewzhou. There is some documentation for how to set things up here

Comment on lines +21 to +29
"SNOWFLAKE_USER": {
"description": "Your Snowflake Username"
},
"SNOWFLAKE_PASSWORD": {
"description": "Your Snowflake Password"
},
"DBT_SCHEMA": {
"description": "The dev schema into which to build your dbt models (e.g. DBT_<YOURNAME>)"
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the secrets that you need to set in order to do dbt-related work in the codespace

language: python
entry: dbt deps --project-dir=transform
language: system
entry: poetry run dbt deps --project-dir transform
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caught some real bugs in the pre-commit set-up when doing this!

mkdocs.yml Outdated
Comment on lines 37 to 42
- dbt:
- Overview: dbt.md
- dbt Performance: dbt-performance.md
- dbt Snowflake Project: dbt_docs_snowflake/index.html
- dbt BigQuery Project: dbt_docs_bigquery/index.html
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by change, organizing some of the dbt-related docs into a folder

@ian-r-rose ian-r-rose self-assigned this Sep 21, 2023
@britt-allen britt-allen self-assigned this Oct 3, 2023
@ian-r-rose ian-r-rose force-pushed the devcontainer branch 2 times, most recently from 82cfd7f to 9c6d0fc Compare October 31, 2023 22:18
@britt-allen
Copy link
Contributor

britt-allen commented Oct 31, 2023

There are no instructions for what to do after you get to this screen. This screen comes immediately after clicking "New with options..." @ian-r-rose I assumed I should create a new branch so I did that and left the other defaults untouched.
Screenshot 2023-10-31 at 4 42 08 PM

@britt-allen
Copy link
Contributor

I did not have an option to add "Recommended Secrets" as the docs say immediately following creation of a codespace with options. This is the screen (below) I was taken to immediately after. It's unclear if I should expect to see the form listed in the docs or if I have to navigate to it. If the latter the instructions are lacking.
Screenshot 2023-10-31 at 4 45 46 PM

@ian-r-rose
Copy link
Member Author

Did you try to create the codespace from the devcontainer branch?

@ian-r-rose
Copy link
Member Author

You should go to the devcontainer branch to create the codespace. If this is in main, that step will not be necessary, so it seemed incorrect to add it to the docs

@britt-allen
Copy link
Contributor

Wow this was SO easy, I am not sure whatever magic you did in the background, but this just works. Thanks @ian-r-rose. I cannot wait to show this off to future MDSA trainees.

One question the docs doesn't answer: "Should we let Visual Studio Code periodically run git fetch?" this is a pop up I got while using codespaces. Want to provide guidance, but seems like it's a personal preference thing. If I do have git fetch running in the background can I still run git pull to get changes into my working directory or will I only be able to use git merge since git fetch is being run?

@britt-allen britt-allen merged commit d3cc815 into main Nov 8, 2023
2 checks passed
@ian-r-rose
Copy link
Member Author

Thanks for testing it out!

One question the docs doesn't answer: "Should we let Visual Studio Code periodically run git fetch?" this is a pop up I got while using codespaces. Want to provide guidance, but seems like it's a personal preference thing.

To be honest, I'm not sure what to recommend here, I don't really understand what the VS Code git extension does when you say yes. I suspect you are right that it's a personal preference thing, though I usually avoid automated git actions because (in my experience) it's an easy way to get into trouble with your git history.

If I do have git fetch running in the background can I still run git pull to get changes into my working directory or will I only be able to use git merge since git fetch is being run?

I think you should still be able to run normal git operations, even if the extension is also doing things occasionally in the background. But I'm not 100% sure, having not really experimented with it myself.

@ian-r-rose ian-r-rose deleted the devcontainer branch November 8, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate GitHub codespaces as a serverless hosted coding environment
2 participants