Skip to content

test(backend): Check candid compatibility #5779

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

Merged
merged 72 commits into from
Apr 15, 2025
Merged

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Apr 10, 2025

Motivation

We wish CI to fail if there is an unannounced breaking change in the backend canister API

Changes

  • Run an compatibility check with the prod API, when the backend candid file changes and no breaking change has been announced.

Tests

Test passes if a PR contains no changes to the backend API

https://github.com/dfinity/oisy-wallet/actions/runs/14379681392
Screenshot from 2025-04-10 14-02-02

Test passes if a PR contains API changes and a conventional commit to match

I added a breaking change to the code and modified the PR title & description to declare the change. The result was as expected:

Screenshot from 2025-04-10 14-05-53

Tests are skipped because the PR declares the breaking change:
Screenshot from 2025-04-10 14-06-58

Test fails if there is a breaking API change

I kept the breaking change but ran without the PR breaking change conventions. This failed, as desired:
Screenshot from 2025-04-10 14-45-39

@bitdivine bitdivine changed the title test(backend): Check candid compatibility test(backend)!: Check candid compatibility Apr 10, 2025
@bitdivine bitdivine changed the title test(backend)!: Check candid compatibility test(backend): Check candid compatibility Apr 10, 2025
@bitdivine bitdivine enabled auto-merge (squash) April 14, 2025 14:15
@bitdivine bitdivine force-pushed the check-candid-compatibility branch from 4419224 to c636f95 Compare April 14, 2025 16:26
Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

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

LGTM tks!

@bitdivine bitdivine merged commit 2bb0f74 into main Apr 15, 2025
36 checks passed
@bitdivine bitdivine deleted the check-candid-compatibility branch April 15, 2025 15:12
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.

2 participants