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

Add host.json for sync trigger payload #7386

Merged
merged 17 commits into from
May 21, 2021
Merged

Add host.json for sync trigger payload #7386

merged 17 commits into from
May 21, 2021

Conversation

TsuyoshiUshio
Copy link
Contributor

Under the Kubernetes Environment, We need to host.json payload for SyncTrigger scenario for transforming Durable Functions and LogicApp scenario.

I currently testing this branch not finished, so that I make it Draft, However, this change should requires discussion with us. I just simply add the host.json payload on the current sync trigger payload.

CC @pragnagopa , @ahmelsayed

Issue describing the changes in this PR

resolves #7288 #7382

Pull request checklist

  • My changes do not require documentation changes
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

cgillum
cgillum previously approved these changes May 19, 2021
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

This looks good to me, but let's also get a sign-off from @mathewc

@cgillum cgillum requested a review from mathewc May 19, 2021 23:35
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
// Add host.json to the payload
if (_environment.IsKubernetesManagedHosting())
{
result.Add("host.json", GetHostJson());
Copy link
Member

Choose a reason for hiding this comment

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

See the comment I left in the previous iteration. Looks like a revision you posted blew the comment away.

Copy link
Member

Choose a reason for hiding this comment

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

Let's not make this Kubernetes specific, since part of our larger goal is to address #7288. Instead, I think we should add just the host.json "extensions" section here, and below if we revert to minimal format based on size, we redefine the minimal format as { triggers: [], extensions: {} } ensuring this data is present in that case as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @mathewc
Done.
Could you have a look?

Copy link
Member

Choose a reason for hiding this comment

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

Looks good. I just had one more comment that I added on removing the unnecessary log statement. They we can get this checked in after you add a test for the scenario - I believe you're in the process of adding one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @mathewc
I tested E2E, so that code is good for now, I'm planning add unit testing for it.
Do we need E2E testing as well? If so I'd happy to do that.

Copy link
Member

Choose a reason for hiding this comment

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

For the scope of the changes here unit test is enough! Thanks!

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 added an Unit Test. Looks good?

Copy link
Member

Choose a reason for hiding this comment

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

I don’t see updates to unit tests. Missed a commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @pragnagopa
Sorry, I missed. Now added.

@TsuyoshiUshio
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TsuyoshiUshio TsuyoshiUshio marked this pull request as ready for review May 20, 2021 19:04
@TsuyoshiUshio
Copy link
Contributor Author

Hi @mathewc
I made change as you requested. Thank you for the quick response and great review!

@TsuyoshiUshio
Copy link
Contributor Author

TsuyoshiUshio commented May 20, 2021

I'm testing this PR E2E once it finished, I'll share it.

@pragnagopa pragnagopa merged commit 6cef580 into dev May 21, 2021
@pragnagopa pragnagopa deleted the tsushi/addhostjson branch May 21, 2021 04:38

namespace Microsoft.Azure.WebJobs.Script.Tests.Managment
{
public class FunctionsSyncManagerTests
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add a new file for this test - we already have an existing test suite here

.

In the upcoming PR, let's fix this. Also, the test doesn't really test the feature/changes you added - ensuring that the actual sync triggers payload contains the expected content.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @mathewc - captured notes here: #7394

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.

Adding Durable storageProvider.type to SyncTriggers payload
5 participants