Skip to content

Projects depend on files in submodules for the config validation #5017

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

Closed
neewy opened this issue Dec 19, 2018 · 15 comments
Closed

Projects depend on files in submodules for the config validation #5017

neewy opened this issue Dec 19, 2018 · 15 comments
Assignees
Labels
Bug A bug Needed: design decision A core team decision is required

Comments

@neewy
Copy link

neewy commented Dec 19, 2018

Details

Our multilanguage docs are stored at https://github.com/soramitsu/localized_docs repo. All .rst files are symbolic links that are pointing to original files in Hyperledger Iroha repo. Project is built when translation files are supplied to conf.py via yaml.

Expected Result

  1. RTD platform clones https://github.com/soramitsu/localized_docs
  2. RTD platform retrieves code in submodule with git submodule update --init --recursive;
  3. RTD platform locates requirements.txt file and builds docs successfully 🌞

Actual Result

  1. RTD platform clones https://github.com/soramitsu/localized_docs
  2. It tries to find requirements.txt file, but since it is in the submodule build fails (although several month ago it used to build) ⛈
@stsewd stsewd self-assigned this Dec 19, 2018
@stsewd stsewd added the Bug A bug label Dec 19, 2018
@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

Sorry about this, we did some changes to separate the submodules step (so users can disable submodules, or clone only the subdmodules that are needed), now we first validate the requirements file, and then we clone the submodules. Not sure how to solve this, but I'll take a look soon.

@neewy
Copy link
Author

neewy commented Dec 19, 2018

@stsewd can you just tell me what is the current pipeline for build so that I can modify repo a bit? Potentially we can store exact copies of requirements.txt until you guys come with modifications.

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

Not sure what you mean, current solution is to add the requirements file on the main repo

@neewy
Copy link
Author

neewy commented Dec 19, 2018

@stsewd Could please tell me what step is right after pip install -r requirements.txt in docs build pipeline?

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

After that we install the project if you have the install project option, and the we execute the sphinx-build command

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

@neewy
Copy link
Author

neewy commented Dec 19, 2018

@stsewd sorry for confusion

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

And no again, if you check the commit, it was building from https://github.com/soramitsu/localized_docs/tree/36b37a4d0a91a793868582dac96812c2aa81b89a/docs/de, there isn't a requierements file there

@stsewd
Copy link
Member

stsewd commented Dec 19, 2018

Could you please tell me the final value of requirements file?

@stsewd stsewd added the Needed: design decision A core team decision is required label Dec 23, 2018
@stsewd stsewd changed the title Cannot build multilanguge projects as they depend on files in submodule Projects depend on files in submodules for the config validation Dec 24, 2018
@stsewd
Copy link
Member

stsewd commented Dec 26, 2018

I'm not sure if this is a common workflow, having files to build docs in a submodule, I was thinking some possible solutions here:

  • Add a skip_validations key to the config (it will only skip validations related to find a file)
  • Split the validations, before and after we have the whole repo (submodules included). That way we have the submodules keys ready to use, and we can continue with the validation after that.
  • Read the config from the provider (GitHub, BitButket, GitLab), and take the decisions about cloning, submodules, etc early.
  • Or maybe this isn't a common pattern and just don't support it?

@neewy
Copy link
Author

neewy commented Dec 26, 2018

At least PhpMyAdmin uses the same approach. We kinda copied their schema with symbolic links here: https://github.com/phpmyadmin/localized_docs

@neewy
Copy link
Author

neewy commented Dec 26, 2018

But they don't host it with readthedocs... Anyway, it should not be that hard to maintain requirements.txt in both repos (original and translation) and for now it solves issues with submodules

@neewy
Copy link
Author

neewy commented Jan 14, 2019

we did some changes to separate the submodules step (so users can disable submodules, or clone only the subdmodules that are needed), now we first validate the requirements file, and then we clone the submodules

@stsewd please put this in documentation

@stsewd
Copy link
Member

stsewd commented Jun 12, 2019

Hi all!, a new release was made today, we don't validate files before cloning submodules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants