-
Notifications
You must be signed in to change notification settings - Fork 28
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
Deleting used build config results in non-editable webhook #242
Comments
I suspect the same will happen when editing a webhook via the REST api (which is how it works on a project edit page) |
I have a fix that looks like it works. I need to get the coverage up on this code, but will try to push later today or tomorrow. |
BTW, I found another bug. Copying a project that contains webhooks with specific builds configured does not update those WebHooks with the new buildType ids in the new project. |
So it looks like copying a project fires off the If a project is new, then it won't have webhooks configured. However, if it has some configured AND any webhook specifically references a Since I have the old edit: Name might not be unique in a project, so using |
it's the gift that keeps on giving :wry-smile: |
New commit pushed. It will build soon. No coverage improvements yet, but now has support for deleted builds. |
Finally got a chance to do some testing on this... On first try I got a 404 trying to edit the webhook, which I couldn't repro, which was annoying. I cleared out the logs (to get rid of the noise), then restarted the server, then tried again, noting down what I did as I went:
I think 14 is related to the 10 second delay (if that's still in there), but not sure what's the go with 16. I reckon we're at "usable", but there's still some gremlins in there. |
I found another event that might help. With regards to 16, I have not written that part yet. The last couple of weeks have been crazy busy. |
I know that feeling all too well :) |
I've pushed an update with the following changes:
The algorithm for remapping is fairly brittle. It assumes the following:
In code, the unit test looks like this... assertTrue(WebHookSettingsManagerImpl.fuzzyNameMatcher("Project1", "Project1_Build01", "Project02", "Project02_Build01"));
assertTrue(WebHookSettingsManagerImpl.fuzzyNameMatcher("project1", "Project1_Build01", "Project02", "Project02_Build01"));
assertTrue(WebHookSettingsManagerImpl.fuzzyNameMatcher("Project1", "Project1Build01", "Project02", "Project02Build01")); I have done zero testing on the legacy Rest API. My main TeamCity VM is off at the moment. I have only tested on my developer workstation, which has a newer TeamCity installed. |
The build has run. oooh, it's build 500. Exciting. |
I forgot to say that the logs look like this...
|
Checking... This branch includes the fixes for #238 as well, yeah? |
Yes, it's supposed to, unless I have introduced a regression |
Just checking in to see if you have any questions on this. Or need any help testing it. |
Sorry for the delay - finally found some time to test it out - cant fault it. (The only thing I did notice was that if you set up 2 build configs, filter to 1 of them, then delete the one you have, it stays in the config. UI still all works though - just ignores it.) |
Thank you so much for your time. I really appreciate it. If you edit the webhook after the build is deleted, does it exclude that BT id when writing the webhook config? I suspect it does. As long as editing works, I'm not too concerned about the delete use case, just in case it is undeleted again. |
Yep, it removes it from the config when you hit sav. Also realised that before you hit edit, the UI shows the correct
Hah! I'm doing the easy part. You're doing the hard work here. |
Sounds good to me! |
It's just really motivating to have someone engaged and interested in the outcome of a piece of work. I appreciate that. |
Expected Behavior
A webhook configured to point to deleted build config should be able to be loaded.
Current Behavior
We get an error
Steps to Reproduce (for bugs)
Project1
BuildConfigA
andBuildConfigB
Project1
, that only triggers onBuildConfigB
project-config.xml
shows that the id is stored in thebuild-types
BuildConfigB
/admin/admin.html?item=tcWebHooks
)n
WebHooks configured in this TeamCity Server" linkEdit project Webhooks
forProject1
edit
for the webhook created in step 3-> get failure popup
An unexpected error occured. Please see your browser's javascript console.
Console log has:
with an stack trace of:
Your Environment
The text was updated successfully, but these errors were encountered: