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

Recommend/create service account for geoipupdate #1046

Closed
pshiu opened this issue Feb 14, 2024 · 10 comments
Closed

Recommend/create service account for geoipupdate #1046

pshiu opened this issue Feb 14, 2024 · 10 comments
Assignees

Comments

@pshiu
Copy link

pshiu commented Feb 14, 2024

Firm Name

2U

Urgency

Low (2 weeks)

Requested Change

May I request a recommendation for a GitHub (service) account for one of our bots to use to continue to refresh file GeoLite2-Country.mmdb in openedx/edx-platform?

I would need assistance getting the username, email, and a personal access token for that account, and in ensuring that the account and token has access to push commits and open/merge PRs in edx-platform.

Reasoning

  • Bot purpose: We run a Jenkins job called "update-geoip-db" that refreshes the edx-platform file GeoLite2-Country.mmdb [example PR] using a script from openedx/ecommerce-scripts called geoipupdate/pull.py.
  • Bot relevance: The path to this file is stored in an LMS setting called GEOIP_PATH, used by country_code_from_ip(), used in a couple places [GitHub search] across LMS.
  • Why now? Our job is currently failing because it piggybacked on the edx-transifex-bot user, which was recently deprecated [public-engineering#225]
  • How does the script auth? The script uses [transifex/utils.py] to authenticate with GitHub, which requires a GitHub personal access token to use.
  • What permissions? The script will write commits, open PRs, and merge PRs in edx-platform.
@pshiu pshiu added the github-request Request for change to access level or settings in the openedx GitHub organization. label Feb 14, 2024
@openedx-workflow-automation
Copy link

Thank you for your report! @openedx/axim-oncall will triage within a business day. Simple requests usually take 2-3 business days to resolve; more complex requests could take longer.

@pshiu
Copy link
Author

pshiu commented Feb 14, 2024

cc: @robrap

@bmtcril bmtcril self-assigned this Feb 15, 2024
@bmtcril
Copy link
Contributor

bmtcril commented Feb 15, 2024

Hi @pshiu, we're kicking around the best way to go about keeping this job around. I'm currently leaning toward moving it to a Github action and bringing the code into edx-platform. Are there other repos using it that you know of?

@bmtcril
Copy link
Contributor

bmtcril commented Feb 15, 2024

@feanil this seems like a bigger issue than on-call, if we wanted to bring this code into edx-platform in a way similar to the tubular migration, then create a github action for it, do you think that's work aximprovements could pick up?

@pshiu
Copy link
Author

pshiu commented Feb 16, 2024

Hey @bmtcril! The only repo it runs on is edx-platform. No particular rush on this one - thank you.

@bmtcril
Copy link
Contributor

bmtcril commented Feb 16, 2024

Hi @openedx/axim-aximprovements ! I spoke with @feanil about this task and I think it's too big for us to handle as an on-call ticket. Can you take a look and let me know if you have any questions? I believe the work here is:

  • Move the scripts from ecommerce-scripts to edx-platform similar to the tubular work
  • Create a bot user with permissions to create PRs against edx-platform
  • Get credentials from maxmind to access the GeoIP web service and store them in the github secrets for edx-platform
  • Create a github action to run weekly that will download the new file and open a PR if there are any changes

This isn't super urgent, but shouldn't sit longer than a few weeks. Thanks!

@bmtcril bmtcril removed their assignment Feb 16, 2024
@arbrandes arbrandes changed the title [GH Request] Recommend/create service account for geoipupdate Recommend/create service account for geoipupdate Feb 21, 2024
@arbrandes arbrandes removed the github-request Request for change to access level or settings in the openedx GitHub organization. label Feb 21, 2024
@arbrandes
Copy link
Contributor

Removing github-request label since this won't be handled by on-call.

@farhan
Copy link

farhan commented Feb 28, 2024

Adding details as per discussed with @feanil
We have to convert the following script into Github Actions workflow rather than calling the script.
https://github.com/openedx/ecommerce-scripts/blob/master/geoipupdate/pull.py

@farhan farhan moved this from 🔖 Ready to 🏗 In progress in Aximprovements Team Mar 13, 2024
@farhan farhan self-assigned this Mar 13, 2024
@farhan farhan moved this from 🏗 In progress to 🔖 Ready in Aximprovements Team Mar 15, 2024
@farhan farhan moved this from 🔖 Ready to 🏗 In progress in Aximprovements Team Apr 9, 2024
@farhan farhan moved this from 🏗 In progress to 👀 In review in Aximprovements Team May 2, 2024
farhan added a commit to farhan/edx-platform that referenced this issue May 2, 2024
@farhan farhan moved this from 👀 In review to 🏗 In progress in Aximprovements Team May 5, 2024
@farhan farhan moved this from 🏗 In progress to 👀 In review in Aximprovements Team May 6, 2024
@farhan farhan moved this from 👀 In review to ✅ Done in Aximprovements Team May 6, 2024
@feanil
Copy link
Contributor

feanil commented May 9, 2024

@feanil feanil closed this as completed May 9, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Axim Engineering Tasks May 9, 2024
@farhan
Copy link

farhan commented May 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Archived in project
Development

When branches are created from issues, their pull requests are automatically linked.

5 participants