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 an isATSConfigured field to the repository GQL type #321

Merged
merged 8 commits into from
Dec 29, 2023

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Dec 27, 2023

Purpose/Motivation

Adds a new gql field on a repo level to check if ATS is configured. This attribute will be consumed in gazebo to render a new ATS tab.

Links to relevant tickets

This PR relates to codecov/engineering-team#930. A follow up PR will add the language field to the type.

Repos with ATS configured have certain values in their YAML file. We have a similar check in worker.

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 Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8fab7a4) 95.63% compared to head (aa7f4b2) 95.63%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #321   +/-   ##
=====================================
  Coverage   95.63   95.63           
=====================================
  Files        730     730           
  Lines      16425   16431    +6     
=====================================
+ Hits       15707   15713    +6     
  Misses       718     718           
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

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-staging
Copy link

codecov-staging bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8fab7a4) 96.00% compared to head (aa7f4b2) 96.01%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   96.00%   96.01%           
=======================================
  Files         615      615           
  Lines       15914    15920    +6     
=======================================
+ Hits        15279    15285    +6     
  Misses        635      635           
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

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 Dec 27, 2023

Codecov Report

Merging #321 (aa7f4b2) into main (8fab7a4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   96.00%   96.01%           
=======================================
  Files         615      615           
  Lines       15914    15920    +6     
=======================================
+ Hits        15279    15285    +6     
  Misses        635      635           
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
graphql_api/types/repository/repository.py 100.00% <100.00%> (ø)

Impacted file tree graph

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title Add isATSConfigured gql field Add an isATSConfigured field to the repository GQL type Dec 27, 2023
@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review December 27, 2023 21:02
@@ -283,6 +283,15 @@ def resolve_flags_measurements_backfilled(repository: Repository, info) -> bool:
return dataset.is_backfilled()


@repository_bindable.field("isATSConfigured")
def resolve_is_ats_configured(repository: Repository, info) -> bool:
if not repository.yaml or "flag_management" not in repository.yaml:
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, have you double checked if you want the repository.yaml or some other yaml value? Check this fn out, UserYaml.get_final_yaml(...), the yaml can be from a commit, repo and/or org, so I'd double check on your end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like it is on the repository. Thanks for the caution here.

@rohitvinnakota-codecov rohitvinnakota-codecov merged commit 3595b60 into main Dec 29, 2023
21 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/ats-gql branch December 29, 2023 14:44
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.

2 participants