8000 Optimized adding dependencies by mnocon · Pull Request #12 · ibexa/ci-scripts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Optimized adding dependencies #12

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 8000 service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

mnocon
Copy link
Contributor
@mnocon mnocon commented May 21, 2021

When looking at https://github.com/ezsystems/ezplatform-page-builder/pull/757 (a build with 20 dependencies) some issues became visible:

  1. Composer is making a lot of GitHub API calls, which can even go over the API limit
  2. It takes a lot of time to download 20 dependencies.

This PR:

  1. Introduces a new property in the dependencies.json schema: privateRepository.
    Example:
    {
        "requirement": "dev-IBX-268-as-editor-i-want-to-see-redesigned-buttons as 2.0.x-dev",
        "repositoryUrl": "https://github.com/ezsystems/ezcommerce-transaction",
        "package": "ezsystems/ezcommerce-transaction",
        "privateRepository": true
    },
    {
        "requirement": "dev-IBX-268-as-editor-i-want-to-see-redesigned-buttons as 3.0.x-dev",
        "repositoryUrl": "https://github.com/ezsystems/ezplatform-admin-ui",
        "package": "ezsystems/ezplatform-admin-ui",
        "privateRepository": false
    },

For public repositories we don't need to add the repository to Composer Repositories, which results in less GitHub API calls:

  1. Travis-CI + Github API limit composer/composer#1314 (comment)
  2. Drupal can't use composer install because it requires a Github Auth token on installation composer/composer#4884 (comment)

For private repositories (where VCS is needed) we set the COMPOSER_NO_INTERACTION variable (https://getcomposer.org/doc/03-cli.md#composer-no-interaction) so that Composer fallbacks to git clone if API limits are exceeded:

  1. Drupal can't use composer install because it requires a Github Auth token on installation composer/composer#4884 (comment)
  2. Travis-CI + Github API limit composer/composer#1314 (comment)

To speed things up I've also changed how the packages are installed:
instead of multiple composer require calls we add the packages with --no-install and then download them in one composer install call.

TO DO:

  1. Rebase and retarget this PR to 0.1, it's for master right now so that I can test it with https://github.com/ezsystems/ezplatform-page-builder/pull/757

@mnocon mnocon force-pushed the optimize-dependencies-adding branch 2 times, most recently from 872534c to d184d4e Compare May 21, 2021 14:10
@mnocon mnocon force-pushed the optimize-dependencies-adding branch from d184d4e to 13ac774 Compare May 21, 2021 14:52
@mnocon
Copy link
Contributor Author
mnocon commented May 24, 2021

Prepared a PR for 0.1 in #13

@mnocon mnocon closed this May 24, 2021
tomaszszopinski pushed a commit that referenced this pull request Feb 15, 2022
@mnocon mnocon deleted the optimize-dependencies-adding branch October 24, 2023 10:03
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
0