Bug 1968843 - F35FailsToInstall: module-build-service; fails to build: Uses broken, deprecated and orphaned python-flask-script, not compatible with Flask 2
Summary: F35FailsToInstall: module-build-service; fails to build: Uses broken, depreca...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: module-build-service
Version: 35
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Brendan Reilly
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2003593 (view as bug list)
Depends On: 1897148
Blocks: F35FTBFS F35FailsToInstall F36FTBFS F36FailsToInstall PYTHON3.10 F35FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2021-06-07 23:11 UTC by Miro Hrončok
Modified: 2021-10-04 00:15 UTC (History)
10 users (show)

Fixed In Version: module-build-service-3.6.1-6.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-04 00:15:31 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure fm-orchestrator issue 1716 0 None None None 2021-09-17 12:02:40 UTC

Description Miro Hrončok 2021-06-07 23:11:40 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok@redhat.com).

Your package (module-build-service) Fails To Install in Fedora 35:

can't install module-build-service:
  - nothing provides python3.9dist(setuptools) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(requests) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(six) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(sqlalchemy) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(flask) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(distro) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(prometheus-client) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(pyopenssl) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(fedmsg) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(flask-sqlalchemy) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(celery) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(dogpile-cache) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(flask-migrate) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(flask-script) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(funcsigs) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(ldap3) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(moksha-hub) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(munch) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(pygobject) needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python(abi) = 3.9 needed by module-build-service-3.6.1-1.fc35.noarch
  - nothing provides python3.9dist(kobo) >= 0.5 needed by module-build-service-3.6.1-1.fc35.noarch
  
If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.


If you don't react accordingly to the policy for FTBFS/FTI bugs (https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/), your package may be orphaned in 8+ weeks.

P.S. The data was generated solely from koji buildroot, so it might be newer than the latest compose or the content on mirrors.

P.P.S. If this bug has been reported in the middle of upgrading multiple dependent packages, please consider using side tags: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#updating-inter-dependent-packages

Thanks!

Comment 1 Miro Hrončok 2021-06-07 23:24:38 UTC
This bugzilla is likely a fallout from the Python 3.10 rebuild.

If your package (or some of the dependencies it has) failed to rebuild during the Python 3.10 rebuild, they now fail to install. To fix this, packages need to be rebuilt in Rawhide.

We will slowly triage the bugzillas, but we'd appreciate your help.

If you know this is blocked by an existing reported build failure or another package not yet rebuilt with Python 3.10, please mark it as such by using the "Depends On"/"Blocks" bugzilla fields. That will help us determine what failures to prioritize.

Thank you and sorry for the inconvenience. Let me know if you need any help.

Comment 2 Miro Hrončok 2021-06-15 00:30:15 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 3 Miro Hrončok 2021-06-25 10:32:54 UTC
Fails to build with: help2man: can't get `--help' info from /builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.noarch//usr/bin/mbs-manager

The underlying traceback is:

+ /builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64//usr/bin/mbs-manager --help
The configuration file at /etc/module-build-service/config.py was not present
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64//usr/bin/mbs-manager", line 33, in <module>
    sys.exit(load_entry_point('module-build-service==3.6.1', 'console_scripts', 'mbs-manager')())
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64//usr/bin/mbs-manager", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/manage.py", line 15, in <module>
    from module_build_service.builder.MockModuleBuilder import (
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/builder/__init__.py", line 12, in <module>
    GenericBuilder.register_backend_class(entrypoint.load())
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/builder/KojiModuleBuilder.py", line 26, in <module>
    from module_build_service.builder.KojiContentGenerator import KojiContentGenerator
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/builder/KojiContentGenerator.py", line 29, in <module>
    from module_build_service.scheduler.db_session import db_session
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/scheduler/db_session.py", line 84, in <module>
    _setup_event_listeners(db_session)
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/scheduler/db_session.py", line 33, in _setup_event_listeners
    db_hook_event_listeners(db_session.bind.engine)
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-2.fc35.x86_64/usr/lib/python3.10/site-packages/module_build_service/common/monitor.py", line 89, in db_hook_event_listeners
    def receive_dbapi_error(**kw):
  File "/usr/lib64/python3.10/site-packages/sqlalchemy/event/api.py", line 142, in decorate
    listen(target, identifier, fn, *args, **kw)
  File "/usr/lib64/python3.10/site-packages/sqlalchemy/event/api.py", line 99, in listen
    _event_key(target, identifier, fn).listen(*args, **kw)
  File "/usr/lib64/python3.10/site-packages/sqlalchemy/event/api.py", line 29, in _event_key
    raise exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: No such event 'dbapi_error' for target 'Engine(sqlite:////builddir/build/BUILD/module-build-service-3.6.1/module_build_service.db)'

Comment 4 Miro Hrončok 2021-07-07 11:39:27 UTC
Hello,

This is the second reminder (step 4 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 5 Fedora Release Engineering 2021-07-11 04:22:58 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-02).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 6 Fedora Release Engineering 2021-08-01 04:22:54 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-02).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 7 Miro Hrončok 2021-08-05 16:44:58 UTC
This package has been orphaned.

You can pick it up at https://src.fedoraproject.org/rpms/module-build-service by clicking button "Take". If nobody picks it up, it will be retired and removed from a distribution.

Comment 8 Ben Cotton 2021-08-10 13:06:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 9 Brendan Reilly 2021-08-12 14:19:10 UTC
The bug looks to be due to the 'dbapi_error' handler being removed from SQLAlchemy. I've filed a PR (https://pagure.io/fm-orchestrator/pull-request/1726) to get that fixed. Once that's merged I'll rebuild for Rawhide and F35.

