Skip to content

Conversation

@Kwaizer
Copy link
Contributor

@Kwaizer Kwaizer commented Nov 6, 2024

Resolves: AlmaLinux/build-system#318

  • Moved both create_errata_record and create_new_errata_record to dramatiq task
  • Switched to accessing AsyncSession via context manager rather than sending it as a parameter

@Kwaizer Kwaizer force-pushed the errata_creation branch 10 times, most recently from cfaef03 to 204f1c4 Compare November 11, 2024 09:17
Copy link
Contributor

@Korulag Korulag left a comment

Choose a reason for hiding this comment

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

Please fix tests

@Kwaizer Kwaizer force-pushed the errata_creation branch 18 times, most recently from 7bcd132 to 25510db Compare November 12, 2024 01:24
@Kwaizer Kwaizer force-pushed the errata_creation branch 4 times, most recently from 3856279 to f999ba1 Compare November 12, 2024 02:28
@Kwaizer Kwaizer requested a review from Korulag November 12, 2024 08:45
Copy link
Contributor

@anfimovdm anfimovdm left a comment

Choose a reason for hiding this comment

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

Also, please fix the following warnings from the pylint report:

alws/routers/errata.py:1:0: R0401: Cyclic import (alws.dramatiq -> alws.dramatiq.errata) (cyclic-import)
alws/dramatiq/errata.py:22:0: W0311: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)


import pytest

from alws.dramatiq.errata import create_new_errata
Copy link
Member

Choose a reason for hiding this comment

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

Is this import really required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, not anymore

@Kwaizer Kwaizer force-pushed the errata_creation branch 2 times, most recently from dd97401 to 06ca5e5 Compare November 28, 2024 10:30
Copy link
Contributor

@anfimovdm anfimovdm left a comment

Choose a reason for hiding this comment

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

Please fix the following warnings from pylint:

************* Module alws.dramatiq.errata
alws/dramatiq/errata.py:22:0: W0311: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)
************* Module alws.schemas.errata_schema
alws/schemas/errata_schema.py:1:0: R0401: Cyclic import (alws.dramatiq -> alws.dramatiq.errata) (cyclic-import)

@Kwaizer Kwaizer force-pushed the errata_creation branch 2 times, most recently from 68323d0 to db2ef95 Compare November 29, 2024 13:48
@Kwaizer
Copy link
Contributor Author

Kwaizer commented Nov 29, 2024

@anfimovdm I'm not really sure how this warning can be fixed:

************* Module alws.schemas.errata_schema
alws/schemas/errata_schema.py:1:0: R0401: Cyclic import (alws.dramatiq -> alws.dramatiq.errata) (cyclic-import)

Is far as I can understand, we have a cyclic import due to importing functions from dramatiq/errata.py to __init__.py and at the same time importing event_loop back to errata file. Is it true?

@anfimovdm
Copy link
Contributor

@Kwaizer please create an issue for fixing cyclic imports in our code

@anfimovdm anfimovdm merged commit 20e9ba2 into AlmaLinux:master Dec 16, 2024
2 checks passed
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.

Move errata record creation in dramatiq task

4 participants