codecov / uploader Goto Github PK
View Code? Open in Web Editor NEWCodecov's universal binary uploader.
Home Page: https://docs.codecov.com/docs/codecov-uploader
License: Apache License 2.0
Codecov's universal binary uploader.
Home Page: https://docs.codecov.com/docs/codecov-uploader
License: Apache License 2.0
codecov uploader for linux shasum failing - both on Travis CI - and have also replicated locally
shasum -a 256 -c codecov-linux.SHA256SUM
shasum: codecov:
codecov: FAILED open or read
shasum: WARNING: 1 listed file could not be read
Originally setup using the instructions from https://docs.codecov.com/docs/codecov-uploader
Example of recent failure on travis:
https://travis-ci.com/github/silverstripe/silverstripe-assets/jobs/519946430#L1024
Travis config used for codecov:
https://github.com/silverstripe/silverstripe-travis-shared/blob/master/config/base.yml#L122
Looks like this has been failing for at least the last 3 hours (around 12:30am 29 June GMT), was working fine 18 hours ago (around 9:30am 28 June GMT)
Example of this working correctly 18 hours ago:
https://travis-ci.com/github/silverstripe/cwp-agencyextensions/jobs/519612481#L1098
Describe the bug
The list of files located in a project without a .git dir do not match the list of one with.
To Reproduce
Run the uploader in a repo directory.
Run the uploader in the same directory after deleting the .git
directory
Compare the file lists.
Expected behavior
I expect the lists to match
Describe the bug
The exit errors are not be saved in the output log.
To Reproduce
Steps to reproduce the behavior:
> output.txt
Expected behavior
All console output should end up in the output file.
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
If paths in the report and the repo do not match, would love a suggested path fix
Describe alternatives you've considered
Manually creating path fixes
Additional context
N/A
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently, due to needing to build node on every run for the alpine binary, the build cycles take a long time (~35 minutes). This hampers rapid progress, in addition to likely annoying our CI provider. (we are likely to run out of free credits)
Describe the solution you'd like
A clear and concise description of what you want to happen.
Faster build cycles
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Moving the binaries to the deploy only stage. Not a good plan, as the binary build process could break and we may have many changes in before we discover this.
Additional context
Add any other context or screenshots about the feature request here.
Suggestions wanted.
Can upload it's own coverage.
Describe the bug
Use local provider when matching CI one is not found
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Do not fail on undetected CI provider.
Describe the bug
A clear and concise description of what the bug is.
When passed a flag with dashes in the name, the uploader passes an empty flag to the server
To Reproduce
Steps to reproduce the behavior:
Call uploader with -F linux-without-git
Expected behavior
A clear and concise description of what you expected to happen.
Flag is passed to the server
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
Unit tests need to be isolated. The branch detection tests will fail if git is not installed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Test should use passed envs and not be affected by outside state.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Spawn the binaries, confirm the output matches what was passed as input
While I would like to be able to auto-test new CI providors, I think that, given the differences in how things like slugs and SHAs are computed from args and envs, it makes more sense to test each separately.
Describe the bug
A clear and concise description of what the bug is.
The -F
command line flag is not working correctly. Flag used was 12.x.v2
To Reproduce
Steps to reproduce the behavior:
-F
flags optionExpected behavior
A clear and concise description of what you expected to happen.
Flags are shown in the UI and the PR comment
https://codecov.io/gh/drazisil/sigdb/commit/ddfcff46193dd3c19ef15d3673d4c27840beb18a/build
Allow the underlying process attempting to read the file to perform validation. Invalid files at that level will report back via a thrown error which can then be displayed to the user.
I would love the ability to upload a raw report generated elsewhere. Say I need to create the report with -d
, then upload it later.
Describe the bug
A clear and concise description of what the bug is.
While the uploader can correctly locate files without a .git
directory, it appears unable to on Windows and OSX
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Should be able to locate report files, similar to on Linux https://app.circleci.com/pipelines/github/codecov/uploader/445/workflows/27d617a9-1375-4fdb-b077-39922becdf57/jobs/2686
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
Upload does not add EOF separator with multiple files
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Line 116 in 821fbb5
Describe the solution you'd like
Please add Buildkite as a supported CI.
Additional context
It's supported by bash uploader so assume just need simple migration?
I write the changelog to the PR to the release branch . However, for some reason, it takes the commit message of the last commit instead.
Currently generates network from the directory it is run from.
^[\w\d\-\/]+$
is the general mask, but we need to support international characters as well.
Describe the solution you'd like
Please add Bitbucket Pipelines as a supported CI.
Additional context
A list of available environment variables can be found here: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/
Describe the bug
-f flag can not handle an absolute path. Since it appends ./
to the path, the path becomes invalid
To Reproduce
Steps to reproduce the behavior:
-f
flag a file path that starts with /
Expected behavior
If the passed path starts with a /
the app should not prefix with ./
web.js uses incorrect headers to describe the Content-Type
of the JSON payload.
We started getting this error message today.
Codecov report uploader 0.1.0
=> Project root located at: /opt/atlassian/pipelines/agent/build
Processing reports/XXXXXXXXXXX.xml...
Detected Bitbucket as the CI provider.
Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******&branch=XXXXXXXXXXXXX&build=140&build_url=&commit=cc70d0cf1e1ca2a00f7979c96ffed1a30b1b3076&job=140&pr=&service=bitbucket&slug=XXXXXXXXXXX&name=&tag=&flags=&parent=
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: Method Not Allowed
Ask: Codecov is lacking data to know how often mercual is being used with Codecov. To that end, I would like to add a vcs=
quesrystring param to indicate if git or hg was used.
It appears that the project is going through all the steps that pkg does—downloading the Node.js source, applying a set of patches to allow "sourceless" compilation, building the patched version of Node.js from source, etc.
Was there a particular design decision that gave weight to doing all the heavy work even though pkg is also used? Is this simply a relic of early development that will be moved away from in the future?
There appears to be a great deal of overlap and duplicated functionality between this project and codecov-node. Is this intended? Will the two be merged in some way?
Describe the bug
The new uploader fails to find coverage reports from Xcode.
To Reproduce
git clone https://github.com/chris-araman/CombineCloudKit.git
cd CombineCloudKit
swift package generate-xcodeproj
xcodebuild test -enableCodeCoverage YES -scheme CombineCloudKit-Package
bin/codecov -n -Q github-action-2.0.1 -Z
Expected behavior
The coverage report is found and uploaded successfully.
Additional context
codecov-action@v2
uses the new uploader. codecov-action@v1
used the old bash uploader. The new uploader fails to find coverage reports from Xcode when the bash uploader found them successfully. I encountered this issue when attempting to migrate from codecov-action@v1
to @v2
.
It seems this functionality was implemented in the bash uploader here:
https://github.com/codecov/codecov-bash/blob/ae76691c8554334bc1ddc355f6667fd36d6890f5/codecov#L1148
There are notes in #15 about wanting to keep this project a "pure uploader". I think separating the concerns of the uploader from the concerns of something processing reports is admirable. However, I think this sort of boilerplate logic is useful to users of the uploader. Perhaps it can be ported to a more coverage-friendly environment (Node.js, Typescript) alongside the uploader functionality, even if it's in a separate module?
This issue is preventing me from migrating to the new uploader via codecov-action@v2
.
Describe the bug
When I run the codecov uploader in the docker container, everything is fine until I set up environment variables using the first technique mentioned in the following article:
https://docs.codecov.com/docs/testing-with-docker
Then the uploader complains about bad requests:
Detected GitHub Actions as the CI provider.
Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******&branch=test/migrate-to-shellspec&build=1039293011&build_url=undefined%2Fdustin71728%2Fyarn-2-completion%2Factions%2Fruns%2F1039293011&commit=24eb740b7574622e2af937f65c74e97292ab9448&job=default&pr=&service=github-actions&slug=dustin71728/yarn-2-completion&name=&tag=&flags=&parent=
https://codecov.io/upload/v4?package=uploader-0.1.0&branch=test/migrate-to-shellspec&build=1039293011&build_url=undefined%2Fdustin71728%2Fyarn-2-completion%2Factions%2Fruns%2F1039293011&commit=24eb740b7574622e2af937f65c74e97292ab9448&job=default&pr=&service=github-actions&slug=dustin71728/yarn-2-completion&name=&tag=&flags=&parent=
Content-Type: 'text/plain'
Content-Encoding: 'gzip'
X-Reduced-Redundancy: 'false'
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: Bad Request
I wonder if the root cause is that the build_url query parameter is not a well-formatted URL. It is a literal undefined string in the host part of the URL.
So I try to set up CI_BUILD_URL with the correct value, but it still doesn't work.
The failed log( In Run yarn test
step):
https://github.com/dustin71728/yarn-2-completion/runs/3091016225?check_suite_focus=true
The log printed out all the environment variables returned from the command:
"ci_env=bash <(curl -s https://codecov.io/env)
"
https://github.com/dustin71728/yarn-2-completion/runs/3090999690?check_suite_focus=true
The successful log without CI environment variables involved:
https://github.com/dustin71728/yarn-2-completion/runs/3081701233?check_suite_focus=true
References
Dockerfile: https://github.com/dustin71728/yarn-2-completion/blob/test/migrate-to-shellspec/docker/bash-5-0.Dockerfile
Github Action YAML file: https://github.com/dustin71728/yarn-2-completion/blob/test/migrate-to-shellspec/.github/workflows/default.yaml
Expected behavior
The uploader should upload the coverage report when the CI is true in the docker container running on Github action.
There's a lot of duplicated logic occurring within the plugin system modeling cloud providers. Specifically, there's some fallback behavior occurring in each one which could be moved up towards the area which calls the providers in order to simplify the logic in the providers and centralize the fallback behavior in general.
/// @file main.js
// Requires at least one test
function getParams(inputs) {
return {
something: provider.getSomething(inputs)
};
}
/// @file provider-a.js
// Requires at least two tests
function getSomething(inputs) {
return inputs.args.something || inputs.envs["PROVIDER_A_VALUE"];
}
/// @file provider-b.js
// Requires at least two tests
function getSomething(inputs) {
return inputs.args.something || inputs.envs["PROVIDER_B_VALUE"];
}
/// @file provider-c.js
// Requires at least two tests
function getSomething(inputs) {
return inputs.args.something || inputs.envs["PROVIDER_C_VALUE"];
}
/// @file main.js
// Requires at least two tests
function getParams(inputs) {
return {
something: inputs.args.something || provider.getSomething(inputs)
};
}
/// @file provider-a.js
// Requires at least one test
function getSomething(inputs) {
return inputs.envs["PROVIDER_A_VALUE"];
}
/// @file provider-b.js
// Requires at least one test
function getSomething(inputs) {
return inputs.envs["PROVIDER_B_VALUE"];
}
/// @file provider-c.js
// Requires at least one test
function getSomething(inputs) {
return inputs.envs["PROVIDER_C_VALUE"];
}
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When running the uploader in docker, or other places where there is no .git dir, it fails
Describe the solution you'd like
A clear and concise description of what you want to happen.
Default to cwd with warning when .git is not located
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Using the -R
flag works
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
A clear and concise description of what the bug is.
In windows, the codecov.exe binary is detected as a coverage report and uploaded, causing the Codecov server to fail to process the "report"
To Reproduce
Steps to reproduce the behavior:
https://2910-223286392-gh.circle-artifacts.com/0/output_win.txt
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Need to investigate if this is a uploader issue, or user
We started getting the following error message on our Bitbucket Pipelines.
Detected Bitbucket as the CI provider.
Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******....................
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: Not Found
Didn't see any incident on your website regarding this.
Describe the bug
Binaries should be ready to go upon download
string
should be {string}
, etc. This issue will likely require a project-wide refactor due to its pervasiveness.
This will greatly increase readability and error catching.
Allow CODECOV_TOKEN to be passed via env
The globbing on this is strange Need to test the !
masks work
-s DIR Directory to search for coverage reports.
Already searches project root and current working directory #89
-t TOKEN Set the private repository token
(option) set environment variable CODECOV_TOKEN=:uuid
-t @/path/to/token_file
-t uuid
-n NAME Custom defined name of the upload. Visible in Codecov UI #75
-X feature Toggle functionalities
-e ENV Specify environment variables to be included with this build
Also accepting environment variables: CODECOV_ENV=VAR,VAR2
-e VAR,VAR2 #75
-X search Disable searching for reports
-X network Disable uploading the file network
-N The commit SHA of the parent for which you are uploading coverage. If not present,
the parent will be determined using the API of your repository provider.
When using the repository provider's API, the parent is determined via finding
the closest ancestor to the commit. #87
-R root dir Used when not in git/hg project to identify project root directory
I'd like to remove xcode functionally and make this a pure uploader
-- xcode --
I'd like to remove gcov functionally and make this a pure uploader
-- gcov --
This can probably be removed as I'm not using color
From #15
-s DIR Directory to search for coverage reports.
Already searches project root and current working directory
We are currently using the -R
flag for both the -s and
-R` uses.
@codecov/open-source can we clearly define the use cases for each flag so we can determine how best to seperate them?
Please verify the SHAs of the prebuilt node binary on alpine, prior to using it
Describe the bug
Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******&branch=undefined&build=&build_url=&commit=75607b5fa42ddbaf29f3cc80593de9a1c71a9b6b&job=&pr=&service=teamcity&slug=&name=&tag=&flags=&parent=
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: connect ETIMEDOUT 34.120.215.12:443
To Reproduce
Steps to reproduce the behavior:
curl -Os https://uploader.codecov.io/latest/linux/codecov
# request codecov to detect CI environment to pass through to docker
ci_env=`bash <(curl -s https://codecov.io/env)`
docker run $ci_env -e CI=true ...
|----- inside docker container
| # exec tests
| # Your Codecov Uploader approach here
| # See more at https://docs.codecov.com/docs/codecov-uploader
| ./codecov
Expected behavior
Bash uploader works well in the case.
Judging by parameters of the query string and by https://github.com/codecov/uploader/blob/master/src/ci_providers/provider_teamcity.js
file, the new uploader does not work with TeamCity variables defined by env script:
elif [ "$TEAMCITY_VERSION" != "" ];
then
add "TEAMCITY_VERSION"
add "TEAMCITY_BUILD_BRANCH"
add "TEAMCITY_BUILD_ID"
add "TEAMCITY_BUILD_URL"
add "TEAMCITY_BUILD_COMMIT"
add "TEAMCITY_BUILD_COMMIT"
add "BUILD_VCS_NUMBER"
add "TEAMCITY_BUILD_REPOSITORY"
Version of env script - 1.0.3
(Also note, that line add "TEAMCITY_BUILD_COMMIT"
is repeated twice - maybe typo)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.