with the switch over to a generic approach for repo synchronization, the hook pift listens to for information about when a push has occurred is being deprecated in favor of a newer, better one with a nicer API. we're looking to deploy these changes on d.o presently, but we'll need to deploy this as well in order to not break the testing infra, i think? (i don't know how important this integration is to pift).

the patch here isn't really complicated - it really just requires a bit of an adjustment to the new datastructure. i'm working on a patch.

Comments

sdboyer’s picture

Status: Active » Needs review
StatusFileSize
new1.8 KB

ok, patch is attached. this should have exactly the same results as before. unfortunately, i have no environment in which i know how to test that with any degree of certainty.

note that i didn't remove the old hook implementation as a precaution, but that's pretty easily done.

sdboyer’s picture

Priority: Normal » Major
rfay’s picture

@sdboyer++, thanks for the patch and the work on this.

Could you inform us about the deployment timeframe, so we can plan accordingly?

sdboyer’s picture

you bet, thanks for making this a priority. we're looking at the next 24-48 hours. is that doable?

jthorson’s picture

I'm assuming this is a major release upgrade for versioncontrol_git ... am I correct?

And if so, do we want this to be a major on the PIFT side of things as well? I don't believe anyone else is actively using PIFT; but this is a bit of a major change in operation. (Thoughts, Randy?)

rfay’s picture

I don't believe PIFT is used anywhere else. @boombatower would know.

Since the patch works with either the old or the new hook, there's nothing to force us to do a major version upgrade, unless we want to lose the old hook.

jthorson’s picture

Yeah, I was assuming we would need to swap hooks ... but if the new hook replaces the old one in versioncontrol_git, then we should be fine keeping both.

Patch is going to need some cleanup though ... it's still referencing the '$refs' variable which was part of the original function declaration. I'm digging into it now.

rfay’s picture

@sdboyer, the problem with the old hook was that there wasn't any reasonable way to test. Do you have any suggestions for the present? How can we validate the patch here with an experiential test?

jthorson’s picture

StatusFileSize
new1.89 KB

Updated patch. Removed array_keys($refs) and replaced with $branch_names.

Committed to 6.x-2.x (commit e73db34).

jthorson’s picture

Status: Needs review » Fixed

Patch rolled into PIFT release 6.x-2.8.

As long as the infra team can guarantee that only one of the two hooks (hook_vcs_git_refs_updated and hook_vcs_event_arrival()) will be in operation at any given time, then this should be safe for update/deployment on drupal.org.

As rfay mentioned above, we have no way of validating this patch in our dev environments. I don't foresee any issues, but be aware that this is going in blind.

eliza411’s picture

Thanks for the prompt response on this!

I'm not sure what services are required for testing. @rfay: Could the old gitdev server (now git6site) do for testing?

I'm happy to work this into the test routine that sdboyer and I have going if it's feasible and I know what's required.

jthorson’s picture

I believe that, for testing, we would need a d.o staging site linked to a git site through which we could trigger the commit hooks ... and some way to enable and disable this linkage on demand. We wouldn't really want to queue every commit, especially if linked to a staging site being used for git development as well.

That said, we've done without this capability to date; and while it would be a great thing to pursue in the future, I wouldn't position it as a pre-requisite in this particular case.

rfay’s picture

A test script to invoke the hook with reasonable and understood parameters would be a decent workaround.

If this gets tested in *some* context before deployment, I'm ok with it. Or if we're just really ready to back it out :-)

Please make sure we're completely aware of when deployment happens so we can monitor the results.

sdboyer’s picture

Status: Fixed » Needs review

reiterating @eliza411 in #11, now that we've got our git vms relatively stable, i'm more than happy to look at further improving the manner in which they replicate the full stack of infra. testing is clearly an important component of that in general, but made more so by that fact that it's so closely tied to code & code changes.

note that we now have pretty extensive test cases in simpletest for different possible push permutations. not sure if we could hook into those in any way for y'all...but they're there. (i'm pretty sure there's a yo dawg in there, somewhere).

if someone could ping me about doing some manner of test, per #13, that'd be great.

jthorson’s picture

Deployed PIFT 6.x-2.8 tonight, to see if that might be part of why the Drupal HEAD branch test has not run since July 2nd.

Of course, other project branch tests *have* run since then, so this may not be related.

sdboyer/eliza411: Has the hook_versioncontrol_git_refs_updated() swap actually happened yet?

sdboyer’s picture

yeah, i forgot to include this in the deployment. sorry. i believe this is fixed now though, yes?

jthorson’s picture

Looks like some contrib projects are queuing, but haven't seen a commit-initiated core test request come through yet.

jthorson’s picture

Looks like I missed the last step on the deploy ... should be deployed now, and ready for a verification test.

marvil07’s picture

I guess the problem is the wrong name in the hook implementation, here a patch against mainline.

PS: I am running to document the hook on vcs api :-p

rfay’s picture

I guess we should just deploy it then?

But what about a simple little watchdog at the top that says what's going on? IMO it's critical. SOME kind of instrumentation. It would also (if we include the contents passed in) give us a way to create a testing utility.

sdboyer’s picture

*facepalms*

marvil07 is totally right, i wrote up the wrong hook name. sorry :(

rfay’s picture

Status: Needs review » Fixed

OK, now 6.x-2.9 is deployed with #19

Automatically closed -- issue fixed for 2 weeks with no activity.