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

Adding a success log to the go mod tidy command to ensure it runs before creating a version bump PR. #11698

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

thavaahariharangit
Copy link
Contributor

@thavaahariharangit thavaahariharangit commented Feb 28, 2025

What are you trying to accomplish?

Currently, the implementation only logs an error message when go mod tidy fails, making it unclear if it runs successfully. This PR ensures proper logging to confirm its execution.

Anything you want to highlight for special attention from reviewers?

N/A

How will you know you've accomplished your goal?

I ran the Dependabot CLI locally and confirmed that I receive a success message (go mod tidy succeeded) before every PR creation(Submitting github.com/spf13/cobra pull request for creation).

Example output:

updater | 2025/02/28 11:25:09 INFO `go mod tidy` succeeded
updater | 2025/02/28 11:25:09 INFO Started process PID: 2077 with command: {} git status --untracked-files all --porcelain v1 /home/dependabot/dependabot-updater/repo/vendor {}
updater | 2025/02/28 11:25:09 INFO Process PID: 2077 completed with status: pid 2077 exit 0
updater | 2025/02/28 11:25:09 INFO Total execution time: 0.0 seconds
updater | 2025/02/28 11:25:09 INFO Submitting github.com/spf13/cobra pull request for creation

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@thavaahariharangit thavaahariharangit requested a review from a team as a code owner February 28, 2025 11:43
@github-actions github-actions bot added the L: go:modules Golang modules label Feb 28, 2025
@thavaahariharangit thavaahariharangit merged commit 04feb66 into main Feb 28, 2025
68 checks passed
@thavaahariharangit thavaahariharangit deleted the harry/log-go-mod-tidy-success-and-failure branch February 28, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: go:modules Golang modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants