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

Label triggered slow ci #2379

Merged
merged 21 commits into from
Feb 1, 2024
Merged

Conversation

avishniakov
Copy link
Contributor

@avishniakov avishniakov commented Jan 31, 2024

Describe changes

This PR has a couple of improvements to the current Fast/Slow CI concept:

  • Running decision for Slow CI is controlled by run-slow-ci label
  • Fast CI always runs
  • Slow CI always runs, but In Slow CI we first check, if the label is set, if not set - it fails.
  • If PR is ready for Slow CI: dev can fix above mentioned error by applying a tag and rerunning slow flow
  • If PR is not yet ready for Slow CI: just ignore, it until it is ready and go to the previous bullet

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • If my changes require changes to the dashboard, these changes are communicated/requested.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Enhanced CI workflow by adding and modifying event triggers for better control.
    • Introduced new CI jobs for specific label checks and updating templates, improving automation and efficiency.
    • Adjusted job dependencies to streamline the CI process.

Copy link
Contributor

coderabbitai bot commented Jan 31, 2024

Walkthrough

Walkthrough

The recent modifications to the CI workflow configuration enhance automation by refining event triggers and permissions, and by introducing a new job that checks for a specific label on pull requests. This update ensures that only relevant changes trigger the CI process, improves security by specifying permissions, and streamlines the workflow by adding dependencies between jobs. Additionally, it introduces a job aimed at updating templates, albeit with noted limitations.

Changes

File Path Change Summary
.github/workflows/ci-slow.yml - Added push event with specific branch and path-ignore configurations.
- Modified pull_request event types and added path-ignore configuration.
- Added a new job run-slow-ci-label-is-set to check for a specific label on pull requests.
- Modified existing jobs to have a dependency on the new run-slow-ci-label-is-set job.
.github/workflows/update-templates-to-examples.yml - Added a specific echo message and executing git diff with a dynamic branch reference in a conditional block.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit-tests for this file.
  • 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 generate unit tests for this file.
    • @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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Jan 31, 2024
@strickvl
Copy link
Contributor

@coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 2

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 38c0246 and 55ca073.
Files selected for processing (1)
  • .github/workflows/ci-slow.yml (10 hunks)
Additional comments: 3
.github/workflows/ci-slow.yml (3)
  • 4-9: The paths-ignore configuration includes a wildcard '*' which is intended to ignore all paths, but it's negated by the explicit inclusion of !pyproject.toml and **.md. This configuration might not work as expected because the wildcard negation is not standard behavior across all GitHub Actions features. It's important to verify that this configuration correctly ignores the intended paths while still triggering on changes to pyproject.toml and Markdown files.
  • 14-16: The permissions section is correctly scoped to the minimum necessary permissions for this workflow, which is a good security practice. contents: read and pull-requests: write are appropriate for the operations performed by the jobs in this workflow. This setup helps to ensure that the GitHub token used by actions has no more permissions than necessary, reducing the risk if it were to be compromised.
  • 178-178: The exclusion strategy for the custom-ubuntu-integration-test job is a good practice to reduce unnecessary test runs, especially considering the time-consuming nature of Docker tests. However, ensure that this exclusion does not inadvertently skip important test scenarios for Python versions other than 3.8. It might be worth considering a conditional inclusion for these tests based on other criteria, such as changes to specific files or directories, to ensure that critical paths are still tested across all supported Python versions.

.github/workflows/ci-slow.yml Outdated Show resolved Hide resolved
.github/workflows/ci-slow.yml Outdated Show resolved Hide resolved
@avishniakov avishniakov marked this pull request as draft January 31, 2024 13:05
@avishniakov avishniakov marked this pull request as ready for review January 31, 2024 14:16
@avishniakov
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 55ca073 and e4e7915.
Files selected for processing (2)
  • .github/workflows/ci-slow.yml (9 hunks)
  • .github/workflows/update-templates-to-examples.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-slow.yml
Additional comments: 1
.github/workflows/update-templates-to-examples.yml (1)
  • 81-83: The use of git diff to check for changes is a good approach, but it's important to ensure that the branch reference origin/${{ github.event.pull_request.head.ref }} is always valid and accessible at the time this job runs. This dynamic reference could potentially lead to issues if the branch is deleted or renamed before this step executes.

@avishniakov avishniakov merged commit a6a39f8 into develop Feb 1, 2024
88 of 90 checks passed
@avishniakov avishniakov deleted the feature/OSSK-386-label-triggered-slow-ci branch February 1, 2024 08:06
adtygan pushed a commit to adtygan/zenml that referenced this pull request Mar 21, 2024
* label driven slow ci

* better name

* fake commit

* dynamic label checker

* naming

* naming

* more alive action

* extend permissions

* extend permissions

* extend permissions

* extend permissions

* pass PR number

* fake .github/labler.yml

* fake .github/labler.yml

* typos

* global permissions

* take out permissions

* coderabbitai suggestions

* verbose git diff in templates on changes

* remove redundant step

* linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues run-slow-ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants