Using "lerna publish --conventional-commits" auto generate CHANGELOG.md with wrong commit link - lerna

I use lerna publish --conventional-commits to auto generate CHANGELOG.md. And lerna default use "conventional-changelog-angular" preset which generates the wrong commits link.
lerna log
lerna info getChangelogConfig Successfully resolved preset "conventional-changelog-angular"
CHANGELOG.md
## [0.19.224-alpha.0](wrong link) (2019-10-12)
### Bug Fixes
* commit message ([c5232fc](wrong link))
Has anyone run into the same problem or any idea how to solve it? Any suggestion is welcome!

Changing each workspace's package.json's repository to reference the root mono-repo URL solved this for me. This is described in the lerna issue #2299
Found this lerna issue that describes my issue.

Related

Why does npm install use a different package version than our forked one?

Since a few days, our aws elastic beanstalk fails to deploy our code through npm Install.
We are using our own fork from parse-server repo, and it always worked fine.
Unfortunately it now fails without obvious reason. When looking at the instance logs it clearly shows it tries to use the original parse-server repo (on a very old branch) instead of our very own fork, but I can't figure why.
Our package.json file indicates:
"parse-server": "git+https://github.com/hulab/parse-server.git#patched/5.3.0-hulab-2"
and our npm-shrinkwrap.json file reflects it with a
"parse-server": {
"version": "git+https://github.com/hulab/parse-server.git#54bfd65181f19d4296f0ebea79cf3a4ab542f2fc",
"from": "git+https://github.com/hulab/parse-server.git#patched/5.3.0-hulab-2",
...
}
Whereas the EC2 instance logs indicate failures when installing:
parse-server#github:parse-community/parse-server#892c6f94d50b6dced8a5e1948e058dc7b095c914
I can't figure out why this branch is used while not being referred to in any of our files!
Any help would be very appreciated :)
It is likely another dependency that points to that specific version of Parse Server.
For example, the Parse JS SDK has a devDependency for integration tests:
"parse-server": "github:parse-community/parse-server#alpha"
Since you are using a customized version of Parse Server, check the Parse JS SDK (which is a component of Parse Server), and any other Parse dependency that you added, whether they have a parse-server dependency and to where it points. In package.json you may only see the branch name but in package-lock.json of that dependency you may see the actual commit hash you are referring to.

goreleaser to only generate the changelog on GitHub

I am the current maintainer for the testcontainers-go project
https://github.com/testcontainers/testcontainers-go .
This project is a library. It does not produce any binary or docker image. I would still like to use goreleaser and the GitHub Action to automate the release process.
I had a look around but I am not able to find the right configuration to only run goreleaser to generate the changelog.
Do you have any suggestion?
Thanks a lot
Thanks a lot. At the end this is the command I will use:
git log $(git describe --abbrev=0)...$(git describe --abbrev=0 $(git describe --abbrev=0 --tags)^) --pretty=format:'* [%s]("http://github.com/testcontainers/testcontainers-go/commit/%H")' --reverse
Right now it isn't.
However, you can generate the changelog using git:
git log --pretty=oneline --abbrev-commit --no-decorate --no-color tags/v1.0.0..tags/v1.1.0
This is pretty much what GoReleaser does underneath.

Gitlab CI - Auto DevOps job failed, Unable to select a buildpack for a Go project?

