Skip to content

Comments

[user-management] build / refactor : move build / development flow to docker , upgrade infrastrucure#43

Merged
metalalive merged 15 commits intomasterfrom
usermgt-dev/build/upgrade-infra-web-pkgs
Aug 17, 2025
Merged

[user-management] build / refactor : move build / development flow to docker , upgrade infrastrucure#43
metalalive merged 15 commits intomasterfrom
usermgt-dev/build/upgrade-infra-web-pkgs

Conversation

@metalalive
Copy link
Owner

No description provided.

… infra

- set up environment for running test cases with dockerfile
- use `docker compose` to launch series of other infra services like
  mariaDB database
- move dependncy config from `pyproject.toml` to `Pipfile`, note `pyproject.toml`
  is still required for pipenv installing local package
- modify database initialization flow, set up databases / relevant login users
  in docker entry script.
- upgrade python to v3.13 , mariaDB server to v11.8.2 docker container,
  pipenv to 2025.0.4
- misc , update gitignore

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…ocker

- streamline initialization flow for development environment in docker
  compose, such as database shcema / data migration, run django development
  server, all tasks are moved in to container

TODO:
- set up RPC consumer (celery) and backend message queue (RabbitMQ) in docker
- smoke test, verify few critical paths from API, only in development
  environment

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- set up custom initialization flow for backend message queue (RabbitMQ)
  in docker compose
- define docker network for message queue server interacting with other
  applications

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- fix errors in docker compose file for test
- exclude commonly used data files that can be switched between
  different environments.

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…er build flow

- seperate CORS config file for different environments
- remove needless fields in secret template file
- remove class-level private property in extended logger
- fix model name lookup in Django ContentType, the search key should be
  all lowercase characters

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…ment

- the test demonstrates basic operations through API server e.g. roles, quota,
  group , user profiles, login process , auth tokens ... etc.
- the test here does NOT consider network domain name / secure connection
  issue , currently no need to share the development environment across
  internet

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
@metalalive metalalive self-assigned this Aug 13, 2025
@metalalive metalalive added enhancement New feature or request build issues related to build tools devlopment environment user-management labels Aug 13, 2025
@gitguardian
Copy link

gitguardian bot commented Aug 13, 2025

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
20073992 Triggered Generic Password 2f7fac8 services/user_management/tests/smoke_test.py View secret
19482687 Triggered Generic Password 370b405 services/user_management/infra/sample.env View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

…code

- reduce final image size by applying multi-stage builds to backend base
  docker file.
  - discard installed packages e.g. python3-dev, gcc, venv, unused at runtime
- add missing quota / low-level permission fixture to data migration as
  part of deployment
- set up volume to map setting modules and misc. files only for test outside
  docker image instead of copying them, this adds flexibility to run app
  in different environments.
- correct reference paths to fixture / template file in code
- resolve `FutureWarning` due to future breaking change of `functools.partial`
  , see issue 121027 in cpython github repo
- ensure / enforce lowercase keywords for Django ContentType search

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- set up common async job worker
- resolve `FutureWarning` due to future breaking change of `functools.partial`
  , see issue 121027 in cpython github repo
- replace old python setup with docker commands in user-management Github
  Action workflow, make the build / test process consistent.
- fix error in CORS configuration data

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…able interpolation

- fix lint errors, add account activation case in smoke test
- misc, remove needless response status code in API view

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…erfile

- remove previous build flow description in README

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
@metalalive metalalive merged commit 4a1fa12 into master Aug 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build issues related to build tools devlopment environment enhancement New feature or request user-management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant