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

Create separate log source for commit and build information #16236

Closed
bahmutov opened this issue Apr 27, 2021 · 2 comments · Fixed by #16238
Closed

Create separate log source for commit and build information #16236

bahmutov opened this issue Apr 27, 2021 · 2 comments · Fixed by #16238
Assignees

Comments

@bahmutov
Copy link
Contributor

When running Cypress you can enable debug logs from different sources https://on.cypress.io/troubleshooting#Log-sources

A common question that comes up a lot is the Dashboard missing CI or Git commit information. This information is collected in https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/modes/record.js with most of the info coming from https://github.com/cypress-io/commit-info and some from https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/util/ci_provider.js

The record and the ci_provider do not have a good way to show just the commit and CI information. You show the collected info via the DEBUG=cypress:server:record setting, but that would expose a LOT of API calls with potentially sensitive information.

I think we can create limited log source in record.js to just log the CI and Git commit info in these lines

const commit = getCommitFromGitOrCi(git)
debug('commit information from Git or from environment variables')
debug(commit)
return api.createRun({
specs,
group,
tags,
parallel,
platform,
ciBuildId,
projectId,
recordKey,
specPattern,
testingType,
ci: {
params: ciProvider.ciParams(),
provider: ciProvider.provider(),
},
commit,

Then the users can safely see what we have collected without exposing the sensitive data or without being overwhelmed by all API calls

@bahmutov bahmutov self-assigned this Apr 27, 2021
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Apr 27, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Apr 28, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 28, 2021

The code for this is done in cypress-io/cypress#16238, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 10, 2021

Released in 7.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.3.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant