Skip to content

Feat/us767 dacc new konnector status indicator

What does this MR do and why?

Add new usage events triggered before the konnector has been connected for the first time. Send a new indicator based on these usage events konnector-attempts-monthly, which counts the attempt's amount per konnector per month.

---> This indicator is not send anymore if the user has already been konnected to the given konnector.

Screenshots or screen recordings

The result :

image

How to set up and validate locally (or on alpha)

You need to test both on local and alpha since we can't connect Konnectors in local (and test these usage events) For local testing, use this usageEvent file :

attemptsEvents.json Follow : doc to use dacc locally : https://doc.self-data.alpha.grandlyon.com/ecolyo/functionalities/dacc/

Local

  • Delete your usageEvent doctype in db and then import with ACH the file above.
  • Run scripts/server.js
  • Build your application with yarn build-dev
  • Run the aggregatorUsageEvent service : yarn run cozy-konnector-dev -m manifest.webapp build/services/aggregatorUsageEvents/ecolyo.js
  • You should see the 3 indicators aggregated (among others) for the connection ATTEMPTS with success for enedi and egl, and error for grdf

On alpha

  • Reset your instance
  • Connect to konnectors (make several attempts to make the test accurate)
  • Make sure the connection process is not altered
  • Export your usageEvent data in order to check if the usage Events has been correctly triggered

MR acceptance checklist

Quality

  • Confirmed
  1. For the code that this change impacts, I believe that the automated tests validate functionality that is highly important to users. If the existing automated tests do not cover this functionality, I have added the necessary additional tests or I have added an issue to describe the automation testing gap and linked it to this MR.
  2. I have made sure that the sonar quality coverage is up to standards.
  3. I have considered the impact of this change on the front-end, back-end, and database portions of the system where appropriate and applied.
  4. I have tested this MR in all supported browsers or determined that this testing is not needed.
  5. I have confirmed that this change is backwards compatible across updates (migrate up needs a migrate down), or I have decided that this does not apply.

Performance, reliability and availability

  • Confirmed
  1. I am confident that this MR does not harm performance, or I have asked a reviewer to help assess the performance impact.
  2. I have considered the scalability risk based on future predicted growth.

Documentation

  • Confirmed
  1. I have prepared a squash commit to feed the changelog linked to the current milestone.
  2. I have added/updated documentation (also updated if the changes feature a deprecation) or I have decided that documentation changes are not needed for this MR.

Security

  • Confirmed
  1. I have confirmed that if this MR does not contains any sensitive informations hidden in the changes.

Deployment

  • Confirmed
  1. When featured on a self-data project release, i have made sure my app version in the manifest and package.json is incremented and any relative changes to the permissions are clearly written and transmitted to Cozy.
Edited by Bastien DUMONT

Merge request reports