Comments (11)
@yi-Xu-0100 这个我会尽快解决,python版本比较好改了。:)
我看链接[1]提到的git rev-list -n 1 --all
这个方法感觉还不错。
from hub-mirror-action.
@yi-Xu-0100 OK,明白了,这是因为empty push失败了,加到failed list里了,如果failed list非空,会在最后退出的。
所以,你这个场景,即使修复了empty这个问题,可能也不能完全避免。感觉需要一个参数来控制最后的退出。
比如类似skip_exit
之类的,默认保持现状,如果用户设置为True的话,job永远成功,不会退出。这样不会break到后面的job。
from hub-mirror-action.
现在这个empty同步是直接中断挂掉了,还是最后raise error?
from hub-mirror-action.
@Yikun 不会中断,但是最后会返回步骤失败,造成缓存无法完成。虽然都同步成功了,但是后面步骤都不会完成。
from hub-mirror-action.
@Yikun https://github.com/yi-Xu-0100/test/runs/1258327855
可以看下以前的这个测试,MyWiki 是空仓库,同步会因为 push fail 而使结果错误。
是否应该在 clone 的地方判断,因为 clone 的结果中包含 warning 提示。
Backup MyWiki ...
(0/3) Downloading...
Cloning into 'MyWiki'...
warning: You appear to have cloned an empty repository.
+ cd MyWiki
+ create_repo MyWiki ***
++ curl https://gitee.com/api/v5/users/yiXu0100/repos
% Total % Received % Xferd Average S++ peejq d '.[] | select(.full_name=="yiXu0100/MyWiki").name'
Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0++ wc -l
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
99 111k 99 111k 0 0 21522 0 0:00:05 0:00:05 --:--:-- 22261
100 111k 100 111k 0 0 21545 0 0:00:05 0:00:05 --:--:-- 36242
+ has_repo=1
+ '[' 1 == 0 ']'
+ git remote add gitee [email protected]:yiXu0100/MyWiki.git
+ update_repo
(1/3) Updating...
+ echo -e '\033[31m(1/3)\033[0m' Updating...
+ git pull -p
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.
+ echo 'Update failed'
+ import_repo
+ echo -e '\033[31m(2/3)\033[0m' Importing...
+ git remote set-head origin -d
Update failed
(2/3) Importing...
+ [[ true == \t\r\u\e ]]
+ git push -f gitee 'refs/remotes/origin/*:refs/heads/*' --tags --prune
Warning: Permanently added 'gitee.com,117.28.245.92' (ECDSA) to the list of known hosts.
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Connection to gitee.com closed by remote host.
Push failed
error: failed to push some refs to '[email protected]:yiXu0100/MyWiki.git'
from hub-mirror-action.
我创建的 repo-list-genreator - github action 自从 v1.0.0 开始已经能够去除空仓库了!这样暂时就不会有这个空仓库推送报错的问题了!
from hub-mirror-action.
@Yikun 空仓库在新版本中仍然无法同步并给出 error,如果只使用当前的 action 可能会造成缓存模式中断和后续任务失败,建议在 python 中增加判断空仓库并跳过给出 warning 的逻辑。😀
from hub-mirror-action.
如果只使用当前的 action 可能会造成缓存模式中断和后续任务失败
昨天我没注意,你说还会影响后续任务失败吗?我试了下,似乎不会break流程 [1],只是有一个failed。因为理论上讲,所有的主流程错误都会被catch住,并且append到failed list里面。
[1] https://github.com/Yikun/hub-mirror-action/pull/95/checks?check_run_id=2077891384
from hub-mirror-action.
@Yikun
我指的是当前 workflows 中这个任务之后的任务,造成整个 job 失败,应该会造成 cache 缓存失败。
当然其他的仓库同步是完成的。
from hub-mirror-action.
另外,empty这个问题已经解决了:#62 ,可以试试 uses: Yikun/hub-mirror-action@empty
,没问题我就合入了。
[1] https://github.com/Yikun/hub-mirror-action/pull/95/checks?check_run_id=2082408627
from hub-mirror-action.
@Yikun 看起来非常不错👍,合并后关闭
from hub-mirror-action.
Related Issues (20)
- 同步到gitlab如何使用呢 HOT 2
- 希望可以对自建Gitea进行支持 HOT 3
- 公共仓库间同步失败 HOT 4
- github 仓库同步到 gitee 仓库失败
- 希望可以添加对 sourcehut 的支持
- 希望添加清理缓存的功能 HOT 4
- 希望增加打印已成功仓库日志 HOT 9
- AttributeError: 'Hub' object has no attribute 'src_repo_base' HOT 4
- hub_mirror-action@v运行缓慢 HOT 2
- 为什么运行同步一直在下载系统安装东西,卡十几分钟都不行 HOT 5
- 同步目标源时创建仓库返回502 HOT 1
- 希望增加对codeup的支持
- 同步非private,但是fork的仓库同步如何做? HOT 2
- 应该如何避免总任务超时 HOT 2
- 同步gitee 失败 HOT 1
- error in gitee 同步github HOT 2
- github action处理python包PyYAML报错 HOT 2
- 【HELP】最近失败的频率有点高 HOT 1
- Permission denied (publickey) HOT 4
- 使用 Yikun/hub-mirror-action@master 报错 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hub-mirror-action.