Closed henrynash closed 4 years ago
We went around a bit on this. As of now, I would let the scripts add/remove the local test repos for you (as they can now do). It is inferring the repo name for local indexes based on the directory structure + local to avoid conflicts. .. For ci/test and other scripts, using a determinable/predictable name is preferred to having guess/adjust.
This first time, when you had one created before, it caused an issue. After this, it won't. And you'll know (automatically) what the local repo name will be because you can guess it.
...and that's a fine approach...although what confused me were the docs on building stacks which seems to advise you manually add indexes to private local repo names (see: https://appsody.dev/docs/stacks/build-and-test). Doesn't this kind of guarantee we push people into this problem?
@Kamran64 can you please review this doc and update to match the current build / ci process.
As an aside, this is a permanent error (i.e. it doesn't go away if you run the ci build again - it stays broken). The only way to make the build work is to remove your other local repo name with appsody repo remove.
If there are good reasons why two repo names can't point at the same index, then we should document this restriction. However, I'm not sure why we should make such a restriction...and if we removed that restriction, then this whole problem would go away.
@groeges
This should be resolved now as the CI scripts are no longer adding/removing repos. @groeges can you confirm this is accurate and close the issue?
The new CI scripts do not use the test.sh anymore as they perform the stack validation (testing) using the appsody stack validate
command. This uses an entry added to the dev.local-index.yaml under the ./appsody/stacks/dev.local directory which is added to the appsody repo list as dev.local
*incubator https://github.com/appsody/stacks/releases/latest/download/incubator-index.yaml
dev.local file:///Users/myuserid/.appsody/stacks/dev.local/dev.local-index.yaml
experimental https://github.com/appsody/stacks/releases/latest/download/experimental-index.yaml
This should therefore not be an issue anymore as the experimental-index-local repo is not added to the appsody repo list anymore.
If you happen to already have a local repo pointing at one the standard local indexes, e.g.
then the build scrips will fail to rebuild this index (since they appear to assume you want the repo to be called experimental-index-local and error out when they see that that index is already assigned to another local repo name) and the subsequent testing will fail since the index doesn't exist.