Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Github exporter integration - #759

Merged
mattdurham merged 11 commits into
mainfrom
rgeyer/github-integration
Aug 2, 2021
Merged

Github exporter integration#759
mattdurham merged 11 commits into
mainfrom
rgeyer/github-integration

Conversation

@rgeyer

@rgeyer rgeyer commented Jul 21, 2021

Copy link
Copy Markdown
Contributor

PR Description

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

@rgeyer rgeyer changed the title Initial commit of github exporter integration Github exporter integration Jul 21, 2021
@rgeyer
rgeyer marked this pull request as ready for review July 21, 2021 22:31
@rgeyer

rgeyer commented Jul 21, 2021

Copy link
Copy Markdown
Contributor Author

This is ready for review, but before we cut a release, I'd like to get two other exporters sorted out.

@rgeyer
rgeyer requested review from mattdurham and rfratto July 21, 2021 22:32

@rfratto rfratto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Just a few small pieces of feedback.

Comment thread docs/configuration/integrations/github-exporter-config.md Outdated
Comment thread docs/configuration/integrations/github-exporter-config.md Outdated
Comment on lines +94 to +99
os.Unsetenv("API_URL")
os.Unsetenv("REPOS")
os.Unsetenv("ORGS")
os.Unsetenv("USERS")
os.Unsetenv("GITHUB_TOKEN")
os.Unsetenv("GITHUB_TOKEN_FILE")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, we might want to consider restoring them to their old value (if it existed) and unsetting if it didn't.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh yes, will do, that's a bit less invasive.

Comment on lines +72 to +78
// It's not very pretty, but this exporter is configured entirely by environment
// variables, and uses some private helper methods in it's config package to
// assemble other key pieces of the config. Thus, we can't (easily) access the
// config directly, and must assign environment variables.
//
// In an effort to avoid conflicts with other integrations, the environment vars
// are unset immediately after being consumed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😞 Can we open an issue upstream to address this? I'm not really a fan of needing to do this, but I'm comfortable getting this merged for now. Let's just stay on top of it and try to improve the situation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, as you can tell by the comment, I'm not a tremendous fan either.

I originally made this design choice when I thought I was going to use the exporter un-modified, but I have since had to make some small changes to a fork of the exporter anyhow.

I'll see if I can get this sorted and put in as a PR upstream as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Did do..

Probably made it impossible for all my changes to get upstream, but..

We'll see 😂

Comment thread docs/configuration/integrations/github-exporter-config.md Outdated

@mattdurham mattdurham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One change to documentation.

@rgeyer

rgeyer commented Jul 22, 2021

Copy link
Copy Markdown
Contributor Author

I'm not sure I understand why this PR conflicts with the CHANGELOG.md in main.. I thought I resolved them, but, this does not appear to be the case 🤔

@rgeyer
rgeyer force-pushed the rgeyer/github-integration branch from fba59f4 to 4a9aa88 Compare July 23, 2021 17:51
@rgeyer
rgeyer force-pushed the rgeyer/github-integration branch from 8eb832c to 66bf65b Compare August 2, 2021 16:55
@mattdurham
mattdurham self-requested a review August 2, 2021 17:31
@mattdurham
mattdurham merged commit 1f436f5 into main Aug 2, 2021
@mattdurham
mattdurham deleted the rgeyer/github-integration branch August 2, 2021 17:33
@mattdurham mattdurham mentioned this pull request Sep 7, 2021
3 tasks
mattdurham pushed a commit that referenced this pull request Nov 11, 2021
* Initial commit of github exporter integration

* Add github exporter config docs. Use a fork of github-exporter with small bug fixes and labeling improvements. gofmt

* Linting fixes for github-exporter

* Okay... More linting then

* Maybe running the linter locally instead of waiting for CI to bark at you is the wiser course.

* Minor github-exporter documentation change. Update github-exporter dependency to fork which cleans up the config steps

* Update docs/configuration/integrations/github-exporter-config.md

Co-authored-by: Robert Fratto <robert.fratto@grafana.com>

* Update docs/configuration/integrations/github-exporter-config.md

Co-authored-by: Robert Fratto <robert.fratto@grafana.com>

* Check for errors from github exporter config

* Actually import the packages you're using

* Rebase to main and resolve go.sum conflict

Co-authored-by: Robert Fratto <robert.fratto@grafana.com>
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 11, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants