Skip to content

[WIP] Playground changes#803

Closed
tibo-pdn wants to merge 38 commits into
mainfrom
playground-changes
Closed

[WIP] Playground changes#803
tibo-pdn wants to merge 38 commits into
mainfrom
playground-changes

Conversation

@tibo-pdn
Copy link
Copy Markdown
Contributor

@tibo-pdn tibo-pdn commented Apr 2, 2026

Description

Please provide a summarized description of what was done in this PR.

Precise the issue that you are resolving.

Overview

This section provides a checklist to help categorize and describe the changes made in this PR.

Area

Please select the area(s) that this PR affects:

  • Core / Global project settings
  • API
  • Playground / Web UI
  • DevOps
  • Docusaurus / Documentation
  • Other (specify below)

If "Other" is selected, please provide more details about the area(s) affected by this PR here, otherwise delete this part.

Type of change

Please select the type of change that this PR introduces:

  • New feature
  • Bugfix
  • Enhancement (improvement of an existing feature)
  • Refactor (change that neither fixes a bug nor modifies behavior)
  • Documentation
  • Tests
  • Performance improvement
  • Chore / Maintenance (change to the build process or auxiliary tools, dependencies update, etc.)

Definition of Done / Technical changes

Please provide the Definition of Done (DoD) criteria that apply to this PR.

  • DoD 1
  • DoD 2
  • DoD 3
  • ...

Screenshots / Demo (if applicable)

Please, attach screenshots or a link to a demo / video demonstrating the changes made in this PR.

Breaking changes

Please select one of the following options:

  • No breaking changes
  • This PR contains breaking changes (explain below)

Please describe the breaking change introduced by this PR here, otherwise delete this part.

NB: A breaking change is a modification that is not backwards-compatible and/or changes current functionality.

Quality assurance & Review readiness

Before requesting a review, please take a moment to confirm that the following aspects have been considered and addressed.

This section helps ensure the PR is ready for review, safe to merge, and deployable. If any items are left unchecked, please add a brief explanation for context.

Documentation

Please select one of the following options:

  • No documentation needed
  • README / Markdown files updated
  • API documentation updated (Swagger / Redoc)
  • Docstrings updated
  • Inline code comments added where needed

Tests

Please select one or more of the following options:

  • No tests added (explain below)
  • Unit tests added
  • Integration tests added
  • Functional tests added
  • End-to-end tests added
  • Performance tests added
  • Existing tests updated

If no tests were added, please explain why here, otherwise delete this part.

NB: For a concise overview of software testing types, see this Atlassian's guide.

Code Standards

  • Code follows project conventions and architecture
  • No unused imports, variables, functions, or classes
  • No debug logs or commented-out code left
  • No secrets or environment variables committed in clear text
  • Code is linted and formatted using the project tools (ruff, etc.)

Git & Process Standards

  • PR title follows Conventional Commits
  • PR is correctly labeled
  • PR is linked to relevant issue(s) / project(s)
  • Author is assigned to the PR
  • At least one reviewer has been requested

Deployment Notes

  • No special deployment steps required
  • Requires database migration (see "Database migration" section)
  • Requires new or updated environment variables (explain below)
  • Requires other special deployment steps (explain below)

If new or updated environment variables are required, please list them here, otherwise delete this part.
If other special deployment steps are required, please describe them here, otherwise delete this part.

Database migration

Please select one of the following options:

  • No database migration required
  • This PR requires a database migration (see checklist below)

Please confirm that the following steps have been completed for the database migration:

  • Migration script added to api/alembic/versions/ folder
  • Migration upgrade tested locally
  • Migration downgrade tested locally
  • Migration documented (if applicable)

Reviewer Focus

Please provide any specific areas you would like the reviewers to focus on during their review of this PR (complex logic, risky changes, performance-sensitive code, etc.).

Additional Notes

Please provide any additional information or context that may be relevant to this PR, otherwise delete this part.

tibo-pdn added 30 commits March 23, 2026 18:26
# Conflicts:
#	.env.example
- remove session_secret_key setting from configuration
- remove default value for session_secret_key
- remove constr() deprecated function to implement new Annotated syntax in configuration.py
- add new auth_secret_key setting
- deprecated auth_master_key setting (still available to use for a moment)
- add default value for auth_secret_key (default = auth_master_key value for retrocompatibility)
- add deprecation warning messages
- fix EmptyDepencency typo to EmptyDependency
- remove usage of auth_master_key in most of the codebase
- add typing in IdentityAccessManager property
- identify duplicate functions for token encoding (added TODO)
- rename get_master_key into get_secret_key
- update SessionMiddleware (cookie encoding/decoding) middleware to now use auth_secret_key
- update config.yml, config.example.yml and config.test.yml
- remove duplicate socket_keepalive in config.test.yml
- remove TOKEN_PREFIX from Key(BaseModel) class due to a duplicate from IdentityAccessManager
- remove useless comment
- remove duplicate content in api.schemas.admin.providers and most of their references
- migrate old Provider class calls to the new one (in api.infrastructure.fastapi.schemas.providers)
- update some part of the documentation (not complete yet)

# Conflicts:
#	api/schemas/admin/providers.py
- remove MasterNotAllowedException exception
- remove hardcoded admin bypass
- delete MASTER_USER_ID and MASTER_KEY_ID for MASTER_ID
- add auth_master_username setting
- add auth_master_password setting
- remove use of master key as API key
- replace 0 refs to MASTER_ID global variable
- add setup_master method in lifespan (WIP: prints still present)
- rename master_key to secret_key in IdentityAccessManager
- add master permission in PermissionType (unused for the moment)
- update inline documentation
- remove useless prints
- restrict the master user permissions to only MASTER instead of the whole list.
- add newline in carbon footprint migration
- fix inline doc typo
- remove debug prints and add logger prints
- check that the master role and user creation runs only at very first run
- update TODO comments to make them clearer
- move MASTER_ID constant into variable.py
- rename user into user_id in DELETE /user endpoint
…update, user creation and user update

- needs to be tested
- from api.schemas.admin.roles to api.domain.role.entities
- add typing for ecologit class
…sto clean architecture

- migrate endpoints
- add use cases for role, user, and bootstrap
- add exceptions
…r user)

- remove master role
- add security boundaries to prevent deleting last admin user or admin role of OGL
- add new bootstrap admin version
- add new exceptions, repistories and factories
- remove old endpoints
- update default admin user and default admin password
…n now delete himself

- fix get_postgres_session iterator call
- quick fix of Routers class
- migrated to clean archi
…MIN)

- fix several playground bugs (login page glitch, redis token lock duration, migration issue on local, usage crash, 500 errors)
- add shield badge on corresponding admin roles
- add background tasks in playground
- fix strategy display when updating a router
- add temporary implementation of update user
- add temporary implementation of delete user
… cases

- fix typing typo
- clean unused bootstrap and hasadmin usecases
- add some TODO comments
- move use case tests to unit folder instead of integration folder
@tibo-pdn
Copy link
Copy Markdown
Contributor Author

tibo-pdn commented Apr 2, 2026

The non playground related changes are the body of this PR.
The selector issue is already fixed, so should be ignored in this PR.

@leoguillaume
Copy link
Copy Markdown
Member

@tibo-pdn close after move to only playground changes into a dedicated PR : #871

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