Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: grafana/tanka
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.23.1
Choose a base ref
...
head repository: grafana/tanka
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.24.0
Choose a head ref
  • 16 commits
  • 67 files changed
  • 8 contributors

Commits on Sep 29, 2022

  1. Use zerolog instead of log (#766)

    Exposes a `--log-level` arg on every command
    Replaces all `log` uses with either `fmt.Fprint(os.Stderr)` or zerolog calls
    
    Benefits:
    - Rather than mixing actual logs (that should have a level) and things that we want to print to stderr, using zerolog and fmt is more deliberate in meaning
    - Logs can be disabled or turned on using the `--log-level` option
    - We'll be able to add more verbose logs without potentially annoying people. An example is the "Loading environment" messages that the export command now prints. I shifted that to debug
    - Will allow for trace level logs. Ex: #751, logs from the underlying `kubectl` exec or helm
    julienduchesne authored Sep 29, 2022
    Configuration menu
    Copy the full SHA
    cc21323 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. Additional logging + improvements (#770)

    Follow-up to #766
    - Shift linting name logging to debug logging. Instead of sending everything to stdout, we can now have a cleaner "report"
    - Missed some `log.Printf`(alias for Debug) in helm code, shifted that to info logs
    - Added some caching logs, whether or not it's a cache hit + time elasped to calculate hash
    - Changed `time` for `duration_ms` in env loading log. This conflicts with the log time
    julienduchesne authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    e26c4dd View commit details
    Browse the repository at this point in the history
  2. Replace external call to diffstat with native code (#769)

    * Replace external call to `diffstat` with native code
    Closes #767
    
    `diffstat` is not available in the `apk` registry so we would have to compile it manually to add it to the docker image
    
    Parsing a diff to get the number of lines is pretty simple
    
    I tried a few external libraries but they didn't work right + less libs is better
    
    * Add docstring
    julienduchesne authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    c5a739e View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. Add new tk tool importers command (#771)

    * Add new `tk tool importers` command
    
    This command is powerful when used with the `--merge-strategy=replace-envs` flag added here: #760
    
    Given a repository with a large number of Tanka environments, exporting the whole set can be very time consuming if done on every commit.
    What a user probably wants to do is to only export the environments that have changed.
    To do this, we need to actually find out what files affect which environments, and this is what this new command does.
    A user can now pass the list of files modified in a git commit, and run `tk export` on the set of environments affected by those files.
    
    * Add comments and simplify functions
    julienduchesne authored Oct 4, 2022
    Configuration menu
    Copy the full SHA
    51b69c5 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Configuration menu
    Copy the full SHA
    f590ad4 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Revert to fmt.Print for error logging (#777)

    When an error occurs, it is ultimately brought to the `main.go` file where it is printed for the user (or machine)
    Using log.Fatal garbles the error by not rendering newlines
    
    This reverts #774 but adds an os.Exit(1) which is an alternative fix to what the PR did
    julienduchesne authored Oct 13, 2022
    Configuration menu
    Copy the full SHA
    2709a0a View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2022

  1. tk tool importers: Cache the full result (#779)

    I hadn't done it before because the benefit was minimal. However, I've found out that for very heavily used libraries (used by hundreds/thousands of files), it does help
    For example, for [`ksonnet-util`](https://github.com/grafana/jsonnet-libs/tree/master/ksonnet-util) which we use everywhere, compute time goes from ~13s to ~6s
    julienduchesne authored Oct 24, 2022
    Configuration menu
    Copy the full SHA
    f205567 View commit details
    Browse the repository at this point in the history
  2. Fix typo on merge-strategy option's help (#781)

    Signed-off-by: Jordi Clariana <[email protected]>
    
    Signed-off-by: Jordi Clariana <[email protected]>
    jordiclariana authored Oct 24, 2022
    Configuration menu
    Copy the full SHA
    f23945c View commit details
    Browse the repository at this point in the history
  3. Document Helm's chart tool multi-version feature (#782)

    Also, the `--prune` option for vendoring
    Closes #778
    julienduchesne authored Oct 24, 2022
    Configuration menu
    Copy the full SHA
    d379f72 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. Prune: Detect resources created by Flux (#784)

    To know that a resource should be pruned, we check that it has a field manager of a known tool
    However, Flux applies with the `kustomize-controller` field manager, which isn't in the list
    Therefore, a `diff --with-prune` doesn't detect resources applied with Flux V2
    
    Also: Added more logs to the `Orphaned` function. It now lists all resources on debug mode
    julienduchesne authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    75c345d View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Find Importers: Add missing break in relative paths logic (#785)

    * Find Importers: Add missing `break` in relative paths logic
    
    Jsonnet is weird with relative paths
    Given two envs in their own folder. The two following imports in `env1/main.jsonnet will work`: `../env2/main.jsonnet` and `../../env2/main.jsonnet`, so we have to try all of them
    
    The logic does so in a loop. Without a `break`, the logic worked when the match was found on the first case (and correct one) but failed on the second
    
    * Simpler logic + add test
    
    * Add new test
    julienduchesne authored Nov 3, 2022
    Configuration menu
    Copy the full SHA
    5bc978b View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2022

  1. Deploy website to Github Pages (#793)

    This gets rid of netlify which we don't really need and is blocking PRs like #783
    This contains two different parts:
    - A step that deploys to a preview for PRs
    - A step that deploys on a push to main
    julienduchesne authored Dec 6, 2022
    Configuration menu
    Copy the full SHA
    08ddf95 View commit details
    Browse the repository at this point in the history
  2. chore(jsonnet): update to 0.19.1 (#783)

    * chore(jsonnet): update to 0.19.0
    
    * Bump version to v0.19.1
    
    * Do not use std.member (google/go-jsonnet#656)
    
    Co-authored-by: Salva Corts <[email protected]>
    Duologic and salvacorts authored Dec 6, 2022
    Configuration menu
    Copy the full SHA
    0ddba90 View commit details
    Browse the repository at this point in the history
  3. Github pages: PR path fix (#794)

    When DNS is setup in Github pages, the URLs (ex: https://grafana.github.io/tanka/pr-preview/pr-783/) now always redirect to the tanka.dev DNS name
    So it becomes: https://tanka.dev/pr-preview/pr-783/
    Therefore, the path prefix is now wrong
    
    Everything else is now running fine without Netlify!
    julienduchesne authored Dec 6, 2022
    Configuration menu
    Copy the full SHA
    8016ce4 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. Update resources.go to take output from [email protected] (#796)

    Signed-off-by: Justin Lei <[email protected]>
    
    Signed-off-by: Justin Lei <[email protected]>
    leizor authored Jan 6, 2023
    Configuration menu
    Copy the full SHA
    d36a5d0 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2023

  1. Support forcing color output on/off (#799)

    * Support forcing color output on/off
    
    Closes #798
    
    Introduce flag `--color` to control the colorization of diff output.
    
    Add flag to all commands that can output colorized diff text:
    - `diff`
    - `apply`
    - `prune`
    
    `--color` has 3 allowed values:
    - `auto` (default): colorize if stdout is a tty (current behavior)
    - `always`: always colorize output
    - `never`: never colorize output
    
    * Remove unused attribute
    
    Co-authored-by: Matt Wilder <[email protected]>
    Co-authored-by: Julien Duchesne <[email protected]>
    3 people authored Jan 27, 2023
    Configuration menu
    Copy the full SHA
    4a53805 View commit details
    Browse the repository at this point in the history
Loading