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

Add toggle for bridge queue config #775

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Arkaniad
Copy link
Contributor

@Arkaniad Arkaniad commented Jun 8, 2023

With the 2.6.0 release it looks like worker support with Redis was configured. With the Helm Chart using the default configuration, the values.yaml has a configured queue block since it's in the config.sample.yml file.

Given that the chart doesn't yet deploy Redis, this results in a broken config by default unless .Values.hookshot.config.queue is set to {} as user-specified values will be merged on top of chart default values.

This will also break user configurations if they set up shop using the config.sample.yml file as it exists prior to this commit.

We're just adding an enabled flag to the queue config key and defaulting it to false - That way Hookshot should never expect a Redis service to be available unless explicitly configured and enabled.

…e crashes for default config

Signed-off-by: Rhea Danzey <rdanzey@element.io>
@Arkaniad Arkaniad requested a review from a team as a code owner June 8, 2023 18:59
Signed-off-by: Rhea Danzey <rdanzey@element.io>
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

Your system linter appears to have gone to town :p

@@ -526,7 +529,7 @@ export class BridgeConfig {
@hideKey()
private readonly bridgePermissions: BridgePermissions;

constructor(configData: BridgeConfigRoot, env?: {[key: string]: string|undefined}) {
constructor(configData: BridgeConfigRoot, env?: { [key: string]: string | undefined }) {
this.bridge = configData.bridge;
assert.ok(this.bridge);
this.github = configData.github && new BridgeConfigGitHub(configData.github);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would suggest modifying line 552 so that if enabled is false, we treat it as { monolithic: true}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Handled in latest commit - I'm not a great JS dev, feel free to critique

… if queue is disabled

Signed-off-by: Rhea Danzey <rdanzey@element.io>
@Arkaniad
Copy link
Contributor Author

Arkaniad commented Jun 8, 2023

Your system linter appears to have gone to town :p

Is there a special invocation I need to make it match up with your conventions or are they not in the repo? I think I just have blanket auto formatting on everything in VSCode somehow...

Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
…ns without redis

Signed-off-by: Rhea Danzey <rdanzey@element.io>
Signed-off-by: Rhea Danzey <rdanzey@element.io>
@Half-Shot Half-Shot self-requested a review July 11, 2023 15:56
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.

None yet

2 participants