Skip to content

Conversation

@haarg
Copy link
Member

@haarg haarg commented Jun 28, 2025

Update the Dockerfile and build process for better caching and to prepare to deploy in Kubernetes.

A docker compose configuration was added to make local testing easier.

Clean up various old files that are no longer relevant.

Switch to precious for formatting and remove formatting test. Replace with a GitHub workflow.

Remove Mojolicious web code. Only Minion and the admin interface remains. Most of the end points were never ported, and MountPSGI ended up being problematic in a number of ways. Production has been switched back to Gazelle for a while now, just using app.psgi. For our other systems deployed in k8s, we're using uwsgi and should be standardizing on it. If someone wants to do a proper port to Mojolicious that could be considered, but it needs to be more complete and would probably only make sense once we're fully disconnected from the ingestion side. We're still using Minion, but it shouldn't be part of the API server.

The CircleCI config has been revised to use the docker compose configuration from this repo rather than pulling it from another. This should make things simpler to update in the future.

haarg added 9 commits June 28, 2025 11:30
Update the Dockerfile to better use caching by separating the prereq
building.

Also switch the server to uwsgi rather than using the Mojolicious
wrapper. It provided little benefit and caused numerous problems, and we
haven't been using it in production for a while.
The main applications is in Catalyst, and using MountPSGI continued to
cause problems. Our deployments are moving to uwsgi. Unless the entire
app is rewritten in Mojolicious, this is just extraneous code.
Our tests for minion don't really check much, and add a dependency on
Postgres. Eventually these tests can return in ingest once it is ready.
This supports ${VAR}, ${VAR:-default}, and ${VAR:+set} variable
replacements to allow overridable config variables.
@haarg
Copy link
Member Author

haarg commented Jun 28, 2025

With this merged, tests can be run locally by checking out the repo and running:

docker compose --profile test run --build api-test prove -lrv t

haarg added 2 commits June 28, 2025 12:23
Use a single workflow for docker building and pushing, and use the
reusable action to make it standardized.

Leaving in a commented out step to update in k8s. Once it is set up, we
can uncomment it.
@haarg haarg force-pushed the haarg/cleanups branch 2 times, most recently from 2991ea6 to 092f158 Compare June 28, 2025 11:12
This repo now has its own docker compose config, so it doesn't need to
pull in a separate repo for testing. This simplifies the CI setup, and
makes future updates easier as they don't have to coordinate across
multiple repos.
@haarg haarg requested a review from oalders June 28, 2025 12:10
Copy link
Member

@oalders oalders left a comment

Choose a reason for hiding this comment

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

I had a quick look and I don't have any concerns. Are the coverage reports still working?

Given where we are at, I'm ok with "move fast and break things" as far as local dev goes. I will try to mess around with the dev env as we merge things to see if I spot any issues.

@haarg
Copy link
Member Author

haarg commented Jun 28, 2025

Coverage should still be working fine

@oalders
Copy link
Member

oalders commented Jun 28, 2025

Coverage should still be working fine

I don't see anything at https://app.codecov.io/gh/metacpan/metacpan-api/tree/haarg%2Fcleanups but that's not so important right now.

@haarg haarg merged commit d37edf2 into master Jun 28, 2025
2 of 3 checks passed
@haarg haarg deleted the haarg/cleanups branch June 28, 2025 22:18
@codecov
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (fafbbe9) to head (74b9d09).
Report is 382 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #1383       +/-   ##
==========================================
- Coverage   60.88%       0   -60.89%     
==========================================
  Files         163       0      -163     
  Lines        4438       0     -4438     
  Branches      646       0      -646     
==========================================
- Hits         2702       0     -2702     
+ Misses       1504       0     -1504     
+ Partials      232       0      -232     

see 129 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants