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

[JENKINS-75012] Pre-compile Handlebars templates #123

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yaroslavafenkin
Copy link

https://issues.jenkins.io/browse/JENKINS-75012

All of the Handlebars stuff is now pre-compiled in built time instead of run time. This includes templates, partials and helpers.

Depends on #122. I'll rebase this PR when that one is merged.

Testing done

There's not much to show in "Before". In report-only mode 15+ violations are caught coming from handlebars-2.0.0.js because of runtime template compilation. In restrictive mode page doesn't render at all.

After the change

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira / Github issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).
    • The changelog generator for plugins uses the pull request title as the changelog entry.
    • Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.
  • There is automated testing or an explanation that explains why this change has no tests.
  • New public functions for internal use only are annotated with @NoExternalUse. In case it is used by non java code the Used by {@code <panel>.jelly} Javadocs are annotated.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease the future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.
  • Changes in the interface are documented.

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically. See also release-drafter-labels.

@yaroslavafenkin
Copy link
Author

I feel I haven't tested this enough yet. Also in the end of the recoding an img-src violation shows up, so I'll try to investigate it a bit.

@yaroslavafenkin yaroslavafenkin marked this pull request as draft December 17, 2024 17:56
@yaroslavafenkin
Copy link
Author

img-src violation in console:
image
Triggered by clicking "Download PNG image" on a chart hamburger dropdown.

Seems to be coming from highchart-exporting.js. Does not affect any of the functionalities on the Test Results Analyzer view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant