-
Notifications
You must be signed in to change notification settings - Fork 479
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
Create LtiIntegration model #51734
Create LtiIntegration model #51734
Conversation
Signed-off-by: Nick Lathe <nick.lathe@code.org>
- Add tests - Add validations - Remove generated lti_integration_factories.rb - Run rails db:miigrate
06d8ca9
to
b202de3
Compare
Because it’s hard to revert a Rails database/schema migration, we have an undocumented practice of putting the actual schema change (the migration and the new schema.rb) in its own Pull Request and merging that before any feature branches that implement validations, tests, load fixtures, etc. This reduces risks if the migration causes issues and needs to be rolled back somehow. Sorry this is not documented anywhere! We should write up some ActiveRecord best practices and/or lint rules to better guide the team on this. |
Ok, this documentation exists. I must have misread it as this PR should include the model changes and any other files generated from Will update PR to include only the |
factory :lti_integration do | ||
platform_id {"1a2b3c5b"} | ||
issuer {"http://some.lms.com"} | ||
client_id {"12345678"} | ||
platform_name {"canavs"} | ||
auth_redirect_url {"http://some.lms.com/lti/authenticate"} | ||
jwks_url {"http://some.lms.com/jwks"} | ||
access_token_url {"http://some.lms.com/access_token"} | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we tend to use hardcoded values in factories, or do we ever prefer randomization? I honestly don't know. I'm a big fan of random so we discover edge cases earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I'll take a look at some other factories for inspiration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a lot of values in factories are hardcoded. However I've changed these to just be string values named as their key. If there is a preferred standard, I'm happy to follow it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left one nit on test language.
Initialize LTI Integration model - Add validations - Add tests Signed-off-by: Nick Lathe <nick.lathe@code.org
Initialize LTI Integration model - Add validations - Add tests Signed-off-by: Nick Lathe <nick.lathe@code.org
This PR adds a new
LtiIntegration
model. I'm looking for feedback on any standards we have that I'm violating, or best practices I've missed. It includes:MigrationSchema changeLinks
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: