- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
♻️ Refactor: migrate more aiohttp app keys to type-safe web.AppKey #8424
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
Conversation
… instances in various modules
          Codecov Report❌ Patch coverage is  Additional details and impacted files@@            Coverage Diff             @@
##           master    #8424      +/-   ##
==========================================
- Coverage   89.01%   87.85%   -1.17%     
==========================================
  Files        1753     1957     +204     
  Lines       68638    76126    +7488     
  Branches      837     1342     +505     
==========================================
+ Hits        61098    66877    +5779     
- Misses       7331     8845    +1514     
- Partials      209      404     +195     
 
 Continue to review full report in Codecov by Sentry. 
 🚀 New features to boost your workflow:
  | 
    
          
🧪 CI InsightsHere's what we observed from your CI run for 2d612cb. ✅ Passed Jobs With Interesting Signals
  | 
    
…plication_keys - Updated imports across multiple modules to source APP_SETTINGS_KEY from application_keys instead of constants. - This change improves the organization of application keys and reduces potential circular dependencies.
…name for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request continues the migration of aiohttp app keys from plain string constants to type-safe web.AppKey objects, building on the work started in PR #8405. This refactoring improves type safety and eliminates the need for manual type casting when accessing application state.
Key changes include:
- Converting string-based app key constants to 
web.AppKeyobjects with proper typing - Updating all usage patterns throughout the codebase to use the new type-safe keys
 - Creating centralized 
application_keys.pyfiles to organize these definitions 
Reviewed Changes
Copilot reviewed 112 out of 113 changed files in this pull request and generated 3 comments.
| File | Description | 
|---|---|
| services/web/server/src/simcore_service_webserver/application_keys.py | New centralized file defining type-safe application keys | 
| Various plugin and service files | Updated to import and use new APP_SETTINGS_APPKEY instead of APP_SETTINGS_KEY | 
| Multiple test files | Updated to use new type-safe app keys for testing | 
| Various constant and key definition files | Migrated string-based keys to web.AppKey objects | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
        
          
                services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py
          
            Show resolved
            Hide resolved
        
              
          
                services/web/server/tests/unit/isolated/notifications/test_wallet_osparc_credits.py
          
            Show resolved
            Hide resolved
        
      | 
           @mergify queue  | 
    
          
 🛑 Configuration not compatible with a branch protection settingThe branch protection setting   | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
          
 | 
    



What do these changes do?
Follows up on PR #8405
This continues the migration of aiohttp app keys from plain strings to type-safe
web.AppKey.SEE https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.AppKey
Changes
Before
After
NOTE: this can be done using
refactor-aiohttp-appkey.prompt.mdAdditions
application_keys.py(or$(domain)/_application_keys.py)refactor-aiohttp-appkey.prompt.mdto streamline future refactorsRelated issue/s
aiohttpstate application keys from string-based keys to type-safeweb.AppKeyinstances #8405How to test
in place
Dev-ops
None