question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scaffolder issues while creating document template

See original GitHub issue

I cloned the project on the 01/31. While testing testing the templates, I got error on different stages of the creation process.

Using the default document-template, I got an error on the “Run the templater” stage.

error: Stage failed with error: ENOENT: no such file or directory, realpath '/tmp/b26c4b6a-b0f9-4391-91ee-dd93cc4add96/intermediate' {"id":"b26c4b6a-b0f9-4391-91ee-dd93cc4add96","stage":"Run the templater","timestamp":"2021-01-31T18:31:26.397Z"}

With my own document-template, I got an error on the “Prepare the Skeleton” stage.

error: Stage failed with error: EISDIR: illegal operation on a directory, unlink '/tmp/a683739f-864d-4b32-97fd-e15cea3c7849/checkout' {"id":"a683739f-864d-4b32-97fd-e15cea3c7849","stage":"Prepare the skeleton","timestamp":"2021-01-31T18:34:10.177Z"}

Expected Behavior

All the stages get completed successfully, the documents gets published and catalog entry gets created on Backstage

Current Behavior

The process fails on the “Run the templater” and “Prepare the Skeleton”

Possible Solution

Not solution, but workaround I went back to a previous clone of the project. bf2dda31b HEAD@{2021-01-21 13:38:04 +0000}: pull origin master: Fast-forward

Steps to Reproduce

Basically follow the getting started guide to run backstage locally. https://github.com/backstage/backstage/blob/master/docs/getting-started/running-backstage-locally.md

  1. git clone --depth 1 git@github.com:backstage/backstage.git
  2. cd backstage
  3. yarn install
  4. yarn tsc
  5. yarn build
  6. cd /opt/backstage/packages/backend
  7. yarn start
  8. cd /opt/backstage
  9. yarn start
  10. Access backstage console
  11. Go to “Create”, select “Documentation Template”
  12. Completed all the necessary information
  13. Create

Context

At the moment, I’m not able to create any template based on tech-docs I was trying to get the latest version of the project

I’m using the standard configuration for the scaffolder and techdocs

techdocs:
  requestUrl: http://localhost:7000/api/techdocs
  storageUrl: http://localhost:7000/api/techdocs/static/docs
  builder: 'local' # Alternatives - 'external'
  generators:
    techdocs: 'docker' # Alternatives - 'local'
  publisher:
    type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.

integrations:
  github:
    - host: github.com
      token:
        $env: GITHUB_TOKEN
		
  processors:
    githubOrg:
      providers:
        - target: https://github.com
          token:
            $env: GITHUB_TOKEN

scaffolder:
  github:
    token:
      $env: GITHUB_TOKEN
    visibility: public # or 'internal' or 'private'

I have tested the token and its working correctly.

Your Environment

  • NodeJS Version (v12): v14.15.3
  • Operating System and Version (e.g. Ubuntu 14.04): Linux backstage-dev 5.4.0-1034-azure #35~18.04.1-Ubuntu SMP Thu Dec 10 09:13:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Browser Information: Firefox 85.0 (64-bit)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
benjdlambertcommented, Feb 15, 2021

Think this is fixed after this got merged: https://github.com/backstage/backstage/pull/4516. Can we close this @biancoda?

1reaction
biancodacommented, Feb 9, 2021

Originally, I set up my templates location as a file

  locations:
    # Runbook template
    - type: file
      target: /opt/<my_project>/backstage/templates/runbook-template/template.yaml
    # K8S template
    - type: file
      target: /opt/<my_project>/backstage/templates/k8s-template/template.yaml

Working with @jhaals, we found that there is possibly a bug when you define the location as a file. I change it to use github as a source and all the templates started working again. So this could be used as a workaround.

    # K8S template
    - type: url
      target: https://<enterprise_github>/<my_project>/backstage/templates/k8s-template/template.yaml
    # Runbook template
    - type: url
      target: https://<enterprise_github>/<my_project>/backstage/templates/runbook-template/template.yaml
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Scaffolder] Cannot open file when using Template Editor
The new functionalities of Scaffolder get an error when trying to open the folder directory or load the exist template form. The error...
Read more >
Writing scaffolder templates - Roadie.io
The Roadie Backstage scaffolder is a feature that allows you to define software templates to create new software projects, update existing ones ...
Read more >
asp.net - VS2013 Scaffolding Error when constructing view
Error: There was an error running the selected code generator: 'The Templates/PackageVersions5.0.1xml file is missing from the installed ...
Read more >
Structuring your templates with Cortex's Scaffolder
Cortex's Scaffolder tool helps you build and modify services using a consistent template. This can remove redundancies and keep different types of code ......
Read more >
Using Live Templates - Scaffolding Forms & Templates for ...
Type {live-template} on an empty page. Edit the Live Template macro, choose the template type and enter the name of template you created...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found