Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

get-nightlies: revamp for deeper comparison #622

Merged

Conversation

sosiouxme
Copy link
Contributor

@sosiouxme sosiouxme commented Jul 18, 2022

Comparing timestamps on nightlies can only go so far.
For a more reliable indicator that all the nightlies selected are "the same thing" get-nightlies now compares contents quite deeply.
This should be reliable enough to feed into gen-assembly or to use in jobs checking that nightlies are available for upcoming releases.

It also allows specifying a nightly you'd like in the set and other improvements.

$ time doozer -q -g openshift-4.10 get-nightlies
4.10.0-0.nightly-ppc64le-2022-07-18-094300 4.10.0-0.nightly-s390x-2022-07-16-173211 4.10.0-0.nightly-arm64-2022-07-16-173300 4.10.0-0.nightly-2022-07-18-094217

real	0m30.512s
user	1m7.026s
sys	0m16.111s

$ time doozer -q -g openshift-4.10 get-nightlies --matching 4.10.0-0.nightly-2022-07-18-094217
4.10.0-0.nightly-ppc64le-2022-07-18-094300 4.10.0-0.nightly-s390x-2022-07-16-173211 4.10.0-0.nightly-arm64-2022-07-16-173300 4.10.0-0.nightly-2022-07-18-094217

real	0m16.225s
user	1m3.965s
sys	0m15.145s

@openshift-ci openshift-ci bot requested a review from Ximinhan July 18, 2022 17:04
@sosiouxme sosiouxme force-pushed the 20220718-get-matching-nightlies branch from 6907538 to a00725a Compare July 19, 2022 14:43
@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 19, 2022
@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 19, 2022
Comparing timestamps on nightlies can only go so far.
For a more reliable indicator that all the nightlies selected are "the
same thing" get-nightlies now compares contents quite deeply.
This should be reliable enough to feed into gen-assembly or to use in
jobs checking that nightlies are available for upcoming releases.

It also allows specifying a nightly you'd like in the set and other
improvements.
@sosiouxme sosiouxme force-pushed the 20220718-get-matching-nightlies branch from 5eb5f20 to 258a7ee Compare July 22, 2022 13:03
@sosiouxme sosiouxme force-pushed the 20220718-get-matching-nightlies branch from 258a7ee to 3b8cd1a Compare July 22, 2022 13:10
@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 22, 2022
@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 22, 2022
@openshift-bot
Copy link

Build #8

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_doozer_PR-622/setup.py
py36 inst-nodeps: /mnt/workspace/jenkins/working/art-tools_doozer_PR-622/.tox/.tmp/package/1/rh-doozer-2.0.15.dev71+g3b8cd1a.zip
py36 installed: aiofiles==0.8.0,astroid==2.11.7,attrs==21.4.0,autopep8==1.6.0,bashlex==0.16,bcrypt==3.2.2,cached-property==1.5.2,certifi==2022.6.15,cffi==1.15.1,charset-normalizer==2.0.12,click==8.0.4,contextvars==2.4,coverage==6.2,cryptography==37.0.4,dataclasses==0.8,decorator==5.1.1,Deprecated==1.2.13,dill==0.3.4,distlib==0.3.5,dockerfile-parse==1.2.0,filelock==3.4.1,flake8==4.0.1,flexmock==0.11.3,future==0.18.2,gssapi==1.7.3,idna==3.3,immutables==0.18,importlib-metadata==4.8.3,importlib-resources==5.4.0,iniconfig==1.1.1,isort==5.10.1,koji==1.29.1,krb5==0.3.0,lazy-object-proxy==1.7.1,mccabe==0.6.1,mock==4.0.3,mysql-connector-python==8.0.29,openshift-client==1.0.17,packaging==21.3,paramiko==2.11.0,platformdirs==2.4.0,pluggy==1.0.0,protobuf==3.19.4,py==1.11.0,pycodestyle==2.8.0,pycparser==2.21,pyflakes==2.4.0,pygit2==1.6.1,PyGithub==1.55,PyJWT==2.4.0,pylint==2.13.9,PyNaCl==1.5.0,pyparsing==3.0.9,pyspnego==0.5.3,pytest==7.0.1,python-dateutil==2.8.2,PyYAML==6.0,requests==2.27.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,rh-doozer @ file:///mnt/workspace/jenkins/working/art-tools_doozer_PR-622/.tox/.tmp/package/1/rh-doozer-2.0.15.dev71%2Bg3b8cd1a.zip,semver==2.13.0,setuptools-scm==6.4.2,six==1.16.0,tenacity==8.0.1,toml==0.10.2,tomli==1.2.3,tox==3.25.1,typed-ast==1.5.4,typing==3.7.4.3,typing-extensions==4.1.1,urllib3==1.26.10,virtualenv==20.15.1,wrapt==1.14.1,zipp==3.6.0
py36 run-test-pre: PYTHONHASHSEED='2387439513'
py36 run-test: commands[0] | coverage run --branch --source doozerlib -m unittest discover -t . -s tests/
/mnt/workspace/jenkins/working/art-tools_doozer_PR-622/.tox/py36/lib/python3.6/site-packages/mysql/connector/authentication.py:44: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
  from cryptography.exceptions import UnsupportedAlgorithm
