Skip to content

add role reader-> AERO_ROLE env var#13

Open
teaforthecat wants to merge 1 commit into
masterfrom
add-role-reader
Open

add role reader-> AERO_ROLE env var#13
teaforthecat wants to merge 1 commit into
masterfrom
add-role-reader

Conversation

@teaforthecat

Copy link
Copy Markdown
Contributor

I didn't see another way to do this in aero, so I thought I would add it here. The idea is to use the same config for multiple deployments, of which an example is on the way.

@teaforthecat teaforthecat requested review from gws and mrichards42 June 21, 2021 16:15

@gws gws left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm hoping an example will help me understand the problem this is solving, but you might put that in the description of the PR - there might be a different way to accomplish what you're trying to do.

Comment thread .java-version
Comment thread src/resource_config/core.clj
@teaforthecat

Copy link
Copy Markdown
Contributor Author

So with https://github.com/democracyworks/electorate-works/pull/93, as the example, does this make sense now?

The idea is the profile/environment case-like statement can't be used for both the environment and this purpose. There may be a way to do it with a ^:ref and #env but I thought this was cleaner. If you can see a better way please do share.

@gws

gws commented Jun 24, 2021

Copy link
Copy Markdown

What I took away from https://github.com/democracyworks/electorate-works/pull/93 is that you might be trying to do too much with a single configuration file. Mike suggested a second configuration file and I suggested configuring the "solo job" queues as a sibling key in the existing configuration. I would prefer either of those (for a bonus, also switching away from this library) over the conditional logic based on AERO_ROLE.

As for the naming, I'm not sure we should use AERO_ROLE because it's not something that will be added to aero and so doesn't belong in that namespace.

Finally, the plan is to decommission this library altogether, so locking services in to this library because of bespoke functionality isn't ideal. If aero doesn't suit your needs for configuration there are other good libraries out there that don't have quite as many warts as this one, but ultimately I don't think a configuration library makes sense for Democracy Works to maintain.

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