My Gitlab CI Auto DevOps job failed with
Status: Downloaded newer image for gliderlabs/herokuish:latest
-----> Unable to select a buildpack
ERROR: Job failed: exit code 1
I've gone through
Auto DevOps and
Getting started with Auto DevOps
and am still not sure where I should put the buildpack.
Mine should be heroku-buildpack-go, which I've lost track where I get that from.
My repo consist only a single-character README.md, and the "Hello, playground" main.go.
Conclusion:
Thanks to David's comprehensive explanation, I was able to get DevOps started with correct buildpack:
From this I would conclude that your single .go file at the root of the directory tree does not meet the activation criteria for auto-building Go projects. I'd suggest picking one of the dependency managers in the requirements above and modifying your project to support it.
FTA, I just did touch go.mod then git add & git push and the AutoDevops started building my GO project indeed.
However it seems to me that Gitlab AutoDevops is not able to build any GO projects very easily, as I get the following error (with project variable TRACE=true):
...
!! The go.mod file for this project does not specify a Go version
!!
!! Defaulting to go1.11.1
!!
!! For more details see: https://devcenter.heroku.com/articles/go-apps-with-modules#build-configuration
!!
-----> Installing go1.11.1
-----> Fetching go1.11.1.linux-amd64.tar.gz... done
!! Installing package '.' (default)
!!
!! To install a different package spec add a comment in the following form to your `go.mod` file:
!! // +heroku install ./cmd/...
!!
!! For more details see: https://devcenter.heroku.com/articles/go-apps-with-modules#build-configuration
!!
-----> Running: go install -v -tags heroku .
go: cannot determine module path for source directory /tmp/build (outside GOPATH, no import comments)
ERROR: Job failed: exit code 1
The easier solution is to use .gitlab-ci.yml file instead, documented in
https://blog.boatswain.io/post/build-go-project-with-gitlab-ci/
(and followed up at Gitlab CI - Start Shared Runner for normal repos).
From the AutoDevops documentation:
Auto Build creates a build of the application in one of two ways:
If there is a Dockerfile, it will use docker build to create a Docker image.
Otherwise, it will use Herokuish and Heroku buildpacks to automatically detect and build the application into a Docker image.
Then looking at the build activation criteria, as per the Heroku Go buildpack documentation:
This buildpack will detect your repository as Go if you are using either:
go modules
dep
govendor
glide
GB
Godep
Or more specifically for godep, govendor or GB:
The Heroku Go buildpack is used when an application meets one of the following requirements:
has a Godeps/Godeps.json file, identifying the application as being managed by godep;
has a vendor/vendor.json file, identifying the application as being managed by govendor;
has a src directory, which has sub directories, contains one or more .go files, identifying the application as being managed by gb.
From this I would conclude that your single .go file at the root of the directory tree does not meet the activation criteria for auto-building Go projects. I'd suggest picking one of the dependency managers in the requirements above and modifying your project to support it. After that AutoDevops should start building your project.
If you are still having issues after that, this debugging note might help:
After making sure that the project meets the buildpack requirements;
if it still fails, setting a project variable TRACE=true will enable verbose logging which​ may help to continue troubleshooting.

PhpStorm: Can't analyse webpack.config.js: coding assistance will ignore module resolution rules in this file

The error started appearing at the start up of PhpStorm after I have upgraded to 2017.3.3
Webpack.config.js is a default one from Laravel 5.5 build.
Tried to suppress it with no success. Very annoying. Any ideas?
If you want to get rid of this problem you can remove the notifications & log for the Webpack from Settings->Apperance&Behavior->Notifications->Webpack
Common Cause:
There's an error in the Javascript used in your Webpack config when evaluated by IntelliJ.
But it works on the commandline?
It may work fine from the command line but the context that IntelliJ evaluates the config is different than the command line.
How can I tell what the Javascript error is?
Below the Can't analyse webpack.config.js error message, look for Error details:. If it's a Javascript error, this will give you a hint of what's failing.
Example:
I saw the following error when I opened a project in IntelliJ
Can't analyse webpack.config.js: coding assistance will ignore module resolution rules in this file.
Possible reasons: this file is not a valid webpack configuration file or its format is not currently supported by the IDE.
Error details: Cannot read property 'require' of undefined
In this case, there was a plugin configuration in the webpack.config.js using require.main.require. This is fine when ran from the command line but fails in IntelliJ because of the way IntelliJ evaluates the webpack.config.js. When IntelliJ evaluates it, require.main is undefined.
Just an workaround. This will make some changes to your project, but you can revert everything back to its original state after if PhpStorm works fine.
STEP 1
Make sure your git status is clean.
Close your PhpStorm.
Remove package-lock.json and node_modules.
Then regenerate package-lock.json with npm install.
Start PhpStorm and open your project.
Confirm that now it works. Event log like
Module resolution rules from webpack.config.js are now used for coding assistance.
STEP 2
Discard all changes with git checkout ..
Revert under node_modules with npm ci.
Now your project is before the workaround but with coding assistance.

Rerun only failed pytests with teamcity

I'm looking for a way to run only failed pytests during last build.
I've tried --lf option for pytest but it did not help, I guess it is so because of teamcity.
Does anyone faced the same problem?
Thanks to usefull answer, I figured out what was wrong with teamcity.
Multiple builds were using same checkout directory, what caused problems.
As #grundic mentioned:
check that your working directory is not changing
use same agent

Resources