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

chore: Add API Breakage Checking GitHub Action #3753

Merged
merged 40 commits into from
Jul 17, 2024

Conversation

rozaychen
Copy link
Contributor

@rozaychen rozaychen commented Jun 18, 2024

Issue #

Description

This PR introduces an automated mechanism to detect API breaking changes, enhancing our CI/CD pipeline's robustness and ensuring backward compatibility. The following components are included:

  1. GitHub Action for API Breaking Change Detection:

    • This action triggers whenever a pull request (PR) is opened.
    • It checks for any API breaking changes and sends a detailed report as a comment on the PR.
    • If any public interface changes are detected, an admin reviewer is automatically added to the PR for further inspection.
  2. Local Script for API Breaking Change Detection:

    • A script is provided to allow developers to check for API breaking changes locally before pushing their changes.
    • This ensures early detection and resolution of potential issues during the development phase.
  3. Daily GitHub Action for Swift API Digester:

    • This action runs every morning to verify that the Swift API Digester tool works as expected.
    • It serves as a continuous check to ensure the reliability and accuracy of our API breaking change detection process.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rozaychen rozaychen requested a review from a team as a code owner June 18, 2024 20:04
Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

Copy link
Contributor

github-actions bot commented Jul 2, 2024

API Breakage Report

✅ No Public API Breaking Change detected

.github/workflows/apiBreakTest.yml Outdated Show resolved Hide resolved
.github/workflows/APIDigesterCheck.yml Outdated Show resolved Hide resolved
.github/workflows/APIDigesterCheck.yml Outdated Show resolved Hide resolved
.github/CODEOWNERS Show resolved Hide resolved
.github/workflows/apiBreakTest.yml Outdated Show resolved Hide resolved
check_api_breakage.sh Outdated Show resolved Hide resolved
.github/workflows/apiBreakTest.yml Outdated Show resolved Hide resolved
.github/workflows/APIDigesterCheck.yml Outdated Show resolved Hide resolved
.github/workflows/apiBreakTest.yml Outdated Show resolved Hide resolved
.github/workflows/apiBreakTest.yml Outdated Show resolved Hide resolved
Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

1 similar comment
Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

1 similar comment
Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

Copy link
Contributor

API Breakage Report

💔 Public API Breaking Change detected:

Module: Amplify
Func ModelAssociation.hasOne(associatedWith:targetNames:) has been renamed to Func hasOne(associatedWith:associatedFields:targetNames:)
EnumElement ModelAssociation.hasOne has declared type change from (Amplify.ModelAssociation.Type) -> (Swift.String?, [Swift.String]) -> Amplify.ModelAssociation to (Amplify.ModelAssociation.Type) -> (Swift.String?, [Swift.String], [Swift.String]) -> Amplify.ModelAssociation
Func ModelAssociation.hasOne(associatedWith:targetNames:) has parameter 1 type change from [Swift.String] to [Swift.CodingKey]
👉🏻 Note: If you're just adding optional parameters to existing methods, neglect the line:
Func ModelAssociation.hasOne(associatedWith:targetNames:) has been renamed to Func hasOne(associatedWith:associatedFields:targetNames:)

Copy link
Contributor

API Breakage Report

✅ No Public API Breaking Change detected

@rozaychen rozaychen merged commit a8beec8 into main Jul 17, 2024
81 checks passed
@rozaychen rozaychen deleted the feat/api-breakage-checker branch July 17, 2024 18:26
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.

4 participants