Skip to content

Improve components infrastructure #12145

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

Merged
merged 74 commits into from
Jul 26, 2019
Merged

Improve components infrastructure #12145

merged 74 commits into from
Jul 26, 2019

Conversation

JunTaoLuo
Copy link
Contributor

Addresses #12030

A few of the workflows I'm trying to improve:

#11592 Stop checking in JS artifacts from Web.JS in Components and compile the artifacts at build time. I need to check that relying on yarn is compatible with source build
Able to trigger builds of Web.JS from depending projects
./build.cmd in Components dir should succeed if yarn is installed

@JunTaoLuo JunTaoLuo marked this pull request as ready for review July 13, 2019 01:46
@JunTaoLuo JunTaoLuo requested review from SteveSandersonMS and a team as code owners July 13, 2019 01:46
@JunTaoLuo
Copy link
Contributor Author

Ahhhhh I see, if there are file conflicts, a build will not be triggered. But you won't know about the conflict until you mark the PR as ready to review. In any case, the PR is NOT ready for review but I'll ping when I figure this out.

@JunTaoLuo
Copy link
Contributor Author

@rynowak Anyone who can help me debug TS test failures? I'm seeing the following error but I'm not quite sure how I caused it:

    ● CircuitManager › discoverPrerenderedCircuits initializes circuits
  
      Found malformed end component comment at  M.A.C.Component: 1 
  
        127 |       }
        128 |     } catch (error) {
      > 129 |       throw new Error(`Found malformed end component comment at ${node.textContent}`);
            |             ^
        130 |     }
        131 |   }
        132 |   throw new Error(`End component comment not found for ${component.node}`);
  
        at getComponentEndComment (src/Platform/Circuits/CircuitManager.ts:129:13)
        at resolveCommentPairs (src/Platform/Circuits/CircuitManager.ts:72:26)
        at resolveCommentPairs (src/Platform/Circuits/CircuitManager.ts:65:28)
        at resolveCommentPairs (src/Platform/Circuits/CircuitManager.ts:65:28)
        at Object.discoverPrerenderedCircuits (src/Platform/Circuits/CircuitManager.ts:21:24)
        at Object.<anonymous> (tests/CircuitManager.test.ts:111:21)

@rynowak
Copy link
Member

rynowak commented Jul 15, 2019

Anyone who can help me debug TS test failures? I'm seeing the following error but I'm not quite sure how I caused it:

I can help with that - do you have the contents of the page?

@mkArtakMSFT mkArtakMSFT added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework area-blazor Includes: Blazor, Razor Components labels Jul 16, 2019
@rynowak
Copy link
Member

rynowak commented Jul 16, 2019

BTW we're going to go a different way with the fix in 324ae15 - so you'll have to rebase and leave that commit out. See #12209

@SteveSandersonMS
Copy link
Member

@JunTaoLuo Could you describe what these changes do? I see there are many changes in ci.yml that are centred around the idea of "downloading build artifacts", but where are they getting downloaded from, and what versions of these artifacts are downloaded? My guess is that it's something like a multi-phase build, where an early phase produces .js files and a later phase consumes them. Is it something like that?

@SteveSandersonMS
Copy link
Member

By default, only the C# projects are built. Some sub-areas have additional requirements, such as needing Yarn to be installed, before being able to build successfully.

Could you clarify why we're still going with a design like that? In what cases is it useful for build.cmd at the root to build only an arbitrary subset of the projects? What's the problem with requiring a full set of build dependencies when the developer indicates they want to build everything?

@JunTaoLuo
Copy link
Contributor Author

I still see a failure on macOS. Seems pretty consistent at this point (3/3)

@SteveSandersonMS
Copy link
Member

@JunTaoLuo If it gets to the point where that's the only thing blocking this PR, then please skip that one test (might have to comment it out, not sure what other mechanism exists for Jest tests) and file an issue for us to investigate it. There is a possibility we actually have a product bug on Mac so we'd definitely want to investigate it ASAP.

@JunTaoLuo
Copy link
Contributor Author

Okay, I'm going to disable it.

@JunTaoLuo
Copy link
Contributor Author

I'll merge pending approval @dougbu

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

One definite deletion and this is ready to go

// expect(testDisplay.show).toHaveBeenCalled();
// expect(testDisplay.failed).toHaveBeenCalled();
// expect(reconnect).toHaveBeenCalledTimes(3);
// });
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't check in commented-out code. This can be found in previous commits if needed in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is tracked by #12578. I would rather add a comment explaining why this is commented out rather than delete the actual test code. Though I don't feel strongly. @SteveSandersonMS ?

Copy link
Member

Choose a reason for hiding this comment

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

Commenting this out is the closest thing we have to a [Skip] attribute. It will be uncommented soon, so as long as there is a comment at the top explaining why this is here, and linking to the issue #12578, I think it's a fair way to express the same intent as [Skip].

Copy link
Member

Choose a reason for hiding this comment

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

Have you tried it.skip(...)?

@JunTaoLuo
Copy link
Contributor Author

@aspnet-hello
Copy link

This comment was made automatically. If there is a problem contact [email protected].

I've triaged the above build. I've created/commented on the following issue(s)
https://github.com/aspnet/AspNetCore-Internal/issues/1323
https://github.com/aspnet/AspNetCore-Internal/issues/2489

@JunTaoLuo JunTaoLuo merged commit e149f9c into master Jul 26, 2019
@ghost ghost deleted the johluo/components-retry branch July 26, 2019 20:31
JunTaoLuo pushed a commit that referenced this pull request Jul 29, 2019
JunTaoLuo pushed a commit that referenced this pull request Jul 29, 2019
* Revert "Improve components infrastructure (#12145)"

This reverts commit e149f9c.

* Update JS file
JunTaoLuo pushed a commit that referenced this pull request Jul 30, 2019
JunTaoLuo pushed a commit that referenced this pull request Aug 5, 2019
…#12744)

* Revert "Revert "Improve components infrastructure (#12145)" (#12679)"

This reverts commit e2d57e2. The improvement to components infrastructure is now reinstated with the following changes:

* Check in release JS artifacts and use them as a fallback when it's not possible to build npmproj.
* Dont' build nodejs in source build.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants