Skip to content
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

Set up Azure pipelines for gensim #2819

Closed
mpenkov opened this issue May 1, 2020 · 34 comments · Fixed by #2824
Closed

Set up Azure pipelines for gensim #2819

mpenkov opened this issue May 1, 2020 · 34 comments · Fixed by #2824
Labels
housekeeping internal tasks and processes

Comments

@mpenkov
Copy link
Collaborator

mpenkov commented May 1, 2020

@piskvorky basic config is ready menshikh-iv#2, waiting when you activate azure for gensim (please make sure than pipeline runs in separate PR, after that I'll continue)

Originally posted by @menshikh-iv in #2814 (comment)

@mpenkov mpenkov added the housekeeping internal tasks and processes label May 1, 2020
@piskvorky
Copy link
Owner

piskvorky commented May 3, 2020

I tried setting up Azure Pipelines and got as far as here:

Screenshot (2)

Do I understand correctly the app wants read+write access to all my repos, including private ones? If so, that's a show stopper – at least for OAuth from my own piskvorky account.

I thought Azure Pipelines could be enabled for selected repos only.

@piskvorky
Copy link
Owner

piskvorky commented May 3, 2020

I think I figured it out. Instead of logging in to Azure Pipelines website and then creating a Pipeline from there (= OAuth above = no go), I went to the Github marketplace and installed Azure Pipeline app from there. Instructions.

That allowed me to select which Github repositories I want. I selected all our open source repos.

