PyFunceble icon indicating copy to clipboard operation
PyFunceble copied to clipboard

BUG: CI duble testing same domain

Open spirillen opened this issue 1 year ago • 5 comments

Description

To understand my question/observation we have to look at these to GHA

  1. https://github.com/mypdns/matrix/actions/runs/9656304178/job/26633593189#step:6:166
  2. https://github.com/mypdns/matrix/actions/runs/9656341145/job/26633690610#step:6:166

As you now can see, then the two CI are testing the same domains. Now why is this weird, the sources are the same, yes. but they are pushing the test results to a central mariadb.

Configuration

Please see https://github.com/mypdns/matrix/blob/e42eba13fb4b7da22c10408362e9891c5d8fd0df/.pyfunceble/.PyFunceble.overwrite.yaml

Reproduction

  1. Run the CI with an external DB

Expected behavior

I would have expected that we don't keep testing the same records again and again as we uses a central DB to store the results. As the one CI started a couple of minutes earlier.

Screenshots

Not needed

Versions

OS: ubuntu-latest

Python Version: 3.12

PyFunceble Version: 4.2.4-dev

Additional context

I will suggest a workflow like

  1. -c --preload = Read date from source
  2. write new data to db
  3. Read data to test
  4. Test that data
  5. Write test result to DB
  6. repeat from 3 till the end

spirillen avatar Jun 25 '24 04:06 spirillen

And a 3rd run, the same data again

https://github.com/mypdns/matrix/actions/runs/9656558435/job/26634259933#step:6:167

spirillen avatar Jun 25 '24 04:06 spirillen

I think you need to activate the cli_testing.autocontinue option. We disabled it as default a few years back. It is only active when you actively want it.

funilrys avatar Sep 22 '24 10:09 funilrys

Changed in https://github.com/mypdns/matrix/commit/7dc1d2d7e18d0eb8cbf4f72f6eeca1a7ad9bb8ec now we just waits

spirillen avatar Sep 23 '24 16:09 spirillen

It comes to my mind while I was eating... This should to my mind not have any relations to the -c | --continue setting, it is purely related to the --bdr as it was already tested within this time frame

Relates to #145, #168 & #383 am I right?

spirillen avatar Sep 23 '24 17:09 spirillen

The -c didn't change the result of this issue...

  1. test run https://github.com/mypdns/matrix/actions/runs/10999209893/job/30538882122#step:6:167
  2. test run https://github.com/mypdns/matrix/actions/runs/11000119117/job/30541818884#step:6:164

spirillen avatar Sep 23 '24 19:09 spirillen

I finally took the time to analyze what is behind this ... Turned out it's the expected behavior.

PyFunceble doesn't have anything to prevent duplicates ... If you give 2 files and the same domain or URL can be found in both files, PyFunceble will just retest.

The only "feature" for such thing is the --merge-output, which will make sure that the output is merged and no duplicate can be found.

Therefore, I'm closing this as it is not a bug. Please open a new issue if you have a feature request.

funilrys avatar Mar 16 '25 15:03 funilrys

😕 ❓ This will leave a never ending loop of testing only the top of any lists in any CI/CD environment, that can not complete testing the source(s) in one run...

spirillen avatar Mar 16 '25 20:03 spirillen