-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(autofix): Properly check for existing installation and code mappings #71162
fix(autofix): Properly check for existing installation and code mappings #71162
Conversation
@@ -119,10 +114,6 @@ def get(self, request: Request, group: Group) -> Response: | |||
|
|||
return Response( | |||
{ | |||
"subprocessorConsent": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also went ahead and removed this part since we don't actually need it anymore, the genAIConsent
flag will be off in this instance and the settings page will alert you that configuration is necessary
return "integration_missing" | ||
|
||
if integration.status != ObjectStatus.ACTIVE: | ||
return "integration_inactive" | ||
code_mappings = get_sorted_code_mapping_configs(project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh didn't know this util existed, should be using it for how the other autofix endpoints gets the code mappings too. I'll make a quick refactor
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #71162 +/- ##
===========================================
+ Coverage 56.76% 77.88% +21.11%
===========================================
Files 6519 6528 +9
Lines 290530 290824 +294
Branches 50279 50329 +50
===========================================
+ Hits 164933 226515 +61582
+ Misses 120851 58067 -62784
- Partials 4746 6242 +1496
|
…ngs (#71162) While running through this, I found an issue with how the setup check is looking at the integration, so made a couple changes: 1. Pass `project` in to the integration check so we can find code mappings for that project and error if not there 2. Checks for the integration's installation instead of the organization integration, which I think is more correct 3. Stop checking for whether it is disabled since Autofix only really needs the code mappings
While running through this, I found an issue with how the setup check is looking at the integration, so made a couple changes:
project
in to the integration check so we can find code mappings for that project and error if not there