Skip to content
Snippets Groups Projects

cache: refactor cache with targets and config

Merged Jakub Ružička requested to merge better-cache into master
All threads resolved!

There are now 3 cache targets along with associated config options:

  • cache.local
  • cache.remote
  • cache.source

cache.source is only enabled when VCS is available, other cache targets are unaffected by VCS and are enabled by default.

Caching apkg commands require following cache targets:

  • make-archive: source
  • get-archive: remote
  • srcpkg: local (archive), source (templates unless --upstream)
  • build: local (source package)

This leads to cache only being disabled for relevant commands working on project source when VCS isn't available as opposed to disabling all caching.

Logging was vastly improved to get useful cache information when using

apkg -L verbose $COMMAND

Docs were expanded with a new cache.md as well as upated with clearly worded requirements for working cache (VCS and proper make_archive_script).

Simple test on examples/minimal-no-git is included in ci/tests/test_apkg.py for testing operation without VCS.

Closes: #73 (closed)

Edited by Jakub Ružička

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jakub Ružička added 12 commits

    added 12 commits

    • bef91811...7e476531 - 8 commits from branch master
    • ab4ccd18 - info: add new cache sub-command
    • 35fad954 - examples: new minimal-no-git example
    • 4613a21d - cache: get rid of cache_name, only use key
    • 5b91ec14 - cache: add cache target support, config, and docs

    Compare with previous version

  • Jakub Ružička added 2 commits

    added 2 commits

    • a609ab93 - cache: extend hash_file to support multiple files
    • 65384ea9 - cache: add cache target support, config, and docs

    Compare with previous version

  • Jakub Ružička resolved all threads

    resolved all threads

  • Jakub Ružička added 8 commits

    added 8 commits

    • 65384ea9...5cc0b0d7 - 3 commits from branch master
    • 9b6c990c - info: add new cache sub-command
    • 8472974b - examples: new minimal-no-git example
    • e9efea83 - cache: get rid of cache_name, only use key
    • 2e72d249 - cache: extend hash_file to support multiple files
    • 7598c34d - cache: add cache target support, config, and docs

    Compare with previous version

  • added 1 commit

    • bbd15f94 - examples/minimal-no-git: add nix packaging

    Compare with previous version

  • Jakub Ružička added 8 commits

    added 8 commits

    • bbd15f94...3c365ec5 - 2 commits from branch master
    • 7cd4624c - info: add new cache sub-command
    • fa842e06 - examples: new minimal-no-git example
    • 890bdd21 - cache: get rid of cache_name, only use key
    • ed67766f - cache: extend hash_file to support multiple files
    • e9dcdc90 - cache: add cache target support, config, and docs
    • bd3d5621 - examples/minimal-no-git: add nix packaging

    Compare with previous version

  • Jakub Ružička added 4 commits

    added 4 commits

    • ad06bc69 - examples/minimal-no-git: add nix packaging
    • ac2d1b10 - cache: get rid of cache_name, only use key
    • ae89713e - cache: extend hash_file to support multiple files
    • 8e10999d - cache: refactor cache with targets and config

    Compare with previous version

  • Jakub Ružička added 2 commits

    added 2 commits

    • c396ef97 - cache: extend hash_file to support multiple files
    • b246f884 - cache: refactor cache with targets and config

    Compare with previous version

  • Jakub Ružička changed title from cache: add cache target support, config, and docs to cache: refactor cache with targets and config

    changed title from cache: add cache target support, config, and docs to cache: refactor cache with targets and config

  • Jakub Ružička changed the description

    changed the description

  • Jakub Ružička added 10 commits

    added 10 commits

    • b246f884...d7f203d0 - 4 commits from branch master
    • 92603864 - info: add new cache sub-command
    • 51ed6a5d - examples: new minimal-no-git example
    • 1a019a20 - examples/minimal-no-git: add nix packaging
    • c1391f42 - cache: get rid of cache_name, only use key
    • 7a642fe8 - cache: extend hash_file to support multiple files
    • d982c681 - cache: refactor cache with targets and config

    Compare with previous version

  • Jakub Ružička resolved all threads

    resolved all threads

  • I think this is ready to merge.

    nix CI failures are due to problems in the jobs, not indicative of bugs in this change.

  • Jakub Ružička assigned to @vcunat and unassigned @vsraier

    assigned to @vcunat and unassigned @vsraier

    • Resolved by Jakub Ružička

      @vcunat I don't know how to properly add setuptools to nix jobs, please assist :pray:

      CI will fix itself once 0.4.0 is released and nix package is updated to 0.4.0, but I'd like this to work anyway, and I don't like merging with red jobs :-/

      I'm gonna merge this on monday one way (green jobs) or another (yellow jobs with allow_failure: true) and hopefully release 0.4.0 as well.

  • Jakub Ružička added 8 commits

    added 8 commits

    • d982c681...6b36e320 - 2 commits from branch master
    • 6476ec74 - info: add new cache sub-command
    • d0ba2cf2 - examples: new minimal-no-git example
    • 924d9d74 - examples/minimal-no-git: add nix packaging
    • 72762cd6 - cache: get rid of cache_name, only use key
    • c5b69563 - cache: extend hash_file to support multiple files
    • 7a014d05 - cache: refactor cache with targets and config

    Compare with previous version

  • added 2 commits

    • c6a8fabf - CI: fixup nixos-unstable-knot-* jobs
    • 0e949087 - Revert "CI: allow nix jobs to fail"

    Compare with previous version

  • Vladimír Čunát resolved all threads

    resolved all threads

  • Jakub Ružička added 7 commits

    added 7 commits

    • b901ec83 - CI: fixup nixos-unstable-knot-* jobs
    • 14e3fb5a - info: add new cache sub-command
    • b8042126 - examples: new minimal-no-git example
    • 171510e0 - examples/minimal-no-git: add nix packaging
    • ae6e3a5a - cache: get rid of cache_name, only use key
    • b457fc9d - cache: extend hash_file to support multiple files
    • 26928982 - cache: refactor cache with targets and config

    Compare with previous version

  • Jakub Ružička mentioned in commit 0bf86282

    mentioned in commit 0bf86282

  • Please register or sign in to reply
    Loading