-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
WIP: Add support to migrate from gogs #7181
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7181 +/- ##
==========================================
- Coverage 41.25% 41.13% -0.13%
==========================================
Files 542 543 +1
Lines 69708 69879 +171
==========================================
- Hits 28758 28744 -14
- Misses 37269 37454 +185
Partials 3681 3681
Continue to review full report at Codecov.
|
Can we do this without having to add gogs-client to every install of gitea? |
If we want to support migration from gogs, I think it's difficult except we rewrite a sdk for gogs. |
func TestGogsDownloadRepo(t *testing.T) { | ||
downloader := NewGogsDownloader("https://try.gogs.io", "c109b3c905eb57951cfdea270cfcfdc297a74500", "", "lunnytest", "TESTREPO") | ||
repo, err := downloader.GetRepoInfo() | ||
assert.NoError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if try.gogs.io is down, or your repo gets remove...will all builds then fail? I know we already rely on github and other sites being available for building but maybe for these type of migration test it can skip them if the URL doesn't respond properly right away. Even now try.gogs.io is very slow for me and times out on some pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, Internet-dependent tests should ideally not run during regular test runs, but only when explicitely triggered e.g. make test-internet
or similar. Could maybe add to release tasks to run those.
"testing" | ||
"time" | ||
|
||
"code.gitea.io/gitea/modules/migrations/base" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix import
df629f1
to
aab6edf
Compare
@lunny I think we should still have the test, it just shouldn't fail if try.gogs.io is down which would break Gitea CI. Maybe we can just try to ping/reach that site before running the test and skip/pass the test if it isn't available. A best way would be to caputre timeout in the actual migration code and if the error is a timeout error not fail the test. Another simple way is to have a check in the test file:
That should make sure that try.gogs.io is up and that your rest repo is still there. Also now we can use |
@mrsdizzie OK. I will add test back. |
64afd75
to
1989861
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
1989861
to
efcf78d
Compare
pleace resolve confilcts |
Why has this feature not been merged yet? It has been waiting for more than a year. |
@Cat7373 the simple answer is nobody had time to finaly finish it |
replaced by #14342 |
get excited. |
As title