Skip to content

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Oct 23, 2024

Description

  • We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect.
  • Expose DockerfileBuildAnnotation to make this possible.
  • Added test and updated the playground with a docker file sample

Fixes #6439

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

- We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect.
- Expose DockerfileBuildAnnotation to make this possible.
- Added test and updated the playground with a docker file sample
@davidfowl davidfowl requested a review from mitchdenny October 23, 2024 01:51
@davidfowl
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Copy link
Contributor

@davidfowl backporting to release/9.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fixed AddDockerFile to work with compute customization - We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect. - Expose DockerfileBuildAnnotation to make this possible. - Added test and updated the playground with a docker file sample
Using index info to reconstruct a base tree...
M	playground/AzureContainerApps/AzureContainerApps.AppHost/Program.cs
M	src/Aspire.Hosting/PublicAPI.Unshipped.txt
M	tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs
Falling back to patching base and 3-way merge...
Auto-merging tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs
Auto-merging src/Aspire.Hosting/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Aspire.Hosting/PublicAPI.Unshipped.txt
Auto-merging playground/AzureContainerApps/AzureContainerApps.AppHost/Program.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fixed AddDockerFile to work with compute customization - We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect. - Expose DockerfileBuildAnnotation to make this possible. - Added test and updated the playground with a docker file sample
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@davidfowl an error occurred while backporting to release/9.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@davidfowl davidfowl enabled auto-merge (squash) October 23, 2024 04:50
@davidfowl davidfowl merged commit d0d94bd into main Oct 23, 2024
9 checks passed
@davidfowl davidfowl deleted the davidfowl/fix-docker-file-aca branch October 23, 2024 05:11
davidfowl added a commit that referenced this pull request Oct 23, 2024
- We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect.
- Expose DockerfileBuildAnnotation to make this possible.
- Added test and updated the playground with a docker file sample
davidfowl added a commit that referenced this pull request Oct 23, 2024
- We were not detecting containers with the build annotation and reading the image name from a parameter. Instead, it was using the runtime image name which is incorrect.
- Expose DockerfileBuildAnnotation to make this possible.
- Added test and updated the playground with a docker file sample
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2024
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PublishAsAzureContainer app doesn't set the right container image for AddDockerFile

3 participants