Commit graph

241 commits

Author SHA1 Message Date
Troy Dawson
00e616bde5 Bump to version 0.8.10
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-09-18 14:00:12 -07:00
Stephen Gallagher
b461ff2072 Drop an unused variable
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-09-17 15:35:45 -04:00
Stephen Gallagher
602c1c9692 Handle packages that don't sync to RHEL
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-09-17 15:35:45 -04:00
Troy Dawson
4793dab0bd Bump to version 0.8.9
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-09-13 11:12:52 -07:00
Stephen Gallagher
a9cb43126f Add determine_rhel_state() and does_branch_exist()
These replace determine_active_y_version and does_divergent_branch_exist()

The return value from determine_rhel_state checks for both Product Pages
state and the presence of the prior release branch to return a complete
set of information about how the current cXs branch will behave.

This patch updates the cli.request_current_state() and cli._build()
functions to use these two new utility features. It also refactors those
two functions to reuse code better.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-09-13 13:22:20 -04:00
Stephen Gallagher
85cce45045 Reformat centpkg src with black
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-09-13 11:41:32 -04:00
Troy Dawson
ff58b37f1f Revert "Set stabilization if any branch is in stabilization (CS-2523)"
This reverts commit 7dbbdbdef4.

Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-09-13 08:36:59 -07:00
Troy Dawson
7dbbdbdef4 Set stabilization if any branch is in stabilization (CS-2523)
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-09-10 09:22:45 -07:00
Troy Dawson
b698f10bf3 Bump to version 0.8.8
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-07-10 10:00:23 -07:00
Stephen Gallagher
edbd72d530 Only add git+ssh:// for git@ repo paths
Fixes an issue introduced by ad46d34581

Apparently, under some circumstances, rpkg will store the "repo name" as
only the path field when using HTTPS remotes. As a result, we were
incorrectly treating those paths as an SSH URI since they had no scheme
when parsed by urllib.parse.urlparse(). This resulted in the first part
of the path being treated as the "netloc" and being trimmed out. This
naturally meant that the lookup against Gitlab for the fork parent would
fail.

This patch adds a check to ensure that the git+ssh:// scheme is only
added if the repo_url starts with "git@".

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-07-10 09:48:45 -04:00
Stephen Gallagher
8c605fd2ee get_canonical_repo_name: Better handle HTTP errors
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-07-10 08:51:08 -04:00
Troy Dawson
a35f1acdfd Bump to version 0.8.7
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-27 11:43:41 -07:00
Stephen Gallagher
54ee6b4db2 Remove overzealous Catch block
We've identified most of the ways that this can fail and accounted for
them, so let's stop catching all errors and let them fail the execution
and get reported if they come up.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-06-27 14:28:35 -04:00
Stephen Gallagher
ad46d34581 Fix autodetection of repo name with SSH remote
There are two valid forms of SSH protocol git remotes, but we were only
expecting the [git+]ssh:// form. The urllib.parse.urlparse() routine was
thus failing to determine the scheme and was treating the entire URL as
the path to pass to the Gitlab API. As a result, it was throwing a 404
exception that we were catching and ignoring.

This patch checks for a missing scheme component and if it finds one, it
transfers the remote into the other URL form for parsing purposes.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-06-27 13:51:33 -04:00
Stephen Gallagher
0debb6fbc1 Update personal_access_tokens_url
At some point, this URL changed and the link needs to be updated.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-06-25 09:19:43 -04:00
Troy Dawson
c64df09264 Bump to version 0.8.6
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-21 15:03:20 -07:00
Troy Dawson
46bfed3ff2 Fix test
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-21 15:02:33 -07:00
Troy Dawson
dbd662abfb Bump to version 0.8.5
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-21 11:43:38 -07:00
Troy Dawson
6434455336 Update tests to look for warning
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-21 11:42:40 -07:00
Troy Dawson
fff9db7053 Bump to version 0.8.4
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-06-21 10:37:57 -07:00
Matej Focko
8e123d3908
Use correct namespace for SIGs during validation
When validating the spelling of the package during cloning, decide based
on the program name whether to use the default namespace of CentOS RPMs,
or the namespace dedicated to CentOS SIGs.

Note that there is no reasonable way to deduce the specific SIG, so it
is required to give absolute path, e.g.,`‹SIG›/rpms/‹package›` when
cloning.

