-
Notifications
You must be signed in to change notification settings - Fork 198
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
Allow persisting CORS for ACA deployments (applies to .NET Aspire) #4325
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to end up with like 50 of these 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully we will have the AppHost producing the
ACA definition
soon and get rid of all of these.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the alpha feature should be something like: "give us the paths of keys that you want preserved" instead of adding a switch per property? That would be a little more generalized and would at least force folks to think about the underlying container app object we are building.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not as familiar with many of the Aspire use cases - but why do we need to explicitly call out parts of the configuration vs taking the snapshot of the current version, then layer the yaml manifest config to form the final container app spec to update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taking snapshot of the current version is not part of the flow, @wbreza
Currently, azd is only taking this snapshot when requested by the user by turning any of alpha features ON.
We could move into
always get the current ACA and overlay with YAML
, but we are already working on moving from YAML to BICEP. And long term, this is expected to be replaced 100% by the AppHost. I don't think we should invest into a more solid approach than what we have because it would be destined to be removedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getContainerApp is not part of deployment. We call it only if we want to persist something:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm not fully understanding the use case. Why wouldn't we persist all of the configuration data that was set during the app provisioning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we're doing here is ignoring IaC as the source-of-truth to allow users to overcome a current bottleneck in the current design (i.e., ACA resource definition not being full representable at the AppHost layer):
I agree with @ellismg, I think this would be most flexible. Can we make a
config.json
property for a.JSONPath
to ignore?We would just need better docs to show how to do all these things. Alternatively, we could still make the alpha feature trigger such a thing underneath, but it'd perhaps make the code churn easier?
The other thing we could do is move this all the way up to AppHost:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing more context here @weikanglim. I'm just not convinced that ignoring IaC as the source of truth is the right choice here.
I'm all for users experimenting with configuration in the Azure Portal, but if the user wants to keep those changes they should go back and make the appropriate tweaks in their IaC / or manifest, etc.
Is the root cause here that the current AppHost layer does not support all the knobs required to set/persist these types of settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case it wasn't clear from the previous message -- yes, this is a point-in-time thing. I would assume that Aspire will eventually surface these knobs, but it requires modeling it at the AppHost layer, which I could imagine takes time. We are going to solve a similar problem in upcoming azd composability work.