Skip to content

Fixes to enable cross repo workflow calls#137

Merged
jackkleeman merged 9 commits intomainfrom
e2e-workflow-call
Jun 8, 2023
Merged

Fixes to enable cross repo workflow calls#137
jackkleeman merged 9 commits intomainfrom
e2e-workflow-call

Conversation

@jackkleeman
Copy link
Copy Markdown
Contributor

@jackkleeman jackkleeman commented Jun 5, 2023

Fixes #110

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 5, 2023

Test Results

  71 files  ±0    71 suites  ±0   6m 35s ⏱️ -24s
  58 tests ±0    57 ✔️ ±0  1 💤 ±0  0 ±0 
151 runs  ±0  150 ✔️ ±0  1 💤 ±0  0 ±0 

Results for commit 8b9e4fc. ± Comparison against base commit bb22501.

♻️ This comment has been updated with latest results.

@jackkleeman jackkleeman force-pushed the e2e-workflow-call branch 4 times, most recently from 65f8622 to 2b93c6a Compare June 5, 2023 11:05
@jackkleeman
Copy link
Copy Markdown
Contributor Author

image image

This is now working in both typescript and runtime repos via my PRs restatedev/restate#481 restatedev/sdk-typescript#86

@jackkleeman jackkleeman requested review from slinkydeveloper and tillrohrmann and removed request for slinkydeveloper June 5, 2023 12:34
Copy link
Copy Markdown
Collaborator

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Overall, this looks good. The only general comment I have is that we need to properly document the setup here, as I personally find it non trivial. Perhaps add some description under docs/dev/README.md (like we have in other repos)?

Another question: If I understood correctly we would not be able to trigger from the UI an e2e test with a specific restate commit and a specific sdk commit, right? Perhaps can we add it in the runtime repo? It would be very very useful to be able to do that!

@jackkleeman
Copy link
Copy Markdown
Contributor Author

I understood correctly we would not be able to trigger from the UI an e2e test with a specific restate commit and a specific sdk commit, right?

We would be able to. There is a workflow call in this repo that i have set up, but I will be testing it as a follow up once this is merged as that makes it quite a bit easier. It needs me to add some new PAT secrets in this repo; hopefully that's all it needs. We will also have to consider retention as 1 day might be a bit annoying if you are testing commits from two repos

Copy link
Copy Markdown
Collaborator

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

LGTM, just one last comment to resolve and then you can go ahead and squash/merge it.

private var additionalContainers: MutableMap<String, GenericContainer<*>> = mutableMapOf(),
private var additionalEnv: MutableMap<String, String> = mutableMapOf(),
private var runtimeContainer: String =
System.getenv(RESTATE_RUNTIME_CONTAINER_ENV) ?: DEFAULT_RUNTIME_CONTAINER,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would not do this change here, and let the fail test on an invalid config of this env. We're covered anyway by gradle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The problem could be that RESTATE_RUNTIME_CONTAINER_ENV is set to the empty string because of ${{ inputs.restateCommit != '' && 'localhost:5000/restatedev/restate:latest' || '' }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah - im not following francesco because the test does not currently fail if its not provided, and now it can be not provided in a new way - empty instead of null

Copy link
Copy Markdown
Collaborator

@slinkydeveloper slinkydeveloper Jun 8, 2023

Choose a reason for hiding this comment

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

The problem could be that RESTATE_RUNTIME_CONTAINER_ENV is set to the empty string

No, the defaulting is covered in the gradle change in the same commit, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

True. I didn't realize that this change was added to the RestateDeployer as well as the build.gradle.kts. I guess with the change in build.gradle.kts it should be enough.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@jackkleeman could you please revert this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i dont understand, sorry. if there is a default set elsewhere, why do we set a default here at all?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Because the idea behind this test utils is to separately ship them to allow users to test, so the RestateDeployer is designed in such a way that it doesn't depend on our gradle script to execute it. I have a concrete example of this in the notebook-demo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, i understand. thanks

Copy link
Copy Markdown
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for creating this workflow @jackkleeman. The changes look good to me. Thanks a lot for the detailed description of the workflow which really helps understanding what is happening! +1 for merging.

@jackkleeman jackkleeman merged commit 3718ec9 into main Jun 8, 2023
@jackkleeman jackkleeman deleted the e2e-workflow-call branch June 8, 2023 10:32
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.

Allow e2e tests to be run with snapshot artifacts

3 participants