GoogleCloudPlatform / terraform-google-artifact-registry

Create and manage Artifact Registry repositories
https://registry.terraform.io/modules/GoogleCloudPlatform/artifact-registry/google
Apache License 2.0
11 stars 9 forks source link

fix!: Don't provide defaults for public repositories #34

Closed frmrm closed 1 week ago

frmrm commented 2 months ago

This PR drops the default values for the public_repository keys under remote_repository_config. This fixes the underlying issue with configuring custom remote repositories, but it will require the data structures for folks using the public repositories to be a bit more verbose, unfortunately.

closes #32

google-cla[bot] commented 2 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

frmrm commented 2 months ago

@prabhu34 - Got the CLA sorted out here. Would love to get this into the mainline so we don't have to maintain a fork. :)

j8r commented 2 weeks ago

Need a rebase now @frmrm. @prabhu34 doesn't look like to be very active this days, maybe @apeabody could help us here?

apeabody commented 2 weeks ago

/gcbrun

apeabody commented 2 weeks ago

(re-opening triggers the stuck lint workflow)

apeabody commented 2 weeks ago

/gcbrun

apeabody commented 2 weeks ago

From the lint test:

Checking for documentation generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=autogen' '--exclude=*.tfvars' '--exclude=*metadata.yaml' /workspace/README.md /tmp/tmp.aG4F7F4BFl/generate_docs/workspace/README.md
56c56
< | remote\_repository\_config | Configuration specific for a Remote Repository. | <pre>object({<br>    description                 = optional(string)<br>    disable_upstream_validation = optional(bool, true)<br>    upstream_credentials = optional(object({<br>      username                = string<br>      password_secret_version = string<br>    }), null)<br>    apt_repository = optional(object({<br>      public_repository = optional(object({<br>        repository_base = string<br>        repository_path = string<br>      }), null)<br>    }), null)<br>    docker_repository = optional(object({<br>      public_repository = optional(string, "DOCKER_HUB")<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    maven_repository = optional(object({<br>      public_repository = optional(string, "MAVEN_CENTRAL")<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    npm_repository = optional(object({<br>      public_repository = optional(string, "NPMJS")<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    python_repository = optional(object({<br>      public_repository = optional(string, "PYPI")<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    yum_repository = optional(object({<br>      public_repository = optional(object({<br>        repository_base = string<br>        repository_path = string<br>      }), null)<br>    }), null)<br>  })</pre> | `null` | no |
---
> | remote\_repository\_config | Configuration specific for a Remote Repository. | <pre>object({<br>    description                 = optional(string)<br>    disable_upstream_validation = optional(bool, true)<br>    upstream_credentials = optional(object({<br>      username                = string<br>      password_secret_version = string<br>    }), null)<br>    apt_repository = optional(object({<br>      public_repository = optional(object({<br>        repository_base = string<br>        repository_path = string<br>      }), null)<br>    }), null)<br>    docker_repository = optional(object({<br>      public_repository = optional(string)<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    maven_repository = optional(object({<br>      public_repository = optional(string)<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    npm_repository = optional(object({<br>      public_repository = optional(string)<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    python_repository = optional(object({<br>      public_repository = optional(string)<br>      custom_repository = optional(object({<br>        uri = string<br>      }), null)<br>    }), null)<br>    yum_repository = optional(object({<br>      public_repository = optional(object({<br>        repository_base = string<br>        repository_path = string<br>      }), null)<br>    }), null)<br>  })</pre> | `null` | no |
Error: Documentation generation has not been run, please run the
'make docker_generate_docs' command and commit the above changes.
frmrm commented 2 weeks ago

@apeabody I have rebased on the latest main and run the doc generator. I'm honestly not sure where they stuck the checkbox to allow maintainers to send commits to my fork. 🧐

frmrm commented 2 weeks ago

Do you want the upgrade guide additions as a part of the same commit or as a subsequent commit?

apeabody commented 2 weeks ago

Do you want the upgrade guide additions as a part of the same commit or as a subsequent commit?

I'd prefer everything in this PR, so we keep the repo aligned. Thanks!

apeabody commented 2 weeks ago

@apeabody I have rebased on the latest main and run the doc generator. I'm honestly not sure where they stuck the checkbox to allow maintainers to send commits to my fork. 🧐

Here is the doc, but I believe some Orgs may restrict it: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests

frmrm commented 2 weeks ago

That's probably the issue - our enterprise may have it set at the enterprise level and our OSS forks org is subject to that.

frmrm commented 2 weeks ago

@apeabody Updated. Let me know if that's what you're thinking or if further changes are needed.

apeabody commented 2 weeks ago

/gcbrun

frmrm commented 2 weeks ago

@apeabody Are you needing anything further from me on this?

apeabody commented 1 week ago

@apeabody Are you needing anything further from me on this?

Thanks @frmrm! - Nothing at this time.

@prabhu34 - Can you please review this breaking change as well?