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

internal: add workflow to update outdated integrations #2936

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

quinna-h
Copy link

@quinna-h quinna-h commented Oct 21, 2024

What does this PR do?

Checks if there is a new latest major available for packages. If so, emit a warning that there is a new major available.

Usage: go run latest_major_version.go emits a list of modules listed in go.mod that have a new major version available.

Issue to improve on:

  • In most cases, the integrations will follow the pattern <repo>/v<major_version> but sometimes the maintainers rename the entire module in a new major, ex. oliviere/elastic: https://github.com/olivere/elastic#releases. We currently only handle the first case.

Motivation

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@quinna-h quinna-h changed the title Add workflow to update outdated integrations internal: add workflow to update outdated integrations Oct 21, 2024
@pr-commenter
Copy link

pr-commenter bot commented Oct 21, 2024

Benchmarks

Benchmark execution time: 2024-11-26 17:39:58

Comparing candidate commit 62fd260 in PR branch quinna.halim/update-outdated-integrations-workflow with baseline commit 2cae09f in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation


- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v6

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation

.github/workflows/outdated-integrations.yml Outdated Show resolved Hide resolved
latest_major_version.go Outdated Show resolved Hide resolved
latest_major_version.go Outdated Show resolved Hide resolved
latest_major_version.go Outdated Show resolved Hide resolved
latest_major_version.go Outdated Show resolved Hide resolved
Comment on lines 24 to 30
- run: go run latest_major_version.go > latest_majors.txt

- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v6
Copy link
Contributor

Choose a reason for hiding this comment

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

From what I see for now, you are only outputting a text file with New latest major version, which I think it doesn't make much sense to be committed to the repo.

What about sending a slack notification for now? We can work on some sort of code-change actionable in the future.

@quinna-h quinna-h force-pushed the quinna.halim/update-outdated-integrations-workflow branch from c5418fd to df21b8e Compare November 20, 2024 19:06
syntax

display git diff

wip

update workflow file

Add copyright header to file

wip

update to use modfile to parse go.mod

update workflow file for testing

wip

Add dummy file for only contribs

wip

gofmt and lint

Cleanup output
@quinna-h quinna-h force-pushed the quinna.halim/update-outdated-integrations-workflow branch from a7f4d34 to 1cb4f22 Compare November 20, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants