flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.47k stars 584 forks source link

reimplement functions in go-mouff-update, use ghreposervice #5470

Closed novahow closed 2 months ago

novahow commented 3 months ago

Tracking issue

closes #5372

Why are the changes needed?

flytectl upgrade is not working after monorepo integration

What changes were proposed in this pull request?

Cloned the code from the original external package https://github.com/mouuff/go-rocket-update/blob/v1.5.4/pkg/provider/provider_github.go , and made modifications to fit our needs

How was this patch tested?

make test_unit

Setup process

Screenshots

Check all the applicable boxes

Related PRs

Docs link

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 21.97802% with 71 lines in your changes missing coverage. Please review.

Project coverage is 60.54%. Comparing base (5b0d787) to head (da3a344). Report is 1 commits behind head on master.

Files Patch % Lines
flytectl/pkg/github/provider.go 20.22% 68 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5470 +/- ## ========================================== - Coverage 60.97% 60.54% -0.44% ========================================== Files 794 718 -76 Lines 51488 47678 -3810 ========================================== - Hits 31397 28866 -2531 + Misses 17199 16086 -1113 + Partials 2892 2726 -166 ``` | [Flag](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | Coverage Δ | | |---|---|---| | [unittests-datacatalog](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `69.31% <ø> (ø)` | | | [unittests-flyteadmin](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `58.69% <ø> (ø)` | | | [unittests-flytecopilot](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `17.79% <ø> (ø)` | | | [unittests-flytectl](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `67.41% <21.97%> (-0.63%)` | :arrow_down: | | [unittests-flyteidl](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `79.04% <ø> (ø)` | | | [unittests-flyteplugins](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `61.85% <ø> (ø)` | | | [unittests-flytepropeller](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `57.29% <ø> (ø)` | | | [unittests-flytestdlib](https://app.codecov.io/gh/flyteorg/flyte/pull/5470/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

eapolinario commented 3 months ago

Thanks for your PR. Can you fix the lint errors?

novahow commented 3 months ago

Do we really have to provide real implementations of all these functions in provider.go?

Also, can you add a few unit tests?

Currently I haven't came up with a way to better utilize the original provider, since embedding the original provider didn't seem feasible

eapolinario commented 2 months ago

Some tests in version_test.go were not calling TearDown (basically another instance of https://github.com/flyteorg/flyte/issues/5325). Fixed in https://github.com/flyteorg/flyte/pull/5470/commits/da3a344f4978028d9a6b6d0a5a2cff9a4d9bb013.