Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7209 closed defect (bug) (fixed)

Fix Travis CI `node_modules` directory cache

Reported by: netweb Owned by: netweb
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Cc:

Description

In r10974 support was added to Travis CI to cache the node_modules directory

This currently doesn't cache BP's NPM modules as BP doesn't use the standard Travis CI repo layout because of the dependency on WordPress develop repo checkout.

For example: npm install here still took 104.60s, whereas the equivalent WordPress here only took 5.84s

I expect the current size of the caches to be quite small as nothing is essentially being cached, after fixing these should be 50-150mb at a guess, caches can be managed at: https://travis-ci.org/buddypress/BuddyPress/caches

Change History (9)

#1 @netweb
3 years ago

  • Owner set to netweb
  • Status changed from new to assigned

#2 follow-up: @DJPaul
3 years ago

I think this should be /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules

@netweb did you assign this ticket to yourself to patch?

#3 @DJPaul
3 years ago

  • Milestone changed from Awaiting Review to 2.7

#4 in reply to: ↑ 2 @netweb
3 years ago

Replying to DJPaul:

I think this should be /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules

@netweb did you assign this ticket to yourself to patch?

Yes, I did, but time got away from me before I was able to patch.

:+1 to /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules is what I think is required

#5 @djpaul
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 10984:

Travis-CI: fix path to node_modules folder.

Hopefully fixes #7209

#6 @DJPaul
3 years ago

  • Keywords needs-patch removed

This broke things.

$ mkdir -p $WP_DEVELOP_DIR
$ git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
fatal: destination path '/tmp/wordpress' already exists and is not an empty directory.
```

As the folder /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules already exists now as it’s restored as part the cache loading, trying to create /tmp/wordpress/again with mkdir -p $WP_DEVELOP_DIR causes the fatal.

If we wanted to go ahead with this, I think we'd have to clone into another folder, then move everything back into /tmp/wordpress, but @netweb is giving this some proper thought. For now, I'll revert.

#7 @DJPaul
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#8 @djpaul
3 years ago

In 10986:

Travis-CI: temporary disable cache.

This is causing the Travis-CI build process to fail because Git won't check into an existing directory. See #7209

#9 @DJPaul
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Not really "fixed" as in it's working how we wanted, but more "fixed" as in "we resolved the problem reported by reverting it".

Note: See TracTickets for help on using tickets.