-
Notifications
You must be signed in to change notification settings - Fork 53
feat(api): Allow using an unreleased image for the run command #1208
Conversation
Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it. |
b2cc9b7
to
248dcfc
Compare
This is useful for build steps which must be completed before an app is fully deployed to deis, for example asset compilation.
248dcfc
to
6927339
Compare
Jenkins, add to whitelist. |
@robholland looks like a simple |
Hey @robholland, first off I want to say thank you for the PR. I'm sure this is something you require for your application's use case. My only concern with this PR is that it conflicts directly from the What are your thoughts on all this? Is there perhaps another way we can resolve this problem while maintaining compatibility with Heroku's run model? |
An approach we considered earlier was adding a hook to require workflow to run a set command inside a new release after building, but before starting any other pods. If the command failed then the release would be rolled back (as if the readiness probe had failed etc). This would also solve this specific use case of asset compilation and may be closer to the heroku model you are trying to follow? The downside is that you lose the flexibility that the run argument provides, any command can be run at anytime, with either previous or as-yet-unreleased versions to help find regressions/bugs in production easily. Also potentially useful for migrations, as you mention. If we create a new app, copy configuration over etc then any inferred namespaces in config settings would need adjusting to make services discoverable and so forth, it's quite a lot of overhead to achieve this with a duplicated app. If the concern is keeping the |
I think implementing the |
For reference this is the issue for the hooks: deis/dockerbuilder#89 |
ping @robholland, are you planning on implementing deis/dockerbuilder#89 or do you still want to go ahead with this? |
I'm working on patches for deis/dockerbuilder#89, but there are quite a few use cases that doesn't cover, it's only suitable for commands that need to be run pre-deploy everytime. We could still really use the ability to run non-deployed revisions to avoid the need to duplicate applications in order to drain sidekiq queues and other adhoc tasks. |
Codecov Report@@ Coverage Diff @@
## master #1208 +/- ##
=========================================
+ Coverage 87.29% 87.3% +<.01%
=========================================
Files 43 43
Lines 3826 3829 +3
Branches 665 667 +2
=========================================
+ Hits 3340 3343 +3
Misses 321 321
Partials 165 165 Continue to review full report at Codecov.
|
Please can I have some feedback on whether this is likely to be included in the next workflow release? We have a lot of applications which can't have their web frontend migrated to workflow until we have the ability to compile their assets during deploys. |
I have the same concerns as @bacongobbler mentioned: this doesn't fit the Having said that, I don't think allowing this would open any particular security issues, just create a bit of conceptual discord. |
We've implemented our requirement using an ugly Feel free to close this and related PRs if you're not happy with the |
I should say I don't plan to work on the deploy hook PRs currently as they don't solve enough of our use cases to be worth the investment required for me to implement (I don't know django/python well and there are a lot of moving parts here). |
@robholland I'm sorry you had to resort to the I apologize for dawdling on this one--it was difficult to decide. We appreciate all your contributions immensely. Let's try to implement deploy hooks for a future release, since that seems like a more consistent solution. I'll see if we can find someone to work on that soon. |
This is useful for build steps which must be completed before an app is fully
deployed to deis, for example asset compilation.