Closed Bug 1529342 Opened 6 years ago Closed 2 years ago

replace configman with everett

Categories

(Socorro :: General, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

(Blocks 3 open bugs)

Details

Attachments

(19 files)

(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details
(deleted), text/x-github-pull-request
Details

In Socorro, crontabber, the processor, and parts of the webapp use configman to configure components. configman has allowed Socorro a level of flexibility that makes it much easier to develop, maintain, and use.

However, configman has some downsides. One is that it's very complex and the library doesn't currently have active maintainers. That's mostly fine since it's static. configman doesn't generate documentation making it easier to figure out configuration. It does log configuration at startup, but learning about how things are configured by reading logs requires many iterations. configman doesn't aid in debugging configuration problems. Often you get odd errors and have to have a working knowledge of what you're tinkering with to know where to look. configman variables are lowercase and period-delimited which means they're not valid Bash variables which makes working with them painful in shell scripts.

When I built Antenna, I wrote a configuration library called Everett which is inspired by configman and python-decouple. Everett has fewer features than configman, but it supports auto-documentation of components, has better configuration debugging facilities, and works fine in shell scripts.

For these reasons, I want to switch from configman to Everett.

This bug covers that.

Grabbing this to look into now. If we were using Everett, then it'd be a little easier to finish up the processor/webapp side of the Pub/Sub changes.

Assignee: nobody → willkg
Status: NEW → ASSIGNED
Priority: -- → P2

Not going to work on this anymore any time soon.

Assignee: willkg → nobody
Status: ASSIGNED → NEW
Priority: P2 → P3

Making this block the processor rewrite. The current processor architecture is inextricably tied to configman and DotDict. We need to untie those and it might be easier to do it as a separate first step.

Blocks: 907277
Priority: P3 → P2
Depends on: 1710725

docker-compose v2 doesn't work with configman variables:

unexpected character "." in variable name near "resource.logging.level=DEBUG

Grabbing this to work on now since it blocks switching to honcho, too.

Assignee: nobody → willkg
Blocks: 1698682
Status: NEW → ASSIGNED

willkg merged PR #6342: "bug 1529342: fix temporary path value" in 7454ee2.

I think this will fix stage deploys which are broken.

willkg merged PR #6351: "bug 1529342: more removals" in 4626020.

This (and the previous PR) chip away at the monster PR I've got that removes configman from Socorro.

willkg merged PR #6347: "bug 1529342: convert from configman to everett" in fb53297.

Next steps:

  1. this will autodeploy to stage
  2. validate everything on stage: processor, crontabber, webapp
  3. update dashboards to track new metrics keys
  4. let it bake over the weekend

While doing that, fix or write follow-up bugs for later for anything that's awry.

Problem: Connecting to SQS fails because it's got the wrong url.

https://mozilla.sentry.io/issues/4008048714/?project=6700122

I need to set the region in the configuration. I'll do that in an infra pr.

Problem: run_migrations.sh and the webapp can't start because the webapp uses socorro/mozilla_settings.py and that requires several settings for the processor to be valid ints, but the way the infrastructure code is set up, those values are the empty string which isn't a valid int. The webapp doesn't need the processor configuration, so this is clunky.

https://mozilla.sentry.io/issues/4008048358/?project=6700122

I think the way I'm going to deal with this is to change the parser to an int_or_none so it handles things that don't evaluate to int and makes them None.

willkg merged PR #6369: "bug 1529342: handle empty string not being a valid int" in ee1ceba.

This will autodeploy the sqs region configuration fix as well as a first pass at an int_or_none fix. I wrote up issue 205 in everett for a better fix. Once I fix that in everett and push an update, we can switch to that.

Regressions: 1822648
Regressions: 1822651

willkg merged PR #6381: "bug 1529342: fix possible race condition when adding directories" in 01c7cb7.

This should fix the most recent cache manager problem where it needed to prune empty directories so as to free up slots in the inotify watch list. After this, I think we're good to go.

I've been working on this for a little over 4 years.

I pushed the last round of changes out today with bug #1824987. I updated the graphs in the production dashboard. Marking as FIXED.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: