Should We Use Squash and Merge Option?

When we merge PR into the base branch, we have an option to do Squash and Merge. My preference is to use it all the time. Let’s talk about why this is the case.

First of all, what do we want from our commit history? We want to have a clean commit history with no noise. We also want to retain the history of change so that we can understand the change and context when we look back.

One commit should be sufficient for a lot of PRs. If you need to have multiple commits, the PR is too large and it should be broken down into smaller pieces.

However, there are many cases where you want to have a few commit histories so that we can trace the change and the PR history itself works as a documentation for the context of the change. In this case, we can retain the commit history in the PR while having a single clean commit to the base branch without noise with Squash and Merge option.

The caveat is that we do not want to abuse it. We want to make sure we retain a good commit history in the PR if it makes sense to have the change history. We can do fixup, squash and so on. As long as we stick to good git practice, the Squash and Merge option works really well.

Git
How to specify which Node version to use in Github Actions

When you want to specify which Node version to use in your Github Actions, you can use actions/setup-node@v2. The alternative way is to use a node container. When you try to use a publicly available node container like runs-on: node:alpine-xx, the pipeline gets stuck in a queue. runs-on is not …

AWS
Using semantic-release with AWS CodePipeline and CodeBuild

Here is the usual pattern of getting the source from a git repository in AWS CodePipeline. In the pipeline, we use AWS CodeStart to connect to a repo and get the source. Then, we pass it to the other stages, like deploy or publish. For some unknown reasons, CodePipeline downloads …

DBA
mysqldump Error: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109)

mysqldump 8 enabled a new flag called columm-statistics by default. When you have MySQL client above 8 and try to run mysqldump on older MySQL versions, you will get the error below. mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM ‘$”number-of-buckets-specified”‘) FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = ‘myschema’ AND TABLE_NAME = ‘craue_config_setting’;’: Unknown …