Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Add retro-compatibility for Semaphore 1.x and maintain support for 2.x#145

Merged
eddiemoore merged 3 commits intocodecov:masterfrom
fabiendem:semaphore-compat
Sep 20, 2019
Merged

Add retro-compatibility for Semaphore 1.x and maintain support for 2.x#145
eddiemoore merged 3 commits intocodecov:masterfrom
fabiendem:semaphore-compat

Conversation

@fabiendem
Copy link
Copy Markdown
Contributor

Why

#132 removes compatibility with Semaphore 1.x.
This PR brings back compatibility with Semaphore 1.x and maintain the support for Semaphore 2.x.

Once merged it would reduce the risk of publishing a new codecov-node version and actually make the support Semaphore 2.x public.

What

  • Bring back support for Semaphore 1.x
  • Keep support for Semaphore 2.x
  • Make sure codecov-node is able to distinguish the versions

How

  • Revert Updates Semaphore CI Service for 2.0 #132
  • Detect Semaphore 1.x using the presence of SEMAPHORE_REPO_SLUG (not available in Semaphore 2.x)
  • Detect Semaphore 2.x using the presence of SEMAPHORE_WORKFLOW_ID (not available in Semaphore 1.x)
  • Add tests

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 10, 2019

Codecov Report

Merging #145 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   89.36%   89.55%   +0.19%     
==========================================
  Files          21       22       +1     
  Lines         329      335       +6     
  Branches       80       82       +2     
==========================================
+ Hits          294      300       +6     
  Misses         35       35
Impacted Files Coverage Δ
lib/detect.js 92.3% <ø> (ø) ⬆️
lib/services/semaphore2x.js 100% <100%> (ø)
lib/services/semaphore.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8371836...0c57093. Read the comment docs.

@eddiemoore eddiemoore merged commit f628c33 into codecov:master Sep 20, 2019
@fabiendem
Copy link
Copy Markdown
Contributor Author

@ChristianJacobsen @eddiemoore codecov detects properly Semaphore 2.x, but during the upload of the report to codecov I realised that it fails with the following error:

==> Uploading reports
--
  | HTTP 400
  | service must be ci-provider

Is there some whitelisting needed server side at codecov for the new service keys?

  • semaphore2x
  • semaphore1x

If so, we would better off reverting this merge and ship instead #132
This ones uses semaphore but drops compatibility with semaphore 1.x

@eddiemoore
Copy link
Copy Markdown
Collaborator

Fixing in #146
Realise the service name should just be semaphore.

@eddiemoore
Copy link
Copy Markdown
Collaborator

@fabiendem Please update to v3.6.1 and try again 👍

@fabiendem
Copy link
Copy Markdown
Contributor Author

Testing... 🕐

@fabiendem
Copy link
Copy Markdown
Contributor Author

✅ Great thanks @eddiemoore! It works now with #146 v3.6.1

==> Uploading reports
--
  | Success!
  | View report at: HTTP 200

And sorry about this, when I made my PR I wasn't aware of that constraint on the service name.

@eddiemoore
Copy link
Copy Markdown
Collaborator

No worries. I wasn't aware either 😂 now we know
Knowing

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 this pull request may close these issues.

2 participants