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

Fix F40 FTBFS for copr-frontend #3172

Merged
merged 6 commits into from
Mar 7, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Mar 3, 2024

Fix #3130

@FrostyX FrostyX marked this pull request as draft March 3, 2024 18:24
@FrostyX
Copy link
Member Author

FrostyX commented Mar 3, 2024

I fixed ~50 tests, 3 are still remaining

tests/test_apiv3/test_rpmrepo.py::TestApiRPMRepo::test_apiv3_rpmrepo_external_deps FAILED
tests/test_logic/test_complex_logic.py::TestComplexLogic::test_fork_copr_projects_with_more_builds FAILED
tests/test_logic/test_complex_logic.py::TestComplexLogic::test_fork_copr_with_eoled_chroots FAILED 

Not sure about the cause. Maybe it is something different than the changes I already made.

@praiskup
Copy link
Member

praiskup commented Mar 4, 2024

Thank you, good progress!

@FrostyX FrostyX force-pushed the ftbfs-f40-frontend branch from a103b7a to a9cfd30 Compare March 5, 2024 12:47
FrostyX added 6 commits March 5, 2024 13:59
See fedora-copr#3130

    AttributeError: 'Engine' object has no attribute 'execute'

And also use text for raw SQL commands

    Use the text() construct, or the Connection.exec_driver_sql()
    method to invoke a driver-level SQL string.

And finially setting `future=True` which is going to be passed to
`create_engine` by Flask-SQLAlchemy to ensure compatibility between
SQLAlchemy 1.x and 2.0. Otherwise we would get

    AttributeError: 'Connection' object has no attribute 'commit'
See fedora-copr#3130

    sqlalchemy.exc.InvalidRequestError: No 'on clause' argument may be
    passed when joining to a relationship path as a target
See fedora-copr#3130

This is a straightforward case. We cannot join or select using
attribute names represented as strings.

    sqlalchemy.exc.ArgumentError: Strings are not accepted for
    attribute names in loader options; please use class-bound
    attributes directly.

This one is a bit harder to understand.

    sqlalchemy.exc.ArgumentError: expected ORM mapped attribute for
    loader strategy argument

Easier to show on an example. When selecting e.g. `BuildChroot` and
wanting to join the build information, we cannot do
`join(models.Build)` but instead, we need to
`join(models.BuildChroot.build)`.
See fedora-copr#3130

For some reason the order of `[x.name for x in self.c3.copr_chroots]`
is different SQLAlchemy 1 and 2.

F39:

    ['fedora-18-x86_64', 'fedora-rawhide-i386']

F40:

    ['fedora-rawhide-i386', 'fedora-18-x86_64']
@FrostyX FrostyX force-pushed the ftbfs-f40-frontend branch from a9cfd30 to 5a04803 Compare March 5, 2024 13:02
@FrostyX FrostyX marked this pull request as ready for review March 5, 2024 13:09
@FrostyX FrostyX added the blocked label Mar 5, 2024
@FrostyX
Copy link
Member Author

FrostyX commented Mar 5, 2024

Everything fixed, PTAL.
I marked the PR as blocked because we want to merge it after this week's release

@praiskup
Copy link
Member

praiskup commented Mar 7, 2024

Very good job, thank you!

@praiskup praiskup merged commit 5bb2250 into fedora-copr:main Mar 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontend FTBFS in rawhide
2 participants