Skip to content

Conversation

erfanimani
Copy link
Contributor

@erfanimani erfanimani commented Mar 12, 2021

Description (*)

Allows the crossorigin attribute to be added to link types, for HEAD elements, in as per https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin

Related Pull Requests

N/A

Fixed Issues (if relevant)

These issues/features are related:

  1. Integrity and crossorigin with external stylesheets not working #32509
  2. Integrity and crossorigin with external stylesheets not working #21427
  3. Can't add script from external sources #29513

Manual testing scenarios (*)

  1. Add <css src="https://my.cdn.com/style.min.css" media="screen" src_type="url" crossorigin="anonymous"/> to default_head_blocks.xml
  2. Ensure crossorigin attribute is added correctly and doesn't break the site with an XSD error

Questions or comments

There's probably already some work in the pipeline regarding this work, but I thought I would create a PR anyway as I need the diff for a patch.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 12, 2021

Hi @erfanimani. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @erfanimani,
Could you cover your changes with some kind of test?

@erfanimani
Copy link
Contributor Author

Hi @ihor-sviziev, thanks for the feedback. I don't think a unit test or functional test is fitting for a pure XSD change. Do you have any suggestions?

@ihor-sviziev
Copy link
Contributor

Yeah, it seems like we don't have any test coverage for XSD schemas. Let's not cover it.

@magento run all tests

@ihor-sviziev ihor-sviziev added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Progress: review Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Mar 15, 2021
@ihor-sviziev
Copy link
Contributor

@magento run WebAPI Tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

✔ Approved

Failing WebAPI tests looks not related to changes from this PR. The SVC failure probably should be approved additionally.

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-8929 has been created to process this Pull Request

@gabrieldagama gabrieldagama added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Mar 16, 2021
@sivaschenko sivaschenko linked an issue Mar 16, 2021 that may be closed by this pull request
@erfanimani
Copy link
Contributor Author

erfanimani commented Mar 17, 2021

Thanks all. I've also added the attribute integrity, as the referenced issue: #32509

(https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)

@magento run all tests

@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Mar 17, 2021

@magento run Functional Tests B2B, Functional Tests EE, WebAPI Tests
Changes still looks good, Approved from my side.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

As we got the SVC approval mentioned in here and the build is green now moving this PR to Merge in Progress.

@erfanimani
Copy link
Contributor Author

It took some time, but is finally happening :)

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit ebbb127 into magento:2.4-develop Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Component: View Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community Release Line: 2.4 Risk: low Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrity and crossorigin with external stylesheets not working
10 participants