@menshikh-iv Azure Pipelines is now active, I added both you and Misha as admins. I have no idea what you mean by (please make sure than pipeline runs in separate PR, after that I'll continue).

@menshikh-iv
Copy link
Contributor

@piskvorky azure pipelines aren't really active, see #2823 (no azure job spawned)

by please make sure than pipeline runs in separate PR, after that I'll continue I mean that you test it first (run any random build from gensim repository), so, please, fix that and make sure than my PR trigger azure build, after I'll continue.

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

If I understand correctly you want me to:

  1. create a new github branch and add that azure yml file to it
  2. create a new azure pipeline at https://dev.azure.com/rare-technologies/gensim-ci by selecting that github branch
  3. ?do something about your PR?

I should get to it tonight. You and Misha are admins, so feel free to add the pipeline yourself if you like.

@menshikh-iv
Copy link
Contributor

I want that you make my PR trigger azure pipeline (no need to create new one, just edit my PR)
I have no access to https://dev.azure.com/rare-technologies/gensim-ci, only you have an access.

@menshikh-iv
Copy link
Contributor

UPD: something wired with microsoft auth system & permissions, let me dig in ...

@piskvorky
Copy link
Owner

That's weird. This is how it's set up:

azureadmin

@menshikh-iv
Copy link
Contributor

I can open your link only If I don't log in (and have no settings controls)

@menshikh-iv
Copy link
Contributor

menshikh-iv commented May 4, 2020

image
Looks like you should add us to organization @piskvorky (I have empty organization list)

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

I already added you to the org – otherwise I couldn't have added you to the project:

Screen Shot 2020-05-04 at 10 40 44

Did you receive an email with the invite? Maybe in spam?

@menshikh-iv
Copy link
Contributor

@piskvorky no emails (even in spam), still no access :(

@piskvorky
Copy link
Owner

Hm. I'll try to see if there's any help/support in Azure DevOps.

@menshikh-iv
Copy link
Contributor

NLP <3

image

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

LOL you should know better than to expect much from "NLP chatbots".

Here: https://developercommunity.visualstudio.com/content/problem/1016416/users-added-but-have-no-access.html

@menshikh-iv
Copy link
Contributor

menshikh-iv commented May 4, 2020

@piskvorky I'm digging into the documentation and have an idea: can you try to fully delete us from azure and add though GitHub usernames (instead of emails)?

Note:

@piskvorky
Copy link
Owner

OK. The Azure support team responded, I'll try that first.

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

Note:

That's what I did before. I re-did it again now – did you receive an email from AzureDevOps@microsoft.com now?

@mpenkov how about you? Did you receive anything?

@menshikh-iv
Copy link
Contributor

No, I changed subscription setting in profile to "get all emails", can you try to resend?

@piskvorky
Copy link
Owner

@menshikh-iv Invite resent:

Screen Shot 2020-05-04 at 14 09 59

@menshikh-iv
Copy link
Contributor

@piskvorky got them, I have an access

@piskvorky
Copy link
Owner

Good. Because adding Github usernames (instead of emails) is not possible. I tried and adding a new user requires their email.

@menshikh-iv
Copy link
Contributor

@piskvorky still can't run build: looks like lack of permissions to RaRe organization, can you create default python pipeline thought https://dev.azure.com/rare-technologies/gensim-ci/_build yourself?

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

Unfortunately not; it's asking for those crazy OAuth permissions on piskvorky again.

What Azure permissions do you need? You should have the same as me (admin) = full access.

@menshikh-iv
Copy link
Contributor

What permissions do you need?

No idea, I'm getting the same OAuth (without options) as you

@menshikh-iv
Copy link
Contributor

PAT tokens maybe https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml ? This shouldn't be such crazy as oauth

@piskvorky
Copy link
Owner

piskvorky commented May 4, 2020

I made you an admin for https://github.com/RaRe-Technologies/gensim, as well as admin for https://dev.azure.com/rare-technologies/gensim-ci. I don't see any higher permissions than that.

@menshikh-iv
Copy link
Contributor

image

No idea what's wrong here =/

@menshikh-iv
Copy link
Contributor

@menshikh-iv
Copy link
Contributor

Finally, it running

image

@menshikh-iv
Copy link
Contributor

So, travis & azure have around 1m difference in the building, no more "slowdown" from appveyor :)

image
image

Possible next step - make a similar replacement in gensim-wheels

@gojomo
Copy link
Collaborator

gojomo commented May 11, 2020

I think a side-effect of this switchover is causing me major git headaches on both Ubuntu & MacOS. I suspect especially this git config change:

93385d3#diff-fc723d30b02a4cca7a534518111c1a66

I'm getting lots of spurious indications that files are modified in ways that git can't reverse in the usual ways, blocking usual operations – and possibly even mangling of the contents of binary files. They're easy to reproduce even in a fresh, vanilla clone. I've posted more details on SO in the hopes of getting some git expert advice or a canonical fix:

https://stackoverflow.com/questions/61720528/simple-git-clone-mangles-many-files-with-phantom-un-resettable-modified-state

Even if this can be worked-around with some local git config change by every dev, it seems something to fix in the repo if at all possible.

Separately, can these new Windows-only Azure builds be listed after the faster/more-central CircleCI/Travis builds? (They don't seem to show as much info, while in progress, as the others.)

This was referenced May 11, 2020
@gojomo
Copy link
Collaborator

gojomo commented May 11, 2020

The 1st comment response at SO suggests the .gitattributes set up to help this Azure process is overbroad, and may inadvertently modify non-text files: https://stackoverflow.com/questions/61720528/simple-git-clone-mangles-many-files-with-phantom-un-resettable-modified-state?noredirect=1#comment109174230_61720528

On the good chance that deleting this file is a step towards a solution, I've started #2836 to do that. Cloning that branch (git clone -b del-gitattributes-text-eol-lf git@github.com:gojomo/gensim.git) yields a usable working-directory without the problem.

@piskvorky
Copy link
Owner

… yields a usable working-directory without the problem

Are the files already mangled, or is it safe to continue from such branch?

@gojomo
Copy link
Collaborator

gojomo commented May 11, 2020

… yields a usable working-directory without the problem

Are the files already mangled, or is it safe to continue from such branch?

In the clone from the branch-without-.gitattributes, I believe they're unchanged. The phantom-change indication seems to be a warning of imminent automatic rewriting on next commit.

Indeed, take a look at PR #2837 - it's what happens if one of the 'modified' files is committed. It's definitely been changed in the repo at that point. However, while preparing the commit (at the add step, git gave its error:

warning: CRLF will be replaced by LF in docs/notebooks/index.
The file will have its original line endings in your working directory.

And indeed, the local file hasn't changed - it's sha1sum is the same as before, and the same as a 'raw' download from the changed-years-ago PNG from github:

$ sha1sum jupyter_home.png 
4832400ee0650c5140ce1261c57106d9fdd1df05  jupyter_home.png

Given this observation, if any files have been corrupted, I'd expect it to be in something that was committed from after the .gitattributes was put in place. So far in develop that's only CHANGELOG.md, which could likely survive any temporary CR/LF strangeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping internal tasks and processes
Projects
None yet
4 participants