Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add provisionerd service#127

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 3 commits intomainfromprovisionerd
Feb 1, 2022
Merged

feat: Add provisionerd service#127

kylecarbs merged 3 commits intomainfromprovisionerd
Feb 1, 2022

Conversation

kylecarbs
Copy link
Member

This brings an async service that parses and
provisions to life! It's separated from coderd
intentionally to allow for simpler testing.

Integration with coderd will come in another PR!

@kylecarbskylecarbs self-assigned thisFeb 1, 2022
@codecov
Copy link

codecovbot commentedFeb 1, 2022
edited
Loading

Codecov Report

Merging#127 (ec865bb) intomain (38867b0) willdecrease coverage by0.16%.
The diff coverage is72.57%.

Impacted file tree graph

@@            Coverage Diff             @@##             main     #127      +/-   ##==========================================- Coverage   72.09%   71.92%   -0.17%==========================================  Files          91       92       +1       Lines        3773     4168     +395       Branches       59       59              ==========================================+ Hits         2720     2998     +278- Misses        832      927      +95- Partials      221      243      +22
FlagCoverage Δ
unittest-go-macos-latest68.25% <72.57%> (+0.25%)⬆️
unittest-go-ubuntu-latest70.09% <68.79%> (+0.12%)⬆️
unittest-go-windows-latest67.73% <71.86%> (+0.53%)⬆️
unittest-js74.72% <ø> (ø)
Impacted FilesCoverage Δ
provisionersdk/serve.go35.13% <13.33%> (-28.20%)⬇️
provisionersdk/transport.go52.77% <52.77%> (-19.45%)⬇️
provisionerd/provisionerd.go76.75% <76.75%> (ø)
peerbroker/listen.go84.80% <100.00%> (ø)
peer/channel.go84.75% <0.00%> (-2.44%)⬇️
peer/conn.go77.34% <0.00%> (-0.53%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update38867b0...ec865bb. Read thecomment docs.

@kylecarbskylecarbsforce-pushed theprovisionerd branch 3 times, most recently fromfa0df57 to0886db4CompareFebruary 1, 2022 15:34
This brings an async service that parses andprovisions to life! It's separated from coderdintentionally to allow for simpler testing.Integration with coderd will come in another PR!
completeChan := make(chan struct{})
closer := createProvisionerd(t, func(ctx context.Context) (proto.DRPCProvisionerDaemonClient, error) {
acquireJobAttempt := 0
return createProvisionerDaemonClient(t, provisionerDaemonTestServer{
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that it is so easy to create testing dialers to control the acquire/create/update/cancel job behavior 👍

Comment on lines +87 to +89
var closer io.Closer
var closerMutex sync.Mutex
closerMutex.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing that isn't obvious to me - why does this test require a mutex to protect theio.Closer?

It's not clear to me why we need to callcloser.Close in both the provisioner and at the end of the test.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The go data race was triggering on this, because technically in a perfect scenario it could callcloser before it completed being defined.

Obviously the scheduler would make this essentially impossible, but the race detector is strict!

acquireJob: func(ctx context.Context, _ *proto.Empty) (*proto.AcquiredJob, error) {
return &proto.AcquiredJob{
JobId: "test",
Provisioner: "someprovisioner",
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool that we can test actually sending stuff to a testing provisioner 👍

kylecarbs reacted with rocket emoji
Copy link
Contributor

@bryphe-coderbryphe-coder left a comment

Choose a reason for hiding this comment

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

Just a small question about one of the tests but otherwise looks good to me! Another big step forward for black triangle

@kylecarbskylecarbs merged commit3ba8242 intomainFeb 1, 2022
@kylecarbskylecarbs deleted the provisionerd branchFebruary 1, 2022 18:15
spikecurtis added a commit that referenced this pull requestDec 3, 2024
Upgrades yamux to 0.1.2, which includes a couple bug fixes.> Significant Changes> * Fixed a case where Streams may continue to exist and block operations even after their Session has been closed.#127 ensures when a Session closes that blocking Stream operations exit as well.> * Allow Reads on locally closed streams. Prior to#131 calling Close() and then Read() on a Stream would fail. Close should only indicate the Stream is done writing. The peer must call Close before Read considers the stream closed. See#131 for details.> * Tests have been improved significantly. See below for details.https://github.com/hashicorp/yamux/releases/tag/v0.1.2
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
1 more reviewer

@bryphe-coderbryphe-coderbryphe-coder approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kylecarbs@bryphe-coder

[8]ページ先頭

©2009-2025 Movatter.jp