Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Scanner/Importer stopped working #330

Closed
dominique-pfister opened this issue Aug 6, 2020 · 4 comments
Closed

Scanner/Importer stopped working #330

dominique-pfister opened this issue Aug 6, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dominique-pfister
Copy link
Contributor

The scanner stopped working on August 4, no more articles are imported. Looking at Coralogix, one can see an error message appearing periodically when the trigger five-mins-trigger executes on helix-clients:

An error occured during the scan: . Error has been caught and next scan might solve the issue.

The message doesn't reveal much, but a manual invocation of the importer reveals an expired Azure Refresh Token.

@dominique-pfister dominique-pfister added the bug Something isn't working label Aug 6, 2020
@dominique-pfister
Copy link
Contributor Author

dominique-pfister commented Aug 6, 2020

I was unable to find the current secrets used in the scanner and importer, so I manually deployed 2 actions

  • helix-theblog-scanner@debug
  • helix-theblog-importer@debug

with valid credentials (executed with OneDrive user helix@adobe.com).

I furthermore disabled the current rule /helix-clients/five-mins-scan and created a new rule:

  • /helix-clients/five-mins-scan-temporary

that invokes the @debug scanner every 5 minutes as a temporary workaround.

A proper fix consists in switching from refresh token to username/password based login in OneDrive, as in the helix-onedrive-listener:

https://github.com/adobe/helix-onedrive-listener/blob/760ca95ea181a91622928c05468e0e414d6ca6d7/src/utils.js#L16

@kptdobe
Copy link
Contributor

kptdobe commented Aug 12, 2020

To solve this, here is what I have done:

For the scanner:

  1. create a new refresh token with https://github.com/adobe/helix-onedrive-cli
  2. update the token in CircleCi - https://app.circleci.com/settings/project/github/adobe/helix-theblog-scanner/environment-variables
  3. trigger a new release with an empty commit git commit --allow-empty -m "fix(ci): trigger a new clean release"
  4. delete the /helix-clients/five-mins-scan-temporaryrule
  5. re-enable the /helix-clients/five-mins-scan rule
  6. create a follow up issue to use username / password (change does not seem trivial): see OneDrive: use username/password based login instead of refresh token helix-theblog-scanner#15

For the importer:

  1. create a new refresh token with https://github.com/adobe/helix-onedrive-cli
  2. update the token in CircleCi - https://app.circleci.com/settings/project/github/adobe/helix-theblog-importer/environment-variables
  3. trigger a new release with an empty commit git commit --allow-empty -m "fix(ci): trigger a new clean release"
  4. create a follow up issue to use username / password (change does not seem trivial): see OneDrive: use username/password based login instead of refresh token helix-theblog-importer#80

Since we might get rid of the importer sooner than later, not sure if this is worth changing the OneDrive login.

@kptdobe
Copy link
Contributor

kptdobe commented Aug 12, 2020

Seems to be back to normal.

@kptdobe kptdobe closed this as completed Aug 12, 2020
@kptdobe
Copy link
Contributor

kptdobe commented Aug 12, 2020

Thanks @dominique-pfister for the tmp fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants