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

feat: protect pro tier projects and our services #1445

Merged

Conversation

chesedo
Copy link
Contributor

@chesedo chesedo commented Nov 30, 2023

Description of change

Prevent the creation of new projects or the starting of idle projects that will overload our servers

How has this been tested? (if applicable)

Updating the tests

@chesedo chesedo marked this pull request as ready for review November 30, 2023 16:38
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

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

LGTM! I left one comment about observability, but it's not blocking.

Comment on lines +963 to +971
let has_capacity = if current_container_count < self.cch_container_limit {
true
} else if current_container_count < self.soft_container_limit {
!is_cch_project
} else if current_container_count < self.hard_container_limit {
matches!(account_tier, AccountTier::Pro)
} else {
false
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add tracing events with the count if we are over any of the limits?

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'm honestly not sure. Because of the ambulance event (in the other PR) we can already setup a honeycomb alert. So I want to add a warn! in this function but don't see how it will be useful considering the ambulance event.

Copy link
Contributor

Choose a reason for hiding this comment

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

True, it's likely overkill. 👍

@oddgrd oddgrd merged commit d320d15 into main Dec 1, 2023
@oddgrd oddgrd deleted the feature/eng-1985-add-a-pull-the-plug-for-all-non-pro-projects branch December 1, 2023 10:32
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.

3 participants