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

Update Samples and documentation #140

Merged
merged 20 commits into from
Jun 27, 2020
Merged

Conversation

TsuyoshiUshio
Copy link
Contributor

I update and refactor the whole samples.

Screen Shot 2020-06-19 at 5 21 39 AM

What I did?

  • Create Custom Container with Documentation
  • Update Sample to Azure Functions Host V3 based
  • Update Sample with Cardinality with Confluent Cloud
  • Wrote a QuickStart Documentation for each language
  • Implement Cardinality for Python binding library
  • Provide DevContainer environment for each language

Review Direction

Sorry guys, this PR becomes big. However, the change for each language is not that big.
Could you help me to review it for language experts?

Python for @Hazhzeng

Could you have a look at the change of

  • /binding-library/python
  • /samples/python

Java/TypeScript for @mhoeger

Could you have a look a the change of

  • /samples/javascript
  • /samples/typescript

Java for @amamounelsayed

  • /binding-library/python
  • /samples/java
  • /samples/container

Overview/Structure for @anirudhgarg

  • /samples/README.md
    You can find each samples.

TODO

  • Update Java binding library (Other repo)
  • Update Python binding library (Other repo)
  • PowerShell will come today (PowerShell doesn't use DevContainer. Customer is Windows-based)
  • Update README.md on the top page to add information on the language supports.
  • CI for validating language samples.

Hazhzeng
Hazhzeng previously approved these changes Jun 19, 2020
Copy link
Contributor

@Hazhzeng Hazhzeng left a comment

Choose a reason for hiding this comment

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

Nits to make the documentation better, otherwise LGTM :)

samples/python/KafkaTriggerMany/main.py Outdated Show resolved Hide resolved
samples/python/library/README.md Show resolved Hide resolved
* @param kafkaEventData
* @param context
*/
// @FunctionName("KafkaTrigger-Java")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mind remove the comments? Are e waiting for the java library to be deployed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have two functions KafkaTrigger-Java and KafkaTrigger-Java-Many The first one is a sample for accessing local clusters with Cardinality.ONE. The second one is a sample for accessing Confluent Cloud with Cardinality.MANY. For the other samples, I comment out the second one, since a lot of getting started customers don't have a Confluence Cloud. So I keep a sample for local Kafka Cluster and comment out the sample for Confluence Cloud. This sample is for Docker, It aims to deploy to the Function App. That means it can't access the local cluster. So I comment out the local cluster sample and enable the Confluent Cloud sample. Should I remove the local cluster sample instead?

context.getLogger().info(message);
}
}
// @FunctionName("KafkaTrigger-Java-Many")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we comment it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have three sample functions. KafkaOutput, Kafka-Trigger-Java, and Kafka-Trigger-Java-Many. The Kafka-Trigger-Java-Many is the sample for Cardinality.MANY and Confluent Cloud. So not many client don't have the Confluent Cloud account. Instead, for the others, it accesses to the local cluster that the DevContainer automatically starts.
That is why I comment on the Kafka-Trigger-Java-Many not to throw an error if the customer doesn't configure Confluent Cloud settings, but I wanted to provide some complex use-case samples.

"topic": "%KafkaTopic%",
"brokerList": "%KafkaBroker%",
"consumerGroup": "%KafkaConsumerGroup%",
"topic": "users",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we return the %% values?

      "topic": "test_topic",
      "brokerList": "localhost:9092",
      "consumerGroup" : "default"
      "topic": "users",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add %% values?

samples/README.md Outdated Show resolved Hide resolved
samples/README.md Outdated Show resolved Hide resolved
samples/README.md Outdated Show resolved Hide resolved
samples/README.md Outdated Show resolved Hide resolved
samples/README.md Outdated Show resolved Hide resolved
samples/README.md Outdated Show resolved Hide resolved
Copy link
Member

@anirudhgarg anirudhgarg left a comment

Choose a reason for hiding this comment

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

Have suggested some text changes to the Samples/Readme.cmd

Copy link

@mhoeger mhoeger left a comment

Choose a reason for hiding this comment

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

Some comments, mostly nit-picking comments! Thanks!

binding-library/java/Readme.md Outdated Show resolved Hide resolved
samples/javascript/README.md Show resolved Hide resolved
samples/javascript/README.md Outdated Show resolved Hide resolved
samples/javascript/README.md Outdated Show resolved Hide resolved
samples/javascript/README.md Outdated Show resolved Hide resolved
samples/javascript/README.md Show resolved Hide resolved
samples/javascript/README.md Outdated Show resolved Hide resolved
samples/javascript/UsersTriggerMany/index.js Outdated Show resolved Hide resolved
samples/typescript/kafka-trigger/README.md Show resolved Hide resolved
samples/typescript/kafka-trigger/README.md Outdated Show resolved Hide resolved
@ghost ghost removed the Needs: author feedback label Jun 24, 2020
@TsuyoshiUshio
Copy link
Contributor Author

If this PR has been merged, I'll merge this PR. The PR for change on the azure-functions-python-library repo.
Azure/azure-functions-python-library#62

@TsuyoshiUshio TsuyoshiUshio requested review from anirudhgarg and removed request for anirudhgarg June 26, 2020 23:19
@TsuyoshiUshio TsuyoshiUshio dismissed anirudhgarg’s stale review June 26, 2020 23:26

I already fix all of the point of him

@TsuyoshiUshio TsuyoshiUshio merged commit 1a7cb25 into dev Jun 27, 2020
@TsuyoshiUshio TsuyoshiUshio deleted the tsushi/pythoncardinality branch August 28, 2020 03:20
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.

None yet

5 participants