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

PR Action Compiling Demo Apps #470

Open
kraftp opened this issue May 23, 2024 · 2 comments
Open

PR Action Compiling Demo Apps #470

kraftp opened this issue May 23, 2024 · 2 comments

Comments

@kraftp
Copy link
Contributor

kraftp commented May 23, 2024

To more easily detect breaking interface changes, we should add a PR hook attempting to compile the demo apps (https://github.com/dbos-inc/dbos-demo-apps) with any new PR. Failures to compile indicate breaking changes that should be fixed.

@kraftp
Copy link
Contributor Author

kraftp commented May 23, 2024

@demetris-manikas We'll work on this to help automatically catch future breaking changes

@demetris-manikas
Copy link
Contributor

demetris-manikas commented May 25, 2024

I saw a video about implicit tests that maybe a simpler and safer solution than relying in what the test apps use.

I did a small POC that seems to work.
I created a public_interfaces_v1.test containing

import { Knex } from "knex";
import { TransactionContext, WorkflowContext, CommunicatorContext } from "../src";
import { Communicator, Transaction, Workflow } from '../src/decorators'

class _DBOSClass {
  @Transaction()
  transaction(_ctxt: TransactionContext<Knex>, _a: string, _b: number) {
    return Promise.resolve(false)
  }
  @Workflow()
  workflow(_ctxt: WorkflowContext, _a: string, _b: number) {
    return Promise.resolve(false)
  }

  @Communicator()
  Communicator(_ctxt: CommunicatorContext, _a: string, _b: number) {
    return Promise.resolve(false)
  }
}

describe("vi-interfaces", () => {
  test("all", () => { expect(true).toBe(true)});
});

Which will choke when I say change the TransactionContext's signature in all the code.

Changes of signatures in this file should be a red flag.

Just an idea

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

No branches or pull requests

2 participants