MetOffice / MetOffice/SimSys_Scripts

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

Aperta
#109 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
9
Fork
19
Merge medio
5g 48m
PR unite (30g)
4

Descrizione

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 ?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziare confrontando i percorsi separati branch, trunk, working-copy, command-line e suite del checker UMDP3 con il comportamento disponibile di fcm bdiff, inclusa la versione di git. Definire quali file o righe dovrebbe prendere di mira un checker delle modifiche in ciascun contesto di runtime e documentare il design risultante e i criteri di accettazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, python
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.