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

Prepare for first release to OpenVSX #191

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Prepare for first release to OpenVSX #191

merged 2 commits into from
Jan 30, 2024

Conversation

marcdumais-work
Copy link
Contributor

@marcdumais-work marcdumais-work commented Jan 24, 2024

Prepare for first release on openvsx.org

Changes

  • Renamed the build workflow to ci-cd and made modifications:
    • added a publish job, that publishes the .vsix extension to openvsx.org,
      triggered only when a release tag (v) is pushed to the repo.
    • merged the build and ui tests jobs. They were redundent, both building
      the project
    • removed yarn package caching: practically it helped very little, cutting
      only ~5% vs the time it takes to install the dependencies without
      ~(25s vs 26s) in the best case (cache hit). With a cache miss (run with
      modified yarn.lock), we had a 100%+ penalty, if we count the overhead
      of the cache being saved to GitHub infrastructure ("Post Cache..." job).
  • created a "release" workflow that uses "pipe-cd/actions-gh-release" to
    create a release tag and corresponding GitHub release, when a change
    is detected in root file "RELEASE".
    • TL;DR: a new release is triggered by adding the tag value
      reflecting release version, to RELEASE file as part of a PR. The
      action will add tentative release notes to the PR that can be edited
      as needed. Upon merging the PR, a release tag will be created in the
      repo, which will trigger the publish job, that will eventually result
      in the new version of the extension being deployed to openvsx.org
    • it looks like the RELEASE file must exist before its first use in a PR,
      so created one with no active content.
  • Added "doc/Publishing.md" to briefly document how to go about creating new
    releases / publish new releases to openvsx.org
  • renamed public-facing name (displayName) of the extension to "Trace Viewer
    for VSCode", to better reflect its nature
  • changed public-facing mentions of "vscode" to the canonical "VSCode"
  • changed extension's publisher, to align with the configuration of the CDT
    Cloud OpenVSX publisher user: "eclipse-cdt". See:
    https://www.open-vsx.org/namespace/eclipse-cdt
  • other misc updates to the extension's package.json: added/massaged important
    fields
    (https://www.open-vsx.org/namespace/eclipse-cdt).
  • kept developer-specific information in repo's root README.md but moved
    generic information, useful to users of the extension, to extension's
    README (which becomes the information page for the extension when published
    or installed).
  • Added an icon for the extension. Though probably not the best ever, re-used
    the one from repo "theia-trace-extension"

Notes

  • CI job "Create or prepare GitHub release" failing is normal at this time, because file ./RELEASE does not yet exist on master. Adding it in this PR will fix this for the future.
  • It's unfortunately not easy to test in advance the publish and release CI jobs. I plan to attempt a first release ASAP to try both, and may find then that some changes are needed.
  • The change in publisher to align with openvsx.org user for eclipse-cdt-cloud may cause momentary issues during the transition, e.g. if a user attempts to install the new version (with the new publisher) when the old one (with original publisher) is already installed. The fact that the extension was never published using the old publisher should mitigate these issues for ordinary end-users.
  • companion extension vscode-trace-server is not yet published. It would be ideal to also publish it to openvsx.org ASAP. It should be possible to do so very similarly as what was done in this PR.

Closes #69

@marcdumais-work marcdumais-work force-pushed the publish-ovsx branch 30 times, most recently from 19b79a3 to ef71cfb Compare January 25, 2024 18:30
@marcdumais-work marcdumais-work force-pushed the publish-ovsx branch 3 times, most recently from d514beb to d9b823e Compare January 25, 2024 20:56
@marcdumais-work marcdumais-work changed the title [WIP] Publish ovsx [WIP] Prepare for first release to OpenVSX Jan 25, 2024
@marcdumais-work marcdumais-work marked this pull request as ready for review January 25, 2024 22:16
@marcdumais-work marcdumais-work force-pushed the publish-ovsx branch 7 times, most recently from 3087b38 to 52e07d9 Compare January 25, 2024 22:46
@marcdumais-work marcdumais-work changed the title [WIP] Prepare for first release to OpenVSX Prepare for first release to OpenVSX Jan 26, 2024
vscode-trace-extension/README.md Show resolved Hide resolved
branches:
- master
paths:
- 'RELEASE'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that run the release already when a pull request is created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will trigger the action but when it checks the RELEASE file it should immediately exit since there is no "tag" entry in the file yet.

Copy link
Contributor Author

@marcdumais-work marcdumais-work Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops - I answered the wrong question, sorry.

When a new PR is created after this is merged, the action will add the automatically created release notes to the PR, leaving the opportunity to make changes if desired (e.g. by using more detailed options in file RELEASE). The GitHub release and release tag will only be created upon the/that PR being merged.

Copy link
Contributor Author

@marcdumais-work marcdumais-work Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answer!


For information about building this extension from sources, debugging, etc, please see [Developing.md](https://github.com/eclipse-cdt-cloud/vscode-trace-extension/tree/master/README.md)

## Using the extension
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this PR, I think the documentation it sufficient. There other ways to open traces. As a follow-up, we should create a dedicated documentation file that is referenced here. The README in the "sister" Theia trace extension has more details: https://github.com/eclipse-cdt-cloud/theia-trace-extension/tree/master#using-the-trace-extension

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed above a left-over, from a previous version of the PR: the mention of "Developing.md". I will correct this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have corrected the leftover above in the latest commit.

Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for the contribution.

branches:
- master
paths:
- 'RELEASE'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answer!

- Renamed the  build workflow to ci-cd and made modifications:
  - added a publish job, that publishes the .vsix extension to openvsx.org,
    triggered only when a release tag (v<something>) is pushed to the repo.
  - merged the build and ui tests jobs. They were redundent, both building
    the project
  - removed yarn package caching: practically it helped very little, cutting
    only ~5% vs the time it takes to install the dependencies without
    ~(25s vs 26s) in the best case (cache hit). With a cache miss (run with
    modified yarn.lock), we had a 100+% penalty, if we count the overhead
    of the cache being saved to GitHub infrastructure.
- created a "release" workflow that uses "pipe-cd/actions-gh-release" to
  to create a release tag and corresponding GitHub release, when a change
  is detected in root file "RELEASE".
    - TL;DR: this is how a release is triggered, by adding the tag value
      reflecting release version, to RELEASE file as part of a PR. The
      action will add tentative release notes to the PR that can be edited
      as needed. Upon merging the PR, a release tag will be created in the
      repo, which will trigger the publish job, that will eventually result
      in the new version of the extension being deployed to openvsx.org
    - it looks like the RELEASE file must exist before its first use in a PR,
      so created one with no active content.
- added "doc/Publishing.md" to briefly document how to go about creating new
  releases / publish new releases to openvsx.org
- renamed public-facing name (displayName) of the extension to "Trace Viewer
  for VSCode",  to better  reflect its nature
- changed public-facing mentions of "vscode" to the canonical "VSCode"
- changed extension's publisher, to align with the configuration of the CDT
  Cloud OpenVSX publisher user: "eclipse-cdt". See:
  https://www.open-vsx.org/namespace/eclipse-cdt
- other misc updates to the extension's package.json: added/massaged important
  fields
  (https://www.open-vsx.org/namespace/eclipse-cdt).
- kept developer-specific information in repo's root README.md but moved
  generic information, useful to users of the extension, to extension's
  README (which becomes the information page for the extension when published
  or installed).
- Added an icon for the extension. Though probably not the best ever, re-used
  the one from repo "theia-trace-extension"

Closes #69

Signed-off-by: Marc Dumais <[email protected]>
@marcdumais-work
Copy link
Contributor Author

I just pushed a rebase on master

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

Successfully merging this pull request may close these issues.

Deploy to OpenVsx marketplace
2 participants