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

Analyzer: Add API for a service #22035

Merged
merged 35 commits into from
Jan 25, 2022
Merged

Analyzer: Add API for a service #22035

merged 35 commits into from
Jan 25, 2022

Conversation

brbrr
Copy link
Contributor

@brbrr brbrr commented Dec 7, 2021

Fixes #

Changes proposed in this Pull Request:

  • Adds routines to run Analyzer scans on multiple plugins async
  • Adds /?status API endpoint to report the status of the scan
  • Adds /?analyze` endpoint to trigger a scan for specified plugin and its versions.

Jetpack product discussion

p9dueE-3LX-p2

Does this pull request change what data or activity we track or use?

n/a

Testing instructions:

  • Try running the scan yourself: p9dueE-3LX-p2#comment-6990

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Dec 7, 2021
@kraftbj
Copy link
Contributor

kraftbj commented Dec 7, 2021

Note: I'm going to try switching use to PSR 12 for the Analyzer so we don't have to rework this code for WPCS. #22040

@brbrr brbrr added [Status] In Progress and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Dec 8, 2021
@brbrr brbrr self-assigned this Dec 8, 2021
@github-actions github-actions bot added the Actions GitHub actions used to automate some of the work around releases and repository management label Dec 8, 2021
@kraftbj kraftbj requested a review from anomiex December 17, 2021 04:16
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Very MVC-y.

projects/packages/analyzer/composer.json Outdated Show resolved Hide resolved
projects/packages/analyzer/scripts/jp-analyze-parallel.php Outdated Show resolved Hide resolved
projects/packages/analyzer/scripts/jp-analyze-parallel.php Outdated Show resolved Hide resolved
projects/packages/analyzer/scripts/jp-analyze-parallel.php Outdated Show resolved Hide resolved
projects/packages/analyzer/scripts/jp-analyze-parallel.php Outdated Show resolved Hide resolved
projects/packages/analyzer/src/api/class-data-store.php Outdated Show resolved Hide resolved
projects/packages/analyzer/src/api/class-data-store.php Outdated Show resolved Hide resolved
projects/packages/analyzer/src/api/class-router.php Outdated Show resolved Hide resolved
projects/packages/analyzer/src/diff-generator.php Outdated Show resolved Hide resolved
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

That was the wrong button...

Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Sorry for being slow about getting back to reviewing this.

projects/packages/analyzer/scripts/jp-warnings-job.php Outdated Show resolved Hide resolved
.github/files/phpcompatibility-dev-phpcs.xml Outdated Show resolved Hide resolved
.phpcs.xml.dist Outdated Show resolved Hide resolved
projects/packages/analyzer/scripts/jp-analyze-parallel.php Outdated Show resolved Hide resolved
projects/packages/analyzer/src/diff-generator.php Outdated Show resolved Hide resolved
@brbrr brbrr requested a review from anomiex January 19, 2022 09:41
anomiex
anomiex previously approved these changes Jan 19, 2022
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Seems good enough to iterate on, although it might be worth a quick fix for the one open comment before merging.

@anomiex anomiex added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 19, 2022
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Err, wait. Something's wrong with the linting...

@anomiex anomiex dismissed their stale review January 19, 2022 19:14

Err, wait. Something's wrong with the linting...

.phpcs.xml.dist Outdated Show resolved Hide resolved
@brbrr brbrr added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jan 24, 2022
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Let's try it.

@anomiex anomiex added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 24, 2022
@brbrr brbrr merged commit f0c1647 into master Jan 25, 2022
@brbrr brbrr deleted the add/analyzer-api branch January 25, 2022 04:20
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions GitHub actions used to automate some of the work around releases and repository management [Package] Analyzer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants