Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit f2f376e

Browse files
authored
Deprecate "local upload" related commands (#679)
This hides all related commands and options from the docs, and removes mentions of them from the README.
1 parent e9bcffd commit f2f376e

File tree

9 files changed

+10
-103
lines changed

9 files changed

+10
-103
lines changed

README.md

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ CodecovCLI is a new way for users to interact with Codecov directly from the use
1717
- [create-commit](#create-commit)
1818
- [create-report](#create-report)
1919
- [do-upload](#do-upload)
20-
- [create-report-results](#create-report-results)
21-
- [get-report-results](#get-report-results)
2220
- [pr-base-picking](#pr-base-picking)
2321
- [send-notifications](#send-notifications)
2422
- [empty-upload](#empty-upload)
25-
- [How to Use Local Upload](#how-to-use-local-upload)
2623
- [Work in Progress Features](#work-in-progress-features)
2724
- [Plugin System](#plugin-system)
2825
- [Static Analysis](#static-analysis)
@@ -123,8 +120,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
123120
| `create-commit` | Saves the commit's metadata in codecov, it's only necessary to run this once per commit
124121
| `create-report` | Creates an empty report in codecov with initial data e.g. report name, report's commit
125122
| `do-upload` | Searches for and uploads coverage data to codecov
126-
| `create-report-results` | Used for local upload. It tells codecov that you finished local uploading and want it to calculate the results for you to get them locally.
127-
| `get-report-results` | Used for local upload. It asks codecov to provide you the report results you calculated with the previous command.
128123
| `pr-base-picking` | Tells codecov that you want to explicitly define a base for your PR
129124
| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previously mentioned commands.
130125
| `send-notifications` | A command that tells Codecov that you finished uploading and you want to be sent notifications. To disable automatically sent notifications please consider adding manual_trigger to your codecov.yml, so it will look like codecov: notify: manual_trigger: true.
@@ -156,7 +151,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
156151
|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required
157152
|-t, --token | Codecov upload token | Required
158153
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
159-
|--code| The code of the report. This is used in local uploading to isolate local reports from regular or cloud reports uploaded to codecov so they don't get merged. It's basically a name you give to your report e.g. local-report. | Optional
160154
|-h, --help | Shows usage, and command options
161155

162156
## do-upload
@@ -165,7 +159,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
165159
| Option | Description | Usage
166160
| :---: | :---: | :---: |
167161
|-C, --sha, --commit-sha| Commit SHA (with 40 chars) | Required
168-
|--report-code | The code of the report defined when creating the report. If unsure, leave default | Optional
169162
|--network-root-folder | Root folder from which to consider paths on the network section default: (Current working directory) | Optional
170163
|-s, --dir, --coverage-files-search-root-folder | Folder where to search for coverage files default: (Current Working Directory) | Optional
171164
|--exclude, --coverage-files-search-exclude-folder | Folders to exclude from search | Optional
@@ -189,30 +182,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
189182
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
190183
|-h, --help | Shows usage, and command options
191184

192-
## create-report-results
193-
`codecovcli create-report-results [OPTIONS]`
194-
195-
| Option | Description | Usage
196-
| :---: | :---: | :---: |
197-
|--commit-sha | Commit SHA (with 40 chars) | Required
198-
|--code | The code of the report. If unsure, leave default | Required
199-
|--slug | owner/repo slug | Required
200-
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
201-
|-t, --token | Codecov upload token | Required
202-
|-h, --help | Shows usage, and command options
203-
204-
## get-report-results
205-
`codecovcli get-report-results [OPTIONS]`
206-
207-
| Option | Description | Usage
208-
| :---: | :---: | :---: |
209-
|--commit-sha | Commit SHA (with 40 chars) | Required
210-
|--code | The code of the report. If unsure, leave default | Required
211-
|--slug | owner/repo slug | Required
212-
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
213-
|-t, --token | Codecov upload token | Required
214-
|-h, --help | Shows usage, and command options
215-
216185
## pr-base-picking
217186
`codecovcli pr-base-picking [OPTIONS]`
218187

@@ -254,25 +223,6 @@ are ignored by codecov (including README and configuration files)
254223
| --git-service | Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional |
255224
| -h, --help | Show this message and exit. | Optional |
256225

257-
# How to Use Local Upload
258-
259-
The CLI also supports "dry run" local uploading. This is useful if you prefer to see Codecov status checks and coverage reporting locally, in your terminal, as opposed to opening a PR and waiting for your full CI to run. Local uploads do not interfere with regular uploads made from your CI for any given commit / Pull Request.
260-
261-
Local Upload is accomplished as follows:
262-
263-
```
264-
pip install codecov-cli
265-
codecovcli create-commit
266-
codecovcli create-report --code <CODE>
267-
codecovcli do-upload --report-code <CODE>
268-
codecovcli create-report-results --code <CODE>
269-
codecovcli get-report-results --code <CODE>
270-
```
271-
272-
Codecov will calculate the coverage results, and return them in your terminal, telling you whether your PR will fail or pass the coverage check.
273-
274-
Note: In order for Local Upload to work, it must be used against a commit on the origin repository. Local Upload does not work for arbitrary diffs or uncommitted changes on your local machine.
275-
276226
# Work in Progress Features
277227

278228
The following features are somewhat implemented in code, but are not yet meant for use. These features will be documented once they are fully implemented in the CLI.
@@ -281,10 +231,6 @@ The following features are somewhat implemented in code, but are not yet meant f
281231

282232
To provide extensibility to some of its commands, the CLI makes use of a plugin system. For most cases, the default commands are sufficient. But in some cases, having some custom logic specific to your use case can be beneficial. Note that full documentation of the plugin system is pending, as the feature is still heavily a work in progress.
283233

284-
## Static Analysis
285-
286-
The CLI can perform basic static analysis on Python code today. This static analysis is meant to power more future looking Codecov features and, as such, is not required or in active use today. As more functionality dependent on static analysis becomes available for use, we will document static analysis in detail here.
287-
288234
# Contributions
289235

290236
This repository, like all of Codecov's repositories, strives to follow our general [Contributing guidelines](https://github.com/codecov/contributing). If you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first.

codecov_cli/commands/create_report_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logger = logging.getLogger("codecovcli")
1212

1313

14-
@click.command()
14+
@click.command(hidden=True, deprecated=True)
1515
@click.option(
1616
"--code", help="The code of the report. If unsure, leave default", default="default"
1717
)

codecov_cli/commands/get_report_results.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import click
44
import sentry_sdk
55

6-
from codecov_cli.fallbacks import CodecovOption, FallbackFieldEnum
76
from codecov_cli.helpers.args import get_cli_args
87
from codecov_cli.helpers.encoder import encode_slug
9-
from codecov_cli.helpers.git import GitService
108
from codecov_cli.helpers.options import global_options
119
from codecov_cli.services.report import send_reports_result_get_request
1210
from codecov_cli.types import CommandContext
@@ -15,7 +13,7 @@
1513
logger = logging.getLogger("codecovcli")
1614

1715

18-
@click.command()
16+
@click.command(hidden=True, deprecated=True)
1917
@click.option(
2018
"--code", help="The code of the report. If unsure, leave default", default="default"
2119
)

codecov_cli/commands/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@click.command()
1616
@click.option(
17-
"--code", help="The code of the report. If unsure, leave default", default="default"
17+
"--code", help="The code of the report. If unsure, leave default", default="default", hidden=True
1818
)
1919
@click.option(
2020
"-P",

codecov_cli/commands/upload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def _turn_env_vars_into_dict(ctx, params, value):
2626
"report_code",
2727
help="The code of the report. If unsure, leave default",
2828
default="default",
29+
hidden=True,
2930
),
3031
click.option(
3132
"--network-root-folder",

codecov_cli/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,19 @@ def cli(
7777
cli.add_command(do_upload)
7878
cli.add_command(create_commit)
7979
cli.add_command(create_report)
80-
cli.add_command(create_report_results)
81-
cli.add_command(get_report_results)
8280
cli.add_command(pr_base_picking)
83-
cli.add_command(label_analysis)
84-
cli.add_command(static_analysis)
8581
cli.add_command(empty_upload)
8682
cli.add_command(upload_coverage)
8783
cli.add_command(upload_process)
8884
cli.add_command(send_notifications)
8985
cli.add_command(process_test_results)
9086

87+
# deprecated commands:
88+
cli.add_command(create_report_results)
89+
cli.add_command(get_report_results)
90+
cli.add_command(label_analysis)
91+
cli.add_command(static_analysis)
92+
9193

9294
def run():
9395
cli(obj={})

codecovcli_commands

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ Options:
1313
Commands:
1414
create-commit
1515
create-report
16-
create-report-results
1716
do-upload
1817
empty-upload
19-
get-report-results
2018
pr-base-picking
2119
process-test-results
2220
send-notifications
@@ -44,8 +42,6 @@ Options:
4442
Usage: codecovcli create-report [OPTIONS]
4543

4644
Options:
47-
--code TEXT The code of the report. If unsure, leave
48-
default
4945
-P, --pr, --pull-request-number TEXT
5046
Specify the pull request number manually.
5147
Used to override pre-existing CI environment
@@ -58,24 +54,9 @@ Options:
5854
repo token in Self-hosted
5955
-h, --help Show this message and exit.
6056

61-
Usage: codecovcli create-report-results [OPTIONS]
62-
63-
Options:
64-
--code TEXT The code of the report. If unsure, leave
65-
default
66-
-C, --sha, --commit-sha TEXT Commit SHA (with 40 chars) [required]
67-
-Z, --fail-on-error Exit with non-zero code in case of error
68-
--git-service [github|gitlab|bitbucket|github_enterprise|gitlab_enterprise|bitbucket_server]
69-
-t, --token TEXT Codecov upload token
70-
-r, --slug TEXT owner/repo slug used instead of the private
71-
repo token in Self-hosted
72-
-h, --help Show this message and exit.
73-
7457
Usage: codecovcli do-upload [OPTIONS]
7558

7659
Options:
77-
--code, --report-code TEXT The code of the report. If unsure, leave
78-
default
7960
--network-root-folder PATH Root folder from which to consider paths on
8061
the network section [default: (Current
8162
working directory)]
@@ -164,19 +145,6 @@ Options:
164145
repo token in Self-hosted
165146
-h, --help Show this message and exit.
166147

167-
Usage: codecovcli get-report-results [OPTIONS]
168-
169-
Options:
170-
--code TEXT The code of the report. If unsure, leave
171-
default
172-
-C, --sha, --commit-sha TEXT Commit SHA (with 40 chars) [required]
173-
-Z, --fail-on-error Exit with non-zero code in case of error
174-
--git-service [github|gitlab|bitbucket|github_enterprise|gitlab_enterprise|bitbucket_server]
175-
-t, --token TEXT Codecov upload token
176-
-r, --slug TEXT owner/repo slug used instead of the private
177-
repo token in Self-hosted
178-
-h, --help Show this message and exit.
179-
180148
Usage: codecovcli pr-base-picking [OPTIONS]
181149

182150
Options:
@@ -230,8 +198,6 @@ Options:
230198
-t, --token TEXT Codecov upload token
231199
-r, --slug TEXT owner/repo slug used instead of the private
232200
repo token in Self-hosted
233-
--code, --report-code TEXT The code of the report. If unsure, leave
234-
default
235201
--network-root-folder PATH Root folder from which to consider paths on
236202
the network section [default: (Current
237203
working directory)]
@@ -306,8 +272,6 @@ Options:
306272
-t, --token TEXT Codecov upload token
307273
-r, --slug TEXT owner/repo slug used instead of the private
308274
repo token in Self-hosted
309-
--code, --report-code TEXT The code of the report. If unsure, leave
310-
default
311275
--network-root-folder PATH Root folder from which to consider paths on
312276
the network section [default: (Current
313277
working directory)]

tests/commands/test_invoke_upload_coverage.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def test_upload_coverage_options(mocker):
7575
" -t, --token TEXT Codecov upload token",
7676
" -r, --slug TEXT owner/repo slug used instead of the private",
7777
" repo token in Self-hosted",
78-
" --code, --report-code TEXT The code of the report. If unsure, leave",
79-
" default",
8078
" --network-root-folder PATH Root folder from which to consider paths on",
8179
" the network section [default: (Current",
8280
" working directory)]",

tests/commands/test_invoke_upload_process.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def test_upload_process_options(mocker):
7575
" -t, --token TEXT Codecov upload token",
7676
" -r, --slug TEXT owner/repo slug used instead of the private",
7777
" repo token in Self-hosted",
78-
" --code, --report-code TEXT The code of the report. If unsure, leave",
79-
" default",
8078
" --network-root-folder PATH Root folder from which to consider paths on",
8179
" the network section [default: (Current",
8280
" working directory)]",

0 commit comments

Comments
 (0)