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

Clay 2.x: review release process #4576

Closed
julien opened this issue Jan 13, 2022 · 10 comments
Closed

Clay 2.x: review release process #4576

julien opened this issue Jan 13, 2022 · 10 comments
Labels
2.x type: bug Issues reporting that Component is not doing what should be done

Comments

@julien
Copy link
Contributor

julien commented Jan 13, 2022

In the 2.x branch, the CONTRIBUTING.md file has notes about the release process.
However, when running lerna publish from-package errors are thrown in the console:

$ lerna publish from-package
ERR! lerna bump must be an explicit version string _or_ one of: 'major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease', or 'from-git'.

If you try to use lerna publish from-git, this will happen:

clay$ lerna publish from-git
lerna notice cli v3.4.3
lerna info Verifying npm credentials
lerna http fetch GET 200 https://registry.npmjs.org/-/whoami 616ms

# Lots of output

[2/4] Logging in...
[3/4] Publishing...
info Two factor authentication enabled.
info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command.

# More output

error Couldn't publish package: "Can't answer a question unless a user TTY"

So the only solution left it to publish manually, but once you do that, there are still lots of changes in the repository, and there's no information on what should be done in this case.

Since we need to maintain this branch, we need to document this and make sure it works.

@julien julien added the type: bug Issues reporting that Component is not doing what should be done label Jan 13, 2022
julien pushed a commit that referenced this issue Jan 13, 2022
See #4576.
I don't know what to do about this so feel free to revert if it's
wrong, with an up to date documentation this probably wouldn't have
happened.
@matuzalemsteles
Copy link
Member

I had the same problem recently, not sure why this is causing this error now, I remember we had the same problem in the past but I don't remember how we fixed it, @bryceosterhaus do you remember anything? I remember you had a similar problem.

Maybe it's the global version of lerna we're using, I did a little research on this error but it doesn't say much 🤷‍♂️.

@bryceosterhaus
Copy link
Member

@matuzalemsteles I don't remember what the solution was but I also remember running into this issue. I feel like I just attempted multiple times after cleaning and re-building the repo...

From a cursory google search, it may have to do with being logged into npm via yarn?

@julien
Copy link
Contributor Author

julien commented Jan 25, 2022

I'll have a look at this again, I just wanted to point out that once we know what the issue is we should just document it.

@matuzalemsteles
Copy link
Member

Yeah, I agree, publishing 2.x manually is not good, I did this once, and doing it with OTP makes everything even slower 🥲.

From a cursory google search, it may have to do with being logged into npm via yarn?

Hmm, this is interesting, I found some issues like lerna/lerna#2315 but it seems unrelated, it seems that this error can be caused by different use cases.

@julien
Copy link
Contributor Author

julien commented Jan 26, 2022

I'm wondering if we could find an alternative to lerna: i'm thinking shell script or Makefile (just thinking out loud).

@matuzalemsteles
Copy link
Member

Yes, I think it would be an option, I think we managed to handle the script well to execute the command, like build, but I don't know how I would handle the publishing of several packages to ask for just one OTP.

@julien
Copy link
Contributor Author

julien commented Jan 27, 2022

@matuzalemsteles concerning OTP I have no idea either - that said, we can create a "spike" related to this issue (I think the OTP part will be handled by "yarn" or "npm" itself but I have to verify)

@matuzalemsteles
Copy link
Member

@julien good, we can test this.

@matuzalemsteles
Copy link
Member

I think I managed to resolve this error after updating Lerna version to version 4.x on v2 branch, I'm also adding CI #4745 with Github Actions to run tests and checks in the Clay v2.

@matuzalemsteles
Copy link
Member

I'm going ahead and closing this issue, the original problem was fixed after we updated the Lerna version to v2 and also added CI to v2 to avoid merging things that are breaking. I don't think it's worth it now to try to remove Lerna or rewrite a script for v2, I think just keep publishing is enough for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x type: bug Issues reporting that Component is not doing what should be done
Projects
None yet
Development

No branches or pull requests

3 participants