......................................................................................s.s....................................s.s...s.s.s..s.s.s........................................................................
----------------------------------------------------------------------
Ran 205 tests in 8.425s

OK (skipped=10)
py36 run-test: commands[1] | flake8
py36 run-test: commands[2] | coverage report
Name                                          Stmts   Miss Branch BrPart  Cover
-------------------------------------------------------------------------------
doozerlib/__init__.py                             9      2      2      1    73%
doozerlib/assembly.py                           162     43     97      8    70%
doozerlib/assembly_inspector.py                 177    158    102      0     8%
doozerlib/assertion.py                           13      0      6      0   100%
doozerlib/brew.py                               345    200    162      4    40%
doozerlib/build_status_detector.py               85     10     56      3    87%
doozerlib/cli/__init__.py                       101     45     20      0    46%
doozerlib/cli/__main__.py                      1126   1126    468      0     0%
doozerlib/cli/cli_opts.py                        15      3      6      0    86%
doozerlib/cli/config_plashet.py                 533    533    248      0     0%
doozerlib/cli/detect_embargo.py                 164     35     70      8    75%
doozerlib/cli/get_nightlies.py                  225     57    135      3    73%
doozerlib/cli/images_health.py                   81     30     26      2    59%
doozerlib/cli/images_streams.py                 617    617    264      0     0%
doozerlib/cli/inspect_stream.py                  45     45     14      0     0%
doozerlib/cli/release_calc_upgrade_tests.py      23     23      6      0     0%
doozerlib/cli/release_gen_assembly.py           213    213    110      0     0%
doozerlib/cli/release_gen_payload.py            535    439    260      0    13%
doozerlib/cli/rpms_build.py                     165     59     58      8    57%
doozerlib/cli/scan_sources.py                   180    139     96      2    17%
doozerlib/config.py                              97     97     46      0     0%
doozerlib/constants.py                           10      0      0      0   100%
doozerlib/coverity.py                           245    215     76      0    10%
doozerlib/dblib.py                              250    154     74      4    36%
doozerlib/distgit.py                           1445    916    699     38    35%
doozerlib/dotconfig.py                           54     43     33      0    15%
doozerlib/exceptions.py                           2      0      2      0   100%
doozerlib/exectools.py                          192    103     78     10    43%
doozerlib/gitdata.py                            171    137     86      0    17%
doozerlib/image.py                              492    324    220      6    28%
doozerlib/logutil.py                              9      0      4      1    92%
doozerlib/metadata.py                           438    161    212     30    58%
doozerlib/model.py                              110     21     44      2    82%
doozerlib/olm/__init__.py                         0      0      0      0   100%
doozerlib/olm/bundle.py                         293    215     72      3    23%
doozerlib/plashet.py                            134      9     92     15    89%
doozerlib/pushd.py                               20      2      4      0    92%
doozerlib/repos.py                              206    105    117     17    45%
doozerlib/rhcos.py                              170     33     62     10    76%
doozerlib/rpm_builder.py                        232     31    125     32    81%
doozerlib/rpm_utils.py                          134     33     90     11    74%
doozerlib/rpmcfg.py                             143     58     62      8    55%
doozerlib/runtime.py                            912    668    376      8    21%
doozerlib/source_modifications.py               111     29     34      4    73%
doozerlib/state.py                               23     12     10      0    39%
doozerlib/util.py                               410    207    154      5    46%
-------------------------------------------------------------------------------
TOTAL                                         11117   7350   4978    243    31%
___________________________________ summary ____________________________________
  py36: commands succeeded
  congratulations :)

@sosiouxme
Copy link
Contributor Author

@thegreyd I refactored toward a Nightly class, I think it's cleaner. Also ended up removing the initial RHCOS comparison by labels which wasn't adding much value. However further optimization to limit generation of candidate sets seemed like it would add complexity for not much benefit; it would only reduce the number of release images pulled, but those already happen quickly in parallel. Deeper equivalence checking is already limited. So, no change there.

@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 22, 2022
@openshift-eng openshift-eng deleted a comment from openshift-bot Jul 22, 2022
@thegreyd
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2022
@thegreyd
Copy link
Contributor

Let's ship it :shipit:

@thegreyd thegreyd merged commit 1d4b78f into openshift-eng:master Jul 25, 2022
@sosiouxme sosiouxme deleted the 20220718-get-matching-nightlies branch July 25, 2022 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants