Skip to content

Return an empty string when config digest is not available in the API

Adie (she/her) requested to merge 408863-do-not-fallback-to-config-blob into master

What does this MR do and why?

In #408863 (closed), it was noted that the API can return nil for the config_digest and when that happens we don't want the revision to fall back to the config blob which is the current behaviour now.

# we assign @revision from ContainerRepository:
# ...
# tag.revision = raw_tag['config_digest'].to_s.split(':')[1]
# ...

def revision
  @revision || config_blob&.revision
end

In this MR, to not fallback to config blob, we set @Revision to an empty string '' instead of nil and we also update the tests to account for that.

I added this fallback in the MR !132716 (diffs) but now learned that we don't want the fallback for revision if it really is not present 😊

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #408863 (closed)

Edited by Adie (she/her)

Merge request reports