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

feat: introduce audit for broken backlinks SITES-18417 #77

Merged
merged 25 commits into from
Jan 23, 2024
Merged

Conversation

dzehnder
Copy link
Contributor

@dzehnder dzehnder commented Jan 12, 2024

PR Status

This PR implements the audit worker for SITES-18417.
Relates to adobe/spacecat-audit-post-processor#37

Copy link
Contributor

@iuliag iuliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some points to be addressed below:

src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
Copy link
Member

@solaris007 solaris007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Audit results need to be stored using dataAccess.addAudit. See https://github.com/adobe/spacecat-audit-worker/blob/main/src/lhs/handler.js#L265 for reference.

src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
src/backlinks/handler.js Outdated Show resolved Hide resolved
@solaris007
Copy link
Member

We should audit on a site-level... audits need to be stored and referenced to a site. see https://github.com/adobe/spacecat-audit-worker/blob/main/src/lhs/handler.js#L353

@iuliag
Copy link
Contributor

iuliag commented Jan 16, 2024

Audit results need to be stored using dataAccess.addAudit. See https://github.com/adobe/spacecat-audit-worker/blob/main/src/lhs/handler.js#L265 for reference.

@solaris007 , this is storing the audit result in DynamoDB, no? Is it mandatory or just best practice?

We should audit on a site-level... audits need to be stored and referenced to a site. see https://github.com/adobe/spacecat-audit-worker/blob/main/src/lhs/handler.js#L353

The url passed through message represents a site, no? Or here, do you actually want to point out that all those site and audit config validations in the given link need to be done as well?

Copy link

This PR will trigger a minor release when merged.

@iuliag iuliag changed the title SITES-18417 - Introduce audit for broken backlinks feat: introduce audit for broken backlinks SITES-18417 Jan 16, 2024
@solaris007
Copy link
Member

solaris007 commented Jan 17, 2024

@iuliag

this is storing the audit result in DynamoDB, no? Is it mandatory or just best practice?

I would consider it both mandatory and best-practice :) audits should be standardized (exceptions apply), in that we store them into our data layer for exposure to our various UIs (e.g. slack bot) and via the HTTP API, serving for analysis and visualization.

The url passed through message represents a site, no? Or here, do you actually want to point out that all those site and audit config validations in the given link need to be done as well?

the URL represents a site, if the url corresponds to a baseURL (unique for sites) for a known site. all audits (exceptions apply) should check whether the audit target (the site) exists and furthermore if the audit config of the site disables audits in general or specifically for that audit type.

Where can I check what they actually represent, e.g. what is siteId, fullAuditRef?

Please see the "data model" tab here: https://lucid.app/lucidchart/f5480d07-626d-42e8-8eb5-39b0e9a1c75f/edit?viewport_loc=-128%2C323%2C2452%2C1717%2C0_0&invitationId=inv_c77bd463-5df8-4973-b70b-a8028a6ee21a

Some details also in the readme (outdated): https://github.com/adobe/spacecat-shared/tree/main/packages/spacecat-shared-data-access

@basecode
Copy link
Member

@solaris007 what of your review is blocking vs what can we do later? Before we aim for engineering excellence, I need to get the use case out in the wild to discuss how/if it makes sense. Thanks!

@solaris007
Copy link
Member

@basecode the execution of the audit in the context of a site obtained from the data layer and storage of the audit result is not engineering excellence, but essential for downstream automation and consumption

@solaris007
Copy link
Member

Create a scheduler that triggers once a week for specified sites

Weekly schedule (dev + prod) have been created with event payload { "type": "broken-backlinks" } for evaluation by the audit-scheduler lambda

src/backlinks/handler.js Show resolved Hide resolved
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c6db132) 100.00% compared to head (a517fd1) 100.00%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #77    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           10        12     +2     
  Lines         1111      1306   +195     
==========================================
+ Hits          1111      1306   +195     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/backlinks/handler.js Outdated Show resolved Hide resolved
iuliag added a commit to adobe/spacecat-api-service that referenced this pull request Jan 22, 2024
solaris007 pushed a commit to adobe/spacecat-api-service that referenced this pull request Jan 22, 2024
iuliag added a commit to adobe/spacecat-audit-scheduler that referenced this pull request Jan 22, 2024
solaris007 pushed a commit to adobe/spacecat-audit-scheduler that referenced this pull request Jan 22, 2024
@iuliag iuliag self-assigned this Jan 22, 2024
@iuliag iuliag dismissed ekremney’s stale review January 23, 2024 09:04

Please re-review

iuliag pushed a commit to adobe/spacecat-audit-post-processor that referenced this pull request Jan 23, 2024
…7) (#37)

Implement the post processor for broken-backlinks audit (SITES-18417).
Relates to adobe/spacecat-audit-worker#77.
@iuliag iuliag merged commit 034e5e8 into main Jan 23, 2024
5 checks passed
@iuliag iuliag deleted the SITES-18417 branch January 23, 2024 14:38
solaris007 pushed a commit to adobe/spacecat-audit-post-processor that referenced this pull request Jan 23, 2024
# [1.3.0](v1.2.3...v1.3.0) (2024-01-23)

### Features

* introduce post processor for broken-backlinks audit (SITES-18417) ([#37](#37)) ([7f0f699](7f0f699)), closes [adobe/spacecat-audit-worker#77](adobe/spacecat-audit-worker#77)
solaris007 pushed a commit that referenced this pull request Jan 23, 2024
# [1.7.0](v1.6.7...v1.7.0) (2024-01-23)

### Features

* introduce audit for broken-backlinks (SITES-18417) ([#77](#77)) ([034e5e8](034e5e8)), closes [adobe/spacecat-audit-post-processor#37](adobe/spacecat-audit-post-processor#37)
@solaris007
Copy link
Member

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants