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: prerelease git issue #1535

Merged
merged 1 commit into from
Dec 17, 2024
Merged

fix: prerelease git issue #1535

merged 1 commit into from
Dec 17, 2024

Conversation

rodrigopavezi
Copy link
Member

@rodrigopavezi rodrigopavezi commented Dec 16, 2024

Problem

https://app.circleci.com/pipelines/github/RequestNetwork/requestNetwork/10432/workflows/50b5a833-a542-4b28-92db-cded685106a0/jobs/159862/parallel-runs/0/steps/0-104

Description of the changes

fix: update lerna publish command to prevent git tagging during prerelease

Summary by CodeRabbit

  • Chores
    • Updated the release process to prevent Git tag creation during publishing.

Copy link
Contributor

coderabbitai bot commented Dec 16, 2024

Walkthrough

The pull request modifies the CircleCI configuration file, specifically the next-release job. The primary change involves adding the --no-git-tag-version flag to the lerna publish command. This modification alters the release process by preventing the automatic creation of Git tags during version publishing. The overall configuration structure remains unchanged, maintaining the existing build, test, and release workflow integrity.

Changes

File Change Summary
.circleci/config.yml Added --no-git-tag-version flag to lerna publish command in next-release job

Possibly related PRs

Suggested reviewers

  • alexandre-abrioux
  • kevindavee
  • sstefdev
  • MantisClone
  • aimensahnoun

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

🧹 Nitpick comments (1)
.circleci/config.yml (1)

Line range hint 288-297: Consider documenting the release process changes.

While the modification correctly prevents git tag creation, it would be beneficial to:

  1. Document this behavior change in the repository's release documentation
  2. Update any CI/CD documentation that references the prerelease process
  3. Ensure team members are aware that prerelease versions won't create git tags

This helps maintain clarity in the release process and prevents confusion about version tracking.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e53da60 and e30646a.

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

291-291: LGTM! The flag addition correctly addresses the prerelease git tagging issue.

The addition of --no-git-tag-version flag to the lerna publish command is appropriate and works well with the existing --no-push flag to prevent automatic git tag creation during prerelease publishing.


Line range hint 368-379: Verify the workflow dependencies remain intact.

The next-release job maintains its position in the workflow with all required checks and contexts. This ensures the release process remains secure and well-tested.

✅ Verification successful

Workflow dependencies and context are properly configured

The verification confirms that:

  • The next-release job maintains all required dependencies:
    • lint
    • build
    • test-unit
    • test-integration-with-smart-contracts
    • test-integration-with-request-node
    • test-usage-examples
    • test-toolbox
  • The protocol-release context is correctly set
  • The job runs only on the master branch as intended
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the workflow dependencies and contexts
# Check if all required jobs are listed as dependencies and the context is properly set

# Test: Extract and verify next-release job dependencies
yq '.workflows."build-and-test".jobs[] | select(has("next-release")) | .next-release.requires[]' .circleci/config.yml

# Test: Verify the context setting
yq '.workflows."build-and-test".jobs[] | select(has("next-release")) | .next-release.context' .circleci/config.yml

Length of output: 422


Script:

#!/bin/bash
# Let's try a different approach using grep to verify the workflow dependencies
# First, let's get the entire next-release job configuration
grep -A 20 "next-release:" .circleci/config.yml

# Then, let's specifically look for requires and context sections
grep -A 5 "requires:" .circleci/config.yml | grep -v "^#"
grep -A 2 "context:" .circleci/config.yml | grep -v "^#"

Length of output: 2591

@MantisClone
Copy link
Member

For posterity, here's the full error text.

lerna notice cli v6.6.2
lerna info versioning independent
lerna info ci enabled
lerna info Looking for changed packages since @requestnetwork/[email protected]
lerna success found 21 packages ready to publish
@requestnetwork/advanced-logic,@requestnetwork/currency,@requestnetwork/data-access,@requestnetwork/data-format,@requestnetwork/epk-cipher,@requestnetwork/epk-decryption,@requestnetwork/epk-signature,@requestnetwork/ethereum-storage,@requestnetwork/lit-protocol-cipher,@requestnetwork/multi-format,@requestnetwork/payment-detection,@requestnetwork/payment-processor,@requestnetwork/request-client.js,@requestnetwork/request-logic,@requestnetwork/request-node,@requestnetwork/smart-contracts,@requestnetwork/thegraph-data-access,@requestnetwork/transaction-manager,@requestnetwork/types,@requestnetwork/utils,@requestnetwork/web3-signature
lerna notice cli v6.6.2
lerna info versioning independent
lerna info ci enabled
lerna WARN force-publish @requestnetwork/advanced-logic
lerna WARN force-publish @requestnetwork/currency
lerna WARN force-publish @requestnetwork/data-access
lerna WARN force-publish @requestnetwork/data-format
lerna WARN force-publish @requestnetwork/epk-cipher
lerna WARN force-publish @requestnetwork/epk-decryption
lerna WARN force-publish @requestnetwork/epk-signature
lerna WARN force-publish @requestnetwork/ethereum-storage
lerna WARN force-publish @requestnetwork/lit-protocol-cipher
lerna WARN force-publish @requestnetwork/multi-format
lerna WARN force-publish @requestnetwork/payment-detection
lerna WARN force-publish @requestnetwork/payment-processor
lerna WARN force-publish @requestnetwork/request-client.js
lerna WARN force-publish @requestnetwork/request-logic
lerna WARN force-publish @requestnetwork/request-node
lerna WARN force-publish @requestnetwork/smart-contracts
lerna WARN force-publish @requestnetwork/thegraph-data-access
lerna WARN force-publish @requestnetwork/transaction-manager
lerna WARN force-publish @requestnetwork/types
lerna WARN force-publish @requestnetwork/utils
lerna WARN force-publish @requestnetwork/web3-signature
lerna info Looking for changed packages since @requestnetwork/[email protected]

