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

Fix get_images method in DockerHubApi to handle new Docker Hub API format #244

Closed
Skazza94 opened this issue Sep 28, 2023 · 0 comments
Closed

Comments

@Skazza94
Copy link
Member

Currently, the get_images method of the DockerHubApi in our codebase filters repositories in the kathara Docker Hub by checking if the repository_type key in the API response is equal to image.

Docker Hub has made changes to its API response structure, specifically in the way repository types are represented. The new API response format includes a repository_type key with a value of null for new images. Instead, the relevant information about the repository type has been moved to the content_types array within the response.

To adapt to these changes, we plan to make the following adjustment to the get_images method of the DockerHubApi:

  • Modify the method to filter repositories based on the content_types key in the API response rather than the repository_type key.

By implementing this change, our code will be compatible with both the old and new Docker Hub API response formats, ensuring that we can retrieve images correctly.

Impact:

  • This change will allow the get_images method to work seamlessly with the new Docker Hub API response format.
  • Compatibility with older API response formats will be maintained.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant