Commit Graph

885 Commits

Author SHA1 Message Date
edX requirements bot
b2cc7f8f7e chore: Updating Python Requirements (#33843)
Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2023-11-30 16:43:46 +05:00
edX requirements bot
c240fd8b52 Python Requirements Update (#33737)
* chore: Updating Python Requirements
* fix: fix test failure occurring due to faker upgrade
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-17 23:56:24 +05:00
edX requirements bot
e46c1d1e61 Python Requirements Update (#33695)
* chore: Updating Python Requirements
* fix: fix completion test query count
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-13 14:37:53 +05:00
Feanil Patel
66e987997c Revert "Revert "chore: remove bok-choy settings"" 2023-11-01 13:41:37 -04:00
Robert Raposa
083ccbf09b Revert "chore: remove bok-choy settings" 2023-10-31 15:27:44 -04:00
salman2013
9452cef97d chore: resolve conflicts 2023-10-23 12:05:25 +05:00
Kyle McCormick
c1163717df build: log npm run postinstall steps to STDOUT so they are visible in CI (#33142)
Without this change, `npm run postinstall` (aka
scripts/copy-node-modules.sh) uses `set -x`, which echo steps to STDERR.
By default, it seems that GitHub Actions doesn't show STDERR.

Having the steps visible in CI was very useful while debugging some
Tutor build improvements, so I figured it would be good to upstream the
change.
2023-10-04 17:34:16 +00:00
salman2013
936a6c0983 chore: resolve conflicts 2023-10-04 19:02:16 +05:00
salman2013
52860c5c9d chore: resolve conflicts 2023-10-04 18:45:02 +05:00
Zubair Shakoor
70f6f5ad9e fix: replaced mysql57 hosts with mysql80 (#33147) 2023-10-04 17:35:18 +05:00
edX requirements bot
9ddde642f8 chore: Updating Python Requirements (#33397) 2023-10-03 12:11:17 +05:00
edX requirements bot
b862bbeba6 chore: Updating Python Requirements (#33383) 2023-10-02 17:10:01 +05:00
salman2013
a763287152 chore: remove all reference for bok-choy 2023-09-28 16:05:15 +05:00
salman2013
42ca0ddec4 chore: remove bok choy settings 2023-09-27 10:58:37 +05:00
Adam Stankiewicz
32a1820360 chore: upgrade to edx-enterprise 4.2.0 (#33305) 2023-09-20 18:32:47 +00:00
Tim McCormack
0304a31c65 docs: Fix second link in sharding doc (#33286) 2023-09-20 16:00:28 +00:00
Tim McCormack
2d7f8afc2b docs: Fix link to sharding doc (#33278)
This should probably be turned into an ADR at some point, but for
now I've just recreated the page on the public wiki. (The space it
was in had been deleted during the 2U/Axim split.)
2023-09-19 12:54:36 +00:00
Syed Ali Abbas Zaidi
8480dbc228 chore: apply amnesty on existing not fixable issues (#32215)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue

* fix: all autofixable eslint issues

* fix: all react related fixable issues

* fix: autofixable eslint issues

* chore: remove all template literals

* fix: remaining autofixable issues

* chore: apply amnesty on all existing issues

* fix: failing xss-lint issues

* refactor: apply amnesty on remaining issues

* refactor: apply amnesty on new issues

* fix: remove file level suppressions

* refactor: apply amnesty on new issues
2023-08-07 19:13:19 +05:00
Kyle McCormick
303bf5ef3c build: npm run watch (experimental) (#32866)
Implements the `npm run watch` section of the assets ADR [1], plus some
modifications since I decided to switch from pywatchman to watchdog (see
ADR changes for justification). This will replace `paver watch_assets`
(edx-platform) and `openedx-assets watch-themes` (Tutor).

Specifically, this PR adds three experimental commands:

* `npm run watch-sass` : Watch for Sass changes with watchdog.
* `npm run watch-webpack` : Invoke Webpack-watch for JS changes.
* `npm run watch` : Invoke both `watch-sass` and `watch-webpack` simultaneously.

These commands are only intended to work in development mode. They have
been tested both on bare-metal edx-platform and through `tutor dev run`
on on Linux.

Before removing the "experimental" label, we need to:

* Test through Devstack on Linux.
* Test through Devstack and `tutor dev run` on macOS.
* Test on bare-metal macOS. Might not work, which is OK, but we should
  document that.
* Document the commands in edx-platform's README.
* Confirm that this not only works through `tutor dev run`, but also as
  a suitable replacement in the `watchthemes` service that Tutor runs
  automatically as part of `tutor dev start`. Tweak if necessary.

References:

1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst

Part of: https://github.com/openedx/edx-platform/issues/31612
2023-07-27 16:33:32 +00:00
Kyle McCormick
3e67719a24 build: npm run build (experimental) (#32823)
This PR implements much of the static assets rework ADR [1], including:

* `npm run build[-dev]`, and its subcommands,
* `npm run webpack[-dev]` and
* `npm run compile-sass[-dev]`.

This is backwards-compatible. `paver update_assets` should not be affected.
The new command warns that it is "experimental" for a few reasons:

* `npm run build` will fail in the webpack phase unless you first
run  `xmodule_assets`. This will be changed soon [2].

* We have tested the new build, but not quite so thoroughly that we'd
recommend it as the production default yet. Once the xmodule_assets
work lands, we'll share this on the forums so early adopters can try it
out.

* The commands lack some top-level documentation. Once they stabilize more,
we'll add a section to the README that explains how and when to use `npm run
build` and its subcommands and its env vars.

* `npm run watch` is not yet implemented.

References:
1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst
2. https://github.com/openedx/edx-platform/pull/32685

Part of: https://github.com/openedx/edx-platform/issues/31604
2023-07-26 08:04:45 -04:00
edX requirements bot
a44c6d3d4a chore: Updating Python Requirements (#32829) 2023-07-25 12:48:44 +05:00
Kyle McCormick
a6f04d8ca3 build: copy from node_modules using NPM postinstall hook, not Paver (RE-MERGE)
Re-merge of 4b64d8342d

The commit after this one contains the fix for the issue that led to the
revert.
2023-07-20 13:46:21 -04:00
Kyle McCormick
95e0cdef28 Revert "build: copy from node_modules using NPM postinstall hook, not Paver (#32717)"
This reverts commit 4b64d8342d.
2023-07-17 14:06:05 -04:00
Kyle McCormick
4b64d8342d build: copy from node_modules using NPM postinstall hook, not Paver (#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. https://github.com/openedx/edx-platform/pull/31790#discussion_r1122802492
3. https://github.com/overhangio/tutor/blob/master/CHANGELOG.md#v1600-2023-06-14

Part of: https://github.com/openedx/edx-platform/issues/31604
2023-07-17 13:26:58 -04:00
edX requirements bot
f2d30d9fbd chore: Updating Python Requirements (#32729) 2023-07-13 13:39:32 +05:00
Awais Qureshi
4bd032ab15 chore: adding pin to avoid test failures. (#32440)
* chore: adding pin to avoid test failures.
---------

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2023-06-14 12:44:39 +05:00
edX requirements bot
25139a08bd chore: Updating Python Requirements (#32321) 2023-06-01 20:20:49 +05:00
Usama Sadiq
6e597b5519 Revert "feat!: upgrading django-storages. (#32311)" (#32340)
This reverts commit cc0d5cdb76.
2023-06-01 17:38:37 +05:00
Awais Qureshi
cc0d5cdb76 feat!: upgrading django-storages. (#32311)
* feat!: upgrading django-storages
2023-06-01 15:33:14 +05:00
Usama Sadiq
065ba5fd73 Pin urllib3 version to urllib3<2.0.0 (#32224)
* fix: constrain urllib3<2.0.0
* fix: pin docutils<0.20 version
2023-05-11 17:58:06 +05:00
Syed Ali Abbas Zaidi
adf879e8b2 Revert "fix: all auto fixable eslint issues (#31900)" (#32203)
This reverts commit 228180b1ef.
2023-05-09 13:53:54 +05:00
Syed Ali Abbas Zaidi
228180b1ef fix: all auto fixable eslint issues (#31900)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint prefer template issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue
2023-05-09 11:57:15 +05:00
edX requirements bot
f3f4b856eb chore: Updating Python Requirements (#32182) 2023-05-08 13:39:36 +05:00
Syed Ali Abbas Zaidi
f1fb38ed83 fix: multi lines and spaces issues (#31885)
* fix: multi lines and spaces issues

* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: remaining quotes issues

* fix: eslint object curly newline issue

* fix: eslint object curly spacing issue

* fix: eslint brace-style issues

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint linbreak style issue

* fix: eslint space unary operator issue

* fix: eslint line around directives issue

* fix: void and typeof space unary ops issue
2023-05-03 12:22:46 +05:00
Tim McCormack
06969e6c50 feat: Add a script to enhance JWKs in preparation for move from pyjwkest (#32089)
* feat: Add a script to enhance JWKs in preparation for move from pyjwkest

This script accepts a signing JWK (presumably `JWT_PRIVATE_SIGNING_JWK`)
and ensures that it has all of the precomputed private numbers that are
required for top performance. This is necessary before moving away from
pyjwkest to PyJWT for signing JWTs. See issue
<https://github.com/openedx/edx-drf-extensions/issues/290>. (Alternatively,
one could remove the p, q, dp, dq, and qi params, but there is an unknown
performance cost to doing so as we are not currently caching these keys,
and the precompution happens on every load due to the way pyjwkest's API
works.)

* fixup! Upgrade devstack at the same time
2023-04-20 09:08:14 -04:00
Tim McCormack
b852344fcf build: Deduplicate mismatched pip.txt files that caused build failure (#32081)
There was a `requirements/pip.txt` with old versions, and a newer
`requirements/edx/pip.txt` managed via a `pip.in` file. The old one was
used in most places, but came out of sync with pip-tools.txt, which was
managed properly. Eventually this caused a `pip check` failure due to the
mismatch.

This should resolve at least part of https://github.com/edx/edx-arch-experiments/issues/267

This PR moves pip.in and pip-tools.in and their corresponding pin files
up to the `requirements/` dir, since they should be shared between the edx
and sandbox environments. This also has the effect of upgrading pip to
match the version in the file we've been uselessly upgrading.

Other improvements:

- Remove `-q` option from pip and pip-sync calls, as it was hiding some
  debugging information that would have resolved this sooner.
- Depend on `pre-requirements` from `compile-requirements`, rather than
  from `upgrade`. (The base target is the one that actually needs it.)
  This also lets us remove the explicit `pip install pip-tools` line.
- Install the recompiled pip and pip-tools files right away, not after the
  loop. When we upgrade pip-tools, we want to use the upgraded version,
  not the previous version. This requires moving the pip-tools.txt
  recompilation outside of the loop and into its own explicit line.
- Don't upgrade pip if we're not running `make upgrade` (respect the
  compile options).
- Remove apparently-unneeded `--no-emit-trusted-host --no-emit-index-url`
  options (we don't pass trusted-host or index-url options).
2023-04-17 17:21:48 +00:00
Awais Qureshi
a899d28b6d chore: upgraing boto3 and botocore versions. (#31925) 2023-03-17 18:01:25 +05:00
Kyle McCormick
cd24534653 build: run ShellCheck in CI (#31809)
build: run ShellCheck

Adds a ShellCheck check to edx-platform PRs and master,
using the shared workflow & template from the .github repo.
This will become a "required" check once it passes for 2 straight weeks on master.

Brings all existing shell scripts into compliance with ShellCheck.
2023-03-10 16:10:56 +00:00
Kyle McCormick
72e0043d1d refactor!: remove unused provisioning scripts (#31811)
These scripts were written to replace some of the
Ansible provisioning steps in Devstack,
before tCRIL's focus turned to Tutor.

These scripts never ended up being used by Devstack, but
Devstack's maintainers did end up replacing
the Ansible provisioning steps with some direct
Bash commands in Devstack's provision-lms.sh:
23e16c1dda/provision-lms.sh (L51-L68)

Tutor has its own user & course provisioning scripts,
written in Sh using Tutor's jobs framework.

Thus, these scripts are no longer needed and do
not seem to be in use.
2023-02-22 11:22:12 -05:00
Kyle McCormick
b140b7e481 refactor!: remove unused update-assets-dev.sh (#31810)
The file was introduced as part of the "decentralized devstack" spike.
We wanted a working Dockerfile in the edx-platform root,
and we wanted to speed it up by not relying on Paver.

edx-platform now has a working Dockerfile, and it does not use this script.

The paver-free-assets initiative is being continued here:
https://github.com/openedx/edx-platform/issues/31798
It will result in a new, prod-ready asset building script.
2023-02-22 10:29:51 -05:00
Kyle McCormick
f3b658dc0b build!: remove Jenkins CI scripts (#31812)
These files were used to run tests on
build.testeng.edx.org, a Jenkins instance.

All tests have since been moved over to
GitHub Actions. The build.testeng.edx.org
instance is decomissioned.

Removed files include:
- scripts/jenkins-*.sh
- scripts/Jenkinsfiles/*
- scripts/xdist/*

Note on xdist scripts: pytest-xdist in general is still
useful for local test runs in order to take advantage
of all available CPU cores, but the scripts here were
specifically for running tests on multiple remote machines,
particularly via Jenkins.
2023-02-22 09:14:48 -05:00
Zubair Shakoor
141d6d4ce6 refactor: remove all paver code related to python unit tests (#31180) 2023-01-18 17:41:56 +05:00
Awais Qureshi
5f95a78a17 build: Unpin few packages. (#31554)
* build: Unpin few packages. These pins were added to minimize the changeset.

* chore: Updating Python Requirements (#31555)

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2023-01-17 11:50:09 +05:00
Awais Qureshi
90f4f6543d build: Adding constraints to avoid multiple major upgrades. (#31551)
* build: Adding constraints to avoid multiple major upgrades
2023-01-16 16:24:34 +05:00
Saleem Latif
d7f2b555c7 Merge pull request #31434 from openedx/saleem-latif/ENT-6518-updates
ENT-6518: chore: Updated edx-enterprise version to 3.59.0
2022-12-13 11:31:39 +05:00
Tim McCormack
b8a34f0c57 build: Set Django version for tests more safely; drop support for non-GHA (#31387)
We have a need to lock the version of Django for production and tests, but
also to test on newer versions of Django so that we can get the repo ready
for long-term-support releases.

We've been doing that by extracting the `django==x.y.z` from the
pip-compiled files and moving it to a django.txt that is then co-installed
but can be overridden during tests. The problem is that this can result
in broken packages.

The approach here is to have `make test-requirements` continue to
ensure a consistent set of packages, and then install a different
Django on top of that in the CI script -- and call `pip check` to make
sure that combination isn't broken.

Adding Django 4.0 to the unit-tests.yml matrix will now correctly
result in this error and a failing job:
`django-splash 1.2.1 has requirement Django<4.0, but you have django 4.0.8.`

The other half of this is to change other CI runners to remove their
ability to control the Django version, since it's complicated to make
this work, and we probably only need it in unit-tests.yml. Convert them
to just use `make test-requirements`.

Also:

- Simplify handling of `pip --src` by setting `PIP_SRC` (rather than our
  own `PIP_SRC_DIR`, which pip ignores because `--src-dir` isn't an option
  that it knows). This is needed to allow `make test-requirements` to do
  the pip calls. An alternative would be to set a pip-options env var for
  the make target to use, but `PIP_SRC` already exists.
- Remove outdated modifications to common_constraints
- Add comment explaining why pylint tests need dev-requirements
2022-12-12 21:45:15 +00:00
Saleem Latif
0fcd4334f8 chore: Updated edx-enterprise version to 3.59.0 2022-12-12 17:26:02 +05:00
edX requirements bot
3744647bd6 chore: Updating Python Requirements 2022-10-03 17:21:24 +05:00
UsamaSadiq
897cb3617f refactor!: delete common/lib and related usages 2022-09-22 14:16:34 +05:00
Kyle McCormick
29cebb7f92 Revert "chore: Updating Python Requirements"
This reverts commit 6d00e4b320.
2022-09-20 06:35:46 -04:00