Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project-specific variables #864

Closed
audibleblink opened this issue Jun 30, 2023 · 4 comments
Closed

Project-specific variables #864

audibleblink opened this issue Jun 30, 2023 · 4 comments
Labels
enhancement New feature or request triage Issue needs triage

Comments

@audibleblink
Copy link
Contributor

Something like key-value pairs that are stuck to Operations would be useful.

This would allow for people with custom Workers to make decisions based on a projects' variables.

An example: Slack channel names

  1. create new project called '2023-Q1-example.com'
  • do normal setup like users, tags, groups, etc
  • create project variables
    • slack_channel: example.com_campaign
    • slack_webhook: https://.........
  1. Create new evidence
  2. A Worker can now query an operation's slack_channel variable and post to that slack channel that evidence was created

Currently I'm using a dictionary in source to map operation slugs to slack-channel slugs. On every new operation, I'm going in to the source to add a new entry and then rebuilding/publishing new docker images. I then pull the image on a docker swarm manager and redeploy the slack worker.
I was about to start the process of modifying my worker to be able to read in and build that dictionary from environment variables, when the idea of operation variables popped in to my head.

@audibleblink audibleblink added enhancement New feature or request triage Issue needs triage labels Jun 30, 2023
@jrozner
Copy link
Member

jrozner commented Jul 3, 2023

A few clarifying questions.

  1. Would you want global ones for the instance as well?
  2. If so, would you want project specific ones to override the global ones?
  3. How would you want the worker to get access to this data?

@audibleblink
Copy link
Contributor Author

  1. Yes, that could be useful for setting base urls to external services, as an example.
  2. Yes, I think that's sound default behavior for configuration variables
  3. I don't have strong feelings about whether the variables are pushed to workers, or if workers have to fetch them with an API call.

It's probably cleaner to make them available to read rather than pushing the same variables over and over.

@jkennedyvz
Copy link
Contributor

  1. This is a good idea
  2. Yes
  3. Having the server pass global and project variables along with the evidence should help minimize overhead from requests and serialization.

@jkennedyvz
Copy link
Contributor

This should be closed with the 2023.3 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Issue needs triage
Projects
None yet
Development

No branches or pull requests

3 participants