Coder Social home page Coder Social logo

dev-charts's Issues

Replace the second timestamp from patch files

Example:

+++ packages/coredns/charts/templates/configmap.yaml 2020-05-19 23:46:53.326737422 +0200

The second timestamp in patch files generated from make patch introduces a ton of new changes per commit that are unrelated to the actual change that needs to be reviewed.

Issues

  • A PR with several commits such as #29 introduces a large number of changes between commits that purely come from timestamp changes (i.e. modifying 2020-07-19 21:58:02.000000000 -0700 to 2020-07-20 00:18:18.000000000 -0700). As a result, the PR becomes difficult to review for a reviewer as they need to filter through all of the timestamp changes in the patch file to find the actual code changes that have been made.
  • Rebasing patch changes within a single PR that is bumping the package version involves re-running the make patch command several times for each commit and encountering several Git conflicts related to timestamp changes. For example, if I have 3 commits and I make a change in commit 1 (i.e. rebase, pick commit 1, run make prepare, make the change necessary, and run make patch), all of the timestamps from commit 1 will change to the current time. This results in several merge conflicts when applying commit 2 onto commit 1, and similarly when applying commit 3 to commit 2.

Proposed solution

On make patch:

  • Replace the timestamp printed by the diff with <package-name>_<package-version> instead. This will introduce changes to all existing patches within the dev-charts repo.

On make prepare:

  • Replace the <package-name>_<package-version> with the current unix timestamp before applying the diff to ensure that the patch step still works as expected.

Once this change is applied, any changes to the chart that necessitate a package version bump would first need to have a commit that just updates the chart version and regenerates the patch followed by the actual changes introduced into the chart for the new version in separate commits.

Alternate solution

Remove timestamps altogether from the patches.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.