From c7f98b09193af84d144370e4cf5671568c11d67e Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Fri, 24 Jan 2025 23:58:13 +0800 Subject: [PATCH 1/3] Add pre task issue template and improve the r2cn template Signed-off-by: Quanyi Ma --- .github/ISSUE_TEMPLATE/pre-task.md | 18 ++++++++++++++++++ .github/ISSUE_TEMPLATE/r2cn.md | 27 ++++++++++++++------------- 2 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/pre-task.md diff --git a/.github/ISSUE_TEMPLATE/pre-task.md b/.github/ISSUE_TEMPLATE/pre-task.md new file mode 100644 index 00000000..dea00b4b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/pre-task.md @@ -0,0 +1,18 @@ +--- +name: pre-task +about: r2cn 测试任务模板 +title: "[libra] " +labels: pre-task libra +assignees: '' + +--- + +[任务简述] Libra XXX 命令实现 YYY 参数 + +[具体描述] XXX 命令 YYY 参数的具体功能描述 + +[实现方案] + +[测试用例] + +[实现方案] diff --git a/.github/ISSUE_TEMPLATE/r2cn.md b/.github/ISSUE_TEMPLATE/r2cn.md index 4be120a5..a2763677 100644 --- a/.github/ISSUE_TEMPLATE/r2cn.md +++ b/.github/ISSUE_TEMPLATE/r2cn.md @@ -7,26 +7,27 @@ assignees: '' --- -[标题] 为xxx实现xxx功能 +[任务] -[任务分值] xx分(根据任务分级自评) +[任务分值] 4 分 -[背景描述] 描述产品及特性 +[背景描述] -[需求描述] 目前需要开发的特性 +[需求描述] -[环境要求] 描述开发环境 +[代码标准] -[产出标准] xxx +1. 所有 PR 提交必须签署 `Signed-off-by` 和 使用 `GPG` 签名,即提交代码时(使用 `git commit` 命令时)至少使用 `-s -S` 两个参数; +2. 所有 PR 提交必须通过 `GitHub Actions` 自动化测试; +3. PR 提交内容和代码注释均需要使用英文; -[PR 提交地址] 仓库xxx分支的xxx目录 +[PR 提交地址] 提交到 [mega](https://github.com/web3infra-foundation/mega) 仓库的 `main` 分支 -[期望完成时间] 202x年xx月xx日 +[开发指导] -[开发指导] 参考资料等 +[导师及邮箱] 请申请此题目的同学使用邮件联系导师,或加入到 [R2CN Discord](https://discord.gg/WRp4TKv6rh) 后在 `#p-meta` 频道和导师交流。 -[导师及邮箱] YYY +1. Quanyi Ma +2. Tianxing Ye -[备注] xxx - -[标签] r2cn +[备注] From a2912d7236201319c874cbfdd43f558816824694 Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Sat, 25 Jan 2025 00:00:58 +0800 Subject: [PATCH 2/3] Remove the mega and aries from docker hub cloud build Signed-off-by: Quanyi Ma --- .github/workflows/build.yml | 50 ------------------------------------- 1 file changed, 50 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09f1e861..1ad97a0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,53 +79,3 @@ jobs: # For pull requests, export results to the build cache. # Otherwise, push to a registry. outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} - aries: - runs-on: ubuntu-latest - if: github.repository_owner == 'genedna' - steps: - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKER_USER }} - password: ${{ secrets.DOCKER_PAT }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: "lab:latest" - driver: cloud - endpoint: "${{ vars.DOCKER_USER }}/mono" - platforms: linux/amd64,linux/arm64 - install: true - - name: Build and push - uses: docker/build-push-action@v6 - with: - tags: "${{ vars.DOCKER_USER }}/mono:aries-engine-latest" - file: docker/aries-engine-dockerfile-hub - # For pull requests, export results to the build cache. - # Otherwise, push to a registry. - outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} - mega: - runs-on: ubuntu-latest - if: github.repository_owner == 'genedna' - steps: - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKER_USER }} - password: ${{ secrets.DOCKER_PAT }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: "lab:latest" - driver: cloud - endpoint: "${{ vars.DOCKER_USER }}/mono" - platforms: linux/amd64,linux/arm64 - install: true - - name: Build and push - uses: docker/build-push-action@v6 - with: - tags: "${{ vars.DOCKER_USER }}/mono:mega-engine-latest" - file: docker/mega-engine-dockerfile-hub - # For pull requests, export results to the build cache. - # Otherwise, push to a registry. - outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} From f2e45cd27a60fc80e52d58e3962ff51c15be4f08 Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Sat, 25 Jan 2025 00:16:26 +0800 Subject: [PATCH 3/3] Fix clippy error of scorpio Signed-off-by: Quanyi Ma --- scorpio/src/overlayfs/layer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scorpio/src/overlayfs/layer.rs b/scorpio/src/overlayfs/layer.rs index 5fafaeac..1669d601 100644 --- a/scorpio/src/overlayfs/layer.rs +++ b/scorpio/src/overlayfs/layer.rs @@ -21,7 +21,7 @@ pub trait Layer: Filesystem { async fn create_whiteout(&self, ctx: Request, parent: Inode, name: &OsStr) -> Result { // Use temp value to avoid moved 'parent'. let ino: u64 = parent; - match self.lookup(ctx, ino, name).await {//FXIME: errir + match self.lookup(ctx, ino, name).await {//FXIME: errir Ok(v) => { // Find whiteout char dev. if is_whiteout(&v.attr) { @@ -46,7 +46,7 @@ pub trait Layer: Filesystem { } None => return Err(e.into()), } - + }, } @@ -126,7 +126,7 @@ pub trait Layer: Filesystem { return Err(Error::from_raw_os_error(libc::ENOTDIR).into()); } - + // Return Result. let check_attr = |inode: Inode, attr_name: &'static str, attr_size: u32| async move { let cname = OsStr::new(attr_name); @@ -134,7 +134,7 @@ pub trait Layer: Filesystem { Ok(v) => { // xattr name exists and we get value. if let ReplyXAttr::Data(bufs) = v { - if bufs.len() == 1 && bufs[0].to_ascii_lowercase() == b'y' { + if bufs.len() == 1 && bufs[0].eq_ignore_ascii_case(&b'y') { return Ok(true); } }