Commit graph

71 commits

Author SHA1 Message Date
d800a953dc migrate to Forge
Update links Pagure -> Forge.

Related to #14
2026-01-22 14:27:44 +01:00
cba8a4f714 Skip EPEL composes
We don't want to log an error every time one happens.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-09-05 23:29:37 -07:00
6a6a70221e Point to Matrix instead of IRC
Fedora synchronous/real-time chat has moved primarily from IRC to
Matrix, so this reference should point to the right place.

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2023-09-23 16:04:05 -04:00
f744ead6a9 Don't run on jobs for ELN composes
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-06-20 07:53:09 +02:00
7fe5517a35 Protect against invalid compose ID in the message consumer
Some kind of bug is currently giving us composes with invalid
IDs - e.g. "[[ release.id_prefix.title() ]]-37-updates-20230429.0"
(obviously a template substitution problem). This causes us to
blow up because fedfind's parse_cid raises an exception in this
case and we don't handle it. So...handle it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-04-28 17:30:31 -07:00
d965a3725b Drop all code handling autocloud test results
Autocloud was retired years ago, we don't need any of this any
more. Simplifies things quite a bit. Yay.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-01-27 12:20:39 -08:00
aca3474fd2 HTML validation fixes: declare language, correct margin unit
Ran the page through the w3c validator and discovered that we're
supposed to declare the page's language, and the bottom margin
of the table had a typo in the unit ("pm" not "px").

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-01-27 11:34:31 -08:00
0f8c73089c s/freenode/libera.chat/g
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-07-06 10:41:26 -07:00
21cc224e3e Update copyright statements to latest RH recommendations
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-06-01 12:57:12 -07:00
6bd1b85732 Put the JSON file in /var/www by default (#10)
By popular request!

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-05-27 15:09:42 -07:00
06dddceca4 add_images: handle fedfind unsupported compose exception
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-11-23 23:12:45 -08:00
829ff06b7f Tweak default data and HTML file handling to allow setting one
The way we had it before, you either set both or none, but turns
out now I moved it to infra I want to set htmlfile but leave
datafile as default. And that didn't work. This makes that work
and is clearer anyhow.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-11-23 08:53:45 -08:00
0007f8666f consumer: don't run on openQA jobs for updates/tasks or CoreOS
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-08-28 16:40:05 -07:00
86d5b03c61 Remove images over 180 days old (#8)
This is a way to get rid of things we just don't build any more
from the list - flavors that were removed or renamed, arches we
stopped doing image builds for (hi, i386!)

It's a slightly crude approach, because it's actually possible
for an image we are still trying to build to fail for this long.
It's probably happened before. But even there the impact should
be fairly limited; the old image will no longer be downloadable
(nightly composes get garbage collected after about two weeks)
and whenever the image finally *does* build again, we'll add it
back in automatically. So all that's lost is the *information*
on when it last successfully built, which is possibly slightly
interesting to someone but the benefit of the cleanup is greater,
I think.

Trying to do this in an 'exactly correct' way is very hard as
compose metadata is silent on the topic of what images *should
have* been built.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-08-10 14:22:57 -07:00
979b7333ae Ditch caching of current_releases as fedfind does it for us
fedfind caches collections data anyway, so this is effectively
duplicating that. (Also the one-day expiry wasn't working
because fedfind's collections cache had no expiry; I've moved
the one-day expiry logic to the fedfind cache in 4.2.8).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-10-01 18:35:05 -07:00
864902d77e Fix a type problem that broke a path when jobs are still running
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-07-16 11:39:19 -07:00
666c492e59 toml: add ZMQ bridge exchange binding
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-06-20 13:09:47 -07:00
305255b607 Fix places where we claim to be skipping to...actually skip
D'oh.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-06-20 13:02:23 -07:00
33f487cbd5 Port consumer from fedmsg to fedora-messaging, drop Python 2
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-06-20 12:59:15 -07:00
311cbfbdb1 Fix the CURRENT_RELEASES cache expiry check
I switched implementation designs halfway through writing it,
and as usually happens, that meant the conditional got left in
the wrong state...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-11-10 08:30:14 -08:00
f26283eb35 Update tests to use a more current image dict
The image dict used in test_image is pretty ancient, and was
actually failing due to fedfind adjusting the image dict for
https://pagure.io/pungi/issue/417 . Let's just update the test
to use a much newer image dict (from the final F29 nightly).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-11-09 15:58:14 -08:00
5ebdf66231 Expire the CURRENT_RELEASES cache every day
We cache it so we're not constantly re-discovering this every
time a test completes (that seems a little excessive), but
caching it *forever* is wrong too, as every few months we
either branch or cut a release. Currently I have to remember to
restart fedmsg-hub when this happens, or else nightlies keeps
showing the table for the release that was cut, or *doesn't*
add a table for the new Branched release.

This way, I don't have to remember that, within a day or so of
the branch happening or a release happening, nightlies will
refresh and clean up the data automatically.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-11-09 15:48:04 -08:00
5426a8b068 get openQA flavor names from fedfind and correct stored images
I added a helper to fedfind for generating 'image identifiers',
set up such that both fedora_openqa_schedule and this tool can
use it to generate the openQA flavor name, so the code doesn't
have to be copied into both.

Also run stored image data through fedfind `correct_image` when
reading it from disk; the intent here is to make sure the
image identifiers for the stored image dicts and newly-imported
ones will match. See https://pagure.io/pungi/issue/417 for
more background on this whole mess.
2016-10-05 16:45:26 -07:00
c784960511 handle new openQA 'softfailed' method
openQA now treats 'softfailed' as a distinct result. For now,
we'll continue to just treat these as passes (we might get
smarter about this in future).
2016-08-26 17:13:36 -07:00
f788f1718e fix crash on consume of pungi status change fedmsg
Previous commit broke this, by leaving no `meth` on this logic
branch.
2016-08-03 08:24:42 -07:00
7fe7f69ced handle changed autocloud fedmsg format, drop unnecessary hack
autocloud is now testing after compose completion, so we don't
need the hack any more. the fedmsg format has also changed, we
need to handle the new one. good news, we have a compose ID now,
so we can do a better image match and do the 'update "built"
if image not found' loop for autocloud too.
2016-07-15 08:48:14 -07:00
4add20a5b3 add Image class tests 2016-04-30 14:07:04 -07:00
8a73ba4dc2 add a ReleaseTable test 2016-04-23 18:17:12 -07:00
7457b4c67c add future imports and module docstrings 2016-04-22 18:31:26 -07:00
1d06b03eda add copyright header to main file, fix the one in tests
this is not part of relvalconsumer.
2016-04-22 18:25:29 -07:00
c82ed088b0 add initial tests (still working on these) 2016-04-22 16:11:31 -07:00
0f5f90a227 consumer: update autocloud results on build completion
this is a hack to deal with #6 for now: autocloud runs on Koji
fedmsgs, so it runs before the compose is complete, and may
finish before the compose is complete, in which case we don't
know what to do with the result. As a temporary hack to deal
with this, just update the last day's worth of autocloud results
every time a compose completes.
2016-04-20 00:01:24 -07:00
dbaefef82e rejig Element contents a bit
do more of the stringification in __str__ rather than __init__,
so self.contents isn't so heavily modified. self.contents will
always be a list of string-able things; if passed a string or
Element as 'contents' it will just be made into a one-item list,
if passed a list of strings or list of Elements it's kept as
self.contents unchanged. Then in __str__ we do the 'stringify
everything in the list and decide on newlines' stuff.
2016-04-19 15:57:34 -07:00
7898219c56 Element: sort attributes when producing string representation
this makes testing easier (and predictable output is always
good).
2016-04-19 14:39:45 -07:00
8d00fe331f another comment 2016-04-15 16:20:10 -07:00
d841a36e4f just add a comment 2016-04-15 16:19:01 -07:00
2fc3c27c02 whoops, still use the 'updated' set to track updated composes
or else we'll re-try the update for every job with the same
compose...
2016-04-15 16:11:59 -07:00
d311f88535 openqa: use get_jobs, handle connection errors, fix a bug
get_jobs is a simpler job getting thing I just added to the
client; we don't need the elaboration of iterate_jobs any more.
Handle connection errors (we didn't before). Handle 'no jobs'
and 'still running jobs' cases differently now.

There was a bug in the 'update the 'last built' data if we
don't find the image' loop: it would update the data alright,
but it wouldn't re-do the match, because that's inside the
'while' loop and once the data was added we broke out of the
loop. So rejig the loop logic a bit so the match is re-done
after the data is updated.
2016-04-15 16:03:53 -07:00
8d69729725 setup.py: note openqa_client 1.1 requirement 2016-04-15 15:32:53 -07:00
46d9557caf use openqa_client constants for job results
not a great improvement here, but good practice. IMPORTANT:
the API does not expose 'softfailed' state and there is no
accounting for it in the constants:
https://github.com/os-autoinst/openQA/issues/648
if that gets fixed this code will need to change.
2016-04-15 15:31:15 -07:00
a12b904037 fix consumer, add a test consumer, more logging
the consumer was broken due to one of my trademark indentation
fails: the update function only got run for Autocloud messages
because it was indented into that block...

also add a test consumer (handy for, well, testing) which
listens for dev not prod messages and writes to files in /tmp.
Set up logging in the consumers, and do a bit more logging
throughout, especially some more debug logging.
2016-04-15 09:22:37 -07:00
856b83a126 update README 2016-04-14 18:35:49 -07:00
8c37b4116c fix green untested links, non-arch weights, openqa dupes
three bug fixes that showed up during testing of the failed
test link stuff.

A cut/paste error in the new get_cell() meant untested links
were green instead of blue.

The image groups are sorted by a weight calculation done by
fedfind. This took arch into account. This was a problem,
because for nightlies the image groups include images of many
arches, so the weight was somewhat unpredictable: nightlies
just picks some random image (the first in the list for the
group) to do the weight score with, and if it happened to pick
an ARM image for a group that includes ARM images, that group
would be heavily penalized. This is why the 'Server DVD' group
would sometimes show up way down the list. So in fedfind 2.4.5
I made it possible to tell fedfind to ignore the arch, and now
we do that (and the weight is calculated solely from the sub
variant).

update_openqa() didn't check for dupes, so if you call it more
than once on the same compose it would add duplicates of
already-stored job dicts. This wasn't obviously visible before
but with the links, it was pretty clear. So this is fixed from
two ends: update_openqa() now won't add a job if it's already
in the list (I hope python's 'dict in list' is up to this...),
and prune_jobs checks through the list of openqa jobs for ones
with the same job ID and removes dupes.
2016-04-14 18:20:00 -07:00
9398d9969e add tooltips with failed test links for failed images
Oh man I love this so much! Huge thanks to Robery Mayr for help
with the HTML/CSS here. You can now hover over the link for any
image with test fails to show a tooltip with links to each of
the failed tests in openQA, or the Autocloud test output page.
Super cool. Woohoo. All in pure HTML/CSS, no stinky JS here.
2016-04-14 17:22:45 -07:00
5413a3bd63 add links to test failures
this isn't quite ready for prime-time: it works, but it's ugly.
I think the right way to do it might be to add a double-height
row when there are failures, with the arch and lng cells
spanning both rows and two cells in the last-built column, one
for the image link and one for the failure links. then we can
play with the height of the failure links row. but that needs
quite a change to the logic, might have to split out the result
row code into a separate function for sanity. i'll play with it
tomorrow.
2016-04-13 20:06:35 -07:00
411846f543 list six requirement in setup.py 2016-04-13 19:07:35 -07:00
d2cef406d8 handle autocloud, fix some critical bugs
ahh, a good old completely mixed up commit, sloppy development
is awesome. This adds a major new feature - autocloud results
support - and fixes some completely critical bugs at the same
time:

* Image.__cmp__ was a terrible idea that wasn't even being used
  for its intended purpose any more, but sure messed with the
  'image in self.data' check in _prune_data

* get_latests(flat=True) was returning a list of lists of images
  not a list of images, so _prune_data would remove everything
  after removing __cmp__

* the sorting for latest images (you know, the core function of
  the entire goddamn tool) was exactly incorrect, so we got the
  OLDEST image

* pruning data after the 'get latest builds' step but before
  the 'update test results' steps during seed_data meant we
  threw out a bunch of images we actually might want as last
  known good and had to go get them again

* the new clever-clever partial stuff in the fedmsg consumers
  was using 'nightlies' before assigning it

Basically everything except the goddamn HTML writer was utterly
screwed. Good job me. This version works though! I promise!
2016-04-13 19:00:22 -07:00
299291e0a2 micro-optimize the ISO link with functools.partial
okay, I admit, I just go around looking for excuses to use
partial. DON'T JUDGE ME
2016-04-13 16:22:44 -07:00
009a691c9e more HTML fiddling (I'm nearly done now, I promise)
make Element a bit smarter. If 'contents' is a list, we str()
each element of the list, join the strings and check how long
the result is; if it's <81 chars we take the result, otherwise
we join the strings with newlines and take that.

If 'contents' is anything but a list, we just stringify it and
take the result.

This lets us make ReleaseTable rather simpler and just throw
Elements, lists of elements, and strings in as 'contents' as we
go.
2016-04-13 16:10:52 -07:00
eb6e6d9dfb simplify Element a bit using kwargs
avoids the need for an annoying attributes dict. Deal with
'class' as a special case. There are some others, apparently,
but hopefully I'm not gonna run into them.

We *could* just use lxml or something, but I'm trying to avoid
the dep for now...
2016-04-13 15:33:56 -07:00