harbor
harbor copied to clipboard
specify the gen_apis image architecture
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.
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
@@ 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.
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.
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.
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.