Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

GitHub Action to automatically update components in TypeScript plugin library #2525

Open
liamrathke opened this issue Jun 2, 2021 · 0 comments
Labels
ci/cd enhancement New feature or request

Comments

@liamrathke
Copy link
Contributor

Describe the problem/challenge you have
At the community meeting today, we decided to couple the Octant and the Octant TypeScript plugin library version numbers, such that there will be an associated TypeScript plugin version for each Octant release. Hopefully, this will make developing plugins for Octant in TypeScript more straightforward, since the plugin versions compatible with each release will be clear.

Currently, the versions for vmware-tanzu/octant and vmware-tanzu/plugin-library-for-octant do not match. Additionally, since the TS components in plugin-library-for-octant are generated by a command that is manually run, many of the components currently in plugin-library-for-octant are out of date, and some components newly added to octant simply don't exist in plugin-library-for-octant. The process for updating plugin-library-for-octant is not standardized or automated, meaning that it will likely be forgotten in some release, thus these versioning issues could persist.

Describe the solution you'd like
By using GitHub Actions, we can ensure that the octant and plugin-library-for-octant releases correspond to each other. After every octant release, this action will automatically perform the following tasks:

  1. Run the command to automatically generate static TS components in vmware-tanzu/plugin-library-for-octant/plugin/components
  2. Increment the plugin-library-for-octant/plugin/package.json version to correspond with the latest octant release
  3. Run npm publish inside plugin-library-for-octant/plugin to release the latest version of the plugin to NPM

There are at least two issues that could emerge:

  • Component generation could fail; currently, component generation fails when a component's configuration does not include the exact component name itself (see Rename Expandable Row Detail TS Component Config Variable #2517); we will need to account for this case
  • If code to update the plugin library is merged in to plugin-library-for-octant/plugin but not released, it will be released as part of the component update; there is a possibility that such code is unexpectedly released

Anything else you would like to add:

  • vmware-tanzu/plugin-library-for-octant actually includes two packages published to NPM: @project-octant/plugin (the code to write a plugin itself) and @project-octant/generator-octant-plugin (a Yeoman generator); do we need to align the Yeoman generator's version with the octant version as well? (related comment)

Additional resources:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ci/cd enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants