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

fix: next release job #1529

Merged
merged 1 commit into from
Dec 13, 2024
Merged

fix: next release job #1529

merged 1 commit into from
Dec 13, 2024

Conversation

rodrigopavezi
Copy link
Member

@rodrigopavezi rodrigopavezi commented Dec 12, 2024

Problem

Calling clean build again in the next-release job is necessary. Also the container needs more resource.

Description of the changes

update CircleCI config to use large resource class and remove lerna build step

Summary by CodeRabbit

  • New Features

    • Enhanced security for the release process with the addition of SSH known hosts entry for GitHub.
  • Improvements

    • Updated resource allocation for the next-release job to optimize performance.
    • Streamlined the build process by removing the step that built all packages with Lerna.

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

Walkthrough

The pull request modifies the .circleci/config.yml file, focusing on the next-release job within the CI/CD pipeline. Key changes include the addition of a resource_class: large declaration to allocate more resources, the introduction of a step to create an SSH known hosts entry for GitHub, and the removal of a step that built all packages with Lerna. These adjustments aim to enhance security and streamline the build process while retaining the overall structure of the CI/CD framework.

Changes

File Change Summary
.circleci/config.yml - Updated next-release job to include resource_class: large.
- Added step Allow github ssh host in next-release job for SSH known hosts entry.
- Removed step Build all packages with lerna from next-release job.

Possibly related PRs

  • refactor: circle ci scripts  #1510: This PR modifies the .circleci/config.yml file, including changes to the next-release job, which is directly related to the modifications made in the main PR.
  • fix: next release #1517: This PR also updates the .circleci/config.yml file, specifically adding an environment variable that addresses memory issues during builds, which is relevant to the changes in the main PR's next-release job.
  • chore: fix circle ci build and test on master #1527: This PR enhances the .circleci/config.yml file by increasing resource allocation for the next-release job, aligning with the resource class changes in the main PR.

Suggested reviewers

  • kevindavee
  • leoslr
  • MantisClone
  • aimensahnoun
  • sstefdev

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>, please review it.
    • Generate unit testing code for this file.
    • 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 generate unit testing code 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 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 generate unit testing code.
    • @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.

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. (Experiment)
  • @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.

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.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
.circleci/config.yml (2)

274-274: Consider using xlarge resource class for consistency

While adding resource_class: large addresses the resource constraints, consider using xlarge to align with other resource-intensive jobs like build and test-integration-with-smart-contracts. This would ensure consistent performance across the pipeline, especially during the publishing process which involves running lerna and npm operations.

-    resource_class: large
+    resource_class: xlarge

Line range hint 279-281: Use CircleCI's built-in GitHub host verification

Instead of manually adding GitHub's SSH key to known hosts, consider using CircleCI's built-in features:

  1. For host verification only: Remove this step as CircleCI already trusts GitHub hosts
  2. For SSH operations: Use the add_ssh_keys step

If SSH operations are needed, replace with:

- add_ssh_keys:
    fingerprints:
      - "xx:xx:xx:xx:xx:xx:xx:xx" # Add your SSH key fingerprint
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86df01b and 9d72f08.

📒 Files selected for processing (1)
  • .circleci/config.yml (1 hunks)
🔇 Additional comments (2)
.circleci/config.yml (2)

Line range hint 348-361: LGTM: Workflow configuration ensures quality releases

The workflow configuration is well-structured:

  1. All tests and checks must pass before release
  2. Branch filtering ensures controlled releases
  3. Proper context usage for secrets

Line range hint 282-299: Verify impact of removed lerna build step

The removal of the lerna build step aligns with the PR objective to avoid redundant builds. However, please verify:

  1. The built artifacts from the build job are correctly persisted and attached
  2. The publishing process doesn't require fresh builds
✅ Verification successful

Let me gather more specific information about the workspace persistence and attachment configurations.


Let me check the build and next-release jobs configuration more specifically.


Based on the gathered information, I can now provide the final response:

Removal of lerna build step is safe

The workspace configuration shows that:

  1. The build job correctly persists all artifacts using persist_to_workspace
  2. The next-release job attaches the workspace and has build as a requirement in the workflow
  3. All built artifacts from the previous build step are available in the workspace when publishing
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if lerna publish requires fresh builds
rg -A 5 'lerna publish' packages/*/package.json

# Check if workspace is correctly persisted
rg 'persist_to_workspace|attach_workspace' .circleci/config.yml

Length of output: 1200


Script:

#!/bin/bash
# Check workspace persistence and attachment details
rg -B 2 -A 3 'persist_to_workspace:|attach_workspace:' .circleci/config.yml

# Check build job configuration
rg -B 5 -A 10 'jobs:.*build:' .circleci/config.yml

Length of output: 1664


Script:

#!/bin/bash
# Get the build job and next-release job configurations
rg -B 2 -A 15 'build:|next-release:' .circleci/config.yml

# Check workflow configuration to understand job dependencies
rg -B 2 -A 15 'workflows:' .circleci/config.yml

Length of output: 2467

@rodrigopavezi rodrigopavezi changed the title chore: fix: next release job Dec 12, 2024
@rodrigopavezi rodrigopavezi requested review from aimensahnoun and sstefdev and removed request for alexandre-abrioux, kevindavee and leoslr December 12, 2024 12:59
Copy link
Member

@MantisClone MantisClone left a comment

Choose a reason for hiding this comment

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

Looks good to me assuming the resulting packages all have dist folders as expected.

.circleci/config.yml Show resolved Hide resolved
@rodrigopavezi rodrigopavezi merged commit 1873e14 into master Dec 13, 2024
11 checks passed
@rodrigopavezi rodrigopavezi deleted the fix/next-release-job branch December 13, 2024 01:58
This was referenced Dec 13, 2024
@MantisClone MantisClone linked an issue Dec 21, 2024 that may be closed by this pull request
@coderabbitai coderabbitai bot mentioned this pull request Jan 16, 2025
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.

Fix -next releases in requestNetwork SDK
3 participants