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

docs: add ADR: "Reimplement edx-platform static asset processing" #31790

Merged
merged 10 commits into from
Mar 10, 2023
Merged

docs: add ADR: "Reimplement edx-platform static asset processing" #31790

merged 10 commits into from
Mar 10, 2023

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Feb 17, 2023

See included ADR for details. Link to latest rendered version of ADR.

Parent issue for all work related to implementing this ADR:

Draft PR of a working build.sh implementation, for reference:

Key reviewers:

@kdmccormick kdmccormick changed the title docs: add ADR: Reimplement edx-platform static asset processing docs: add ADR for reimplementation of static asset processing Feb 17, 2023
@kdmccormick kdmccormick changed the title docs: add ADR for reimplementation of static asset processing docs: add ADR: "Reimplement edx-platform static asset processing" Feb 17, 2023
Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

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

This seems like a great step forward toward more standards-based/vanilla asset processing... where I consider bash much more of a 'standard' than paver. 😂

One small comment on a command name, but otherwise in general this feels like we'll be in a better place after this work is done.

Copy link
Contributor

@jmbowman jmbowman left a comment

Choose a reason for hiding this comment

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

Looks pretty good, just a few suggestions.

docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
Copy link
Member Author

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

Question for reviewers:

docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

The general approach looks good to me. I made a few suggestions for details that I think should be made, but I don't need to look at it again before it merges unless there are major changes to the approach.

docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
docs/decisions/0017-reimplement-asset-processing.rst Outdated Show resolved Hide resolved
@kdmccormick
Copy link
Member Author

@jmbowman @davidjoy @feanil @regisb Thanks for you reviews! I applied all of your suggestions. If you have more concerns if you want more time to review, let me know tomorrow. Otherwise, I'll be merging Friday morning.

@kdmccormick kdmccormick merged commit 2ca95e5 into openedx:master Mar 10, 2023
@kdmccormick kdmccormick deleted the kdmccormick/assets-adr branch March 10, 2023 13:08
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

kdmccormick added a commit that referenced this pull request Mar 16, 2023
kdmccormick added a commit that referenced this pull request Jul 17, 2023
…32717)

During the review of ADR 17 [1], Régis pointed out [2] that the shell script
which replaces Paver's `process_npm_assets`  could be automatically invoked as
an NPM post-install hook, ensuring that the step is seamlessly executed whenever
`npm install` is run. I had avoided using that suggestion, as I worried that it
would make it harder to move node_modules out of the edx-platform directory in
Tutor's openedx image.

Since then, two things have changed. Firstly, Tutor v16's new persistent mounts
interface [3] has lessened the importance of moving node_modules. Secondly, I
have realized that using a post-install hook would not preclude us from
modifying the underlying script (scripts/copy-node-modules.sh) to look in an
alternative location for node_modules, should that end up being something we
want to do.

This commit modifies the ADR based on those findings, stubs out Paver's
`process_npm_assets`, and adds the suggested post-install hook and replacement
Bash script.

References:
1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst
2. #31790 (comment)
3. https://github.com/overhangio/tutor/blob/master/CHANGELOG.md#v1600-2023-06-14

Part of: #31604
@kdmccormick kdmccormick mentioned this pull request May 1, 2024
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.

Write edx-platform ADR for Paver-free asset processing
6 participants