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

fix: virtual repository multiple upstream_policies #13

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

romancin
Copy link
Contributor

@romancin romancin commented Feb 15, 2024

With current module, defining multiple upstream_policies in the virtual_repository_config variable doesn't work, only the last one is applied.

This PR changes this variable type so upstream_configs is a list. As an example of a working calling to this module using the changes included in this PR:

module "my_repo_3" {
  ...
  mode          = "VIRTUAL_REPOSITORY"
  virtual_repository_config = {
    upstream_policies = [
      {
        id         = module.my_repo_1.artifact_name
        repository = module.my_repo_1.artifact_id
        priority   = 20
      },
      {
        id         = module.my_repo_2.artifact_name
        repository = module.my_repo_2.artifact_id
        priority   = 10
      }
    ]
  }
}

This PR fixes #11

@romancin romancin requested review from prabhu34, gtsorbo and a team as code owners February 15, 2024 17:53
@romancin romancin changed the title Fix virtual repo upstreams fix: virtual repository multiple upstream_policies Feb 15, 2024
@g-awmalik
Copy link

/gcbrun

@g-awmalik
Copy link

@romancin - thanks for the PR. Can you please rebase this with master?

@romancin romancin force-pushed the fix-virtual-repo-upstreams branch from c590129 to ed767a8 Compare February 26, 2024 13:37
@romancin
Copy link
Contributor Author

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

@prabhu34
Copy link
Collaborator

/gcbrun

@prabhu34
Copy link
Collaborator

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

@romancin I have pushed another change to main. Can you do rebase again?

@romancin romancin force-pushed the fix-virtual-repo-upstreams branch from 6985718 to ed767a8 Compare February 26, 2024 14:39
@romancin romancin force-pushed the fix-virtual-repo-upstreams branch from ed767a8 to a616ded Compare February 26, 2024 14:39
@romancin
Copy link
Contributor Author

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

@romancin I have pushed another change to main. Can you do rebase again?

Of course! Done!

@prabhu34
Copy link
Collaborator

/gcbrun

Copy link
Collaborator

@prabhu34 prabhu34 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prabhu34 prabhu34 merged commit 1221e4e into GoogleCloudPlatform:main Feb 26, 2024
4 checks passed
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.

virtual_repository_config should be a map
3 participants