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

Syntax highlighting and static analysis of Supply Chains/Deliveries in Docs #566

Closed
7 of 19 tasks
squeedee opened this issue Jan 28, 2022 · 1 comment
Closed
7 of 19 tasks
Assignees

Comments

@squeedee
Copy link
Member

squeedee commented Jan 28, 2022

Description of problem

User POV:
When I work with supply chains (and deliveries) I struggle to ensure :

  1. I am matching inputs to the correct outputs
  2. My syntax is correct
  3. Know what my options for syntax are.
  4. Evaluate the correctness of my supply chain without pushing the changes to a cluster.

Doc Author/support POV:
Explaining examples of supply chains is difficult without a way to visualize the shape of the supply chain and the dependencies involved.

Proposed solution

Introduce a live playground like ytts

I've already demonstrated a rudimentary live visualizer to the maintainers using mermaid

I propose a static web app built using

  1. Monaco for live yaml editing. This is the same editor component as found in VSCode
  2. The monaco-yaml editor, with a schema definition for Supply Chains and Deliveries
  3. An autocomplete worker process that identifies possible entries for sources|images|configs
  4. A live transform that produces a mermaid graph of the supply chain/delivery

Additional Context

Happy to treat this work as a spike and publish the editor as a blog post to gather feedback while not implying ongoing support.

Spike Targets:

  • Republishable to the blog post
  • Errors on illegal references
  • Vizualizer (maybe not show empty nodes until they refer to something valid)
  • Shareable Link (Really nice to have)
  • tidy
    • clean up the blog post, add image, explain the editor and make the external link obvious
    • in the "help" mention copy-past of the url (maybe add a share-link button)
    • make the lint and copyright pass.

Implied work

  • Support options, snippets and/or multipath

Big list of awesome

  • JSON Schema
    • Extract Schema generator into a tool
    • Host schema, and use it in the editor so that tooltips are more useful.
  • Supply chains show default and required params
  • workload tabs that visualize the supply chain specifically for the workload.
    • Missing params and resulting-set params
  • Template tabs (showing params?) and autocompleting template names in the supply chain resources
  • Gist reference support (and maybe create-new-gist)
  • Runnable? Delivery? Deliverable?
  • Show that a workload will select the given supply chain AND/OR supply-chains
@squeedee
Copy link
Member Author

This work is done enough to consider the spike complete. I need to add/update the 'roadmap' in the editors readme and close this issue.

I think it's worth sharing some learnings

  1. the yaml library I am using is great, it lets me do a significant amount of lexicial analasys/ast work cheaply.
  2. I'm not using a worker, and I'm not backing things with a language server. The worker is not necessary with the current load, but perhaps it will be when parsing multiple files at once. A language server would be much more reusable (in other editors) but is far from necessary for this one editor.
  3. To formalize this editor as something well managed, well written, tested and CI/CDed would require a dedicated person (or pair) for a significant time. I'm thinking 4 weeks before being able to slow down and pick up other work.

squeedee added a commit that referenced this issue Feb 23, 2022
squeedee added a commit that referenced this issue Feb 23, 2022
@squeedee squeedee moved this from PR to Closed in Cartographer OSS Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

No branches or pull requests

2 participants