Comment 10 Brendan Reilly 2021-08-12 18:15:19 UTC
The patch didn't resolve the issue [1]. Miro, where did you get the underlying traceback for the previous failed build? I'd like to see that for this failure but it's not in any of the logs.

I did successfully rebuild for F34 [2].

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=73735305
[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=73736873

Comment 11 Miro Hrončok 2021-08-12 18:18:47 UTC
Prior to running help2man I actually run the --help command to see why it errors:

I adapted this:

for command in mbs-manager mbs-frontend mbs-upgradedb ; do
    help2man -N --version-string=%{version} \
    %{buildroot}/%{_bindir}/$command > \
    %{buildroot}/%{_mandir}/man1/$command.1
done

To this:

for command in mbs-manager mbs-frontend mbs-upgradedb ; do
    %{buildroot}/%{_bindir}/$command --help
    help2man -N --version-string=%{version} \
    %{buildroot}/%{_bindir}/$command > \
    %{buildroot}/%{_mandir}/man1/$command.1
done

I recommend keeping it that way, as help2man is not good at telling what went wrong running that --help.

Comment 12 Miro Hrončok 2021-08-23 11:02:07 UTC
The current error is:

+ /builddir/build/BUILDROOT/module-build-service-3.6.1-4.fc36.noarch//usr/bin/mbs-manager --help
The configuration file at /etc/module-build-service/config.py was not present
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-4.fc36.noarch//usr/bin/mbs-manager", line 33, in <module>
    sys.exit(load_entry_point('module-build-service==3.6.1', 'console_scripts', 'mbs-manager')())
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-4.fc36.noarch//usr/bin/mbs-manager", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/module-build-service-3.6.1-4.fc36.noarch/usr/lib/python3.10/site-packages/module_build_service/manage.py", line 11, in <module>
    from flask_script import Manager, prompt_bool
  File "/usr/lib/python3.10/site-packages/flask_script/__init__.py", line 15, in <module>
    from flask._compat import text_type
ModuleNotFoundError: No module named 'flask._compat'

This might be caused by flask_script not being compatible with Flask 2.

The python-flask-script package is orphaned for: Unmaintained upstream. See e.g. https://pagure.io/odcs/issue/504

Comment 13 Brendan Reilly 2021-08-25 13:31:52 UTC
That's right, yes. I'm working now on removing the flask_script dependency from MBS.

Comment 14 Miroslav Suchý 2021-09-05 15:37:50 UTC
Ping. Any progress?

Comment 15 Miro Hrončok 2021-09-13 09:42:10 UTC
*** Bug 2003593 has been marked as a duplicate of this bug. ***

Comment 16 Miro Hrončok 2021-09-17 12:02:41 UTC
See also https://pagure.io/fm-orchestrator/issue/1716

Comment 18 Miro Hrončok 2021-09-29 14:46:27 UTC
The final freeze for F35 starts in less than a week on Tuesday 2021-10-05. Setting severity to urgent.

Comment 19 Brendan Reilly 2021-09-30 13:48:26 UTC
I have been working on replacing the flask-script dependency with argparse, but it's still only a partial implementation and will not be ready by next Tuesday. I'm discussing with Mike what other solutions there might be to get a build out by that time.

Comment 20 Miro Hrončok 2021-09-30 14:03:11 UTC
A solution I would be satisfied with is to retire the package from F35 and F36 and introduce it via an update once it is installable. That way, we can unblock system upgrades and avoid the not-installable package in the GA repo.

Comment 21 Brendan Reilly 2021-09-30 14:38:33 UTC
After discussing with Mike, we've decided to patch in this change for Fedora, which removes the flask-script dependency in favor of click:
https://pagure.io/fm-orchestrator/pull-request/1602

I'm working on getting that built now.

Comment 22 Brendan Reilly 2021-09-30 17:27:28 UTC
I've successfully built module-build-service for F35:
https://koji.fedoraproject.org/koji/taskinfo?taskID=76524552

and rawhide:
https://koji.fedoraproject.org/koji/taskinfo?taskID=76523661

Here are the respective bodhi updates:
https://bodhi.fedoraproject.org/updates/FEDORA-2021-b3f267c3b2
https://bodhi.fedoraproject.org/updates/FEDORA-2021-859ea75d41

Please let me know if anything else is required.

Comment 23 Fedora Update System 2021-09-30 17:51:58 UTC
FEDORA-2021-b3f267c3b2 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b3f267c3b2

Comment 24 Miro Hrončok 2021-09-30 17:55:51 UTC
Fedora 36: 

 Problem: cannot install the best candidate for the job
  - nothing provides python3-flask-script needed by module-build-service-3.6.1-5.fc36.noarch

Fedora 35:

Error: 
 Problem: conflicting requests
  - nothing provides python3-flask-script needed by module-build-service-3.6.1-5.fc35.noarch

Comment 26 Fedora Update System 2021-09-30 21:39:43 UTC
FEDORA-2021-f1f15e8012 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f1f15e8012

Comment 27 Miro Hrončok 2021-09-30 21:41:49 UTC
Thanks. The update will not make it to the final freeze if it doesn't gain moe karma. Hence requesting a freeze exception.

Comment 28 Fedora Update System 2021-10-01 01:39:43 UTC
FEDORA-2021-f1f15e8012 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f1f15e8012`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f1f15e8012

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 29 Fedora Update System 2021-10-04 00:15:31 UTC
FEDORA-2021-f1f15e8012 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.