Skip to content

Conversation

@RobertSzefler
Copy link
Contributor

No description provided.

@RobertSzefler RobertSzefler force-pushed the feature/main-1744/slack-grouping-aligned-periods branch 3 times, most recently from 2936b00 to d0856f1 Compare June 25, 2024 13:48
@RobertSzefler RobertSzefler marked this pull request as ready for review June 25, 2024 14:07
@RobertSzefler RobertSzefler requested a review from arikalon1 June 25, 2024 14:08
@RobertSzefler RobertSzefler force-pushed the feature/main-1744/slack-grouping-aligned-periods branch 2 times, most recently from ea1839d to 40729f9 Compare June 25, 2024 14:12
@RobertSzefler RobertSzefler force-pushed the feature/main-1744/slack-grouping-aligned-periods branch from 40729f9 to 53c880a Compare July 8, 2024 08:09
if values is None:
return {"summary": SummaryNotificationModeParams()}
def validate_interval_alignment(cls, values: Dict):
if values["aligned"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

what if values is none? wont this throw? i would handle that case first

Copy link
Contributor Author

@RobertSzefler RobertSzefler Jul 9, 2024

Choose a reason for hiding this comment

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

It's marked as required, so the only possible values should be True and False. If somehow it's not set (should not be possible but can be forced), I think it should indeed throw an exception. If somehow it's set to None (again, should not be possible..) it will be evaluated to False, which I think is sensible here.

def validate_interval_alignment(cls, values: Dict):
if values["aligned"]:
if values["interval"] < 24 * 3600:
if (24 * 3600) % values["interval"]:
Copy link
Contributor

@Avi-Robusta Avi-Robusta Jul 9, 2024

Choose a reason for hiding this comment

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

not sure i understand, we allow the interval to be seconds but we dont support seconds, shouln't we change it to minutes or have it round up to the nearest minute instead of failing ? (inorder to support backward compatibility)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There will be no backwards compatibility problems, as prior users don't use the interval aligning mechanism (it's not been released yet).

Also, we support aligning on thresholds shorter than a minutes here without problem. For example, if the user specs interval as 15 seconds, the intervals will be automatically aligned at x:00, x:15, x:30, x:45 (for consecutive minutes x).

Copy link
Contributor

Choose a reason for hiding this comment

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

got it

idx = 1 if resolved else 0
if now_ts - self.start_ts > interval or not self.summary_table:
# Expired or the first summary ever for this group_key, reset the data
if not self.end_ts or now_ts > self.end_ts:
Copy link
Contributor

Choose a reason for hiding this comment

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

what if not self.summary_table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If end_ts is not set it means that the whole object is not initialized, and so summary_table is also not set. I basically simplified the condition here.

@moshemorad moshemorad added the Silence Ignored by schedule notification label Jun 22, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 22, 2025

Warning

Rate limit exceeded

@moshemorad has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fcc8658 and 53c880a.

📒 Files selected for processing (4)
  • src/robusta/core/sinks/sink_base.py (2 hunks)
  • src/robusta/core/sinks/sink_base_params.py (1 hunks)
  • src/robusta/core/sinks/slack/slack_sink.py (2 hunks)
  • tests/test_slack_grouping.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Robert Szefler seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Silence Ignored by schedule notification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants