Skip to content

[LogicApp] Update LA SDK version #8452

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

Merged
merged 5 commits into from
Feb 5, 2019

Conversation

refortie
Copy link
Contributor

@refortie refortie commented Jan 30, 2019

Description

Updating the referenced SDK to 4.1.0 and updating the necessary files based on changes in the SDK

Checklist

@maddieclayton
Copy link
Contributor

@refortie You'll need to add the updated recorded files because of the API version bump.

@refortie
Copy link
Contributor Author

refortie commented Jan 30, 2019

@maddieclayton Yeah. I'm getting an One or more errors occurred. (AADSTS50012: Invalid client secret is provided. when trying to re-record them. I've never seen this before and was attempting to find out if this local to my machine only or not

EDIT: Totally was, expired test credentials

@refortie
Copy link
Contributor Author

@maddieclayton I got this issue when using the old recorded session when trying to do new recording

Message: System.MissingMethodException : Method not found: 'Void Newtonsoft.Json.JsonSerializerSettings.set_TypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.

Is this a known thing or something specific to my machine? I've been recording tests for the last couple of months and never had this come up

@maddieclayton
Copy link
Contributor

@refortie If you pulled from master recently, this is a known issue. The fix is in this PR: #8448 which has been approved and will be merged as soon as it passes CI. In the meantime (which should be maximum of one hour) you can use this work around:

Single test
dotnet test {path_to_solution}\{solution_name}.sln --filter DisplayName={test_namespace}.{test_class}.{test_name} --framework netcoreapp2.0

All tests in a class
dotnet test {path_to_solution}\{solution_name}.sln --filter ClassName={test_namespace}.{test_class} --framework netcoreapp2.0

All check-in tests in a solution
dotnet test {path_to_solution}\{solution_name}.sln --filter AcceptanceType=CheckIn&RunType!=DesktopOnly --framework netcoreapp2.0

All tests in a solution
dotnet test {path_to_solution}\{solution_name}.sln --framework netcoreapp2.0

You will need to set the connection string by hand, so it might be worth waiting the one hour for the PR to get merged, then pulling from upstream.

@maddieclayton
Copy link
Contributor

Update: Fix has been merged, please pull using "git pull upstream master" and you should no longer see this issue.

@refortie refortie force-pushed the update-la-sdk-version branch from 9e401fb to 595acbe Compare January 31, 2019 21:43
@maddieclayton
Copy link
Contributor

@refortie Can you explain why you need to many changes to the tests? If there are no breaking changes in the SDK, why are entire sections of the tests rewritten (and new harded coded values added, which makes the test very hard to rerecord)?

@refortie
Copy link
Contributor Author

refortie commented Feb 1, 2019

For the chunks that I had to modify:

  • New-AzResource doesn't appear to be a command we can call anymore, so any tests that used that needed to be modified. I would have preferred to remove it in a different PR, but it didn't seem worth the effort to modify the tests just to strip them out once this is merged. As a parallel, all the tests that used New-AzResource were to either provision an App Service plan, which isn't how we do Logic Apps anymore and haven't for a couple years I think. The other was to create a data plane artifact which was causing us to break fundamentals because we weren't documenting it, every time we recorded tests. No customer was ever supposed to manually create it, it is a byproduct of other processes, and I think was only exposed, so that we could run these tests and access will be blocked at some point.
    • EDIT: For the data plane artifact, they are exposed only through a GET command, so not hard coding them is difficult without doing a lot of work.
  • It seems like when whoever changed over the file paths to use Join-Path that they missed a number of them (or didn't realize that you needed to do both pieces of the folder structure)
  • I also had to change a couple of spots where I think you had made resources (like a keyvault), I don't have access to your resources and so I couldn't record new versions without providing my own. Also, those resources probably should live in our sub anyway.

@maddieclayton
Copy link
Contributor

@refortie The comments above make sense. Only extra comment that I have is that you should add comments above the hardcoded value stating how to properly set up your subscription to rerecord these tests.

@refortie
Copy link
Contributor Author

refortie commented Feb 1, 2019

For the tests that take special work to set up the state properly: would you like those instructions inline/in file or in an external file (like perhaps in the documentation folder)? There are quite a few steps to recreate it and it might be a long in file comment

@maddieclayton
Copy link
Contributor

@refortie An external file sounds perfect - please put this new file in the ScenarioTests folder and link to it inline in the ps1 file.

@vladimir-shcherbakov
Copy link
Contributor

@refortie Ping on the comments above.

@refortie refortie force-pushed the update-la-sdk-version branch from 47537be to 35dbff9 Compare February 5, 2019 18:45
@refortie
Copy link
Contributor Author

refortie commented Feb 5, 2019

Added the readme file

@refortie refortie assigned maddieclayton and unassigned refortie Feb 5, 2019
@refortie refortie force-pushed the update-la-sdk-version branch from 35dbff9 to 11e8705 Compare February 5, 2019 19:03
@maddieclayton maddieclayton removed their assignment Feb 5, 2019
@maddieclayton maddieclayton merged commit 999423f into Azure:master Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants