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

Add github CI/CD setup #5

Merged
merged 7 commits into from
Sep 19, 2024
Merged

Add github CI/CD setup #5

merged 7 commits into from
Sep 19, 2024

Conversation

nsavoire
Copy link
Collaborator

@nsavoire nsavoire commented Sep 18, 2024

First version of github CI (heavily inspired by dd-trace-go):

  • Go build and test
  • Publish pre-release on main
  • golang-ci lint
  • codeql analysis (disabled for now as repo is private) + govulncheck
  • copyright check

@nsavoire nsavoire requested a review from a team as a code owner September 18, 2024 09:13
@nsavoire nsavoire force-pushed the nsavoire/ci_setup branch 6 times, most recently from 517d5a0 to f636d00 Compare September 18, 2024 11:54
Copy link
Collaborator

@r1viollet r1viollet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@r1viollet r1viollet left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +4 to +5
RUN apt-get update && \
apt-get install -y --no-install-recommends binutils ca-certificates

Choose a reason for hiding this comment

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

Code Quality Violation

package binutils should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

@nsavoire nsavoire force-pushed the nsavoire/ci_setup branch 7 times, most recently from f0952dd to 83f3514 Compare September 19, 2024 14:30
nsavoire and others added 4 commits September 19, 2024 14:48
Copy link
Member

@Gandem Gandem left a comment

Choose a reason for hiding this comment

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

Neat, thanks!

)

// Assert that we implement the full Reporter interface.
var _ reporter.Reporter = (*DatadogReporter)(nil)

const profilerName = "dd-otel-profiling-agent"
const profilerName = "dd-opentelemetry-profiler"
Copy link
Member

Choose a reason for hiding this comment

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

@nsavoire We will need to update the code in the backend to reflect this change. Do you mind following up or adding a card to track this 🙇 ?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Still, there are lot places where we are using (dd-)otel-profiling-agent as repository or executable name and that will need to be updated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -4,6 +4,9 @@
* See the file "LICENSE" for details.
Copy link
Member

Choose a reason for hiding this comment

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

Was it intentional to leave the old copyright here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, because it's based on cli_flags.go from opentelemetry-ebpf-profiler.
I also added Datadog copyright because we modified it (same for helpers.go and some other files).

- name: Check out
uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to use the official golangci/golangci-lint-action ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's what dd-trace-go is using and since I don't have much experience with Go, I figured they knew what they are doing 😄

@nsavoire nsavoire merged commit 637395b into main Sep 19, 2024
10 checks passed
@nsavoire nsavoire deleted the nsavoire/ci_setup branch September 19, 2024 17:45
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.

3 participants