harbor icon indicating copy to clipboard operation
harbor copied to clipboard

specify the gen_apis image architecture

Open kycheng opened this issue 1 year ago • 3 comments

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Fix the problem encountered by M1 when executing make gen-apis.

Issue being fixed

Fixes #17016

Please indicate you've done the following:

  • [x] Well Written Title and Summary of the PR
  • [ ] Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • [x] Accepted the DCO. Commits without the DCO will delay acceptance.
  • [x] Made sure tests are passing and test coverage is added if needed.
  • [x] Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

kycheng avatar Dec 08 '23 08:12 kycheng

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.54%. Comparing base (f65d238) to head (7b374cf). Report is 213 commits behind head on main.

:exclamation: Current head 7b374cf differs from pull request most recent head a7100e4. Consider uploading reports for the commit a7100e4 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #19688      +/-   ##
==========================================
+ Coverage   67.42%   67.54%   +0.11%     
==========================================
  Files         993      991       -2     
  Lines      108981   109175     +194     
  Branches     2752     2719      -33     
==========================================
+ Hits        73484    73739     +255     
+ Misses      31541    31467      -74     
- Partials     3956     3969      +13     
Flag Coverage Δ
unittests 67.54% <ø> (+0.11%) :arrow_up:

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

see 59 files with indirect coverage changes

codecov[bot] avatar Dec 08 '23 21:12 codecov[bot]

It only works for amd64, how about what a user requires is not amd64 platform, such as arm?

The spectral file we downloaded does not work well on the ARM architecture.

https://github.com/goharbor/harbor/blob/2532ffe5a8114824a01adff6459d417d5b865313/tools/swagger/Dockerfile#L5C42-L5C157

https://github.com/goharbor/harbor/blob/2532ffe5a8114824a01adff6459d417d5b865313/tools/swagger/Dockerfile#L5C42-L5C157

gen_apis uses the same architecture build image when generating apis documents locally, so it can also work under the arm architecture.

A better approach may be to upgrade spectrum and select the executable file of the corresponding architecture when downloading spectrum.

https://github.com/stoplightio/spectral/releases/tag/v6.11.0

I alone cannot evaluate whether it is possible to upgrade directly.

kycheng avatar Dec 13 '23 06:12 kycheng

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

github-actions[bot] avatar Feb 11 '24 09:02 github-actions[bot]

This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main.

github-actions[bot] avatar Mar 12 '24 09:03 github-actions[bot]