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

Fail to dedupe with 403 error on /api/action/package_update #4548

Closed
FuhuXia opened this issue Dec 6, 2023 · 2 comments
Closed

Fail to dedupe with 403 error on /api/action/package_update #4548

FuhuXia opened this issue Dec 6, 2023 · 2 comments
Labels
bug Software defect or bug harvest-duplicates Issues related to Duplicated Datasets

Comments

@FuhuXia
Copy link
Member

FuhuXia commented Dec 6, 2023

The dedupe script is not working any more.

Run dedupe GH action at https://github.com/GSA/datagov-dedupe/actions/workflows/run_dedupe.yml, or run local command

pipenv run python duplicates-identifier-api.py ca-gov --api-key some-api-key --newest

It gives error:

...
  File "/home/fxia/git/datagov/datagov-dedupe/dedupe/ckan_api.py", line 342, in update_package
    self.request("POST", "/action/package_update", json=package)
  File "/home/fxia/git/datagov/datagov-dedupe/dedupe/ckan_api.py", line 102, in request
    raise CkanApiStatusException(
dedupe.ckan_api.CkanApiStatusException: Unsuccessful status code 403

On the server side, there is 403 error.

# on catalog-admin
 [ckan.config.middleware.flask_app]  403 /api/action/package_update render time 0.407 seconds

# on catalog-proxy
NginxLog "POST /api/action/package_update HTTP/1.1" 403 268

Sketch

[Notes or a checklist reflecting our understanding of the selected approach]

@FuhuXia FuhuXia added the bug Software defect or bug label Dec 6, 2023
@gujral-rei gujral-rei moved this to 📟 Sprint Backlog [7] in data.gov team board Dec 7, 2023
@FuhuXia FuhuXia moved this from 📟 Sprint Backlog [7] to 🏗 In Progress [8] in data.gov team board Dec 12, 2023
@FuhuXia FuhuXia moved this from 🏗 In Progress [8] to 📟 Sprint Backlog [7] in data.gov team board Dec 12, 2023
@FuhuXia FuhuXia moved this from 📟 Sprint Backlog [7] to 🏗 In Progress [8] in data.gov team board Dec 14, 2023
@FuhuXia FuhuXia self-assigned this Dec 14, 2023
@FuhuXia
Copy link
Member Author

FuhuXia commented Dec 14, 2023

I assume we are using the user geo.gov's credential to run the dedupe script. But geo.gov has no api-token. Not sure why but if we create a new one then update the GH secret, it will be working again.

@btylerburton btylerburton added the harvest-duplicates Issues related to Duplicated Datasets label Dec 21, 2023
@FuhuXia
Copy link
Member Author

FuhuXia commented Dec 26, 2023

Token github-dedupe was created for user geo.gov, used in GH secret. Dedupe script runs fine now.

@FuhuXia FuhuXia closed this as completed Dec 26, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In Progress [8] to ✔ Done in data.gov team board Dec 26, 2023
@btylerburton btylerburton moved this from ✔ Done to 🗄 Closed in data.gov team board Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software defect or bug harvest-duplicates Issues related to Duplicated Datasets
Projects
Archived in project
Development

No branches or pull requests

2 participants