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

Revert "Avoid setting --port twice for Azure Functions (#7683)" #7726

Closed
wants to merge 1 commit into from

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Feb 21, 2025

This reverts commit 97d5c1c.

Change is no longer neccessary with #7711

Confirmation that double args aren't shown:

image

From Azure Functions EndToEnd sample.

@JamesNK JamesNK added the area-integrations Issues pertaining to Aspire Integrations packages label Feb 21, 2025

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/Aspire.Hosting.Azure.Functions/AzureFunctionsProjectResourceExtensions.cs:120

  • There is an inconsistency between the publish mode check here and the one in the removed block that uses 'builder.ApplicationBuilder.ExecutionContext'. Consider revisiting which property should be used to ensure consistent behavior.
if (builder.ExecutionContext.IsPublishMode)

tests/Aspire.Hosting.Azure.Tests/AzureFunctionsTests.cs:53

  • The test now expects a null TargetPort rather than a specific port value; please verify that this change correctly reflects the intended behavior of the port-mapping logic.
Assert.Null(endpointAnnotation.TargetPort);
@danmoseley danmoseley enabled auto-merge (squash) February 21, 2025 00:29
@JamesNK
Copy link
Member Author

JamesNK commented Feb 21, 2025

Note: This change isn't in release/9.1. No need to backport this PR.

@eerhardt
Copy link
Member

Are we sure we should be reverting this change? From @captainsafia on #7653 (comment)

Hmmm...I see. I think the change on the Functions side is still valid since we shouldn't be populating args at all if we don't need to.

@JamesNK JamesNK disabled auto-merge February 21, 2025 00:45
@JamesNK
Copy link
Member Author

JamesNK commented Feb 21, 2025

There is no urgency is merging this. Will wait until David, Safia have commented.

@captainsafia
Copy link
Member

Let's not merge the revert. Although the DCP issue was the root cause, this was still exposing a place where we were setting the --port redundently.

It also happens that I need to move the WithArgs to the WithFunctionsHttpEndpoint for some launch profile-based processing for HTTPs so this is a code move that would've happened anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants