Compare commits

..

1 Commits

Author SHA256 Message Date
Frank Schreiner
9f67f43ac9 t: add Dockerfiles for building in OBS 2026-03-10 17:27:05 +01:00
5 changed files with 15 additions and 7 deletions

View File

@@ -857,13 +857,12 @@ func (gitea *GiteaTransport) ResetTimelineCache(org, repo string, idx int64) {
func (gitea *GiteaTransport) GetTimeline(org, repo string, idx int64) ([]*models.TimelineComment, error) {
page := int64(1)
resCount := 1
disableCache := GetEnvOverrideBool(os.Getenv("AUTOGITS_TIMELINE_CACHE_DISABLE"), false)
prID := fmt.Sprintf("%s/%s!%d", org, repo, idx)
giteaTimelineCacheMutex.RLock()
TimelineCache, IsCached := giteaTimelineCache[prID]
var LastCachedTime strfmt.DateTime
if IsCached && !disableCache {
if IsCached {
l := len(TimelineCache.data)
if l > 0 {
LastCachedTime = TimelineCache.data[0].Updated
@@ -880,10 +879,6 @@ func (gitea *GiteaTransport) GetTimeline(org, repo string, idx int64) ([]*models
giteaTimelineCacheMutex.Lock()
defer giteaTimelineCacheMutex.Unlock()
if disableCache {
TimelineCache = TimelineCacheData{}
}
for resCount > 0 {
opts := issue.NewIssueGetCommentsAndTimelineParams().WithOwner(org).WithRepo(repo).WithIndex(idx).WithPage(&page)
if !LastCachedTime.IsZero() {

View File

@@ -0,0 +1,7 @@
#!BuildTag: openbuildservice/gwf-test-basecontainer
#!UseOBSRepositories
FROM registry.suse.com/bci/bci-base:15.7
RUN zypper -n install binutils gawk git git-core git-lfs jq make openssh openssh-clients sqlite3 vim which
RUN zypper -n install autogits-gitea-events-rabbitmq-publisher autogits-obs-staging-bot autogits-workflow-pr gitea

View File

@@ -0,0 +1,5 @@
#!BuildTag: openbuildservice/gwf-client
#!UseOBSRepositories
FROM opensuse/tumbleweed
RUN zypper -n install podman podman-compose vim make python3-pytest python3-requests python3-pytest-dependency python3-pytest-httpserver

View File

@@ -95,7 +95,6 @@ services:
- AMQP_USERNAME=gitea
- AMQP_PASSWORD=gitea
- SSL_CERT_FILE=/usr/share/pki/trust/anchors/gitea-rabbitmq-ca.crt
- AUTOGITS_TIMELINE_CACHE_DISABLE=1
volumes:
- ./gitea-data:/var/lib/gitea:ro,z
- ./workflow-pr/workflow-pr.json:/etc/workflow-pr.json:ro,z

View File

@@ -139,6 +139,7 @@ index 00000000..473a0f4c
@pytest.mark.t005
# @pytest.mark.xfail(reason="TBD troubleshoot")
def test_005_any_maintainer_approval_sufficient(maintainer_env, ownerA_client, ownerBB_client):
"""
Test scenario:
@@ -200,6 +201,7 @@ index 00000000..473a0f4c
@pytest.mark.t006
@pytest.mark.xfail(reason="tbd flacky in ci")
def test_006_maintainer_rejection_removes_other_requests(maintainer_env, ownerA_client, ownerBB_client):
"""
Test scenario: