harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Make swagger download automatically select architecture

Open AaronDewes opened this issue 2 years ago • 10 comments

Comprehensive Summary of your change

This does not work for all architectures, but at least amd64 and arm64. I could also add a switch statement, but ARM64 seems to be the most important arch to implement right now (#3505).

Issue being fixed

Helps towards #3505

Please indicate you've done the following:

  • [x] Well Written Title and Summary of the PR
  • [x] 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.

AaronDewes avatar Jan 01 '24 21:01 AaronDewes

this command dpkg --print-architecture doesn't work in MacOSX

zyyw avatar Jan 02 '24 06:01 zyyw

Could you please contribute in the following repo to support Harbor in ARM:

  • https://github.com/goharbor/harbor-arm

Thanks

zyyw avatar Jan 02 '24 07:01 zyyw

this command dpkg --print-architecture doesn't work in MacOSX

The container is always a Linux container, isn't it?

And https://github.com/goharbor/harbor-arm seems unmaintained.

In my opinion, a second repo for arm is unnecessary considering how small the changes for arm64 support would need to be (This PR + another 10 line patch).

So please reopen or reconsider this PR.

AaronDewes avatar Jan 02 '24 17:01 AaronDewes

Codecov Report

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

Project coverage is 66.43%. Comparing base (b7b8847) to head (98ff607). Report is 376 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #19780      +/-   ##
==========================================
- Coverage   67.56%   66.43%   -1.14%     
==========================================
  Files         991     1048      +57     
  Lines      109181   116119    +6938     
  Branches     2719     2845     +126     
==========================================
+ Hits        73768    77142    +3374     
- Misses      31449    34595    +3146     
- Partials     3964     4382     +418     
Flag Coverage Δ
unittests 66.43% <ø> (-1.14%) :arrow_down:

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

see 597 files with indirect coverage changes

codecov[bot] avatar Jan 12 '24 10:01 codecov[bot]

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 Mar 19 '24 09:03 github-actions[bot]

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 May 19 '24 09:05 github-actions[bot]

@Vad1mo Any news on this?

AaronDewes avatar May 19 '24 09:05 AaronDewes

this command dpkg --print-architecture doesn't work in MacOSX

It is not intended to work on Mac, the command is executed in the container and guaranteed to be there. The only thing it does is selection the right CPU architecture. which in terms allows you to build images on your ARM pc/mac

I think it solves a problem and does not impact the current image build in any way.

Vad1mo avatar May 28 '24 20:05 Vad1mo

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 Jul 28 '24 09:07 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 Aug 27 '24 09:08 github-actions[bot]

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 Oct 28 '24 09:10 github-actions[bot]

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 Dec 29 '24 09:12 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 Jan 28 '25 09:01 github-actions[bot]

@Vad1mo that's quite outdated check here: https://github.com/goharbor/harbor/commit/b0545c05fd0a70c589f21cdce0bf4e0e60842ed8

OrlinVasilev avatar Jan 28 '25 11:01 OrlinVasilev

right we do now RUN go install github.com/go-swagger/go-swagger/cmd/swagger@$SWAGGER_VERSION

didn't see that, we can close it as resolved than.

Vad1mo avatar Jan 28 '25 12:01 Vad1mo