Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Promoting a previously deleted test with the same name #48

Open
mmanashirov opened this issue Dec 9, 2019 · 5 comments
Open

Promoting a previously deleted test with the same name #48

mmanashirov opened this issue Dec 9, 2019 · 5 comments

Comments

@mmanashirov
Copy link

We've identified an issue where it's not possible to promote a test once it's been deleted. We believe the issue is here https://github.com/indeedeng/proctor-webapp-library/blob/master/src/main/java/com/indeed/proctor/common/ProctorPromoter.java#L118 where it's finding the last commit for that test even though it was a "Deleting A/B test" message in the git log. We could try to contribute a fix but it seems that this repo has now been integrated with the main proctor repo and there does not appear to be any new releases of that project since 2018. Any recommendations?

@aboivineau
Copy link
Collaborator

Hi! Thanks for raising. Is my understanding correct that the issue you have identified is in the indeedeng/proctor-webapp-library repo ?
https://github.com/indeedeng/proctor-webapp-library has been archived, and moved into https://github.com/indeedeng/proctor where it is currently being maintained. That's where contributions can be made.

Additionally if you are able to share more details on a repro for "not possible to promote a test once it's been deleted", we will definitely take a look at it.

@mmanashirov
Copy link
Author

mmanashirov commented Dec 11, 2019

That's correct. I'd love to try it out in the new location but as I mentioned in the OP there does not appear to be any tagged releases. When I clone and follow the instructions on the master branch I get the following error when trying to start the app:

ERROR [localhost-startStop-1][2019-12-11 15:11:36,350] [org.springframework.web.context.ContextLoader.initWebApplicationContext] - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'matrixChecker' defined in URL [jar:file:/Users/mmanashirov/Downloads/proctor/target/tomcat.8080/webapps/expanded/WEB-INF/lib/proctor-webapp-library-9999-SNAPSHOT.jar!/com/indeed/proctor/webapp/jobs/MatrixChecker.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'proctorSpecificationSource' defined in class path resource [com/indeed/proctor/webapp/spring/applicationContext.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'int' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

To reproduce the issue (in the archived version) you simply create a new test, promote to qa and production, delete the test from all 3, then recreate and repromote. When you try to promote it will fail because that test name is represented in the git history (albeit with a 'Deleting' commit message) so it tries to update the existing test (which doesn't exist) instead of creating it.

It's possible this issue is fixed now because looking at the code in master it's using TestDefinitionUtil.getResolvedLastVersion which is new and might handle it correctly. Would love to confirm but can't run due to error above.

@KaiqiJinWow
Copy link

That's correct. I'd love to try it out in the new location but as I mentioned in the OP there does not appear to be any tagged releases. When I clone and follow the instructions on the master branch I get the following error when trying to start the app:

ERROR [localhost-startStop-1][2019-12-11 15:11:36,350] [org.springframework.web.context.ContextLoader.initWebApplicationContext] - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'matrixChecker' defined in URL [jar:file:/Users/mmanashirov/Downloads/proctor/target/tomcat.8080/webapps/expanded/WEB-INF/lib/proctor-webapp-library-9999-SNAPSHOT.jar!/com/indeed/proctor/webapp/jobs/MatrixChecker.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'proctorSpecificationSource' defined in class path resource [com/indeed/proctor/webapp/spring/applicationContext.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'int' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

To reproduce the issue (in the archived version) you simply create a new test, promote to qa and production, delete the test from all 3, then recreate and repromote. When you try to promote it will fail because that test name is represented in the git history (albeit with a 'Deleting' commit message) so it tries to update the existing test (which doesn't exist) instead of creating it.

It's possible this issue is fixed now because looking at the code in master it's using TestDefinitionUtil.getResolvedLastVersion which is new and might handle it correctly. Would love to confirm but can't run due to error above.

same problem! Did you solve it?

@mmanashirov
Copy link
Author

same problem! Did you solve it?

Not the spring error when starting the app but I was able to work around the issue of recreating the test by doing it outside the proctor webapp. Far from ideal but I just recreated it manually and pushed to the git repo myself.

@aboivineau
Copy link
Collaborator

Hi there! The issue with tagged releases and this repo lagging several commits behind has been solved. One fix it brings is for the spring error mentioned above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants