Skip to content

Container Repository samples issues #19010

Description

Section link1:
image

Reason1:
for tag in tags[3:]:
TypeError: 'ItemPaged' object is not subscriptable.

Suggestion1:
Update to:

for tag in client.list_tag_properties(repository, order_by=TagOrder.LAST_UPDATE_TIME_DESCENDING):
    tag_count += 1
    if tag_count > 3:
        client.delete_tag(repository, tag.name)   

Suggestion2:
Add code:

if __name__ == "__main__":
    sample = DeleteOperations()
    sample.delete_old_tags()   

Section link:
image

Suggestion:
Add await before sample.delete_old_tags().

Jon Gallant (@jongio) for notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.needs-team-triageWorkflow: This issue needs the team to triage.test-manual-pass

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions