-
Notifications
You must be signed in to change notification settings - Fork 0
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
Webhook #29
Closed
Closed
Webhook #29
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
702e076
Format using Blue, drop unused imports
kaapstorm 065ce5f
Fix unimported exception
kaapstorm 79a30af
isort, drop unused imports
kaapstorm c23f53a
Define undefined exception, drop unused comment
kaapstorm bfb8c7f
Move refresh_hq_datasource() out of views.py
kaapstorm 04cc01b
Create webhook endpoint
kaapstorm 10f9436
Happy path up front to improve readability
kaapstorm a449215
Move `convert_to_array()` to utils
kaapstorm ced4d8f
Nit: Typo
kaapstorm e3c6d65
Pull out function
kaapstorm bcc6d71
Define `update_dataset()`
kaapstorm 4ab6617
Move superset imports locally
kaapstorm 7e1c379
Call `add_view()`
kaapstorm e9e2207
Add details to README
kaapstorm 591857f
Error handling in DataSetChangeAPI view
kaapstorm db84723
Define `update_dataset()`
kaapstorm b6f9ec4
Add `blinker` as a dependency
kaapstorm 6507f64
Add oauth models and authorization api
Charl1996 26bdaa0
Add scope check and better error handling
Charl1996 612616f
Update error message
Charl1996 3281a2b
Pull hq requests out into class
Charl1996 08b91f6
Add subscriber task and move models to separate file
Charl1996 405c266
Add require_oauth decorator
Charl1996 70b280f
Fix accessor of response
Charl1996 fdaedb7
Minor changes
Charl1996 934ca9c
Add scope back to Token and add grant types on client
Charl1996 b0480b3
Undo my hack
Charl1996 19df6d0
Invoke celery task to subscribe to datasource
Charl1996 b746cc6
Fix circular import
Charl1996 7fdfff1
Add BASE_URL to config
Charl1996 e69828f
Some fixes
Charl1996 0bbbee6
Append test_download_datasource
Charl1996 7f5ec64
Add require_oauth decorator to endpoint
Charl1996 4279f4c
Remove breakpoint
Charl1996 3338ffe
Uncomment presumably useful line
Charl1996 b6dd2a4
models.py: Support Python 3.8
kaapstorm a838483
`setup_hq_db()` assumes test DB is Postgres
kaapstorm 2250eb7
Add comments to clarify methods
Charl1996 5e919ca
Make use of timedelta days instead of seconds
Charl1996 c6f6bac
Use more secure method for generating a client_secret
Charl1996 43cd6b6
Increase length of client_secret
Charl1996 8524beb
Merge pull request #30 from dimagi/cs/SC-3069-subscribe-to-ds-changes
kaapstorm 950077e
Revert "Add `blinker` as a dependency"
kaapstorm f0a820a
Move DataSetChangeAPI to api module
kaapstorm faa8269
--wip-- Troubleshooting: Upgrade Superset to master
kaapstorm 1a3679d
--wip-- Config, and test nitpicks
kaapstorm 76ce919
Merge branch 'master' into nh/webhook
kaapstorm 8a9e263
Fix tests
kaapstorm fa34441
Merge branch 'master' into nh/webhook
kaapstorm e4cdb41
Document rookie mistake
kaapstorm 571c3bb
Better error message
kaapstorm 9765272
"CommCare HQ" has a space
kaapstorm afb1ee6
Give an error message if unable to connect to HQ
kaapstorm bc06e03
Set HQ Data URI in `superset_config.py`
kaapstorm f287af4
isort
kaapstorm 1154a80
Use SQLAlchemy bind for HQ Data db
kaapstorm 73e32d4
Add migration
kaapstorm ef72e21
Add how to create a migration to docs
kaapstorm 54f5d31
Call `subscribe_to_hq_datasource()` synchronously
kaapstorm 00c244c
`abort()` requires a code
kaapstorm b4502e0
Dependency inversion: Create services layer
kaapstorm 76ac389
Dependency inversion: Move util to model method
kaapstorm 801b962
Move URL functions into a module
kaapstorm 4aea365
Use symmetric encryption for client secrets
kaapstorm f8b13eb
Don't hardcode URLs
kaapstorm b59dd0f
Move OAuth2 server code to its own module
kaapstorm d81eba0
A few nits
kaapstorm c2a43e8
Simplify check_client_secret()
kaapstorm 1a52c35
Add `AUTHLIB_INSECURE_TRANSPORT` to README.md
kaapstorm 1d6c6e4
Avoid Celery pickle error
kaapstorm 1f7dc4b
Drop `get_explore_database()`
kaapstorm 133b7ee
Fix DataSetChange
kaapstorm b2aa3cb
Add API endpoints to domain-excluded views
kaapstorm e66e002
Simplify update_dataset()
kaapstorm 83538b7
Cast data to column types
kaapstorm a11b348
Small refactor `update_dataset()` fixes insert
kaapstorm b375cb5
Don't bother with non-pk index column
kaapstorm e7d921e
Fix decorator
kaapstorm 8a91695
Token extends OAuth2TokenMixin
kaapstorm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
From the commit message:
Speaking out of inexperience in this area, but can't we simply pass the token to the celery task?
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.
(Just closing the loop here. It needs the request session. We could serialize it and pass it to the task, but something about that feels awkward to me. I'm happy to be educated though. :) )