Skip to content
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

Add update self hosted settings mutation #559

Merged
merged 20 commits into from
May 22, 2024

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented May 13, 2024

Purpose/Motivation

This PR closes codecov/engineering-team#1473. We want to move our REST endpoints to GQL. This change creates a mutation and adds an additional resolver that will be consumed in gazebo in useSelfHostedSettings and AutoActivateMembers (we are currently making a GET and PATCH REST call).

A follow up PR will be made in gazebo to migrate the endpoints.

After that, we will delete the old REST code, once we confirm that it is no longer in use.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.86%. Comparing base (e1af712) to head (99c3b08).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #559     +/-   ##
=======================================
+ Coverage   95.84   95.86   +0.02     
=======================================
  Files        779     782      +3     
  Lines      17320   17370     +50     
=======================================
+ Hits       16601   16651     +50     
  Misses       719     719             
Flag Coverage Δ
unit 91.40% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.40% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link

codecov-notifications bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.40%. Comparing base (e1af712) to head (99c3b08).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
+ Coverage   91.37%   91.40%   +0.02%     
==========================================
  Files         601      604       +3     
  Lines       16002    16052      +50     
==========================================
+ Hits        14622    14672      +50     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.40% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.40% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov-public-qa bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.40%. Comparing base (e1af712) to head (99c3b08).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
+ Coverage   91.37%   91.40%   +0.02%     
==========================================
  Files         601      604       +3     
  Lines       16002    16052      +50     
==========================================
+ Hits        14622    14672      +50     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.40% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.40% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...s/owner/interactors/update_self_hosted_settings.py 100.00% <100.00%> (ø)
codecov_auth/commands/owner/owner.py 100.00% <100.00%> (ø)
graphql_api/types/config/config.py 100.00% <100.00%> (ø)
graphql_api/types/mutation/__init__.py 100.00% <100.00%> (ø)
graphql_api/types/mutation/mutation.py 100.00% <100.00%> (ø)
...s/mutation/update_self_hosted_settings/__init__.py 100.00% <100.00%> (ø)
...elf_hosted_settings/update_self_hosted_settings.py 100.00% <100.00%> (ø)

Impacted file tree graph

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title [draft] Add self hosted settings gql type [draft] Add update self hosted settings mutation May 14, 2024
@rohitvinnakota-codecov rohitvinnakota-codecov changed the title [draft] Add update self hosted settings mutation Add update self hosted settings mutation May 14, 2024
@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review May 14, 2024 20:58
@rohitvinnakota-codecov rohitvinnakota-codecov requested a review from a team as a code owner May 14, 2024 20:58
Copy link

@barnett-yuxiang barnett-yuxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@codecov codecov deleted a comment from barnett-yuxiang May 22, 2024

if not settings.IS_ENTERPRISE:
raise ValidationError(
"enable_autoactivation and disable_autoactivation are only available in self-hosted environments"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: enable_auto_activation vs. enable_autoactivation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see it either way, but because we're camelcasing the input on AutoActivate, it seems more consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are what the methods are called in self_hosted.py

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooo okay makes sense

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small comment, otherwise lgtm

@rohitvinnakota-codecov rohitvinnakota-codecov added this pull request to the merge queue May 22, 2024
Merged via the queue into main with commit ad629f2 May 22, 2024
21 of 22 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/migrate-self-hosted-settings branch May 22, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gazebo] Update /settings references to GQL
3 participants