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

build: add snapshot build support #1547

Closed

Conversation

gregmagolan
Copy link
Collaborator

@gregmagolan gregmagolan commented Jan 14, 2020

Example of a generated and published snapshot build at https://github.com/gregmagolan/rules_nodejs-builds/tree/labs.

The first argument of the script is the GitHub org to publish to. In the above case it is my GitHub account gregmagolan. Ideally, we'd publish snapshot builds from CI to https://github.com/bazelbuild/rules_nodejs-builds but some discussion as to if this is the best solution is needed first and we need to ask bazelbuild for another repo rules_nodejs-builds .

A few points from offline discussion:

  • publishing each npm package to its own repo as angular does (https://github.com/angular/core-builds, https://github.com/angular/http-builds, etc...) is not a great solution since we would be publishing to the bazelbuild org and we would both spam their repositories list and need to ask for a new repository for every new npm package

  • the last point is why I chose to publish .tar.gz files to this one repo for all of the npm packages. This works well for fetching these in your package.json with: "@bazel/terser": "https://github.com/gregmagolan/rules_nodejs-builds/raw/1.1.0+7e1ec700/@bazel_terser-labs-snapshot.tar.gz"

  • publishing snapshots to npm is not desirable as it would span the npm versions and we want to reserve next for rcs

  • publishing to the main repo https://github.com/bazelbuild/rules_nodejs is not desirable as it would make that repository grow in size by adding binary files to it and if you pull all branches on clone you would have to download all of the snapshot releases

  • one benefit of the angular approach is that it makes it easy to see diffs in the release artifacts with each commit which we don't get here with the .tar.gz. It would be fairly easy to add the contents of the .tar.gz along side the binary archive in the commit so that diffs in the release artifacts would be available under a single repo (best of both worlds)

  • considered making releases for each snapshot built to https://github.com/bazelbuild/rules_nodejs-builds using the GitHub API to upload release artifacts but that would not be as easy to navigate between branches and snapshots between branches would be interleaved in the release logs. You would also not get release artifacts diffs from the last point.

@gregmagolan
Copy link
Collaborator Author

@alexeagle I'll add the source trees to the commit so we get the diffs. I think the next step here is to ask bazelbuild for a new repo named rules_nodejs-builds

@gregmagolan gregmagolan force-pushed the snapshot_builds branch 2 times, most recently from 70f3d5b to e186d34 Compare January 15, 2020 01:52
@gregmagolan
Copy link
Collaborator Author

gregmagolan commented Jan 15, 2020

Added the release artifacts sources: https://github.com/gregmagolan/rules_nodejs-builds/tree/labs

And docs show up too for each npm packages with the README.md: https://github.com/gregmagolan/rules_nodejs-builds/tree/labs/%40bazel_typescript

@gregmagolan
Copy link
Collaborator Author

gregmagolan commented Jan 15, 2020

Oh would you look at that. @bazel/typescript includes in external npm deps. Whoops: https://unpkg.com/browse/@bazel/typescript@1.1.0/external/npm/node_modules/

Should fix that. Made an issue so we don't forget: #1551

@gregmagolan gregmagolan force-pushed the snapshot_builds branch 2 times, most recently from 343e28e to 8cc1ffd Compare February 12, 2020 01:28
@gregmagolan gregmagolan requested a review from jbedard as a code owner April 3, 2020 17:51
@gregmagolan gregmagolan force-pushed the snapshot_builds branch 3 times, most recently from b406166 to e1892fe Compare April 10, 2020 00:56
@github-actions
Copy link

This Pull Request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label Oct 12, 2020
@github-actions
Copy link

This PR was automatically closed because it went two weeks without a reply since it was labeled "Can Close?"

@github-actions github-actions bot closed this Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? We will close this in 30 days if there is no further activity cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants