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

Github exporter integration #759

Merged
merged 11 commits into from
Aug 2, 2021
Merged

Github exporter integration #759

merged 11 commits into from
Aug 2, 2021

Conversation

rgeyer
Copy link
Contributor

@rgeyer rgeyer commented Jul 21, 2021

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
Copy link
Contributor Author

rgeyer commented Jul 21, 2021

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

Copy link
Member

@rfratto rfratto left a comment

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.

docs/configuration/integrations/github-exporter-config.md Outdated Show resolved Hide resolved
docs/configuration/integrations/github-exporter-config.md Outdated Show resolved Hide resolved
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
Member

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
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
Member

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
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
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 😂

Copy link
Collaborator

@mattdurham mattdurham left a comment

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
Copy link
Contributor Author

rgeyer commented Jul 22, 2021

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
@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