docs.ubports.com icon indicating copy to clipboard operation
docs.ubports.com copied to clipboard

move to gitlab

Open doniks opened this issue 1 year ago • 22 comments

The topic of moving to gitlab was just refloated in a telegram chat related to reviving the weblate setup.

I think we would (at least) need the following steps:

  • [x] clone https://github.com/ubports/docs.ubports.com/ into gitlab (@peat-psuwit )
  • [x] create new RTD project (incl translation subprojects, @doniks has rights)
  • [x] merge the existing translations into single .po files per language (@doniks #630)
  • [ ] set up new weblate (@Danfro has rights)
  • [ ] set up CI
  • [ ] verify everything works
  • [ ] setup/redirect dns of docs.ubports.com
  • [ ] archive/redirect github repo

doniks avatar Dec 15 '24 14:12 doniks

fyi, some pointers and notes from previous attempt here: https://github.com/ubports/docs.ubports.com/issues/479

doniks avatar Dec 15 '24 14:12 doniks

Relating the third point, mainly the .pot file needs to be merged into one file. Then weblate can be set up to use that as template and provide translations in one component.

The merging of existing .po files into one may save us all existing translated strings. Not sure about that, but I think weblate would try to import them when setting up the component.

Danfro avatar Dec 15 '24 19:12 Danfro

A possible typo in the last step. That should be "archive/redirect gitHUB repo, right?

But all in all I think your summary of the steps are good. :+1:

Danfro avatar Dec 15 '24 19:12 Danfro

Relating the third point, mainly the .pot file needs to be merged into one file

that merging is a manual step right? is it msgmerge? are you familiar with that? if so, would you be willing to do this merge? I'd suggest to do this whenever we're ready in the existing github

doniks avatar Dec 15 '24 19:12 doniks

A possible typo in the last step. That should be "archive/redirect gitHUB repo, right?

yes. thanks. fixed

doniks avatar Dec 15 '24 19:12 doniks

Relating the third point, mainly the .pot file needs to be merged into one file

that merging is a manual step right? is it msgmerge? are you familiar with that? if so, would you be willing to do this merge? I'd suggest to do this whenever we're ready in the existing github

To be honest, I have not done that before. Hopefully someone can tell us.

Danfro avatar Dec 15 '24 20:12 Danfro

Maybe moving to gitlab isn't such a good idea.

https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/views/notify/pipl_compliance_notification.html.haml

PIPL|Please be advised that GitLab can no longer service GitLab.com accounts for individuals and organizations located in Mainland China, Macao, and Hong Kong. Our system indicates that you are visiting GitLab from one of these locations. We advise you to sign up with JiHu %{jihu_link}. JiHu is an independent company with a localized GitLab offering that has an exclusive right to provide GitLab to individuals and organizations located in this region. You must complete the transition by %{deadline}, after which GitLab will delete your account from our systems. If you believe you are receiving this notification in error, please log in to GitLab.com from a supported service location. For further information or support, please feel free to contact [email protected].

kuailexs avatar Dec 25 '24 09:12 kuailexs

@kuailexs since we moved most of our infra already to gitlab, this is hardly to be avoided if we want to keep some consistency. UBports isn't China based, so no problem in general. Although I do understand that contributions will become difficult for Chinese people. But what are the alternatives? Looks like Github is having hard times in China as well...

Edit: I did not know that gitlab actually blocks Chinese users until you pointed that out. This will need to be discussed.

Danfro avatar Dec 25 '24 13:12 Danfro

It is not easy to use github, but it can be used, and the obstacle to using github is from China.

gitlab will disable Chinese accounts, and the obstacle to using gitlab comes from gitlab.

kuailexs avatar Dec 25 '24 14:12 kuailexs

One way to adjust to this could be to mirror from the mentioned site, but it will indeed make things harder

Fuseteam avatar Dec 25 '24 14:12 Fuseteam

It is not easy to use github, but it can be used, and the obstacle to using github is from China.

gitlab will disable Chinese accounts, and the obstacle to using gitlab comes from gitlab.

I suspect/guess the true reason for gitlab to disable Chinese accounts is China too. :smirk: They simply don't have the leverage Microsoft (github) has. Not that this helps us any further.

Danfro avatar Dec 25 '24 21:12 Danfro

Interesting... First time I hear about this. Here's a gitlab blogpost from 2021 about this https://about.gitlab.com/blog/2021/03/18/gitlab-licensed-technology-to-new-independent-chinese-company/ and an FAQ https://about.gitlab.com/pricing/faq-jihu/

doniks avatar Dec 26 '24 09:12 doniks

makes me wonder if we should have some sort of mirror to github. then when PRs are merged on this side we pull the changes into gitlab

i am thinking in this direction because @kuailexs was also going to be a maintainer of a device, so we do need a way to work with them going forward

Fuseteam avatar Dec 27 '24 13:12 Fuseteam

Maybe. But yeah, since this is not just a docs problem and not just a ubports problem, I'm wondering what other open source projects do here? I would hope there are some best practices we could copy

doniks avatar Dec 27 '24 15:12 doniks

Maybe there is something like dependabot (or whatever that is called) that can automatically pull commits from a github repo into gitlab?

--

Danfro avatar Dec 27 '24 16:12 Danfro

there are ways to push and pull automatically on gitlab, but we need to make sure the two are in sync before pulling from github, or we'll be dealing with potential merge conflicts

Fuseteam avatar Dec 27 '24 18:12 Fuseteam

I've searched a bit, but I cannot find any discussion of any other gitlab hosted project that mentions this challenge of Chinese contributions

doniks avatar Dec 27 '24 22:12 doniks

i have a feeling it is slipping under the radar :thinking:

Fuseteam avatar Dec 30 '24 13:12 Fuseteam

Well. We've had some discussions, but

  • This is not just a docs problem, but would affect all of UBports. So, there should be a wider discussion and if needed solutions for all of UBports. Also the details of this are still not clear
  • We want to un-stuck the docs repo, so we can move ahead with the harmonisation of UBports repos in the same place and fix docs weblate
  • @kuailexs maybe consider posting in the forum and give as much detail about this topic of contributor access from China

doniks avatar Jan 02 '25 10:01 doniks

We'll migrate https://github.com/ubports/docs.ubports.com to gitlab tomorrow. Subsequently we'll update the plumbing around it to serve docs.ubports.com from this new repo

doniks avatar Jan 02 '25 11:01 doniks

could we use the docs as a first test? perhaps if we can work out a gitlab/github mirror structure for docs we could work out a solution for the rest :thinking:

Fuseteam avatar Jan 02 '25 12:01 Fuseteam

so repo migration is done: https://gitlab.com/ubports/docs/docs.ubports.com let me continue this issue also over there: https://gitlab.com/ubports/docs/docs.ubports.com/-/issues/628

doniks avatar Jan 03 '25 19:01 doniks