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

[feature]: Debugging Reporter #2910

Merged
merged 27 commits into from
Jan 29, 2021
Merged

Conversation

sirugh
Copy link
Contributor

@sirugh sirugh commented Dec 17, 2020

Description

This feature/hackathon project should make it easier for folks to provide debugging info about their Magento/PWA Studio system.

I was not able to access extension or target usage info. I wasn't sure what the optimal way to do this was. Perhaps there is some tooling we have already written that exposes it.

Related Issue

Closes PWA-1091.

Acceptance

Verification Stakeholders

Specification

Verification Steps

  1. Scaffold a new app using this branch
    DEBUG_PROJECT_CREATION=1 ../pwa-studio/packages/create-pwa/bin/create-pwa
  2. In the scaffold, yarn install and yarn build:report
  3. See output!

Screenshots / Screen Captures (if appropriate)

Image from Gyazo

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Dec 17, 2020

Messages
📖

Associated JIRA tickets: PWA-1091.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Generated by 🚫 dangerJS against d527baa

Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
@revanth0212
Copy link
Contributor

Love it ❤️

Can you also add a feature where the whole output is copied to the clipboard so people can simply paste it into the issue?

@sirugh
Copy link
Contributor Author

sirugh commented Dec 17, 2020

Can you also add a feature where the whole output is copied to the clipboard so people can simply paste it into the issue?

Copy commands differ across operating systems. I figured for now it's easy enough to just ask folks to copy the output of the command into the issue when creating one.

@revanth0212
Copy link
Contributor

Can you also add a feature where the whole output is copied to the clipboard so people can simply paste it into the issue?

Copy commands differ across operating systems. I figured for now it's easy enough to just ask folks to copy the output of the command into the issue when creating one.

Ahhh got it. Makes sense.

If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Paste the output of `yarn build:report`, and any other context about the problem, here.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

}

function inspectBuildEnv() {
const osVersion = os.version();
Copy link
Contributor

@revanth0212 revanth0212 Dec 21, 2020

Choose a reason for hiding this comment

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

We need to be careful of this. os.version is added in node 13.

Failed in my local machine since I was running node 10. Do we recommend a minimum version of node for using PWA Studio?

image

Started working after I moved to the latest stable (14.15.3).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, you're right! Our monorepo package.json requires at least 10, but if this doesn't work in 10 we need a fall back (upgrading to minimum 12 is definitely out of scope).


function inspectBuildEnv() {
const osVersion = os.version();
const nodeVersion = process.version();
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure of this API? I checked the node docs and realized process.version is a string, not a function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another good catch. I wonder how I got this to work. Maybe I had it written when I ran it for the screenshot and forgot to push? 🤷 Thanks for fixing :)

jimbo
jimbo previously approved these changes Jan 12, 2021
@revanth0212
Copy link
Contributor

Not sure why the test job failed on AWS. Works fine in my local. Gonna investigate the logs for more info.

image

@revanth0212
Copy link
Contributor

Not sure why the test job failed on AWS. Works fine in my local. Gonna investigate the logs for more info.

image

Found it

image

Our CICD must be on a version of Node that does not support os.version API. We have documented this in the code but not implemented for it in tests. My bad. Ill update the tests to handle this.

@revanth0212 revanth0212 dismissed stale reviews from jimbo and tjwiebell via a061195 January 12, 2021 20:19
Copy link
Contributor Author

@sirugh sirugh left a comment

Choose a reason for hiding this comment

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

Approved again - we skip the os.version check if we aren't on >= node 13.

@sirugh sirugh added version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump. version: Patch This changeset includes backwards compatible bug fixes. and removed version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump. labels Jan 13, 2021
@dpatil-magento
Copy link
Contributor

@sirugh @revanth0212 Have some queries with respect this report tool code dependency with rest of pwa-studio.

  1. Any reason it can't be an extension? Was expecting this to work both on cloned/forked repo and scaffolded project on need basis and not by default, something like yarn venia add -D @magento/venia-sample-language-packs@0.0.1 and then yarn build:report
  2. Hope it does not interfere in default yarn install and yarn build.

@sirugh
Copy link
Contributor Author

sirugh commented Jan 29, 2021

Any reason it can't be an extension?

Haha no, but it is easier to make it a utility of buildpack than a random extension. Also the initial ticket/request suggested it be a buildpack utility, which is why I went that direction.

Stop trying to throw in scope @dpatil-magento!

Hope it does not interfere in default yarn install and yarn build.

Try it :P

@dpatil-magento dpatil-magento dismissed revanth0212’s stale review January 29, 2021 17:46

updated by requestor :P

@dpatil-magento
Copy link
Contributor

QA Approved.

@dpatil-magento dpatil-magento merged commit 28026fb into develop Jan 29, 2021
@dpatil-magento dpatil-magento deleted the rugh/hackathon-2020-build-report branch January 29, 2021 17:51
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.

6 participants