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

ci: Replace DataDog CI with custom upload script #169

Merged
merged 5 commits into from
Feb 7, 2022
Merged

ci: Replace DataDog CI with custom upload script #169

merged 5 commits into from
Feb 7, 2022

Conversation

kylecarbs
Copy link
Member

@kylecarbs kylecarbs commented Feb 6, 2022

This will reduce CI time by ~6 minutes across all of our runners. It's a bit janky, but I believe worth the slight maintenance burden.

Because this is quick now, we upload tests for PostgreSQL and fake database implementations.

@kylecarbs kylecarbs self-assigned this Feb 6, 2022
@kylecarbs kylecarbs force-pushed the datadog branch 2 times, most recently from 876fcc6 to c7f65c1 Compare February 6, 2022 01:05
@codecov
Copy link

codecov bot commented Feb 6, 2022

Codecov Report

Merging #169 (4f585ca) into main (4cd0261) will decrease coverage by 0.17%.
The diff coverage is 78.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
- Coverage   67.75%   67.57%   -0.18%     
==========================================
  Files         107      107              
  Lines        5644     5650       +6     
  Branches       68       68              
==========================================
- Hits         3824     3818       -6     
- Misses       1463     1471       +8     
- Partials      357      361       +4     
Flag Coverage Δ
unittest-go-macos-latest 65.37% <78.04%> (-0.05%) ⬇️
unittest-go-ubuntu-latest 66.63% <78.04%> (-0.21%) ⬇️
unittest-go-windows-latest ?
unittest-js 64.66% <ø> (ø)
Impacted Files Coverage Δ
coderd/provisionerdaemons.go 48.30% <57.14%> (+0.12%) ⬆️
coderd/projectversion.go 66.07% <81.25%> (ø)
coderd/workspacehistory.go 61.57% <83.33%> (-0.21%) ⬇️
peerbroker/dial.go 76.19% <0.00%> (-4.77%) ⬇️
peerbroker/listen.go 82.40% <0.00%> (-2.40%) ⬇️
peer/conn.go 78.71% <0.00%> (-1.29%) ⬇️
codersdk/workspaces.go 73.85% <0.00%> (+1.96%) ⬆️

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 4cd0261...4f585ca. Read the comment docs.

@kylecarbs kylecarbs force-pushed the datadog branch 2 times, most recently from 6061196 to 92c2aba Compare February 6, 2022 01:31
This will reduce CI time by ~6 minutes across all of
our runners. It's a bit janky, but I believe worth
the slight maintainance burden.
@kylecarbs kylecarbs force-pushed the datadog branch 5 times, most recently from 6ab61f3 to 6117e87 Compare February 6, 2022 03:07
Comment on lines +25 to +26
// It's built using node, and took ~3 minutes to install and
// run on our Windows runner, and ~1 minute on all others.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The built binary could probably be cached once it's built, too!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it cache, but the Windows runner has such slow disk IO it made little difference 😥

Comment on lines +21 to +23
// The DataDog "cireport" API is not publicly documented,
// but implementation is available in their open-source CLI
// built for CI: https://github.com/DataDog/datadog-ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Comment on lines +128 to +129
provisionerJobID := uuid.New()
projectVersion, err = api.Database.InsertProjectVersion(r.Context(), database.InsertProjectVersionParams{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: It'd be nice to have the race fixes in a separate PR - just so the CI could be evaluated independently (or if we found there was a regression, we could pull it off w/o impacting the DataDog improvements)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entirely agree. Just fixed these in here to ensure my CI changes didn't break anything. I'm going to let it slide in this PR, because hopefully CI is reliable enough from this point forward that these types of things can't slip in.

Comment on lines +21 to +23
// The DataDog "cireport" API is not publicly documented,
// but implementation is available in their open-source CLI
// built for CI: https://github.com/DataDog/datadog-ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: I wonder if utilities like this would be good open-source candidates for our org? We ourselves searched for a tool like this, and couldn't find it - so you had to build it!

I figure if this is around and someone else finds it, could be marketing for coder overall

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree this is a great candidate for OSS!

@kylecarbs kylecarbs enabled auto-merge (squash) February 7, 2022 17:32
@kylecarbs kylecarbs merged commit 3002a27 into main Feb 7, 2022
@kylecarbs kylecarbs deleted the datadog branch February 7, 2022 17:32
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

2 participants