feat: bump terraform-provider-launchdarkly to v2.29.0 and support local provider checkouts - #65
Open
devopsdina wants to merge 6 commits into
Open
feat: bump terraform-provider-launchdarkly to v2.29.0 and support local provider checkouts#65devopsdina wants to merge 6 commits into
devopsdina wants to merge 6 commits into
Conversation
…l and high CVEs, add local e2e testing (#3) * move to no-fork architecture * add local e2e to run example CRDs against an LD instance. * Update docs * Remediate critical and high CVEs
* update to Go 1.25.7 * bubble up errors in e2e testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Bumps the upstream
terraform-provider-launchdarklydependency from v2.25.3→ v2.29.0 and refactors how the version is declared so that all four
locations (binary constant, Go module pseudo-version, Makefile, runtime SDK
call) stay in sync.
Also adds an opt-in workflow for developing against a local terraform-provider
checkout via a gitignored
local.env+TF_PROVIDER_PATH, which was used tovalidate against an unreleased provider branch while iterating on this PR.
Highlights
Provider bump (v2.25.3 → v2.29.0)
Makefile:TERRAFORM_PROVIDER_VERSIONand derivedTERRAFORM_PROVIDER_GIT_REF.go.mod: pseudo-version forterraform-provider-launchdarklyupdated tothe v2.29.0 release commit;
api-client-goindirect dep moved v17 → v22.apis/**/zz_*_types.go,package/crds/*.yaml,config/provider-metadata.yaml,config/schema.json,examples-generated/**) reflect new fields and updated docs from v2.29.0:FeatureFlag: newdeprecated,viewKeysfields.Project: newrequireViewAssociationForNewFlags,requireViewAssociationForNewSegmentsfields.EnvironmentSegment: new fields surfaced by upstream schema.AuditLogSubscription: integration keys now includedynatrace-v2,jira.Single source of truth for provider version
internal/versionexportingTerraformProviderVersion(andthe existing build-time
Versionvar).internal/clients/launchdarkly.goandconfig/provider.gono longerhard-code
"2.25.3"; they import the constant.semver,
go.modcomment,go.modpseudo-version) are documented in thenew Upgrading the upstream Terraform provider section of
README.md.Local provider development workflow
Makefile: optional-include local.env. WhenTF_PROVIDER_PATHis set,TERRAFORM_PROVIDER_REPOandTERRAFORM_PROVIDER_GIT_REFare derivedfrom the local checkout's git remote + current branch, so
pull-docsclones from the right place without committing any override.pull-docsnow usesTERRAFORM_PROVIDER_GIT_REFdirectly instead ofre-deriving
v$(TERRAFORM_PROVIDER_VERSION)inline.README.mddocuments the workflow under Testing Against an UpstreamTerraform Provider Branch.
Misc Makefile fixes
go.cleansomake cleandoesn't wipegolang.org/toolchainfrom the module cache; new
clean-module-cachetarget for the full wipe.local-deploynow restarts provider deployments and uses$(CROSSPLANE_NAMESPACE)instead of hard-codedupbound-system.Example cleanup
custom_role,feature_flag_environment/targeting,project_environment_and_flag/*,segment/segment_with_env,team_with_custom_roles/*to align with providercrossplane-created-…naming convention and switched hard-coded
projectKeystrings toprojectKeyRefso the examples actually work as a connected set whenapplied together for
make local-e2e.How has this code been tested
make generate— clean output, no diff.make check-difflocally — passes (branch is clean).devopsdina/crossplane-provider-launchdarkly) — see thefork's PR for the green run.
make local-e2eend-to-end against a real LaunchDarkly account using theupdated examples — all resources reconcile to
Ready=True, including thenew
deprecated/viewKeys/requireViewAssociationForNew*fields onFeatureFlagandProject.TF_PROVIDER_PATHat acheckout of
terraform-provider-launchdarklyon theissue-387branch from the PR on the terraform providerI have:
make reviewable testto ensure this PR is ready for review.