Skip to content

build: add test/... to the bazel_build job #20245

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

Closed
wants to merge 2 commits into from

Conversation

wagnermaciel
Copy link
Contributor

  • update the bazel_build job (the job that tests that everything
    builds with Bazel) to also include test/...

@wagnermaciel wagnermaciel requested a review from a team as a code owner August 7, 2020 22:20
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 7, 2020
@wagnermaciel wagnermaciel added the blocked This issue is blocked by some external factor, such as a prerequisite PR label Aug 7, 2020
@wagnermaciel
Copy link
Contributor Author

Blocked by PR #20221

@wagnermaciel wagnermaciel removed the blocked This issue is blocked by some external factor, such as a prerequisite PR label Aug 12, 2020
@devversion
Copy link
Member

@wagnermaciel looks like the job fails for some reason. Can you look into it? Happy to help if needed. I wonder how this runs in g3 right now?

@wagnermaciel
Copy link
Contributor Author

@wagnermaciel looks like the job fails for some reason. Can you look into it? Happy to help if needed. I wonder how this runs in g3 right now?

@devversion I could actually use some help here. When I build //test/... locally everything passes, but on CI the test is failing saying it

could not resolve //src/material-experimental/mdc-theming/prebuilt/indigo-pink.css

I remember Jeremy was surprised that we are able to reference indigo-pink.css in the benchmark components like this
styleUrls: ['//src/material-experimental/mdc-theming/prebuilt/indigo-pink.css'],
so I am pretty sure referencing indigo-pink like this is what's causing the failures but I don't know why.

@devversion
Copy link
Member

@wagnermaciel yeah, that was actually something I was not sure either. I looked into it.. and it seemed that this purely worked by accident in ngtsc. See explanation of why this works. As a side note: It would be good to consider moving away from this unconventional pattern at some point.

Can you try adding the prebuilt theme to ng_assets of the component benchmark rule? I see it is only added to styles, but we load the prebuilt theme as part of the component, so it needs to be part of the dependencies when the ng_module is built. This might also explain why it surfaces only on CI where we build in remote build containers (with full sandboxed environments).

@devversion
Copy link
Member

devversion commented Aug 14, 2020

I tried locally but was not able to reproduce the issue there. I'm pretty confident it's due to the issue I mentioned before w/ RBE. We can remove the prebuilt theme from the styles too because they are inlined directly into the component definition when the ng_module target is built.

@wagnermaciel
Copy link
Contributor Author

@devversion I tried using ng_assets to provide the styles but the tests still failed to build on ci

I think we'll have to solve the larger problem and revisit this. Even though the current component_benchmark implementation is nice and simple, I agree that this not a good pattern and a more complex solution is clearly needed

I'm not sure if or when asset injection will be implemented given how many other higher priority tasks we've got lined up but how would you feel about discussing it again in next weeks team meeting?

@devversion
Copy link
Member

devversion commented Aug 18, 2020

@wagnermaciel Yeah SGTM. I'm not sure why it works locally but not on CI. The only difference is really the remote container sandboxing as far as I remember. Agreed, that we should not bother with this as obviously this is working by accident/is somewhat hacky.

@wagnermaciel wagnermaciel added the blocked This issue is blocked by some external factor, such as a prerequisite PR label Aug 18, 2020
* update the bazel_build job (the job that tests that everything
  builds with Bazel) to also include test/...
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 14, 2021
@wagnermaciel wagnermaciel deleted the ci-build-test-dir branch January 14, 2021 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked This issue is blocked by some external factor, such as a prerequisite PR cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants