Skip to content

Chore: update composer setup#1723

Open
MarceloRobert wants to merge 6 commits intokernelci:mainfrom
MarceloRobert:chore/update-composer-setup
Open

Chore: update composer setup#1723
MarceloRobert wants to merge 6 commits intokernelci:mainfrom
MarceloRobert:chore/update-composer-setup

Conversation

@MarceloRobert
Copy link
Collaborator

@MarceloRobert MarceloRobert commented Jan 30, 2026

Changes

  • Fixes default for trees_file when it was not passed to the ingester command
  • Adds an ingester container
  • Adds a container for process_pending_aggregation
  • Fixes signal handling for both commands when running on docker
  • Changes backend entrypoint so that these new command containers don't start cronjobs
  • Removes google cloud-sql references

Since there are profiles in the new containers, by running docker compose up they won't be started by default. But if you run docker compose --profile with-commands up you'll run all containers including the new services.

I wasn't able to connect to the production database through docker, so the instructions reflect that.

Closes #1721

@MarceloRobert MarceloRobert self-assigned this Jan 30, 2026
@MarceloRobert MarceloRobert added the Ingester The issue relates to the ingester tool, including the command itself and related functions. label Jan 30, 2026
@MarceloRobert
Copy link
Collaborator Author

@nuclearcat I want to confirm too that you have the trees file in the /data directory over on your side, correct? Otherwise we either should change the container's local mount or change the ingester parameters.

Also, is there any other change to be done?

Copy link

@tales-aparecida tales-aparecida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I would appreciate including "why" in the commit message bodies, especially on the one separating the ingester container

@MarceloRobert MarceloRobert force-pushed the chore/update-composer-setup branch 2 times, most recently from 41494d9 to db46b2a Compare January 30, 2026 17:58
Comment on lines 47 to 50
\"NAME\": \"${DB_DEFAULT_NAME:=kcidb}\",
\"USER\": \"${DB_DEFAULT_USER:=kernelci}\",
\"PASSWORD\": \"$DB_DEFAULT_PASSWORD\",
\"HOST\": \"${DB_DEFAULT_HOST:=cloudsql-proxy}\",
Copy link
Contributor

@gustavobtflores gustavobtflores Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't be needed to change DB_DEFAULT_NAME and DB_DEFAULT_USER to match de dashboard_db ones?

.env.db.example sets:

POSTGRES_USER=${DASH_DB_USER:-admin}
POSTGRES_PASSWORD=${DASH_DB_PASSWORD:-admin}
POSTGRES_DB=${DASH_DB_NAME:-dashboard}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had left them different since DB_DEFAULT_ is supposed to be a different db from DASH_DB_, but I guess it's ok to point both to the local db

@MarceloRobert MarceloRobert force-pushed the chore/update-composer-setup branch from db46b2a to e939f1c Compare January 30, 2026 20:00
Copy link
Contributor

@gustavobtflores gustavobtflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

If the ingester was initialized with an empty trees_file argument it was not defaulting correctly since None was passed to the function
@MarceloRobert MarceloRobert force-pushed the chore/update-composer-setup branch from e939f1c to 08c5b62 Compare February 2, 2026 19:56
@MarceloRobert
Copy link
Collaborator Author

Added changes for fixing the exit of the ingester service on docker, and also adding the execution of the other required command process_pending_aggregations as a new service (this will also help with separating logs and avoiding sub-process problems).

nuclearcat and others added 4 commits February 2, 2026 18:01
The ingester is used to insert data into the database, so we always want it running smoothly in the project
while also not consuming resources or having its resources consumed by the backend as if it were just a cron job

Also fixes signal handling when running the ingester command within docker
and avoids running cronjobs in the new service.

Co-authored-by: Marcelo Robert Santos <marcelo.santos@profusion.mobi>
Follows the addition of the ingester service. This new service will consume the items generated by the ingester aggregation and organize them into the listing tables. It is done as a new service instead of a cronjob in order to avoid over-execution and multiple processes being started

Also adds a dockerignore file to avoid building cache folder/files and the folder for submission testing
Removed old configuration for Google Cloud because it has been replaced with Azure database

Co-authored-by: Marcelo Robert Santos <marcelo.santos@profusion.mobi>
@MarceloRobert MarceloRobert force-pushed the chore/update-composer-setup branch from f3579df to 721ab74 Compare February 2, 2026 21:01
Copy link
Contributor

@gustavobtflores gustavobtflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'd like to see trees.yaml generated automatically inside the container, it would make onboarding and external contributions much easier

@nuclearcat
Copy link
Member

Looks good. I'd like to see trees.yaml generated automatically inside the container, it would make onboarding and external contributions much easier

Absolutely! We need to avoid dropping anything manually.

Replaces the use of a cronjob to update the tree-names file with updating it with the ingester. This also lets the command be called within the code.
@MarceloRobert
Copy link
Collaborator Author

@nuclearcat @gustavobtflores Added a change to update the trees file when the ingester is run, this is also possible because that's currently the only reason we're still using this file. All changes are in the last commit

Copy link
Member

@nuclearcat nuclearcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingester The issue relates to the ingester tool, including the command itself and related functions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update composer setup

4 participants