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

Unset srpm url if all tasks have failed #999

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kwaizer
Copy link
Contributor

@Kwaizer Kwaizer commented Sep 25, 2024

@@ -896,8 +896,9 @@ async def __update_built_srpm_url(
# if SRPM built we need to download them
# from pulp repos in next tasks
if srpm_artifact and build_task.built_srpm_url is None:
platform_name = (await build_task.awaitable_attrs.platform).name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm not really sure why it was there too :/
BTW, you think that accessing values via awaitable_attrs is a bad practice or it wouldn't be right in this specific context?

build_task.ts = datetime.datetime.utcnow()
build_task.error = str(e)
build_task.status = BuildTaskStatus.FAILED
await build_node_crud.fast_fail_other_tasks_by_ref(db, build_task)
await db.flush()

build_id = await _get_build_id(db, request.task_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get build_id from previously loaded build_task

)
)

await db.flush()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we check it only once when all build tasks are completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rebuild srpm if all architectures are failed
3 participants