MetOffice / MetOffice/SimSys_Scripts

How should <branch/change checkers> assemble the list of files to check ? #UMDP3_check

未关闭
#109 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
9
派生
19
平均合并
5 天 48 分钟
30 天内合并 PR
4

描述

This question arises from looking at UMDP3 checker, but it could be applied to any scripts we want to target code being changed.

The original UMDP3 checker was grown not designed. This means it has several, completely separate ways of deciding what files to check based on branch v trunk v WC **and** command line v suite
Originally, IIRC, as a script run manually on a WC it used output from 'fcm bdiff' to get a list of files to check.

This doesn't work in quite the same way in most other circumstances though.
- in rose-stem it can only see changes committed to the (mirror) branch
- when dealing with the trunk, bdiff produces no results
- When rose-stem is run on a 'test branch' it tries to auto correct to the dev branch.

Ultimately this means that the current structure of the (AI translated code) branches quite early on based on "is trunk" and "is suite" rather than calling a "get checklist" function which could handle a vairety of methods beghind the scene.

The result is a range of code specific to the runtime circumstances (umdp3 checker really is about 3 separate codes with little overlap in anything other than intent...)

Secondary issues are that when working on a WC (and possibly a branch, but not in rose-stem ==I think==) it also relies on the full output of fcm bdiff to only check the changed lines. Or when run in rose stem, it tries to decide if "other repos" (linked tickets) are in play and then tries to check the code in them too - but doesn't have a branch - only the fully extracted code to look at.

At present, the git version of 'fcm bdiff', while superior in many ways to the actual 'fcm bdiff', does not have the option to generate a list of changed/added/deleted lines - It could be added, however I'm not sure we should be restricting the checks to that level....

And /finally/ the output of UMDP3 checker in the automatic tests on the trunk (nigtly/weekly) produce so much spurious output, it seems noone is looking at them any more.

So the question is : what is it we want any change checker to check ?

1. All the code ?
2. or only the changed files ?
3. or only the changed lines ?

approach 1 has the following issues :
- time/performance - there might be a lot of code to check.
- spotting 'issues' that pre-existed the change in question (devs don't like this)
approach 2 can **still** spot 'issues' that aren't a result of the change, but less of them as it's only dealing with a smaller subset of files.

approach 3 is only available when looking at a branch, and has the small hickup that in my tests, it fails to highlight the removal of an "implicit None" as that's not an issue on 'a line' but requires a check which looks at the whole file - which it's currently not getting..

So - as we prgogress from FCM to Git - and I'm looking at it anyway, if we were designing something to target checks within a change - what would we **want** it to do ?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,将 UMDP3 checker 的独立 branch、trunk、working-copy、command-line 和 suite 路径与可用的 fcm bdiff 行为进行比较,包括 git 版本。定义变更检查器在每个运行时上下文中应针对哪些文件或行,并记录由此形成的设计和验收标准。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, python
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。