KTH / devops-course

Repository of the DevOps course at KTH Royal Institute of Technology DD2482
191 stars 427 forks source link

Open-Source Contribution Submission #2662

Closed marcusalstrom closed 1 month ago

marcusalstrom commented 1 month ago

Assignment Proposal

Title

Fixing unnoticed commits of unstaged changes with bump in Commitizen

Names and KTH ID

Deadline

Task 3

Category

Open source

Description

Commitizen is an open source release management tool, that automatically creates commits in a standard way and updates versioning. It is actively used and popular with 2.5k stars with an active community. Bump is a tool within Commitizen that allows automated updating of the version of the project, which is managed by version provider files, such as pyproject.toml or Cargo.toml. Bump will automatically update the version of the project within the version file, it will add all tracked files to staging, create a changelog, and commit these files with a git tag corresponding to the new version.

The problem: There has been an ongoing issue where the project has been bumped up with uncommitted changes that could go unnoticed. This could lead to breaking changes being included in the new version of the project.

Our first idea was to simply abort any bump if there were unstaged changes. However, after a short discussion with one of the maintainers we agreed that the best solution would be to only add the version files and let any unstaged changes remain unstaged.

Before starting, we took time to:

Solved the issue by:

Our pull request can be found here and we are currently awaiting review from the maintainers.

Relevance

Commitizen is a tool with an important application in managing commits and versioning, which is an important part of DevOps (especially in CI/CD pipelines) and helps teams structure their commits and be on track. First, automation is key in DevOps, and so Commitizen provides a structured and consistent approach to creating commit messages that are consistent and easy to follow. In addition it can analyze commits to determine the next version and automatically change the version of a project and create tags, changelogs, and releases. Some tools in DevOps, such as Jenkins work well with structured commit messages and can do actions based on certain patterns. Also, an important aspect in DevOps is good communication between developers, which can be more easily facilitated by using standardized commit messages.

dd2482-bot commented 1 month ago

Readme is not correctly formatted Need exactly: ['Assignment Proposal', 'Title', 'Names and KTH ID', 'Deadline', 'Category', 'Description']

Got: ['Assignment Proposal', 'Title', 'Names and KTH ID', 'Deadline', 'Category', 'Description', 'Relevance']

javierron commented 1 month ago

@marcusalstrom thanks for the submission.

I cannot find the corresponding task proposal, can you link me to it?

marcusalstrom commented 1 month ago

Hi, We didn't realize that we were supposed to send in a proposal before the submission (which is obvious that we should've done now in hindsight). So there is no proposal unfortunately, this is both the proposal and the submission.

Sorry about the inconvenience