Skip to content

Conversation

@hrideshmg
Copy link
Contributor

@hrideshmg hrideshmg commented Apr 15, 2025

Please prefix your pull request with one of the following: [FEATURE] [FIX] [IMPROVEMENT].

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used the project.
  • I have used the project briefly.
  • I have used the project extensively, but have not contributed previously.
  • I am an active contributor to the project.

Should fix the following warnings:

var/www/sample-platform/mod_ci/controllers.py:220: SAWarning: TypeDecorator DeclEnumType('linux', 'windows') will not produce a cache key because the cache_ok attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
maintenance_mode = MaintenanceMode.query.filter(MaintenanceMode.platform == platform).first()
/var/www/sample-platform/mod_ci/controllers.py:232: SAWarning: Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly
Test.id.notin_(finished_tests), Test.id.notin_(running_tests), Test.platform == platform
/var/www/sample-platform/mod_ci/controllers.py:237: SAWarning: TypeDecorator DeclEnumType('preparation', 'testing', 'completed', 'canceled') will not produce a cache key because the cache_ok attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
for test in pending_tests:
/var/www/sample-platform/mod_ci/controllers.py:237: SAWarning: TypeDecorator DeclEnumType('linux', 'windows') will not produce a cache key because the cache_ok attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
for test in pending_tests:

Removed the conversion of the query object to a subquery as notin_ can directly use query objects.

@canihavesomecoffee canihavesomecoffee merged commit fd80f8f into CCExtractor:master Apr 16, 2025
1 of 5 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.

2 participants