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

DO NOT MERGE - SMOKE TEST #2004

Closed
wants to merge 1 commit into from
Closed

Conversation

andrueastman
Copy link
Member

@andrueastman andrueastman commented Jul 6, 2023

This pull request was automatically created by Azure Pipelines. Important Check for unexpected deletions or changes in this PR.

Microsoft Reviewers: Open in CodeFlow

@andrueastman andrueastman requested a review from a team as a code owner July 6, 2023 20:39
@baywet baywet changed the title Generated models and request builders DO NOT MERGE - SMOKE TEST Jul 6, 2023
@baywet
Copy link
Member

baywet commented Jul 6, 2023

@andrueastman I triggered that generation for sanity to make sure the few last minute changes in kiota didn't have unanticipated side effect.
This is based of that version microsoft/kiota#2864
It's the end of my work day anyway, I'm going to pause to avoid making mistakes in hurry.
There are a bunch of additions but besides that those two things look suspicious to me and I'd like your opinion on the following changes:

Enum options now get their value escaped when they didn't. I think we should trigger a generation for Go for sanity and double check we don't get unwanted values escaped.

 namespace Microsoft.Graph.Models {
     public enum ExternalEmailOtpState {
         [EnumMember(Value = "default")]
-        Default,
+        @Default,

The following models are removed, to me it looks like they are not used anywhere and they got rightfully trimmed, but I'd like a confirmation:

  • src/Microsoft.Graph/Generated/Models/IdentityGovernance/TimeBasedAttributeTrigger.cs
  • src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTriggerTimeBasedAttribute.cs

@andrueastman
Copy link
Member Author

Enum options now get their value escaped when they didn't. I think we should trigger a generation for Go for sanity and double check we don't get unwanted values escaped.

The enum renaming really is a regression after u CodeEnumOption to derive from CodeElement which was handled diferently ealier because of this. I've authored microsoft/kiota#2874 as I don't think we want to have name replacements when we don't really need to have them. I don't think this affects other languages as they do not pass exclusions for these types in the refiners.

The following models are removed, to me it looks like they are not used anywhere and they got rightfully trimmed, but I'd like a confirmation:

I'm not too sure about theses getting rightfully trimmed. The real reasons is that the discriminator for the WorkflowExecutionTrigger.cs is getting trimmed. Which I'm not sure if it should as I think it should remain in chain as the type will lose downcasting capability(especially since its technically abstract in the metadata)

@@ -40,11 +40,7 @@ public class WorkflowExecutionTrigger : IAdditionalDataHolder, IBackedModel, IPa
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static WorkflowExecutionTrigger CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue();
return mappingValue switch {
"#microsoft.graph.identityGovernance.timeBasedAttributeTrigger" => new TimeBasedAttributeTrigger(),
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing this mapping causes the dropping of the two types. cc @baywet

Copy link
Member

Choose a reason for hiding this comment

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

The only reference to that type is in triggerAndScopeBasedConditions, which is not directly referenced but derives from workflowExecutionConditions.

There's no way of directly accessing WorkflowExecutionTrigger and I'd in fact argue that this type itself should have been trimmed too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to confirm here. What were are saying is that since this is a derived type of a property from a derived type of another property, we would classify that as being to far off to be included?

Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing that if you get a workflowBase, for which the executionConditions property value is in fact a triggerAndScopeBasedConditions (derived from the declared type) of which the trigger property is in fact a timeBasedAttributeTrigger (derived from the declared type) you'd need it. Which makes this a breaking change.

I'm guessing this is cause by that change (no condition previously), I'm just worried that removing the condition would end up pulling too many types.
https://github.com/microsoft/kiota/blob/06e9deac11c68ff683ddb3f57504e7f655094829/src/Kiota.Builder/KiotaBuilder.cs#L1763

Let me look into it further

@baywet
Copy link
Member

baywet commented Jul 7, 2023

starting a new generation.

@baywet baywet closed this Jul 7, 2023
@baywet baywet deleted the kiota/v1.0/pipelinebuild/119455 branch July 7, 2023 21:04
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.

2 participants