Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of development/x major version #187

Merged
merged 37 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
94896a0
Support of development/x major version
tcarmet Jul 30, 2024
d78f49e
Test modifications with no test changes
tcarmet Jul 31, 2024
d86bfad
start breaking stuff
tcarmet Jul 31, 2024
b5964ac
Merge remote-tracking branch 'origin/main' into feature/PTFE-1927-dev…
tcarmet Jul 31, 2024
ebdf1d5
finding tags
tcarmet Jul 31, 2024
74c87c2
document a todo to handle
tcarmet Aug 1, 2024
f757ade
fix var name
tcarmet Aug 7, 2024
7e2fc7d
Add groups on testname for ease of ci debug
tcarmet Aug 7, 2024
23b47c7
add new line to group
tcarmet Aug 7, 2024
8c42119
fix some tests
tcarmet Aug 7, 2024
724e277
add more fixes
tcarmet Aug 7, 2024
0846d37
taking note on queueintegrationbranch pattern
tcarmet Aug 7, 2024
e47b468
fix more tests
tcarmet Aug 7, 2024
beb45a5
fix more tests
tcarmet Aug 7, 2024
7a2b6f0
fix more tests
tcarmet Aug 7, 2024
7ff4e45
fix more tests
tcarmet Aug 7, 2024
ab68fcb
Change pattern of Integration Queue branches
tcarmet Aug 7, 2024
aaef646
fix queueing tests
tcarmet Aug 7, 2024
13bcf22
fix more queueing tests
tcarmet Aug 7, 2024
c667ed0
Fix more queueing tests
tcarmet Aug 8, 2024
892363f
remove pdb leftovers
tcarmet Aug 8, 2024
73461c8
fix more queueing tests
tcarmet Aug 8, 2024
69fc27e
Fix issue with integration queue branch new name
tcarmet Aug 8, 2024
4e786da
fix last queueing test
tcarmet Aug 8, 2024
1fb9b78
linting
tcarmet Aug 8, 2024
1656e98
modify test reactor tests with option that came up
tcarmet Aug 8, 2024
721869d
lint
tcarmet Aug 8, 2024
7cd0555
fix some cases and tests
tcarmet Aug 9, 2024
d1a3fbc
finish it up with all todos
tcarmet Aug 9, 2024
f725fb0
add a simple test case for major dev branch
tcarmet Aug 9, 2024
169ac90
PTFE-1927 add full test with lonely stab
tcarmet Aug 9, 2024
7a0e5d8
lint
tcarmet Aug 9, 2024
eb7ea9b
Merge branch 'main' into feature/PTFE-1927-dev-major-support
tcarmet Aug 9, 2024
e64e795
Add extra test for coverage
tcarmet Aug 9, 2024
8ebed7e
Merge branch 'main' into feature/PTFE-1927-dev-major-support
tcarmet Aug 9, 2024
0eba2e9
Update changelog
tcarmet Aug 9, 2024
07f5cc9
Update bert_e/lib/versions.py
tcarmet Aug 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Change Log
All notable changes to this project will be documented in this file.

## [4.0.0] - 2024-03-06
## [4.0.0] - 2024-08-09
# Removed
- Support of tasks as it unused to due its incompatibility with GitHub.

# Added
- Bert-E's status notifications through a build status check.
- Support of development branches with only major version: `development/x`.

# Changed
- Integration queue branches pattern is now `q/w/{pr.id}/{integration.branch}`
tcarmet marked this conversation as resolved.
Show resolved Hide resolved
instead of `q/{pr.id}/{integration.branch}`.

## [3.12.0] - 2024-02-26
# Added
Expand Down
10 changes: 5 additions & 5 deletions bert_e/jobs/delete_queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def delete_queues(job: DeleteQueuesJob):
if not queue_branches:
raise exceptions.JobSuccess()

branch_factory(
repo,
'development/{}.{}'.format(queue_branches[0].major,
queue_branches[0].minor)
).checkout()
queue_branch = queue_branches[0]
if queue_branch.minor is None:
repo.checkout(f"development/{queue_branch.major}")
else:
repo.checkout(f"development/{queue_branch.major}.{queue_branch.minor}")

for branch in queue_branches:
branch.remove(do_push=False)
Expand Down
6 changes: 6 additions & 0 deletions bert_e/lib/versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def version_key(version):
"""Key function to sort versions in descending order."""
parts = version.split('.')
parts = tuple(int(part) for part in parts)
# Convert parts to integers and fill missing parts with float('inf')
return parts + (float('inf'),) * (4 - len(parts))
4 changes: 2 additions & 2 deletions bert_e/server/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""This module defines the server status page."""
import logging
from flask import Blueprint, current_app, render_template, request
from bert_e.lib.versions import version_key

from ..git_host.cache import BUILD_STATUS_CACHE

Expand Down Expand Up @@ -44,8 +45,7 @@ def display():
for version, _ in queued_commits:
versions.add(version)

versions = sorted(versions, reverse=True)

versions = sorted(versions, key=version_key, reverse=True)
for pr_id, queued_commits in queue_data.items():
if int(pr_id) in [i['id'] for i in merged_prs]:
continue
Expand Down
Loading
Loading