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

chore: change logic to write data to storage #48

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

giovanni-guidini
Copy link
Contributor

After moving ReportDetails.files_array and Commit.report to archive successfilly for Codecov
we want to do the same for some selected customers (in repo_ids) and then we will want
to start the process for new fields. Only for codecov.

The way things were before, if you have a field set to write to GCS it is valid for all codecov
repos AND all repos under repo_ids, while we would only want that for codecov repos.

So by changing the master_write_switch to strings we can have more power over each individual
field. Now we can use:

  • True or codecov_access to write only for codecov repos
  • restricted_access to write to all repos in repo_ids (+ codecov)
  • general_access to write to all repos

Because currently we're only writing for codecov repos the change will not affect any customers

Part of codecov/engineering-team#100

Purpose/Motivation

What is the feature? Why is this being done?

Links to relevant tickets

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

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.

After moving `ReportDetails.files_array` and `Commit.report` to archive successfilly for Codecov
we want to do the same for some selected customers (in `repo_ids`) and then we will want
to start the process for new fields. Only for codecov.

The way things were before, if you have a field set to write to GCS it is valid for all codecov
repos AND all repos under `repo_ids`, while we would only want that for codecov repos.

So by changing the `master_write_switch` to strings we can have more power over each individual
field. Now we can use:
*  `True` or `codecov_access` to write *only* for codecov repos
*  `restricted_access` to write to all repos in `repo_ids` (+ codecov)
*  `general_access` to write to all repos

Because currently we're only writing for codecov repos the change will not affect any customers

Part of codecov/engineering-team#100
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #48 (a2467bd) into main (fba7cd8) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head a2467bd differs from pull request most recent head 08c34f5. Consider uploading reports for the commit 08c34f5 to get more accurate results

@@          Coverage Diff          @@
##            main     #48   +/-   ##
=====================================
  Coverage   95.17   95.17           
=====================================
  Files        572     571    -1     
  Lines      14365   14335   -30     
=====================================
- Hits       13671   13642   -29     
+ Misses       694     693    -1     
Flag Coverage Δ
unit 95.16% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 95.16% <100.00%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
utils/config.py 80.55% <100.00%> (+1.76%) ⬆️

... and 3 files with indirect coverage changes

@hootener
Copy link

hootener commented Jul 31, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (dad4aa9) 95.16% compared to head (08c34f5) 95.16%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   95.16%   95.16%           
=======================================
  Files         572      572           
  Lines       14367    14370    +3     
=======================================
+ Hits        13672    13675    +3     
  Misses        695      695           
Flag Coverage Δ
unit 95.16% <100.00%> (+<0.01%) ⬆️

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

Files Changed Coverage Δ
utils/config.py 80.55% <100.00%> (+1.76%) ⬆️

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

@giovanni-guidini giovanni-guidini merged commit 4d8e128 into main Aug 1, 2023
7 of 8 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/change-write-to-storage-control-logic branch August 1, 2023 16:29
adrian-codecov pushed a commit that referenced this pull request Aug 2, 2023
After moving `ReportDetails.files_array` and `Commit.report` to archive successfilly for Codecov
we want to do the same for some selected customers (in `repo_ids`) and then we will want
to start the process for new fields. Only for codecov.

The way things were before, if you have a field set to write to GCS it is valid for all codecov
repos AND all repos under `repo_ids`, while we would only want that for codecov repos.

So by changing the `master_write_switch` to strings we can have more power over each individual
field. Now we can use:
*  `True` or `codecov_access` to write *only* for codecov repos
*  `restricted_access` to write to all repos in `repo_ids` (+ codecov)
*  `general_access` to write to all repos

Because currently we're only writing for codecov repos the change will not affect any customers

Part of codecov/engineering-team#100
adrian-codecov added a commit that referenced this pull request Aug 10, 2023
* Add trial logic

* Get rid of unecessary comments + linting

* reintroduce print statement and revert gql nullability

* Added expiration value when expiring trial

* Add pretrial user count field

* create a new endpoint that marks the completion step for uploads, which triggers notifs and syncs pulls (#49)

* fix: Cast UUID to str before saving in the db (#56)

* chore: add debug log for files array saving (#47)

In an effort to understand why we're getting `SessionArray` data from GCS without 'meta' info
we'll add a temporary log line when saving data from the API.
Mostly because I don't think this should happen, so I don't expect to see that line.
But who knows...

Part of codecov/engineering-team#119

* chore: change logic to write data to storage (#48)

After moving `ReportDetails.files_array` and `Commit.report` to archive successfilly for Codecov
we want to do the same for some selected customers (in `repo_ids`) and then we will want
to start the process for new fields. Only for codecov.

The way things were before, if you have a field set to write to GCS it is valid for all codecov
repos AND all repos under `repo_ids`, while we would only want that for codecov repos.

So by changing the `master_write_switch` to strings we can have more power over each individual
field. Now we can use:
*  `True` or `codecov_access` to write *only* for codecov repos
*  `restricted_access` to write to all repos in `repo_ids` (+ codecov)
*  `general_access` to write to all repos

Because currently we're only writing for codecov repos the change will not affect any customers

Part of codecov/engineering-team#100

* fix: Force owner login during pagination test (#58)

* merge

* Small fixes + addons

* Misc additions to the plan service + trial

* fix: Ensure we don't accidentally leak stack trace info (#59)

* Add pretrial_plan resolver

* Fix test

---------

Co-authored-by: Dana Yaish <98817625+dana-yaish@users.noreply.github.com>
Co-authored-by: scott-codecov <scott@codecov.io>
Co-authored-by: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com>
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.

None yet

3 participants