Signed-off-by: Matej Focko <mfocko@redhat.com>
2024-06-10 09:47:11 +02:00
Matej Focko
875769d8e2
Do not expect the package name to be second
Do not assume that the package name is second when validating the
spelling of the package name with a specified namespace.

This holds for CentOS itself as there is only one namespace in front of
the package, e.g., `rpms` or `modules`. However when using the
`centpkg-sig`, the packages reside under the SIGs' namespace adding
an additional layer which yields the `rpms` for second part of the path
instead of the package name.

Signed-off-by: Matej Focko <mfocko@redhat.com>
2024-06-10 09:45:56 +02:00
Troy Dawson
9106242667 No longer block on possible bad branch names.
This is because we cannot confidently check if we are pushing
to a fork or not.
Instead give a warning, and proceed.

Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-04-23 09:37:40 -07:00
Troy Dawson
506f6ce85f Bump to version 0.8.3
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-03-15 13:36:20 -07:00
Stephen Gallagher
3c9d74b7f2 Update branch detection for c10s
In RHEL 10, the internal branch names have dropped the extra .0

Additionally, there will now also be a rhel-X.0-beta branch.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-03-14 11:09:36 -04:00
Troy Dawson
b02ad77348 Bump to version 0.8.2
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2024-02-21 09:07:10 -08:00
Troy Dawson
9f10a855db Set CS10 and RHEL10 to latest 2024-02-21 09:03:07 -08:00
Troy Dawson
0fb26c5d52 Allow openjdk branches 2024-02-19 14:58:27 -08:00
Troy Dawson
b66e8a61f5 Drop Python 2 compatibility 2024-02-19 14:52:47 -08:00
Troy Dawson
df70e4f1c9 Mark fork tests as expected failures 2024-02-19 14:51:35 -08:00
Troy Dawson
4d66e03581 Bump to version 0.8.1
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-09-07 09:47:47 -07:00
Troy Dawson
e25a639d57 Add rhel-target none option
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-09-07 09:36:01 -07:00
Carl George
790841602b Add minimum rpkg version
This is currently being enforced in the RPM spec file, but it would be
better to enforce it in the Python metadata.

4bd83a5398
2023-09-01 23:29:44 -05:00
Carl George
248917149b Add missing python-gitlab dependency
This was first introduced in 5fd982bf00.
2023-09-01 23:29:30 -05:00
Carl George
bcb8595f04 Clean up dependencies
This change specifies the dependencies directly in setup.py, instead of
in a requirements.txt file that is parsed by a helper function.
2023-09-01 23:24:15 -05:00
Troy Dawson
a62668c923 urlgrabber code has been commented out for 9 years. remove it
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-29 09:03:16 -07:00
Troy Dawson
c4fdfc29d1 koji was never directly required
koji was only needed because rpkg libraries required koji

Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-29 08:52:04 -07:00
Carl George
572f6b3fac Remove unused pytz import
See https://bugzilla.redhat.com/show_bug.cgi?id=2235255
2023-08-28 22:26:18 -05:00
Troy Dawson
b60371f902 Bump to version 0.8.0
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 15:57:17 -07:00
Troy Dawson
aededb449c Add current-state option
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 15:52:41 -07:00
Troy Dawson
874d108037 Use correct format for divergent_branch
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 15:45:03 -07:00
Troy Dawson
6b939c428f Update Stabilization Phase Detection
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 15:10:27 -07:00
Troy Dawson
739c746983 On errors: output to stderr, exit with code 1
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 09:14:12 -07:00
Troy Dawson
75ceb34ee8 Treat all slashes the same
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-28 08:49:48 -07:00
Troy Dawson
fb42b297a7 Correctly clone rpms/<package>
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-08-15 07:03:01 -07:00
Troy Dawson
fbdb66146c Bump to version 0.7.4
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-07-10 14:29:50 -07:00
Troy Dawson
af648d3af8 Exit with message if unable to look for file 2023-07-10 21:24:30 +00:00
Anton Bobrov
5e8e77dfad Add StreamLookasideCache specific get_download_url method 2023-07-07 10:50:21 +02:00
Troy Dawson
5fd982bf00 Check package spelling (CS-767)
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-06-06 14:21:36 -07:00
Troy Dawson
87795b6ebf Bump to version 0.7.3
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-05-03 06:54:55 -07:00