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

Adopt with_model #36

Merged
merged 3 commits into from
Aug 12, 2022
Merged

Adopt with_model #36

merged 3 commits into from
Aug 12, 2022

Conversation

duncanjbrown
Copy link
Contributor

I found this extremely useful gem which lets us declare the app's models at the top of specs instead of maintaining them as state in the dummy app 🙌 .

Migrate existing specs to it. I'll rebase the auto-init branch on top of this.

This is significantly cleaner than setting up models in the dummy app

Note that we must clear entity_model_mapping between specs to avoid
state leakage - this isn't great but we can fix later
Copy link
Contributor

@misaka misaka left a comment

Choose a reason for hiding this comment

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

I really like this with_model thing, however, a couple concerns.

  1. I was wondering if the right way for us to check end-to-end integration with BigQuery is to use the dummy app that gets superceded by with_model here.
  2. We've removed the dummy apps models, but the controllers stay there. It could be nice to keep the dummy app as a more complete example of how to setup an app, which could integrate nicely the integration tests mentioned above.

So ... options:

  1. Use the dummy app for these purposes.
  2. Setup a separate dummy app for integration testing that also demonstrates how things are setup.

Also, is there a way to make models without requiring ActiveRecord? Something like active_attr? Although I think our other PR more closely ties us to ActiveRecord so maybe not.

@duncanjbrown
Copy link
Contributor Author

As discussed:

  • We're going to clean up the models in dummy app so they're not dangling
  • We're going to try and add a proper e2e integration test that goes all the way to BQ, for running in CI with suitable creds

@duncanjbrown
Copy link
Contributor Author

updated!

@duncanjbrown duncanjbrown merged commit 72e7e7e into main Aug 12, 2022
@duncanjbrown duncanjbrown deleted the with_model branch August 12, 2022 09:40
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.

2 participants