MetOffice / MetOffice/SimSys_Scripts

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

Abierto
#109 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
9
Forks
19
Merge medio
5 d 48 min
PR fusionados (30 d)
4

Descripción

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 ?

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comience comparando las rutas independientes de branch, trunk, working-copy, command-line y suite del checker de UMDP3 con el comportamiento disponible de fcm bdiff, incluida la versión de git. Defina a qué archivos o líneas debería dirigirse un checker de cambios en cada contexto de ejecución y documente el diseño resultante y los criterios de aceptación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
git, python
Área
tooling
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.