Skip to content

Removed NETSTANDARD2_0 IFDefs and added Brackets #451

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 6 commits into from
May 29, 2020

Conversation

KyleJFischer
Copy link
Contributor

Removed NETSTANDARD2_) IfDefs to allow later versions of .net to be able to use the external execution feature.

Also added { because it won't let me build if I didn't fix them. Can remove them if we want it the old way.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KyleJFischer
To complete the pull request process, please assign krabhishek8260
You can assign the PR to them by writing /assign @krabhishek8260 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 22, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @KyleJFischer!

It looks like this is your first PR to kubernetes-client/csharp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/csharp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 22, 2020
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 22, 2020
@k8s-ci-robot k8s-ci-robot removed the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 22, 2020
@KyleJFischer
Copy link
Contributor Author

@k8s-ci-robot /check-cla

@KyleJFischer
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@KyleJFischer: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@KyleJFischer
Copy link
Contributor Author

/check-cla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 22, 2020
@KyleJFischer
Copy link
Contributor Author

/assign @krabhishek8260

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 22, 2020
@KyleJFischer
Copy link
Contributor Author

Sorry about all the extra commits, first time contributing. Let me know if there is anything else you need me to change!

@@ -411,7 +407,6 @@ public static string RenewAzureToken(string tenantId, string clientId, string ap
throw new KubeConfigException("Refresh not supported.");
}

#if NETSTANDARD2_0
Copy link

Choose a reason for hiding this comment

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

Not sure what impact this will have in terms for backwards compatibility.
Will this cause any harm if this block of code runs for non .Net core clients?

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'll try running some more testing on this in a bit. If others could test different setups as well, that would probably be the most ideal.

@tg123
Copy link
Member

tg123 commented May 26, 2020

I think it is OK to remove this build condition.

add in #359
ping @talboren for more info

@ghost
Copy link

ghost commented May 27, 2020

I think it is OK to remove this build condition.

add in #359
ping @talboren for more info

At the time I had several problems with these tests that required the preprocessor directives, not quite sure what will be the impact of removing these but it seems that build passes.

@tg123 you mentioned before that you're working on migrating the codebase to .netstandard2.0, how's that going? anything we can help with?

btw, not sure it has something to do with this specific pull request but @KyleJFischer please bare in mind the following issue: #396 (although I haven't suffered from the problems mentioned in there)

if (config.EnvironmentVariables != null)
{
foreach (var configEnvironmentVariableKey in config.EnvironmentVariables.Keys)
{
process.StartInfo.Environment.Add(key: configEnvironmentVariableKey,
process.StartInfo.EnvironmentVariables.Add(key: configEnvironmentVariableKey,
Copy link
Member

Choose a reason for hiding this comment

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

I checked the doc
EnvironmentVariables === Environment

just curious why this was changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you are asking why I changed it, I had read above the target .net framework for this client was 4.5.2 which unfortunately doesn't have the Environment. However, EnvironmentVariables does exist in 4.5.2 and is in the latest preview of .net 5. Source

If you are asking why it changed in general, well, I can't help you there :)

Hopefully that clears up any confusion.

@tg123
Copy link
Member

tg123 commented May 27, 2020

/LGTM

already moved to netstandard2
thanks @talboren

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2020
@NasAmin
Copy link

NasAmin commented May 28, 2020

Is there anything else specific this PR is waiting on? I'd really appreciate if it can be merged please.
@KyleJFischer I have tried your PR changes locally to pull deployments and namespaces from multiple clusters on .NET Core 3.1 project. It works perfectly.

@brendandburns brendandburns merged commit 187ec8f into kubernetes-client:master May 29, 2020
@brendandburns
Copy link
Contributor

/approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants