Skip to content

build: Clear out stale dependencies when installing requirements - #31080

Merged
timmc-edx merged 3 commits into
masterfrom
timmc/ci-sync
Oct 3, 2022
Merged

build: Clear out stale dependencies when installing requirements#31080
timmc-edx merged 3 commits into
masterfrom
timmc/ci-sync

Conversation

@timmc-edx

@timmc-edx timmc-edx commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

This should help prevent some cross-version caching issues in the edx-platform-runner unit tests, which apparently run on a "dirty" environment. (This results in errors between master and older open-releases but could also prevent us from noticing missing deps.)

Calling make local-requirements at the end of each *-requirements target rather than making it a prerequisite is necessary for using sync, since otherwise the local reqs would be wiped out.

Adding a prerequisite of pre-requirements allows us to simplify some workflow calls slightly.

Also fix leading whitespace issue in Makefile.


We may wish to backport some or all of these changes to Nutmeg or maybe even Maple due to the caching issues that led to this PR (see discussion in #30759) but the changes will almost certainly not apply cleanly, and will have to be replayed by hand.

This should help prevent some cross-version caching issues in the
edx-platform-runner unit tests, which apparently run on a "dirty"
environment. (This results in errors between master and older open-releases
but could also prevent us from noticing missing deps.)

Calling `make local-requirements` at the end of each `*-requirements`
target rather than making it a prerequisite is necessary for using sync,
since otherwise the local reqs would be wiped out.

Adding a prerequisite of `pre-requirements` allows us to simplify some
workflow calls slightly.

The pip lockfile also wasn't being used in the Makefile, so fix that.

Also fix leading whitespace issue in Makefile.

- name: Install Required Python Dependencies
run: |
pip install -r requirements/pip.txt

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All of these removals are just to take advantage of the Make targets now doing this automatically.

Comment thread Makefile

@kdmccormick kdmccormick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one request, otherwise looks like a great change.

BTW, all these X-requirements targets are brand new so don't worry too much about messaging out changes to them.

Comment thread Makefile Outdated
They were basically doing the same thing, except the newer
`dev-requirements` didn't include private reqs.

@kdmccormick kdmccormick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One non-blocking nit, otherwise 🚀

Comment thread Makefile Outdated
@timmc-edx
timmc-edx merged commit 2edbdcf into master Oct 3, 2022
@timmc-edx
timmc-edx deleted the timmc/ci-sync branch October 3, 2022 20:26
@edx-pipeline-bot

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

timmc-edx added a commit that referenced this pull request Oct 3, 2022
…ents

The comment starting at column zero made this Action unparseable. But
the comment can also just be removed entirely by using the new
`dev-requirements` target, which after PR #31080/commit 2edbdcf now
also installs pip and edxapp.

I'm not exactly sure why `--src` is being specified here (is this a global
package installation, and therefore the editable deps would be installed
in the working dir?) but it can be specified even with pip-sync via
`PIP_SRC`. I also added it to the verify job since it should probably be
there as well.
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.

4 participants