Skip to content

Conversation

@ModeSevenIndustrialSolutions
Copy link
Contributor

  • Set many INFO log messages to DEBUG level
  • Improve output to display when run as action, ssh-agent available
  • Error when GitHub token not available or doesn't have permissions
  • Fix/improve duplicate handling to better match changes
  • Add SSH configuration parsing for smarter automatic behaviour
  • Implement and document centralised error handling and exit codes
  • Add pytest to local pre-commit hooks; disable in GitHub CI
  • Correctly set primary repo to lfreleng-actions/github2gerrit-action
  • Update documentation references to correct repo/location
  • Fix ssh-agent setup bugs when called/used as action
  • Remove redundant SBOM workflow
  • Update sha-pinned-action.yaml action call
  • Migrate testing from ONAP repository to lfit/sandbox
  • Implement CLI tool GitHub API failure test (invalid token)
  • Fix logging output visibility problems
  • Enable fallback to local user SSH agent/configuration
  • Populate configuration with derived settings only after Gerrit change
  • Extensive testing of action in sandbox repository
  • Tested tagged release v0.1.18 from PyPI

Copilot AI review requested due to automatic review settings October 13, 2025 17:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements improved SSH handling and ssh-agent setup along with comprehensive error handling improvements. The changes enhance SSH configuration parsing, streamline logging levels, and implement centralized error handling with specific exit codes.

Key changes:

  • Implements SSH configuration parsing for smarter automatic behavior
  • Adds centralized error handling with standardized exit codes
  • Improves SSH agent setup with fallback to existing agents
  • Reduces many INFO log messages to DEBUG level for cleaner output

Reviewed Changes

Copilot reviewed 49 out of 50 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/unit/test_ssh_config_parser.py Comprehensive tests for SSH configuration parsing functionality
tests/unit/test_config_integration.py Tests integration of SSH config parsing with main configuration system
tests/test_ssh_discovery_dry_run.py Tests SSH discovery behavior in dry-run mode
tests/test_ssh_discovery.py Updates to SSH discovery tests removing immediate config saving
tests/test_ssh_common.py Enhanced SSH options testing with secure defaults
tests/test_ssh_agent.py Updated SSH agent tests for new fallback behavior
tests/test_reconciliation_plan_and_orphans.py Logging level changes from INFO to DEBUG
tests/test_reconciliation_extracted_module.py Logging level changes from INFO to DEBUG
tests/test_pr_content_filter_integration.py Added github_token field to test inputs
tests/test_metadata_trailer_separation_bug.py Added github_token field to test inputs
tests/test_github_api_retry_and_helpers.py Updated error handling to use centralized error codes
tests/test_github_api_helpers.py Updated error handling to use centralized error codes
tests/test_github_api_error_handling.py New comprehensive tests for GitHub API error handling
tests/test_ghe_and_gitreview_args.py Removed branch argument from git-review to avoid bug
tests/test_gerrit_change_id_footer.py Added github_token field to test inputs
tests/test_error_codes.py Comprehensive tests for new centralized error handling system
tests/test_email_case_normalization.py Added dry-run mode tests
tests/test_core_ssh_setup.py Enhanced SSH setup tests with agent fallback
tests/test_core_prepare_commits.py Added github_token field to test inputs
tests/test_core_integration_fixture_repo.py Added github_token field to test inputs
tests/test_core_config_and_errors.py Added github_token field to test inputs
tests/test_config_helpers.py Updated config helper tests for SSH integration
tests/test_composite_action_coverage.py Updated action step names
tests/test_cli.py Enhanced CLI tests for SSH agent behavior
tests/test_change_id_deduplication.py Added github_token field to test inputs
tests/test_action_step_validation.py Updated action step names
tests/fixtures/ssh_config_samples.py Sample SSH configurations for testing
tests/conftest.py Enhanced test configuration with GitHub CI mode disabling
src/github2gerrit/ssh_discovery.py Removed immediate config saving, enhanced dry-run support
src/github2gerrit/ssh_config_parser.py New SSH configuration parser with credential derivation
src/github2gerrit/ssh_agent_setup.py Enhanced SSH agent setup with existing agent fallback
src/github2gerrit/similarity.py Improved dependency package extraction patterns
src/github2gerrit/rich_logging.py Simplified logging setup, removed handler modification
src/github2gerrit/orchestrator/reconciliation.py Changed logging level from INFO to DEBUG
src/github2gerrit/models.py Added github_token field to Inputs model
src/github2gerrit/github_api.py Implemented centralized error handling with proper exit codes
src/github2gerrit/error_codes.py New centralized error handling system with standardized exit codes
src/github2gerrit/duplicate_detection.py Enhanced duplicate detection with better Gerrit API handling
src/github2gerrit/core.py Major improvements to workspace preparation and SSH handling
src/github2gerrit/config.py Integrated SSH config parsing with parameter derivation
src/github2gerrit/cli.py Enhanced CLI with improved error handling and SSH status display
pyproject.toml Updated repository URLs and removed pytest asyncio setting
action.yaml Updated dependencies and installation logic
REVISION_PLAN.md Removed completed revision plan document
README.md Added comprehensive error codes documentation
.pre-commit-config.yaml Added pytest to pre-commit hooks, disabled in CI
.github/workflows/testing.yaml Updated testing workflows with better error handling
.github/workflows/sha-pinned-actions.yaml Updated pinned action version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ModeSevenIndustrialSolutions
Copy link
Contributor Author

Workflow/job tested the action interface here successfully:
https://github.com/lfit/sandbox/actions/runs/18326021487/job/52628749262
...which raised the Gerrit change here:
https://gerrit.linuxfoundation.org/infra/c/sandbox/+/73738
Latest release tagged/published here:
https://github.com/modeseven-lfreleng-actions/github2gerrit-action/actions/runs/18471770609

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 50 out of 51 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

tests/unit/test_config_integration.py:1

  • [nitpick] This type narrowing suggests the workspace parameter should be non-optional in the constructor. Consider making the workspace parameter required or use a factory method that ensures workspace is always set.
# SPDX-License-Identifier: Apache-2.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 50 out of 51 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 50 out of 51 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 50 out of 51 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Set many INFO log messages to DEBUG level
- Improve output to display when run as action, ssh-agent available
- Error when GitHub token not available or doesn't have permissions
- Fix/improve duplicate handling to better match changes
- Add SSH configuration parsing for smarter automatic behaviour
- Implement and document centralised error handling and exit codes
- Add pytest to local pre-commit hooks; disable in GitHub CI
- Correctly set primary repo to lfreleng-actions/github2gerrit-action
- Update documentation references to correct repo/location
- Fix ssh-agent setup bugs when called/used as action
- Remove redundant SBOM workflow
- Update sha-pinned-action.yaml action call
- Migrate testing from ONAP repository to lfit/sandbox
- Implement CLI tool GitHub API failure test (invalid token)
- Fix logging output visibility problems
- Enable fallback to local user SSH agent/configuration
- Populate configuration with derived settings only after Gerrit change
- Extensive testing of action in sandbox repository
- Tested tagged release v0.1.18 from PyPI

Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
@tykeal tykeal merged commit 7b63e7c into lfreleng-actions:main Oct 15, 2025
17 checks passed
@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions deleted the add-merge-debugging branch November 11, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants