Skip to content

Fix retry job runtime error #1075

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

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
run: make install
- name: Run tests
run: bin/test.sh
- name: Run retry
run: DL_QUEUE_CONSTANT_RETRY=false poetry run python -m jbi.retry.py
review-dependabot-pr:
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion jbi/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
APP_DIR = Path(__file__).parents[1]

settings = get_settings()
version_info = get_version(APP_DIR)
version_info: dict[str, str] = get_version(APP_DIR)
VERSION: str = version_info["version"]

logging.config.dictConfig(CONFIG)
Expand Down
8 changes: 5 additions & 3 deletions jbi/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import traceback
from abc import ABC, abstractmethod
from datetime import datetime
from functools import lru_cache
from functools import cached_property, lru_cache
from json import JSONDecodeError
from pathlib import Path
from typing import AsyncIterator, Optional
Expand All @@ -37,7 +37,7 @@
import dockerflow.checks
from pydantic import BaseModel, FileUrl, ValidationError, computed_field

from jbi import app, bugzilla
from jbi import bugzilla
from jbi.environment import get_settings

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -90,9 +90,11 @@ class QueueItem(BaseModel, frozen=True):
rid: Optional[str] = None

@computed_field # type: ignore
@property
@cached_property
def version(self) -> str:
# Prevents circular imports.
from jbi import app

return app.VERSION

@property
Expand Down
Loading