-
Notifications
You must be signed in to change notification settings - Fork 208
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
ci(dev-canary): publish a dev
NPM dist tag on every push
#4120
Conversation
Some questions:
|
feb9523
to
a24aea7
Compare
I think there's only one way to find out. I've seen this kind of "nightly build" for other projects, but I don't know what their rates are. NPM is now owned by GitHub, so I'd think the acceptable rates are more than they used to be. Do note that the only dev packages published are roughly the ones that actually changed.
The
Yes, that's possible.
They only get executed after being enabled by one of the team members, so that can only happen if we're not vigilant.
That's what I'm thinking. And also some I personally take our Github to be our source of truth, and these other services need to reflect what we have there or we run into the problem of users consuming stale code.
I've tried to separate these things in general. I have verified that the cache can be used in any file. However, separate files run in parallel and so race for the cache. That may end up running more Actions minutes than we expect. I'd be happy to revisit this (splitting the workflow files) some other time. |
Doesn't publishing a package require the Would all the packages be pushed or only the ones impacted by a change (which does bring the question of updating dependencies if changing the versions, so that a specific tag pulls in the right dependencies). I suppose an alternative is to have CI automatically add a commit which bumps the package versions appropriately before merging? |
I think I'm ok with there being slight differences between the tarball and the source tree that the tarball's
That sounds.. eww, like two commits per commit. I'm not ok with high-rate automatic commits made by bots. I can see being ok with it like once per real release, as part of some automated release management stuff, but I don't want an extra commit or extra tag per real commit. |
The I have some questions about code distribution as NPM introduces complexity and an opportunity for things to break... especially in terms of version-mismatch issues and nightly releases. How do we authoritatively release things now? Ideally, how would we like to authoritatively release things in the future? ;) Where do we want our customers to get our code from? If the answer is "Github", there is arguably a world where we can set up a process for our latest release to be pushed to our NPM package. I'm not sure that it is appropriate to use NPM/Docker for nightly distribution. There doesn't seem to be a good reason for nightly code to be immutably available in third party package registries to developers, especially if the known broken code will just hang out around there forever. Also, in my experience, projects with very active nightly release cycles tend to require developers to get that code directly from them. (e.g. Homebrew doesn't provide Rust nightlies, only major releases. Rust provides a custom toolchain for installing nightlies.) Are there any plans to distribute and sign our software outside of the NPM universe? There is a case where someone who trusts Agoric more than NPM may want to come to us directly for software, and would like to be able to check that software against a cryptographic identity, e.g. a validator with a mature approach to dependency management. |
I tag
Just formalise the things we're already doing to make it more consistent, with an eye on automation to reduce the maintenance burden.
We have multiple audiences, any of which may want to use a Git agoric-sdk checkout for bleeding-edge changes or their own modifications.
The reason I'm advocating
I would agree, once our smart contract platform isn't in so much flux. Testing the release process is one reason I want to do it. Also, I want to make it possible for standard JS or devops tools (NPM+Docker) to be used consistently rather than having to rely on a "custom toolchain", which has been the bane of my existence. Ideally, dapp developers could consistently use their own package management tools, not just Yarn and an SDK checkout. That's why I'm trying to go in this direction. Being able to say: "So you have a problem with the Docker
I imagine that Exo will be a signed multiplatform application.
That's why all these release-generation-from-Git-checkout tools within |
...
👍
see also #2541 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this seems reasonable. maybe add a comment about the omitted PR type for future readers.
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
types: [opened, closed, reopened, synchronize] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what type of PR does this omit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, adds closed
(which is not triggered by default) to the default list. I'll add a comment referring to Github documentation.
a24aea7
to
20004f8
Compare
refs: #4117, #3857
Description
Add a
dev-canary
CI job to publish dev snapshots to NPM for changes merged tomaster
.The benefit is that our SDK will be published on Github (freshest), NPM (master only), and Docker Hub (nightly only).
Security Considerations
Consider the risk/benefit of publishing to NPM:
From the Agoric side, we're only using the
NPM_TOKEN
to publish as constrained by the Github Actions present onmaster
. This ensures the packages are marked as prerelease (version isdev-${commitHash}.N
) and never match thelatest
orbeta
tags, onlydev
.From the NPM side, the NPM
agoricbot
account should be added to theagoric
organization, so that that Github secretNPM_TOKEN
for that bot doesn't have access to publish to other NPM organizations outsideagoric
. I'm counting on @warner to enable that if he approves.Documentation Considerations
Testing Considerations