Git Product home page Git Product logo

cachewrtbuild's People

Contributors

higarfield avatar stupidloud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cachewrtbuild's Issues

一些错误信息

缓存后,post cache会有如下警告:

Post job cleanup.
fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Warning: Command failed: git log --pretty=tformat:"%h" -n1 tools toolchain
fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

原始Action

貌似跟save.js以及fetch.js有关

我是js彩笔,请求修复

命中缓存关键词增加分支名

编译完这个分支,再去编译其他分支的时候缓存就被覆盖了,其他分支本来就编译过,这就浪费了编译时间

报错,求支援

配置:

    steps:
      - name: Checkout
        uses: actions/checkout@master
        with:
          ref: main
          fetch-depth: 0

      - name: cache
        uses: klever1988/cachewrtbuild@main
        with:
          ccache: 'true'

log:

fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: Command failed: git log --pretty=tformat:"%h" -n1 tools toolchain
fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

几十个CI并发编译时遇到Post cache错误

Post job cleanup.
cache-openwrt-a2a022b9-1630776622
/usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/lede-17.01.4-Mod/lede-17.01.4-Mod --files-from manifest.txt
(node:758271) UnhandledPromiseRejectionWarning: Error: Cache service responded with 429 during upload chunk.
at /home/runner/work/_actions/HiGarfield/cachewrtbuild/main/node_modules/@actions/cache/lib/internal/cacheHttpClient.js:149:19
at Generator.next ()
at fulfilled (/home/runner/work/_actions/HiGarfield/cachewrtbuild/main/node_modules/@actions/cache/lib/internal/cacheHttpClient.js:5:58)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:758271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:758271) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/home/runner/work/_actions/HiGarfield/cachewrtbuild/main/node_modules/@actions/cache/lib/internal/cacheHttpClient.js:180
throw new Error(Cache upload failed because file read failed with ${error.message});
^

Error: Cache upload failed because file read failed with EBADF: bad file descriptor, read
at ReadStream. (/home/runner/work/_actions/HiGarfield/cachewrtbuild/main/node_modules/@actions/cache/lib/internal/cacheHttpClient.js:180:31)
at ReadStream.emit (events.js:210:5)
at internal/fs/streams.js:167:12
at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)

【bug】缓存总是命中

https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L18-L19
由于 restoreKeys = ['cache-openwrt']restoreKeys = ['cache-openwrt', 'cache-openwrt-<commithash>']
下面再查缓存的时候
https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L40
keyString 包含时间戳,肯定不会命中,所以会用 restoreKeys 依次去查
但是因为缓存的 key = cache-openwrt-<commithash>-<timestamp>
所以 restoreKeys 中的 cache-openwrt 一定会命中缓存
也就是说不管工具链的commithash有没有发生变化,只要缓存存在就一定会命中,那这个还有什么意义呢?

建议将 restoreKeys 只添加一个 restoreKeys = ['cache-openwrt-<commithash>'] 这样可以根据工具链的 commithash 去命中缓存

some error report

Run klever1988/cachewrtbuild@main
with:
ccache: true
toolchain: true
skip: true
clean: false
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
FEEDS_CONF: feeds.conf.default
CONFIG_FILE: config/x64.config
DIY_P1_SH: diy-part1.sh
DIY_P2_SH: diy-part2.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_COWTRANSFER: false
UPLOAD_WETRANSFER: false
UPLOAD_RELEASE: true
TZ: Asia/Shanghai
fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Error: Command failed: git log --pretty=tformat:"%h" -n1 tools toolchain
fatal: ambiguous argument 'tools': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

请教大佬

请问,如果我想在本地保留缓存,应该保留什么文件呢?我想在本地编译的时候把缓存文件保留起来,然后跟云编译一样,用最新的源码跟插件编译,本地的那些文件应该保留那些文件可以达到保留缓存的效果?

大佬test分支能更新Node.js 16吗?

用main分支的话,如果已经存在缓存,就会出现一个报错,不影响编译就是,test分支不会报错,不过一直提示要更新Node.js 16

main分支如果已经存在缓存,就会出现以下报错
QQ截图20221020234401

tar命令出错

gzip: stdout: No space left on device
/usr/bin/tar: cache.tgz: Wrote only 4096 of 10240 bytes
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now
Warning: Failed to save: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2

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.