Docker Community Forums

Share and learn in the Docker community.

[BUG] Saving an invalid Stack file causes infinite loader


(Eamonwoortman) #1

Issue type: bug
OS Version/build: Windows 10 Pro
App version: Chrome Version 51.0.2704.106 m
Steps to reproduce:

  1. Create or edit a Stack
  2. Use this Stack file:
hello-world:
  image: 'hello-world:latest'
  labels:
    awesomelabel: 'foobar'
  1. Click Create/Save

When trying to save an invalid stack file, the new UI shows a loading circle animation and never stops.
In the developer console I can see a failed Patch request(400 BAD REQUEST), followed by the following JS errors;

Unhandled rejection ActionableError
    at t (https://cloud.docker.com/main.be0924330b93349012c0.js:5:18331)
    at new t (https://cloud.docker.com/main.be0924330b93349012c0.js:5:18770)
    at r (https://cloud.docker.com/main.be0924330b93349012c0.js:31:2635)
    at https://cloud.docker.com/main.be0924330b93349012c0.js:18:13185
    at Array.forEach (native)
    at s (https://cloud.docker.com/main.be0924330b93349012c0.js:18:13156)
    at https://cloud.docker.com/main.be0924330b93349012c0.js:18:13771
From previous event:
    at Object.update (https://cloud.docker.com/main.be0924330b93349012c0.js:18:13740)
    at v (https://cloud.docker.com/0.0.6387b7759bb2f5a86af5.js:1:26304)
    at t.value (https://cloud.docker.com/0.0.6387b7759bb2f5a86af5.js:4:11925)
    at Object.r (https://cloud.docker.com/main.be0924330b93349012c0.js:17:30227)
    at a (https://cloud.docker.com/main.be0924330b93349012c0.js:20:18861)
    at Object.s [as executeDispatchesInOrder] (https://cloud.docker.com/main.be0924330b93349012c0.js:20:19072)
    at f (https://cloud.docker.com/main.be0924330b93349012c0.js:5:21475)
    at p (https://cloud.docker.com/main.be0924330b93349012c0.js:5:21601)
    at Array.forEach (native)
    at n (https://cloud.docker.com/main.be0924330b93349012c0.js:18:8193)
    at Object.processEventQueue (https://cloud.docker.com/main.be0924330b93349012c0.js:5:22721)
    at r (https://cloud.docker.com/main.be0924330b93349012c0.js:47:31886)
    at Object.handleTopLevel [as _handleTopLevel] (https://cloud.docker.com/main.be0924330b93349012c0.js:47:31992)
    at a (https://cloud.docker.com/main.be0924330b93349012c0.js:48:432)
    at i (https://cloud.docker.com/main.be0924330b93349012c0.js:48:246)
    at r.perform (https://cloud.docker.com/main.be0924330b93349012c0.js:8:4037)
    at Object.batchedUpdates (https://cloud.docker.com/main.be0924330b93349012c0.js:17:26377)
    at Object.i [as batchedUpdates] (https://cloud.docker.com/main.be0924330b93349012c0.js:3:30216)

When trying this in the classic UI, it informs me the labels have to be formatted in a list by the means of this error notification;

Oops!
Service 'hello-world': 'labels' must be a 'list' of 'strings'. See 'https://docs.docker.com/docker-cloud/feature-reference/stack-yaml-reference/' for more details

(Badevguru) #2

Same in Chrome OS/X Version 53.0.2785.1 canary (64-bit)

I issue is the error messages not bubbling up in the new UI.
The second issue is that the UI when loading existing stacks reformats the YAML that had labels as strings in to the alternate format that triggers the error.