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

refactor: add sentry dsn rotation logic #466

Merged
merged 10 commits into from Oct 7, 2023

Conversation

lsndr
Copy link
Contributor

@lsndr lsndr commented Oct 4, 2023

relates-to: #458

@lsndr lsndr self-assigned this Oct 4, 2023
@lsndr lsndr added Type: refactoring Changes in the way the code works internally without changing the output produced. Type: technical debt Changes that remove or significantly update old unused code and/or dependencies. labels Oct 4, 2023
@lsndr lsndr marked this pull request as ready for review October 4, 2023 10:50
@lsndr lsndr requested a review from derevnjuk October 4, 2023 10:50
src/Config/CliBuilder.ts Outdated Show resolved Hide resolved
src/Config/CliBuilder.ts Outdated Show resolved Hide resolved
src/Config/CliBuilder.ts Outdated Show resolved Hide resolved
src/Config/CliBuilder.ts Outdated Show resolved Hide resolved
src/Config/SystemConfigReader.ts Outdated Show resolved Hide resolved
src/Config/SystemConfigReader.ts Outdated Show resolved Hide resolved
src/Config/SystemConfigReader.ts Outdated Show resolved Hide resolved
src/Config/SystemConfigReader.ts Outdated Show resolved Hide resolved
Comment on lines +76 to +79
await this.updateConfigFile({
...configFile,
updatedAt: new Date()
});
Copy link
Member

Choose a reason for hiding this comment

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

Seems this is redundant. Should we update the configuration as though the rotation was successful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think yes, just because if we don't do that, it will try to perform rotation on every bright-cli call causing at most 1.5 seconds delay.

Since rotation logic is not crucial for the cli for now, I think it's ok in case of failure to repeat it later.

Copy link
Member

Choose a reason for hiding this comment

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

As you wish. However, I'm still uncertain about how it is supposed to work for long-running processes like the repeater which is intended to work for months.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's have a separate PR for the background rotation

Copy link
Member

Choose a reason for hiding this comment

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

@lsndr please open a ticket in Jira

src/Config/SystemConfigReader.ts Outdated Show resolved Hide resolved
@lsndr lsndr requested a review from derevnjuk October 5, 2023 12:32
@derevnjuk derevnjuk merged commit 886cbdd into alpha Oct 7, 2023
4 checks passed
@derevnjuk derevnjuk deleted the refactor/add-sentry-dsn-rotation-logic branch October 7, 2023 08:06
derevnjuk pushed a commit that referenced this pull request Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: refactoring Changes in the way the code works internally without changing the output produced. Type: technical debt Changes that remove or significantly update old unused code and/or dependencies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants