-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GDL-9 publish npm package to registry #206
base: development/7.10
Are you sure you want to change the base?
Conversation
Hello tcarmet,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
1761cd4
to
fb466cd
Compare
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command:
Alternatively, the |
Before jumping into implementation, can we write a TAD to discuss the various issues and solutions? There are quite a few questions to investigate, impacts on dev process to evaluate and discuss: like at least
|
Sounds good @francoisferrand, I'll open a PR in citadel. |
@tcarmet Rather than citadel that is for component design we write in confluence in object squad the TAD https://scality.atlassian.net/wiki/spaces/OS/pages/1573289989/Technical+Approach+Documents+TADs |
okk understood, thanks @BourgoisMickael |
As requested, here's the TAD |
9c07d80
to
710c2a0
Compare
03dd4a7
to
6ad5454
Compare
83629d8
to
951faba
Compare
with: | ||
registry-url: https://registry.npmjs.org | ||
- name: Publish to npmjs.org | ||
run: npm publish --provenance |
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 happens if the push to npmjs
fails, i.e. how can be "finisih" the release?
- there is a "tag" check, which prevents generating the tag if already done : OK since the tag (and release) is created last
- when publish to Github packages fails, nothing was actually changed : OK
- when publish to npmjs fails, github package has already been published:
- re-running may fail (?) as we already pushed to github?
- if we re-run the release, we may have a different commit on the "new" release.... and could end-up with an incorrect build on github?
- in the mean-time, the release is not present, but the package is already in github and may be consummed/upgraded unexpectedly... should we remove it? or make the tag/release first (but this adds complexity to re-run)?
- as the tag is not created, bert-e (when used) may also mark more jira tickets as "fixed" in this release... this is not a new issue, but agravated if the release takes longer...
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.
You wanna change the order, this way if it fails on npm it didn't published on GitHub packages?
Also let's try not to overthink this too much, let's get some field experience first.
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.
I don't want to change the order, I want to merge something where we have a path, in case of failure : because such failures do and will happen, and typically when it happens it is at the worst of times...
So it is really not overthinking, but actually just thinking it through, to try and have some way to finish the release anyway when we need it.
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.
I see, ran a couple of test and confirm that we will face some failure if for example we want to re-publish a package to GitHub (I guess the same will happen on npm):
npm error code E409
npm error 409 Conflict - PUT https://npm.pkg.github.com/@scality%2feslint-config - Cannot publish over existing version
npm error A complete log of this run can be found in: /home/codespace/.npm/_logs/2025-02-21T21_38_24_404Z-debug-0.log
Now, my main concern here, is not towards what you want to apply, it's mostly that we are adding too much code/logic into something that as far as we established will be copy pasted.
So if we are duplicating code, let's keep it "dumb" even if the feature are limited. But if we want to add more checks and all, I rather we develop an action and reuse that code, otherwise it will be a pain to maintain across 20 different repos.
Let me know which path you prefer, either are fine by me I don't mind developing an action for it.
951faba
to
1b3c5a3
Compare
1b3c5a3
to
240ff79
Compare
69e8627
to
6a8f240
Compare
6a8f240
to
0d4a7a2
Compare
Release workflow that will publish
guidelines
as@scality/guidelines
on both GitHub Packages and Npmjs.org.I recommend us to spend some time here as this will kind of set the picture for the rest of our packages, the work will be pretty much a copy paste from here.
Publishing on GitHub Packages could arguably be optional, but I believe it helps with some internal discovery things like dependabot or security. Additionally, I believe that privates one will be published into GitHub Packages, so at least all of our packages will be with one registry if it's something we will look into in the future.
The most important one to set it's npmjs.org. because even though we can host public packages under the GitHub umbrella, it still enforces users to login with GitHub to be able to pull them, and I'm afraid this some unnecessary complexity, which may break scripts, or user workflows, etc.