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

Local deploys should specific error if out_dir isn't provided #1023

Open
stevenle opened this issue Oct 9, 2019 · 3 comments
Open

Local deploys should specific error if out_dir isn't provided #1023

stevenle opened this issue Oct 9, 2019 · 3 comments

Comments

@stevenle
Copy link
Member

stevenle commented Oct 9, 2019

Currently throwing a different traceback instead:

Deploying: 61/61 (in 0:00:00.0)                                                
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/indexes.py", line 224, in run_func
    kwargs['func'](*kwargs['args'])
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/destinations/local.py", line 57, in write_file
    self.storage.write(out_path, rendered_doc.read())
  File "/usr/local/lib/python2.7/dist-packages/grow/storage/file_storage.py", line 69, in write
    os.makedirs(dirname)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/indexes.py", line 224, in run_func
    kwargs['func'](*kwargs['args'])
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/destinations/local.py", line 57, in write_file
    self.storage.write(out_path, rendered_doc.read())
  File "/usr/local/lib/python2.7/dist-packages/grow/storage/file_storage.py", line 69, in write
    os.makedirs(dirname)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/indexes.py", line 224, in run_func
    kwargs['func'](*kwargs['args'])
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/destinations/local.py", line 57, in write_file
    self.storage.write(out_path, rendered_doc.read())
  File "/usr/local/lib/python2.7/dist-packages/grow/storage/file_storage.py", line 69, in write
    os.makedirs(dirname)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
Traceback (most recent call last):
  File "/usr/local/bin/grow", line 76, in <module>
    group.grow()
Error deploying (<grow.rendering.rendered_document.RenderedDocument object at 0x7f3b9c4e99d0>,)
[Errno 2] No such file or directory: ''

Error deploying (<grow.rendering.rendered_document.RenderedDocument object at 0x7f3b9c417190>,)
[Errno 2] No such file or directory: ''

Error deploying (<grow.rendering.rendered_document.RenderedDocument object at 0x7f3b9c059850>,)
[Errno 2] No such file or directory: ''

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/grow/commands/subcommands/deploy.py", line 100, in deploy
    is_partial=is_partial)
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/destinations/base.py", line 315, in deploy
    threaded=self.threaded, batch_writes=self.batch_writes)
  File "/usr/local/lib/python2.7/dist-packages/grow/deployments/indexes.py", line 295, in apply
    len(apply_errors)), apply_errors)
grow.deployments.indexes.DeploymentErrors: There were 3 errors during deployment.
make: *** [stage] Error 1
Makefile:24: recipe for target 'stage' failed
ERROR: Job failed: exit code 1
@Zoramite
Copy link
Member

Where this is happening is kind of odd. It looks like it is happening with the rendered docs, but the rendered docs should always have tmp file paths, which is why this seems to be failing. There isn't any tmp file path. Could you send me some more information or a reproducible branch I could look at?

@stevenle
Copy link
Member Author

This was reported by a client in an internal repo, so I wasn't able to reproduce it myself. It sounded like grow build worked fine but grow deploy -f local raised that error when out_dir isn't provided.

@Zoramite
Copy link
Member

Thanks, that should be enough to try and replicate it.

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

2 participants