Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into promisify-anything
Browse files Browse the repository at this point in the history
  • Loading branch information
pcholakov committed Feb 6, 2024
2 parents f7a668b + 6fedf9d commit 9539e62
Show file tree
Hide file tree
Showing 171 changed files with 6,244 additions and 47 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,18 @@ jobs:

# Bump sdk version in java/kotlin examples and run checks
# When adding a new example make sure it's listed here
- name: Find and replace restateVersion in build.gradle.kts for java templates
- name: Find and replace restateVersion in build.gradle.kts for java examples
if: github.event.inputs.sdkJavaVersion != ''
run: for jvmDir in hello-world-http hello-world-lambda food-ordering/app patterns; do sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' java/$jvmDir/build.gradle.kts; done
run: for jvmDir in hello-world-http hello-world-lambda food-ordering/app tour-of-restate patterns; do sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' java/$jvmDir/build.gradle.kts; done
- name: Find and replace restateVersion in build.gradle.kts for kotlin templates
if: github.event.inputs.sdkJavaVersion != ''
run: for jvmDir in hello-world-http hello-world-lambda; do sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/$jvmDir/build.gradle.kts; done
- name: Find and replace restateVersion in build.gradle.kts for kotlin/hello-world-lambda-cdk
if: github.event.inputs.sdkJavaVersion != ''
run: sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/hello-world-lambda-cdk/lambda/build.gradle.kts
- name: Find and replace restateVersion in Dependencies.scala for scala templates
if: github.event.inputs.sdkJavaVersion != ''
run: for scalaDir in hello-world-http; do sed -i 's/lazy val restate = "[0-9A-Z.-]*"/lazy val restate = "${{ inputs.sdkJavaVersion }}"/' scala/$scalaDir/project/Dependencies.scala; done

# When adding a new example add the check task here
- name: Test java/hello-world-http
Expand All @@ -90,6 +93,12 @@ jobs:
with:
arguments: check
build-root-directory: java/patterns
- name: Test java/tour-of-restate
if: github.event.inputs.sdkJavaVersion != ''
uses: gradle/gradle-build-action@v2
with:
arguments: check
build-root-directory: java/tour-of-restate
- name: Test kotlin/hello-world-http
if: github.event.inputs.sdkJavaVersion != ''
uses: gradle/gradle-build-action@v2
Expand All @@ -102,6 +111,10 @@ jobs:
with:
arguments: check
build-root-directory: kotlin/hello-world-lambda
- name: Build Scala HTTP template
if: github.event.inputs.sdkJavaVersion != ''
run: sbt -v +package
working-directory: scala/hello-world-http

- name: Update cdk version
if: github.event.inputs.cdkVersion != ''
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ jobs:
typescript-hello-world-lambda-cdk.zip
typescript-dynamic-workflow-executor.zip
typescript-end-to-end-testing.zip
scala-hello-world-http.zip
typescript-tour-of-restate.zip
java-hello-world-http.zip
java-hello-world-lambda.zip
java-food-ordering.zip
java-tour-of-restate.zip
kotlin-hello-world-http.zip
kotlin-hello-world-lambda.zip
kotlin-hello-world-lambda-cdk.zip
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
with:
arguments: check
build-root-directory: java/patterns
- name: Test java/tour-of-restate
uses: gradle/gradle-build-action@v2
with:
arguments: check
build-root-directory: java/tour-of-restate
- name: Test kotlin/hello-world-http
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -59,6 +64,9 @@ jobs:
run: |
npm --prefix kotlin/hello-world-lambda-cdk clean-install
npm --prefix kotlin/hello-world-lambda-cdk run verify
- name: Build Scala HTTP template
run: sbt -v +package
working-directory: scala/hello-world-http

build-ts:
# prevent from running on forks
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 - Restate Software, Inc., Restate GmbH
Copyright (c) 2024 - Restate Software, Inc., Restate GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@
Browse this repository to see how easy distributed applications development becomes with Restate.

