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

preheat image supports authentication and parse multi manifest mediatype #2819

Merged

Conversation

Panlq
Copy link
Contributor

@Panlq Panlq commented Oct 21, 2023

Description

  1. support preheat images from private registry correctly
  2. parse multi-mediatype manifest
  3. support specific platforms for manifest list

Related Issue

#769

Motivation and Context

Supports direct preheating of private registry images

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@Panlq Panlq requested a review from a team as a code owner October 21, 2023 10:32
@gaius-qi
Copy link
Member

@Panlq Please fix lint.

@Panlq
Copy link
Contributor Author

Panlq commented Oct 26, 2023

@Panlq Please fix lint.
https://github.com/dragonflyoss/Dragonfly2/actions/runs/6601592490/job/18066447978
It seems that the execution of the lint timeout. I have fixed the lint during the first action execution.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #2819 (eaf60e9) into main (2515c13) will decrease coverage by 0.53%.
Report is 5 commits behind head on main.
The diff coverage is 65.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2819      +/-   ##
==========================================
- Coverage   52.08%   51.55%   -0.53%     
==========================================
  Files         157      162       +5     
  Lines       21364    21851     +487     
==========================================
+ Hits        11127    11265     +138     
- Misses       9590     9921     +331     
- Partials      647      665      +18     
Flag Coverage Δ
Object-compatibility-e2etests ?
e2etests ?
unittests 51.55% <65.78%> (-0.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
manager/job/types.go 30.76% <30.76%> (ø)
manager/job/preheat.go 43.15% <72.52%> (ø)
manager/job/image_auth_client.go 63.95% <63.95%> (ø)

... and 3 files with indirect coverage changes

@Panlq Panlq force-pushed the opt/support-multi-manifest-mediatype branch from 38b1ffc to 0ac9180 Compare October 26, 2023 10:53
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Panlq
Copy link
Contributor Author

Panlq commented Nov 1, 2023

@Panlq Please add E2E testing in https://github.com/dragonflyoss/Dragonfly2/blob/main/test/e2e/manager/preheat.go.

Changes in new features are compatible with the original e2e test content!so there is no need to add anything else?
This PR only affects the image type and does not affect the file type preheating tasks.
I have added unit tests for the image type:
https://github.com/dragonflyoss/Dragonfly2/pull/2819/files#diff-081c3a63e6dd230c53072d96260e02bab12cb187c4d75b018c2c0052652a951a

@gaius-qi
Copy link
Member

gaius-qi commented Nov 2, 2023

@Panlq Please add E2E testing in https://github.com/dragonflyoss/Dragonfly2/blob/main/test/e2e/manager/preheat.go.

Changes in new features are compatible with the original e2e test content!so there is no need to add anything else? This PR only affects the image type and does not affect the file type preheating tasks. I have added unit tests for the image type: https://github.com/dragonflyoss/Dragonfly2/pull/2819/files#diff-081c3a63e6dd230c53072d96260e02bab12cb187c4d75b018c2c0052652a951a

@Panlq Unit testing and E2E testing are two different things. Please add E2E testing in https://github.com/dragonflyoss/Dragonfly2/blob/main/test/e2e/manager/preheat.go and resolved conflicting.

@Panlq Panlq force-pushed the opt/support-multi-manifest-mediatype branch from b47e979 to 68cbb95 Compare November 2, 2023 09:31
@Panlq
Copy link
Contributor Author

Panlq commented Nov 3, 2023

I know, what I want to express is that the original e2e has already involved image type testing, and is also compatible with new code.

I am familiar with the existing e2e use cases and add the scenario of specifying platform parameters. The auth(account and password) cannot be written in them

@gaius-qi
Copy link
Member

gaius-qi commented Nov 3, 2023

I know, what I want to express is that the original e2e has already involved image type testing, and is also compatible with new code.

I am familiar with the existing e2e use cases and add the scenario of specifying platform parameters. The auth(account and password) cannot be written in them

You can send me the image, and I will upload it to dragonfly's group in docker hub for E2E testing. I think you should need to add multi-platform E2E test cases.

@gaius-qi
Copy link
Member

gaius-qi commented Nov 3, 2023

I know, what I want to express is that the original e2e has already involved image type testing, and is also compatible with new code.

I am familiar with the existing e2e use cases and add the scenario of specifying platform parameters. The auth(account and password) cannot be written in them

@Panlq
First you can send me the image and version, and I will upload it to dragonfly's group in docker hub for E2E testing. I think you should need to add multi-platform E2E test cases.

@Panlq
Copy link
Contributor Author

Panlq commented Nov 3, 2023

I know, what I want to express is that the original e2e has already involved image type testing, and is also compatible with new code.
I am familiar with the existing e2e use cases and add the scenario of specifying platform parameters. The auth(account and password) cannot be written in them

@Panlq First you can send me the image and version, and I will upload it to dragonfly's group in docker hub for E2E testing. I think you should need to add multi-platform E2E test cases.

ok, I think I can use busybox:latest (amd64/arm64) to write e2e use cases

@gaius-qi
Copy link
Member

gaius-qi commented Nov 3, 2023

I know, what I want to express is that the original e2e has already involved image type testing, and is also compatible with new code.
I am familiar with the existing e2e use cases and add the scenario of specifying platform parameters. The auth(account and password) cannot be written in them

@Panlq First you can send me the image and version, and I will upload it to dragonfly's group in docker hub for E2E testing. I think you should need to add multi-platform E2E test cases.

ok, I think I can use busybox:latest (amd64/arm64) to write e2e use cases

You can use dragonflyoss/scheduler:v2.1.0(amd64/arm64) to write e2e use cases.

@Panlq
Copy link
Contributor Author

Panlq commented Nov 3, 2023

ok, I have added the e2e test case, please re-execute ci! @gaius-qi

Signed-off-by: jonpan <[email protected]>
@Panlq Panlq force-pushed the opt/support-multi-manifest-mediatype branch from cefaf71 to 44e9ec3 Compare November 6, 2023 04:49
@Panlq Panlq force-pushed the opt/support-multi-manifest-mediatype branch from 44e9ec3 to eaf60e9 Compare November 7, 2023 09:58
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit 58f1370 into dragonflyoss:main Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants