Skip to content

Commit a57495e

Browse files
authored
Merge build and refactoring changes (#1)
* Build Settings * .NET 5.0 support * Updated depdencies and contributors * README improvements * Add Consul Sample * More samples, DaprSidekickBuilder, usability tweaks * Simplify dependency injection, change to AddDaprSidekick() * More samples and bug fixes * Renamed Dapr.Sidekick to Man.Dapr.Sidekick * Added a final sample * Add issue types
1 parent 5a49423 commit a57495e

File tree

346 files changed

+3515
-1069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+3515
-1069
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
root = true
88

99
# Treat all cs files in this folder as generated code
10-
[{**/Samples,**/DaprClient,**/Native,**/Log4Net,**/Logging/Internal}/**.cs]
10+
[{**/samples/**,**/DaprClient,**/Native,**/Log4Net,**/Logging/Internal}/**.cs]
1111
generated_code = true
1212

1313
# Don't use tabs for indentation.

.github/ISSUE_TEMPLATE/bug_report.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Report a bug in Dapr Sidekick
4+
title: ''
5+
labels: kind/bug
6+
assignees: ''
7+
8+
---
9+
## Expected Behavior
10+
11+
<!-- Briefly describe what you expect to happen -->
12+
13+
## Actual Behavior
14+
15+
<!-- Briefly describe what is actually happening -->
16+
17+
## Steps to Reproduce the Problem
18+
19+
<!-- How can a maintainer reproduce this issue (be detailed) -->
20+
21+
## Release Note
22+
<!-- How should the fix for this issue be communicated in our release notes? It can be populated later. -->
23+
<!-- Keep it as a single line. Examples: -->
24+
25+
<!-- RELEASE NOTE: **ADD** New feature in Dapr Sidekick. -->
26+
<!-- RELEASE NOTE: **FIX** Bug in Dapr process manager. -->
27+
<!-- RELEASE NOTE: **UPDATE** Package library reference. -->
28+
29+
RELEASE NOTE:

.github/ISSUE_TEMPLATE/discussion.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Discussion
3+
about: Start a discussion for Dapr Sidekick
4+
title: ''
5+
labels: kind/discussion
6+
assignees: ''
7+
8+
---
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature Request
3+
about: Create a Feature Request for Dapr Sidekick
4+
title: ''
5+
labels: kind/enhancement
6+
assignees: ''
7+
8+
---
9+
## Describe the feature
10+
<!-- Please also discuss possible business value -->
11+
12+
## Release Note
13+
<!-- How should this new feature be announced in our release notes? It can be populated later. -->
14+
<!-- Keep it as a single line. Examples: -->
15+
16+
<!-- RELEASE NOTE: **ADD** New feature in Dapr Sidekick. -->
17+
<!-- RELEASE NOTE: **FIX** Bug in Dapr process manager. -->
18+
<!-- RELEASE NOTE: **UPDATE** Package library reference. -->
19+
20+
RELEASE NOTE:

.github/ISSUE_TEMPLATE/proposal.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Proposal
3+
about: Create a proposal for Dapr Sidekick
4+
title: ''
5+
labels: kind/proposal
6+
assignees: ''
7+
8+
---
9+
## Describe the proposal
10+
<!-- Please use this for a concrete design proposal for functionality. -->
11+
<!-- If you just want to request a new feature and discuss the possible business value, create a Feature Request. -->

.github/ISSUE_TEMPLATE/question.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Question
3+
about: Ask a question about Dapr Sidekick
4+
title: ''
5+
labels: kind/question
6+
assignees: ''
7+
8+
---
9+
## Ask your question here

.github/pull_request_template.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Description
2+
3+
_Please explain the changes you've made_
4+
5+
## Issue reference
6+
7+
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
8+
9+
Please reference the issue this PR will close: #_[issue number]_
10+
11+
## Checklist
12+
13+
Please make sure you've completed the relevant tasks for this PR, out of the following list:
14+
15+
* [ ] Code compiles correctly
16+
* [ ] Created/updated tests
17+
* [ ] Extended the documentation where possible
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------------------------------
5+
6+
# This script parses release version from Git tag and set the parsed version to
7+
# environment variable, REL_VERSION.
8+
9+
import os
10+
import sys
11+
12+
gitRef = os.getenv("GITHUB_REF")
13+
tagRefPrefix = "refs/tags/v"
14+
15+
with open(os.getenv("GITHUB_ENV"), "a") as githubEnv:
16+
if gitRef is None or not gitRef.startswith(tagRefPrefix):
17+
githubEnv.write("REL_VERSION=edge\n")
18+
print ("This is daily build from {}...".format(gitRef))
19+
sys.exit(0)
20+
21+
releaseVersion = gitRef[len(tagRefPrefix):]
22+
releaseNotePath="docs/release_notes/v{}.md".format(releaseVersion)
23+
24+
if gitRef.find("-rc.") > 0:
25+
print ("Release Candidate build from {}...".format(gitRef))
26+
else:
27+
# Set LATEST_RELEASE to true
28+
githubEnv.write("LATEST_RELEASE=true\n")
29+
print ("Release build from {}...".format(gitRef))
30+
31+
githubEnv.write("REL_VERSION={}\n".format(releaseVersion))

.github/workflows/build.yaml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
- feature-*
9+
tags:
10+
- v*
11+
12+
pull_request:
13+
branches:
14+
- main
15+
- release-*
16+
17+
jobs:
18+
build:
19+
name: Build
20+
runs-on: windows-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Parse release version
24+
run: python ./.github/scripts/get_release_version.py
25+
- name: Build
26+
run: dotnet build --configuration release
27+
- name: Generate Packages
28+
run: dotnet pack --configuration release
29+
30+
test:
31+
name: Unit Tests
32+
runs-on: windows-latest
33+
strategy:
34+
matrix:
35+
dotnet-version: ['net35', 'net48', 'net50']
36+
include:
37+
- dotnet-version: 'net35'
38+
display-name: '.NET Framework 3.5'
39+
framework: 'net35'
40+
logger: '--logger="trx"'
41+
- dotnet-version: 'net48'
42+
display-name: '.NET Framework 4.8'
43+
framework: 'net48'
44+
logger: '--logger="GitHubActions;report-warnings=false" --logger="trx"'
45+
- dotnet-version: 'net50'
46+
display-name: '.NET 5.0'
47+
framework: 'net5.0'
48+
logger: '--logger="GitHubActions;report-warnings=false" --logger="trx"'
49+
steps:
50+
- uses: actions/checkout@v2
51+
- name: Parse release version
52+
run: python ./.github/scripts/get_release_version.py
53+
- name: Build
54+
# disable deterministic builds, just for test run. Deterministic builds break coverage for some reason
55+
run: dotnet build --configuration release /p:GITHUB_ACTIONS=false
56+
- name: Test
57+
continue-on-error: true # proceed if tests fail, the report step will report the failure with more details.
58+
run: dotnet test -c release --no-build --no-restore -f ${{ matrix.framework }} ${{ matrix.logger }} -r "${{ github.workspace }}/TestResults" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:GITHUB_ACTIONS=false
59+
- name: Upload test coverage
60+
uses: codecov/codecov-action@v1
61+
with:
62+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
63+
flags: ${{ matrix.framework }}
64+
- name: Parse Trx files
65+
uses: NasAmin/[email protected]
66+
id: trx-parser
67+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository # does not work on PRs from forks
68+
with:
69+
TRX_PATH: ${{ github.workspace }}/TestResults
70+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# These owners are the maintainers and approvers of this repo
2-
* @maintainers-dapr-sidekick @approvers-dapr-sidekick
2+
* @dapr-sidekick-maintainers

CONTRIBUTING.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contribution Guidelines
2+
3+
Thank you for your interest in Dapr Sidekick!
4+
5+
This project welcomes contributions and suggestions. Contributions come in many forms such as submitting issues, writing code or participating in discussions.
6+
7+
This document provides the guidelines for how to contribute to the Dapr Sidekick project.
8+
9+
## Issues
10+
11+
This section describes the guidelines for submitting issues.
12+
13+
### Issue Types
14+
15+
There are 5 types of issues:
16+
17+
- Issue/Bug: You've found a bug with the code, and want to report it, or create an issue to track the bug.
18+
- Issue/Discussion: You have something on your mind, which requires input form others in a discussion, before it eventually manifests as a proposal.
19+
- Issue/Feature Request: You would like to request a new feature to be implemented by the community. This would normally be smaller in scope than a Proposal.
20+
- Issue/Proposal: Used for items that propose a new idea or functionality, including features you would like to implement yourself. This allows feedback from others before code is written.
21+
- Issue/Question: Use this issue type, if you need help or have a question.
22+
23+
### Before You File
24+
25+
Before you file an issue, make sure you've checked the following:
26+
27+
1. Check for existing issues
28+
- Before you create a new issue, please do a search in [open issues](https://github.com/man-group/dapr-sidekick-dotnet/issues) to see if the issue or feature request has already been filed.
29+
- If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reaction-to-pull-requests-issues-and-comments). Use a reaction:
30+
- 👍 up-vote
31+
- 👎 down-vote
32+
1. For bugs
33+
- Check it's not an environment issue. For example, make sure [Dapr prerequisites](https://docs.dapr.io/getting-started/install-dapr-selfhost/) are in place. (state stores, bindings, etc.)
34+
- You have as much data as possible. This usually comes in the form of logs and/or stacktrace.
35+
36+
## Contributing to Dapr Sidekick
37+
38+
This section describes the guidelines for contributing code / docs to Dapr Sidekick.
39+
40+
### Pull Requests
41+
42+
All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:
43+
44+
1. Make sure there's an issue (bug or proposal) raised, which sets the expectations for the contribution you are about to make.
45+
1. Fork the repo and create a new branch
46+
1. Create your change
47+
- Code changes require tests
48+
1. Update relevant documentation for the change
49+
1. Commit and open a PR
50+
1. Wait for the CI process to finish and make sure all checks are green
51+
1. A maintainer of the project will be assigned, and you can expect a review within a few days
52+
53+
#### Use work-in-progress PRs for early feedback
54+
55+
A good way to communicate before investing too much time is to create a "Work-in-progress" PR and share it with your reviewers. The standard way of doing this is to add a "[WIP]" prefix in your PR's title and assign the **do-not-merge** label. This will let people looking at your PR know that it is not well baked yet.
56+
57+
**Thank You!** - Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.

GitVersion.yml

-11
This file was deleted.

0 commit comments

Comments
 (0)