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!: Don't provide defaults for public repositories #34

Conversation

frmrm
Copy link
Contributor

@frmrm frmrm commented Jul 25, 2024

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

@frmrm frmrm requested review from prabhu34 and a team as code owners July 25, 2024 20:31
Copy link

google-cla bot commented Jul 25, 2024

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
Copy link
Contributor Author

frmrm commented Jul 31, 2024

@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
Copy link

j8r commented Sep 10, 2024

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

@apeabody
Copy link
Contributor

/gcbrun

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @frmrm!

Can you please rebase (or ideally add permission for maintainers).

Also, as this will be a breaking change, so we might need an upgrade guide similar to https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/master/docs/upgrading_to_v33.0.md

@apeabody apeabody closed this Sep 10, 2024
@apeabody apeabody reopened this Sep 10, 2024
@apeabody
Copy link
Contributor

apeabody commented Sep 10, 2024

(re-opening triggers the stuck lint workflow)

@apeabody
Copy link
Contributor

/gcbrun

@apeabody
Copy link
Contributor

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 frmrm force-pushed the msf/remove-default-public-repo-values branch from 23c2f58 to 450503e Compare September 10, 2024 23:45
@frmrm
Copy link
Contributor Author

frmrm commented Sep 10, 2024

@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
Copy link
Contributor Author

frmrm commented Sep 10, 2024

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

@apeabody
Copy link
Contributor

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
Copy link
Contributor

@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

@apeabody apeabody changed the title fix: Don't provide defaults for public repositories fix!: Don't provide defaults for public repositories Sep 10, 2024
@frmrm
Copy link
Contributor Author

frmrm commented Sep 11, 2024

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
Copy link
Contributor Author

frmrm commented Sep 11, 2024

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

@apeabody
Copy link
Contributor

/gcbrun

@apeabody apeabody self-requested a review September 11, 2024 16:06
@frmrm
Copy link
Contributor Author

frmrm commented Sep 15, 2024

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

@apeabody
Copy link
Contributor

@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?

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @frmrm!

@apeabody apeabody merged commit 110c340 into GoogleCloudPlatform:main Sep 19, 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.

Conflicting values when using remote docker repositories with custom uri
3 participants