## Starters
| Language | Name / Link |
|-----------|-----------------------------------------------------------------|
| TypeScript| [Hello world on AWS Lambda](typescript/hello-world-lambda) |
| TypeScript| [Hello world on AWS Lambda + CDK](typescript/hello-world-lambda-cdk) |
| Java | [Hello World HTTP](java/hello-world-http) |
| Java | [Hello world on AWS Lambda](java/hello-world-lambda) |
| Kotlin | [Hello World HTTP](kotlin/hello-world-http) |
| Kotlin | [Hello world on AWS Lambda](kotlin/hello-world-lambda) |
| Kotlin | [Hello world on AWS Lambda + CDK](kotlin/hello-world-lambda-cdk) |
| Language | Name / Link |
|------------|----------------------------------------------------------------------|
| TypeScript | [Hello world on AWS Lambda](typescript/hello-world-lambda) |
| TypeScript | [Hello world on AWS Lambda + CDK](typescript/hello-world-lambda-cdk) |
| Java | [Hello World HTTP](java/hello-world-http) |
| Java | [Hello world on AWS Lambda](java/hello-world-lambda) |
| Kotlin | [Hello World HTTP](kotlin/hello-world-http) |
| Kotlin | [Hello world on AWS Lambda](kotlin/hello-world-lambda) |
| Kotlin | [Hello world on AWS Lambda + CDK](kotlin/hello-world-lambda-cdk) |
| Scala | [Hello world HTTP](scala/hello-world-http) |

## Tutorials
| Language | Name / Link |
|-------------|-----------------------------------------------------------------------------------------------|
| TypeScript | [Tour of Restate](typescript/tour-of-restate): A tour of the essentials of the Typescript SDK |
| Java | [Tour of Restate](java/tour-of-restate): A tour of the essentials of the Java SDK |

## Patterns

Expand Down Expand Up @@ -119,3 +126,5 @@ Before releasing, trigger the "pre-release" workflow to update sdk versions. Thi
Once the repo is ready for the release, push a tag of the form `vX.Y.Z`.
This triggers a workflow that [creates a draft release](https://github.com/restatedev/examples/releases) on Github, which you need to approve to finalize it.
Please update the version tag referenced on the [Tour of Restate](https://github.com/restatedev/documentation/blob/main/docs/tour.mdx) documentation page.
5 changes: 5 additions & 0 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This directory contains Restate examples using the Java SDK.
| Java | [Hello World HTTP](hello-world-http) |
| Java | [Hello world on AWS Lambda](hello-world-lambda) |

## Tutorials
| Language | Name / Link |
|----------|------------------------------------------------------------------------------|
| Java | [Tour of Restate](tour-of-restate): A tour of the essentials of the Java SDK |

## Patterns

| Language | Name / Link |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import dev.restate.sdk.examples.external.DriverMobileAppSimulator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import static dev.restate.sdk.examples.generated.OrderProto.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import static dev.restate.sdk.examples.generated.OrderProto.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import static dev.restate.sdk.examples.generated.OrderProto.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import static dev.restate.sdk.examples.generated.OrderProto.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;

import static dev.restate.sdk.examples.utils.TypeUtils.statusToProto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.clients;

import java.util.Properties;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.clients;

import org.apache.logging.log4j.LogManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.clients;

import dev.restate.sdk.common.TerminalException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.external;

import static dev.restate.sdk.examples.generated.OrderProto.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

import com.fasterxml.jackson.annotation.JsonCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

import com.fasterxml.jackson.annotation.JsonCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

public enum DriverStatus {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

import com.fasterxml.jackson.annotation.JsonCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

import com.fasterxml.jackson.annotation.JsonCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
*
* This file is part of the Restate examples,
* which is released under the MIT license.
*
* You can find a copy of the license in the file LICENSE
* in the root directory of this repository or package or at
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples.types;

public enum StatusEnum {
Expand Down
Loading

0 comments on commit 9539e62

Please sign in to comment.