Changes:
 - @requestnetwork/advanced-logic: 0.48.0 => 0.48.1-next.0
 - @requestnetwork/currency: 0.22.0 => 0.22.1-next.0
 - @requestnetwork/data-access: 0.39.0 => 0.39.1-next.0
 - @requestnetwork/data-format: 0.19.4 => 0.19.5-next.0
 - @requestnetwork/epk-cipher: 0.4.0 => 0.4.1-next.0
 - @requestnetwork/epk-decryption: 0.7.4 => 0.7.5-next.0
 - @requestnetwork/epk-signature: 0.9.4 => 0.9.5-next.0
 - @requestnetwork/ethereum-storage: 0.39.0 => 0.39.1-next.0
 - @requestnetwork/integration-test: 0.39.0 => 0.39.1-next.0 (private)
 - @requestnetwork/lit-protocol-cipher: 0.4.0 => 0.4.1-next.0
 - @requestnetwork/multi-format: 0.22.0 => 0.22.1-next.0
 - @requestnetwork/payment-detection: 0.48.0 => 0.48.1-next.0
 - @requestnetwork/payment-processor: 0.51.0 => 0.51.1-next.0
 - @requestnetwork/request-client.js: 0.53.0 => 0.53.1-next.0
 - @requestnetwork/request-logic: 0.38.0 => 0.38.1-next.0
 - @requestnetwork/request-node: 0.39.0 => 0.39.1-next.0
 - @requestnetwork/smart-contracts: 0.42.0 => 0.42.1-next.0
 - @requestnetwork/thegraph-data-access: 0.45.0 => 0.45.1-next.0
 - @requestnetwork/toolbox: 0.15.4 => 0.15.5-next.0 (private)
 - @requestnetwork/transaction-manager: 0.39.0 => 0.39.1-next.0
 - @requestnetwork/types: 0.48.0 => 0.48.1-next.0
 - @requestnetwork/usage-examples: 0.32.4 => 0.32.5-next.0 (private)
 - @requestnetwork/utils: 0.48.0 => 0.48.1-next.0
 - @requestnetwork/web3-signature: 0.8.4 => 0.8.5-next.0

lerna info auto-confirmed 
lerna info execute Skipping git push
lerna info execute Skipping releases
lerna ERR! Error: Command failed with exit code 128: git commit -F /tmp/e050e08f-0810-42bd-8064-316c8ed6b779/lerna-commit.txt
lerna ERR! Author identity unknown
lerna ERR! 
lerna ERR! *** Please tell me who you are.
lerna ERR! 
lerna ERR! Run
lerna ERR! 
lerna ERR!   git config --global user.email "[email protected]"
lerna ERR!   git config --global user.name "Your Name"
lerna ERR! 
lerna ERR! to set your account's default identity.
lerna ERR! Omit --global to set the identity only in this repository.
lerna ERR! 
lerna ERR! fatal: unable to auto-detect email address (got 'circleci@24da47a67012.(none)')
lerna ERR!     at makeError (/home/circleci/repo/node_modules/@lerna/child-process/node_modules/execa/lib/error.js:60:11)
lerna ERR!     at handlePromise (/home/circleci/repo/node_modules/@lerna/child-process/node_modules/execa/index.js:118:26)
lerna ERR! Error: Command failed with exit code 128: git commit -F /tmp/e050e08f-0810-42bd-8064-316c8ed6b779/lerna-commit.txt
lerna ERR! Author identity unknown
lerna ERR! 
lerna ERR! *** Please tell me who you are.
lerna ERR! 
lerna ERR! Run
lerna ERR! 
lerna ERR!   git config --global user.email "[email protected]"
lerna ERR!   git config --global user.name "Your Name"
lerna ERR! 
lerna ERR! to set your account's default identity.
lerna ERR! Omit --global to set the identity only in this repository.
lerna ERR! 
lerna ERR! fatal: unable to auto-detect email address (got 'circleci@24da47a67012.(none)')
lerna ERR!     at makeError (/home/circleci/repo/node_modules/@lerna/child-process/node_modules/execa/lib/error.js:60:11)
lerna ERR!     at handlePromise (/home/circleci/repo/node_modules/@lerna/child-process/node_modules/execa/index.js:118:26)
lerna ERR! lerna Command failed with exit code 128: git commit -F /tmp/e050e08f-0810-42bd-8064-316c8ed6b779/lerna-commit.txt
lerna ERR! lerna Author identity unknown
lerna ERR! lerna 
lerna ERR! lerna *** Please tell me who you are.
lerna ERR! lerna 
lerna ERR! lerna Run
lerna ERR! lerna 
lerna ERR! lerna   git config --global user.email "[email protected]"
lerna ERR! lerna   git config --global user.name "Your Name"
lerna ERR! lerna 
lerna ERR! lerna to set your account's default identity.
lerna ERR! lerna Omit --global to set the identity only in this repository.
lerna ERR! lerna 
lerna ERR! lerna fatal: unable to auto-detect email address (got 'circleci@24da47a67012.(none)')

Exited with code exit status 128

@MantisClone
Copy link
Member

I wonder if we could fix it in a way so that the tagging works instead of skipping it 🤔 Nonetheless, I'll approve this change and we can revisit it later.

@rodrigopavezi rodrigopavezi merged commit 0bfa87a into master Dec 17, 2024
11 checks passed
@rodrigopavezi rodrigopavezi deleted the fix/prerelease-git-issue branch December 17, 2024 10:56
@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