-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Bug] Conflicts between the new bot and the web hooks? #33
Comments
I'll have a look closer when I get to work, the hook could have been missed? I'm not sure I'm fully understanding what you're saying. None of the code has changed compared to the old hooks, but we are using a much newer version of Perl. |
The hook definitely fired, there's a commit with the new file. But that file is missing from the master branch. It looks like the merge commit deleted it? I don't understand what happened either. |
Same thing just happened to KSP-CKAN/NetKAN#7392. New .ckan file: However, that's showing a specific commit, and if you use the branch dropdown to switch to master, https://github.com/KSP-CKAN/CKAN-meta/blob/master/CrewLight/CrewLight-1.19.1.ckan @linuxgurugamer, FYI, some things may be a bit broken at the moment, and changes made by your PRs may not be reflected immediately in CKAN as they were before. We're looking into it, but hopefully it should only be a delay of a few hours as I expect the normal bot process to pick up the same changes... |
I don't know that this is a new problem and part of my reasoning for the rewrite. If the indexer blows up now, it bails out and ECS restarts it. On restart it's a new container and pulls everything down, picking up where it left off.
I'm not entirely sure how it got in this state, but I don't think it's worth investing any time in figuring it out. We'd be better off investing in #15 and it's not something we have to do all at once, as we can route different paths to different containers using nginx. Personally I think starting with Spacedocks existing endpoint is probably a good place. It's very simple and will get the process fleshed out. I'm talking like for like here, we can add a new endpoint pretty easily after. Anyway, I'm going to close this. It's an edge case thing and having to fix it manually will motivate me to learn flask! |
A few more examples of this in the recent log. You can tell where each commit came from because the Perl code puts an extra set of quote marks around the commit message. In each case, the extra-quotes commit from Perl comes first, followed by a merge commit that does nothing, and later the new bot creates a real commit: https://github.com/KSP-CKAN/CKAN-meta/commits/master AntennaHelper: CEDA-AeronautisDivision: |
It doesn't appear to be an edge case, it appears to affect every instance of the web hook. |
Hrm. It isn't affecting the end result. But it's like the new indexer isn't seeing the new file, committing it, and it is designed to be the source of the truth, so any conflicts it'll win. Now the indexer is supposed to pull on every batch (using the context manager), but maybe that's not happening? But on commit it definitely happens and then wins. The only immediate danger is extra commits, it's not breaking consistency. So I'll take a look after work. |
So. I know why this is occurring This is what a regular git clone config looks like:
This is what ours looks like
So our local master isn't tracking to origin, so the pull doesn't pull anything. I'm honestly very close to setting it on fire and just calling a subprocess to get this blasted thing to clone properly. It really shouldn't be this hard to initialise a repo. |
Hmm, I notice that |
I'm wondering if the config was a read herring or not, as the repo tracking appears to be the same and the config is definitely now correct. [core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = [email protected]:KSP-CKAN/CKAN-meta.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master #36 is still an issue and hasn't updated since the new bot was started. I'm not 100% convinced the pull from origin is doing what it is supposed to be doing. |
Yeah, it's really bizarre. Do you know where these merge commits are coming from? They should not be necessary since it's just pulling on a clean working dir, committing to master, and then pushing again; there's no need to merge anything in that flow, yet apparently it's doing it: Maybe we should try it without |
Hmm, that's only the pull and should only trigger if there is conflict. We've been using that strategy for as long as I can remember. I think we need to do some testing, it's pretty easy, so it should be easy enough to replicate. That class can be pulled into ipython to do commits and updates using the same methods. So it should be relatively straight forward to figure out, I just need to set aside some time to do it (still in catch up mode) |
https://git-scm.com/docs/git-pull
!!!!! That's exactly what's happening! The Indexer is discarding everything the other trees (web hooks, download counter) did in its merge commits!
NetKAN-Infra/netkan/netkan/indexer.py Line 100 in e5735d3
No, we used |
This is also blocking manual changes to @DasSkelett tried to delete this file: https://github.com/KSP-CKAN/CKAN-meta/blob/master/Decalc-o-mania/Decalc-o-mania-1.2.ckan ... in this commit: However, the bot brought it back thirteen minutes later in a merge commit, and there it remains. The reason that the Indexer seems to always "win" these conflicts is that it pulls and pushes once per group of 10 modules while it's running. The old bot did one big push at the end (if I'm not mistaken). This change is fine in principle, but at the moment it means that we have a nuisance process reverting everyone else's changes every few minutes during certain periods. |
Yeah, the old bot did one at the end of the run, unless there was a staged commit. This bot aimed to get committed data out the door as soon as it was available. This bug however was quite problematic! |
This file was just generated in response to KSP-CKAN/NetKAN#7391 :
https://github.com/KSP-CKAN/CKAN-meta/blob/bcc0624e44f4cc1aa7344ab05fd81a83d172fe5f/CommunityDeltaVMaps/CommunityDeltaVMaps-v2.6.0.ckan
However, it's not in the master HEAD folder:
https://github.com/KSP-CKAN/CKAN-meta/tree/master/CommunityDeltaVMaps
At first I thought this might be a glitch with GitHub, but if I refresh the CKAN GUI, the new module doesn't show up, so it looks like a real issue.
The text was updated successfully, but these errors were encountered: