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

Malformed YAML throws Grow into an inconsistent state, and the development server must be restarted #81

Closed
jeremydw opened this issue Jun 10, 2015 · 1 comment

Comments

@jeremydw
Copy link
Member

Steps to reproduce:

  1. Make an edit to a YAML file that introduces invalid YAML syntax.
  2. Load a page.
  3. Fix the YAML.
  4. Refresh the page.
  5. Grow still crashes on load / displays old YAML data.

Expected behavior: Grow should recover and operate normally once YAML syntax is fixed.

@jeremydw
Copy link
Member Author

The issue has to do with the routes cache. Traceback from an issue.

Traceback (most recent call last):
  File "growsdk/threading", line 810, in __bootstrap_inner
  File "growsdk/watchdog.observers.api", line 241, in run
  File "growsdk/watchdog.observers.api", line 408, in dispatch_events
  File "growsdk/watchdog.observers.api", line 403, in _dispatch_event
  File "growsdk/watchdog.events", line 486, in dispatch
  File "growsdk/grow.pods.preprocessors.file_watchers", line 45, in on_created
  File "growsdk/grow.pods.preprocessors.file_watchers", line 41, in handle
  File "growsdk/grow.pods.preprocessors.routes_cache", line 11, in run
  File "growsdk/grow.pods.routes", line 47, in reset_cache
  File "growsdk/grow.pods.routes", line 59, in _build_routing_map
  File "growsdk/grow.pods.collectionz.collectionz", line 190, in list_servable_documents
  File "growsdk/grow.pods.collectionz.collectionz", line 184, in list_documents
  File "growsdk/grow.pods.collectionz.collectionz", line 171, in process
  File "growsdk/grow.common.structures", line 144, in insert
  File "growsdk/grow.pods.collectionz.documents", line 94, in order
  File "growsdk/webapp2", line 726, in __get__
  File "growsdk/grow.pods.collectionz.documents", line 67, in fields
  File "growsdk/webapp2", line 726, in __get__
  File "growsdk/grow.pods.collectionz.documents", line 79, in tagged_fields
  File "growsdk/webapp2", line 726, in __get__
  File "growsdk/grow.pods.collectionz.documents", line 75, in format
  File "growsdk/grow.pods.collectionz.formats", line 34, in get
  File "growsdk/grow.pods.collectionz.formats", line 27, in __init__
  File "growsdk/grow.pods.collectionz.formats", line 61, in load
  File "growsdk/yaml", line 71, in load
  File "growsdk/yaml.constructor", line 37, in get_single_data
  File "growsdk/yaml.composer", line 36, in get_single_node
  File "growsdk/yaml.composer", line 55, in compose_document
  File "growsdk/yaml.composer", line 84, in compose_node
  File "growsdk/yaml.composer", line 133, in compose_mapping_node
  File "growsdk/yaml.composer", line 82, in compose_node
  File "growsdk/yaml.composer", line 111, in compose_sequence_node
  File "growsdk/yaml.composer", line 84, in compose_node
  File "growsdk/yaml.composer", line 127, in compose_mapping_node
  File "growsdk/yaml.parser", line 98, in check_event
  File "growsdk/yaml.parser", line 439, in parse_block_mapping_key
ParserError: while parsing a block mapping
  in "<string>", line 150, column 5:
      - name: Foo
        ^
expected <block end>, but found '-'
  in "<string>", line 152, column 5:
        - title: "Foo  ... 
        ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant