Skip to content

Conversation

@LoopedBard3
Copy link
Member

@LoopedBard3 LoopedBard3 commented Jan 3, 2023

This enables android mobile testing for Maui in the performance pipeline. This includes adding the scenarios for the Maui runs, adding some version passing capabilities, and a working queue for the runs. The first version of this is #2789, with some main branch specific changes made.

This also includes the updates made to dotnet.py to make getting the commit datetime more resilient, and changes to how _Version environment variables are saved such that they are added dynamically.

@LoopedBard3 LoopedBard3 added the enhancement New feature or request label Jan 3, 2023
@LoopedBard3 LoopedBard3 self-assigned this Jan 3, 2023
@LoopedBard3 LoopedBard3 force-pushed the AddMauiMobileTestingMain branch 28 times, most recently from 21a8c58 to 7b55f8f Compare January 5, 2023 23:26
@LoopedBard3 LoopedBard3 force-pushed the AddMauiMobileTestingMain branch 4 times, most recently from cdbe01f to 7c90323 Compare January 9, 2023 18:28
@LoopedBard3
Copy link
Member Author

@LoopedBard3 LoopedBard3 force-pushed the AddMauiMobileTestingMain branch from 5f8024f to f398728 Compare January 9, 2023 23:37
@LoopedBard3 LoopedBard3 marked this pull request as ready for review January 10, 2023 21:38
…ng).

Move maui android scenario yml template to the correct place. (Private runs)

specify that it is the dotnet packs we are removing from the correlation staging

Testing the passing of links for the dotnet version.

Add rollback file for installing the maui workload on .Net versions 8 and up, and update output dir functionality to work when it is not included.
@LoopedBard3 LoopedBard3 force-pushed the AddMauiMobileTestingMain branch from 0915880 to 0ef1134 Compare January 17, 2023 19:17
…and, and strip the getActivity output to fix error with the activity name.
@LoopedBard3
Copy link
Member Author

Copy link
Contributor

@cincuranet cincuranet left a comment

Choose a reason for hiding this comment

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

LGTM. Only minor observations, I'll leave that to your discretion.


setup_loggers(True)
precommands = PreCommands()
target_framework_wo_platform = precommands.framework.split('-')[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be, maybe, extracted and reused? Just in case we ever need to change the logic.

workload_install_args += ['--from-rollback-file', f'https://aka.ms/dotnet/maui/{target_framework_wo_platform}.json']

precommands.install_workload('maui', workload_install_args)
precommands.existing(projectdir='./dotnet-podcasts',projectfile='./src/Mobile/Microsoft.NetConf2021.Maui.csproj')
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Missing space before projectfile.


# Download what we need
with open ("MauiNuGet.config", "wb") as f:
f.write(requests.get(f'https://raw.githubusercontent.com/dotnet/maui/{target_framework_wo_platform}/NuGet.config', allow_redirects=True).content)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this could be "maui" helper as well...

Copy link
Member Author

Choose a reason for hiding this comment

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

Combined this with the target_framework_wo_platform line making a single install_versioned_maui method.


if __name__ == "__main__":
if __name__ == "__main__":
versionsreadjsonfilesaveenv(rf".\{PUBDIR}\versions.json")
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably better to follow "standard" naming conventions and use _ in the method name.

if "PERFLAB_INLAB" in os.environ and os.environ["PERFLAB_INLAB"] == "1":
os.remove(inputfile)

def GetVersionFromDllPowershell(dll_path: str):
Copy link
Contributor

Choose a reason for hiding this comment

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

Name should be Python-like. You probably had brain in PS mode. :)

{
build.AdditionalData["mauiVersion"] = environment.GetEnvironmentVariable("MAUI_VERSION");
}
foreach (DictionaryEntry entry in environment.GetEnvironmentVariables()){
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting.

…sc spacing, and consolidating reused maui methods into mauisharedpython. Also moved mauisharedpython from its own folder to the general shared folder since it was the only file in the maui specific shared folder.
@LoopedBard3 LoopedBard3 merged commit 5f0c813 into dotnet:main Jan 20, 2023
@LoopedBard3 LoopedBard3 deleted the AddMauiMobileTestingMain branch January 20, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants