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

Exclude from latest flag is ignored #433

Open
tsvietOK opened this issue Jul 26, 2024 · 2 comments
Open

Exclude from latest flag is ignored #433

tsvietOK opened this issue Jul 26, 2024 · 2 comments

Comments

@tsvietOK
Copy link

tsvietOK commented Jul 26, 2024

Overview of the Issue

I am trying to build Azure image with a set flag shared_gallery_image_version_exclude_from_latest to "true". At the end of the build packer shows -> SIG image version exclude from latest : 'true', but the published image actually marked as latest:
image

Reproduction Steps

  1. Create json template
  2. To the builder add "shared_gallery_image_version_exclude_from_latest": "true"
  3. Run packer build
  4. At the end of the build make sure it contains line -> SIG image version exclude from latest : 'true'
  5. Check for image "Exclude from latest" parameter in Azure

Plugin and Packer version

Packer v1.11.0
Plugin v2.1.7

Simplified Packer Buildfile

File

Operating system and Environment details

Windows Server 2022 x64 (MicrosoftWindowsServer, WindowsServer, 2022-datacenter-g2)

Log Fragments and crash.log files

==> azure-arm.build image: Publishing to Shared Image Gallery ...
==> azure-arm.build image:  -> Source ID used for SIG publish        : '/subscriptions/...'
==> azure-arm.build image:  -> SIG publish resource group            : 'imagesRG'
==> azure-arm.build image:  -> SIG gallery name                      : 'gallery'
==> azure-arm.build image:  -> SIG image name                        : 'image-def-update'
==> azure-arm.build image:  -> SIG image version                     : '1.0.0'
==> azure-arm.build image:  -> SIG target regions                    : '[westeurope]'
==> azure-arm.build image:  -> SIG storage account type              : ''
==> azure-arm.build image:  -> SIG image version endoflife date      : ''
==> azure-arm.build image:  -> SIG image version exclude from latest : 'true'
==> azure-arm.build image:  -> Shared Gallery Image Version ID : '/subscriptions/...'
==> azure-arm.build image:
@tsvietOK tsvietOK added the bug label Jul 26, 2024
@JenGoldstrich
Copy link
Contributor

JenGoldstrich commented Aug 26, 2024

@tsvietOK I am having trouble reproducing this error, are you still experiencing this? The page you posted a screenshot of can be edited without making it clear that it's been modified, if you check on the Overview page on ACG, it shows the static element, can you confirm if you're still seeing this on images build? I wonder if there was a upstream Azure API issue that got resolved between when you opened the issue and today

Screenshot 2024-08-26 at 9 53 30 AM

@tsvietOK
Copy link
Author

Currently we use a workaround. We use az-cli to exclude published image version from the latest. I will try to check this issue again later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants