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

Docker volumes should not trigger warning #760

Merged
merged 2 commits into from
Apr 19, 2016

Conversation

pierluigi
Copy link
Contributor

if (model.container != null && model.container.volumes != null &&
model.instances > instances
) {
if (model.container != null &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also fix the handleSuspendApp condition, and maybe move the persistent volume app condition into a util.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noticing. I also realised we should still show the warning if the volume has .external defined. Force-pushed some changes.

return app.container != null &&
app.container.volumes != null &&
app.container.volumes
.filter(volume => volume.persistent != null || volume.external != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use volumes.some(volume => volume.persistent != null || volume.external != null) to check if there is at least one persistent volume.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I'll do it.

@pierluigi
Copy link
Contributor Author

gerebased

@orlandohohmeier
Copy link
Contributor

Looks good to me! Let's 🚢 🇮🇹

@orlandohohmeier orlandohohmeier merged commit 4c902e8 into master Apr 19, 2016
@orlandohohmeier orlandohohmeier deleted the fix/stateful-warning branch April 19, 2016 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants