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

Improve local git source repository handling #876

Closed
frol opened this issue Apr 10, 2016 · 6 comments
Closed

Improve local git source repository handling #876

frol opened this issue Apr 10, 2016 · 6 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@frol
Copy link
Contributor

frol commented Apr 10, 2016

Right now, either you use a remote git repo or a local one, conda build executes git clone and that is it. This works in some cases, it works slowly in other cases, and it may not work at all on access-restricted repos or while you are offline.

Once you have a submodule (obviously listed in .gitmodules with an external link), git clone of a local repo will require network access, "read" permissions to the submodule, and some network traffic. There are a few use-cases when this will be a show-stopper:

  1. CI server, which clones private repositories with its own credentials and you cannot re-clone the submodules on conda build stage due to the lack of credentials.
  2. Offline mode development is not possible without manual modifications (e.g. changing git_url to path in meta.yaml).

Even if it is not a show-stopper for you, you may suffer from a slow internet connection, so downloading all submodules on every build will be frustrating and completely unnecessary.

I used to use source/path option, but it was "fixed" in #745. I have also noticed #753, but it doesn't solve the issue at all since it will only work for the cases when you don't need submodules.

/cc @ilanschnell @jasongrout @stuarteberg @gmarkall @jakirkham @groutr

@stuarteberg
Copy link
Contributor

I used to use source/path option, but it was "fixed" in #745.

IIUC, I think the behavior of source/path within git repos was recently improved by @groutr via #801. I haven't tested the new behavior myself, though.

@frol
Copy link
Contributor Author

frol commented Apr 12, 2016

@stuarteberg The PR makes the code look much better. Yet, it doesn't change the fact that having GIT_DESCRIBE_* env variables requires source/git_url setting, which results in git clone.

Since we have our automated build scripts on top of conda-build, I have managed to auto-discover GIT_DESCRIBE_* information before conda-build run, and pass it via env variables to conda-build execution, so we continue to use GIT_DESCRIBE_* with source/path setting in meta.yaml.

@groutr
Copy link
Contributor

groutr commented Apr 19, 2016

@frol, if source/path isn't defining GIT_* variables, then it's very likely a bug that needs to be fixed. The test for source/path specifically checks that these GIT_* variables are defined when source/path is used.

@frol
Copy link
Contributor Author

frol commented Apr 20, 2016

@groutr This "bug" was introduced as a fix in #745. (I have mentioned this in the first message.)

@stuarteberg
Copy link
Contributor

This "bug" was introduced as a fix in #745

As I mentioned above, I think it was probably fixed by @groutr in #801. Can you confirm, @frol?

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Jun 16, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Jul 17, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jul 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

3 participants