pion / .goassets Goto Github PK
View Code? Open in Web Editor NEWAsset files automatically deployed to Go package repositories
Home Page: https://pion.ly/
License: MIT License
Asset files automatically deployed to Go package repositories
Home Page: https://pion.ly/
License: MIT License
Unfortunately, we're impacted. I don't believe we use any secrets in our CI for this repo thankfully. But I can't verify that to be 100% sure since I don't have admin access to this repo. I also don't know if other repos in the pion org may be affected and require secrets rolling.
Paging @Sean-Der
Metadata lint job on PRs to non-master branch (e.g. v3 branch) detect errors on unrelated commits.
What do you think @at-wat? I am not auditing anything if the build passes personally.
It is just taking more developer time/making the project look bad when we have open PRs.
pion/stun
has a test script and makefile.
Detect hook script and execute.
The go test
output can be overwhelming if there's a lot of tests, and it can be hard to find the actual failure. This makes it annoying when trying to find the broken test in CI.
There's a rather nice library gotestfmt that prettifies the output and makes each test a collapsible section in the GitHub Actions UI. The use of colour and emoji in the output makes it easier to spot what's broken.
How would people feel about using it? I would only integrate it in CI, so we don't affect people's local flows and preferences.
Reusable workflow feature is GA since Nov 2021.
https://github.blog/2021-11-29-github-actions-reusable-workflows-is-generally-available/
https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow
I think we should start maintaining proper CHANGELOGs across the projects. I would propose to adopt the https://keepachangelog.com/en/1.0.0/ format for this.
I feel extremely awkward having to add myself to the README whenever I contribute even the most minuscule changes to a pion repo. On the one hand I appreciate the shout-out, on the other hand, it's awkward. It's also a bit out of the ordinary compared to most other projects as far as additional things you need to do when contributing.
Instead I would propose to move attribution into a CHANGELOG(.md). This is a far more common place to keep information around who has contributed to what, and would also let us attribute actual changes over time more easily to individuals than a single static entry in the README. Expecting PRs to also provide a changelog entry, when necessary, is also fairly commonplace.
Though there are many ways to maintain a changelog, I like the idea of having something that is at least standard across our repos, and as such I'd say we should follow the https://keepachangelog.com/en/1.0.0/ format. It might not be an industry wide standard, but at least it's a document we can point everyone at (which limits the amount of bike shedding around the format) and in general results in fairly nice changelog entries. We use the format in flask-dance if you want to get a sense of what it looks like.
Having a somewhat standardised format also makes it easier to create tooling around that format, which has already been done in other languages, like https://github.com/contentful-labs/keepachangelog.
We've had discussions before about switching the commit format to Conventional Commits. If we do that, we'd probably be better off generating the changelog automatically using the Conventional Changelog set of tooling instead. We could also use something like git-chglog to generate a Convetional Changelog.
The reason I'm proposing Keep A Changelog over Conventional Changelog is that the latter is highly dependent on using the Conventional Commits format everywhere, requiring us to put that in place before we get to this.
The transport module has a CodeQL GitHub workflow as can be found here: https://github.com/pion/transport/blob/master/.github/workflows/codeql-analysis.yml
I do not see this workflow in this repo.
Should we add it to goassets as well?
Or is it obsolete and can be removed from the transport module?
Load shell variables from file
I used these to replace quickly
gsed -i 's/lim := /defer /g' *.go
gsed -i '/defer lim.Stop()/d' *.go
gsed -i '/test.TimeOut/s/$/.Stop()/' *.go
What do you think @stv0g ?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
.github/workflows/assets-sync-sandbox.yml
actions/checkout v3
at-wat/assets-sync-action v0
.github/workflows/assets-sync.yml
actions/checkout v3
at-wat/assets-sync-action v0
at-wat/assets-sync-action v0
.github/workflows/codeql-analysis.reusable.yml
actions/checkout v3
github/codeql-action v2
github/codeql-action v2
.github/workflows/generate-authors.reusable.yml
actions/checkout v3
actions/checkout v3
.github/workflows/generate-authors.yaml
actions/checkout v3
.github/workflows/lint.reusable.yml
actions/checkout v3
actions/checkout v3
actions/checkout v3
golangci/golangci-lint-action v3
.github/workflows/lint.yml
actions/checkout v3
.github/workflows/release.reusable.yml
actions/checkout v3
actions/setup-go v4
goreleaser/goreleaser-action v4
.github/workflows/renovate-go-sum-fix.reusable.yml
actions/checkout v3
at-wat/go-sum-fix-action v0
.github/workflows/shfmt.yml
actions/checkout v3
.github/workflows/test-i386.reusable.yml
actions/checkout v3
actions/cache v3
.github/workflows/test-wasm.reusable.yml
actions/checkout v3
actions/setup-node v3
actions/cache v3
codecov/codecov-action v3
.github/workflows/test.reusable.yml
actions/checkout v3
actions/cache v3
actions/setup-go v4
haveyoudebuggedit/gotestfmt-action v2
actions/upload-artifact v3
codecov/codecov-action v3
.github/workflows/tidy-check.reusable.yml
actions/checkout v3
actions/setup-go v4
.github/workflows/update-go-version.yml
actions/checkout v3
latest-go-version
golang 1.19
It doesn't seem like we are getting much value from using this library. I vote drop it. It is used in pion/quic and pion/sctp
@scorpionknifes @enobufs Yay/Nay?
I think we could try to rewrite our Bash-based linting scripts in Go.
WDYT?
What do you think about adding a REUSE CI workflow?
It basically means, that each file is checked to have proper licensing info.
E.g. by adding a single comment: SPDX-License-Identifier: Apache-2.0
Reported by @Sean-Der (from: #74 (comment))
We also need to improve the commit message linter. It would save me so much time if it spit out a 'GitHub Actions Native' message. The users don't need to open up the action stdout.
Generating package sum requires full source and it is resource consuming job; Renovate bot looks not doing it for all package.
ref: renovatebot/renovate#3017
e.g. pion/dtls@9180e92
- golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM=
- golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
which should be
- golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM=
- golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876 h1:sKJQZMuxjOAR/Uo2LBfU90onWEf1dF4C+0hPJCc9Mpc=
+ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
It causes an error on Go 1.13. https://travis-ci.org/pion/dtls/builds/636289709
verifying golang.org/x/[email protected]: golang.org/x/[email protected]: open /go/pkg/sumdb/sum.golang.org/latest: no such file or directory
Adding a CI job to do go mod download
, go mod tidy
, commit and push would fix it.
.goassets/ci/.github/lint-filename.sh
Line 12 in 24c338b
Filename can contain number.
Official example: base64.go
https://github.com/golang/go/tree/master/src/encoding/base64
Failed run: https://github.com/pion/webrtc/actions/runs/8077383883/job/22067676162?pr=2683
Running [/home/runner/golangci-lint-1.52.2-linux-amd64/golangci-lint run --out-format=github-actions $GOLANGCI_LINT_EXRA_ARGS] in [] ...
Error: undefined: webrtc (typecheck)
Error: undefined: webrtc (typecheck)
Error: undefined: webrtc (typecheck)
Error: undefined: ice (typecheck)
Error: undefined: ice (typecheck)
Error: undefined: ice (typecheck)
Error: undefined: max (typecheck)
Error: issues found
Ran golangci-lint in 2530ms
Succeeded run (re-run): https://github.com/pion/webrtc/actions/runs/8077383883/job/22067714078?pr=2683
Running [/home/runner/golangci-lint-1.52.2-linux-amd64/golangci-lint run --out-format=github-actions $GOLANGCI_LINT_EXRA_ARGS] in [] ...
golangci-lint found no issues
Ran golangci-lint in 49563ms
Its one of the major reasons new contributions are failing the CI for..
Right now we are just doing the default config. We should look through the linters and decide which ones we want.
#196 seems introduced a lot of new lint errors:
https://github.com/pion/webrtc/actions/runs/8089732277/job/22106111066?pr=2685#step:5:25
Running [/home/runner/golangci-lint-1.56.2-linux-amd64/golangci-lint run --out-format=github-actions $GOLANGCI_LINT_EXRA_ARGS] in [] ...
Warning: unused-parameter: parameter 'headPacket' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'o' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'receiver' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'receiver' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'receiver' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'id' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'track' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'track' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'track' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'd' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'attributes' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'pair' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'cs' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'd' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'ss' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'pcs' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'ics' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'trackRemote' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'i' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'i' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'i' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'midValue' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'm' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'msg' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'd' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'msg' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'msg' seems to be unused, consider removing or renaming it as _ (revive)
Warning: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Error: issues found
Ran golangci-lint in 33923ms
Originally posted by @at-wat in #196 (comment)
Commit from GitHub web UI uses CR+LF.
ref: #4 (comment)
Some of the repository has no meaning to test with WASM. (e.g. ionorg/ion#94)
Place .github/.no-wasm-test
?
I am wondering where the GITHUB_WORKSPACE
env variable is set?
See: https://github.com/pion/.goassets/blob/master/ci/.github/generate-authors.sh#L15
WASM is still in Minimum Viable Product stage. IP socket is not yet supported and net_fake.go is used in Go1.13.
A lot of the tests using net.Conn fail to be built, deadlock, or cause below runtime error in net_fake.go
.
panic: interface conversion: net.sockaddr is *net.UDPAddr, not *net.TCPAddr
Now, some tests in dtls, ice, sctp, transport, turn, and webrtc packages are disabled.
Once WASM and Go support UDP connection, we can enable them.
ref: #4 (comment)
I think we should move the list of contributors in the README file to a dedicated AUTHORS.txt file like for the other repos.
I currently receive the following warnings when running the most recent version of golangci-lint:
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
I think we should disable these linters or replace them by a more updated alternative.
Currently, API compatibility check is done in the main test job.
So, we can't distinguish whether the unit tests are failing or just pointing out API breakage from CI status.
golang removed it golang/go#53961
This just removes complexity/makes contributing a little easier.
What do you think of requiring require
everywhere @stv0g
I am merging your change that does this in pion/ice, seems like a good idea to be consistent!
I see some pion repos having their own editorconfig file.
E.g. https://github.com/pion/dtls/blob/master/.editorconfig
I propose to move it into the goassets repo.
https://github.com/codecov/codecov-action?tab=readme-ov-file#v4-release
Breaking Changes
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
TODO
The generate-authors workflow currently rewrites history by smashing the AUTHORS changes into the latest commit and then force-pushing to the branch.
That's a tidbit ugly, not actually true history wise and makes it annoying when you need to push additional changes since local and remote history have now diverged.
It would be nice to change this to being a separate commit. In most cases we squash-merge PRs anyway so the end result after the merge will be the same.
(PR to this .goassets repository)
commit range is not calculated correctly
go get -u github.com/ory/go-acc
updates go.mod and go.sum.
After installing go-acc
, go test
fails by
/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:20:2: missing go.sum entry for module providing package github.com/davecgh/go-spew/spew (imported by github.com/stretchr/testify/assert); to add:
go get github.com/stretchr/testify/[email protected]
FAIL github.com/pion/interceptor/internal/test [setup failed]
The script requires TRAVIS_COMMIT_RANGE
environment variable.
.goassets/.github/workflows/lint.yml
Lines 23 to 35 in 326ae64
TRAVIS_COMMIT_RANGE
environment variable. (I'm not very sure it covers all situations.)We use https://github.com/google/go-licenses to check all dependencies of our product have allowed licenses.
Currently, license can't be automatically detected in many pion packages.
E0519 02:38:40.946603 3890 library.go:122] Failed to find license for github.com/pion/ice/v2: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]"
E0519 02:38:41.147227 3890 library.go:122] Failed to find license for github.com/pion/ice/v2/internal/atomic: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]/internal/atomic" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]"
E0519 02:38:41.165343 3890 library.go:122] Failed to find license for github.com/pion/ice/v2/internal/fakenet: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]/internal/fakenet" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]"
E0519 02:38:41.179924 3890 library.go:122] Failed to find license for github.com/pion/ice/v2/internal/stun: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]/internal/stun" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/ice/[email protected]"
E0519 02:38:41.216210 3890 library.go:122] Failed to find license for github.com/pion/stun: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/[email protected]" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/[email protected]"
E0519 02:38:41.248084 3890 library.go:122] Failed to find license for github.com/pion/stun/internal/hmac: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/[email protected]/internal/hmac" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/[email protected]"
E0519 02:38:41.455293 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:41.503584 3890 library.go:122] Failed to find license for github.com/pion/srtp/v2: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/srtp/[email protected]" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/srtp/[email protected]"
E0519 02:38:41.529922 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/internal/fmtp: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/internal/fmtp" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:41.553269 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/internal/mux: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/internal/mux" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:41.578211 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/internal/util: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/internal/util" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:41.604190 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/pkg/media: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/pkg/media" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:41.627958 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/pkg/rtcerr: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/pkg/rtcerr" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
E0519 02:38:42.477853 3890 library.go:122] Failed to find license for github.com/pion/webrtc/v3/pkg/media/samplebuilder: cannot find a known open source license for "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]/pkg/media/samplebuilder" whose name matches regexp ^(?i)((UN)?LICEN(S|C)E|COPYING|README|NOTICE).*$ and locates up until "/home/runner/go/pkg/mod/github.com/pion/webrtc/[email protected]"
After migrating to GitHub actions GO_JS_WASM_EXEC
, TEST_EXTRA_ARGS
and GOLANGCI_LINT_EXRA_ARGS
was broken.
I hardcoded these values for now, just so we can move ahead.
Update module github.com/pion/interceptor to v0.0.11
is not allowed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.