Skip to content

Release: Stable release from 'v0.2.0-rc.1'#35

Open
refucktor wants to merge 35 commits intomainfrom
dev
Open

Release: Stable release from 'v0.2.0-rc.1'#35
refucktor wants to merge 35 commits intomainfrom
dev

Conversation

@refucktor
Copy link
Member

No description provided.

refucktor and others added 30 commits June 11, 2025 17:07
Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Upgrade Go to version 1.24 and toolchain to 1.24.3.
- Update direct and indirect dependencies to their latest compatible versions.
- Replace deprecated libraries with new, recommended ones where applicable.

This improves compatibility, stability, and prepares the project for better future support.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Use a new postgresql client library (github.com/jackc/pgx/v5)
- Add repository interfaces for the different postgresql object
- Add unit and integration tests

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Delete `pg_client.go` and associated tests, including the connection, error, and event trigger logic.
- Remove redundant utility functions and validation related to PostgreSQL operations.

No longer used in the application; streamlines codebase by removing obsolete code.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Introduce reusable validator with Singleton behaviour.
- Implement `RandomString` utility for generating random alphanumeric strings.
- Add operations for slices: `CleanUpSlice`, `SliceReduce`, and `SliceMap`.
- Include comprehensive unit tests for all new helpers to ensure reliability.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Introduce `FormatTerraformAttribute` for converting Terraform attribute values to HCL strings.
- Add helper functions for processing collection and single attribute values.
- Enhance testing capabilities for Terraform plugin development.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Add `go:generate` comments to automate Terraform code formatting for documentation examples.
- Include `go:generate` command to generate documentation using `tfplugindocs`.
- Improves reproducibility and consistency of generated resources.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Implement a custom Terraform string validator for PostgreSQL object names

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
…ted tests

- Remove the `event_trigger` resource and datasource implementation.
- Remove test cases and helper files associated with `event_trigger`.
- Clean up related documentation and unused constants.
- Change intended to simplify the codebase and remove outdated functionalities.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Centralize common error and validator messages in `messages.go`

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Implement terraform resource functionalities for: read, create, update, delete and import
- Add acceptance tests
- Extract common types logic in a separated file

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Introduce a new data source to retrieve PostgreSQL event trigger information.
- Implement core methods: Metadata, Configure, Schema, and Read.
- Add tests for the new data source to ensure expected behaviour with PostgreSQL containers.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Implement terraform resource functionalities for: read, create, update, delete and import
- Add acceptance tests
- Extract common types logic in a separated file

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Implement terraform resource functionalities for: read, create, update, delete and import
- Add acceptance tests
- Extract common types logic in a separated file

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Update provider configuration schema with less attributes.
- Use `pgclient` for PostgreSQL client creation, replacing `client` package.
- Simplify environment variable parsing and validation logic for provider configuration.
- Improve provider resources and data sources definitions for clarity.
- Adjust tests to accommodate `NewPostgresqlProvider`.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Replace the generic provider with the specialized Postgresql provider in the server setup.
- Ensures compatibility and alignment with Postgresql-specific features.
- Improves clarity by explicitly initializing the Postgresql provider.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
…urces

- Use templating mechanisms from `terraform-plugin-docs` to generate the provider documentation
- Add default templates for resources and datasources.
- Add terraform code examples for all currently supported resources and datasources

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
…settings

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Set terraform versions matrix to support 1.11 and 1.12
- Set Go versions matrix to support 1.24
Bumps [github.com/hashicorp/terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) from 1.13.1 to 1.13.2.
- [Release notes](https://github.com/hashicorp/terraform-plugin-testing/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-testing/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-testing@v1.13.1...v1.13.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-testing
  dependency-version: 1.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
- simplify GitHub Actions
- remove old build/lint/release workflows
- add a reusable setup-go composite action
- add new ci workflow to run build, MegaLinter, tests, Sonar, and CodeQL
- add new release workflow with semantic‑release dry run and manual release
Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Remove `npm clean-install` and `npm audit signatures` steps as they are redundant in the context of GitHub Actions.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Install `conventional-changelog-conventionalcommits` globally in release steps.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
- Modify steps to install conventional-changelog-conventionalcommits locally

Signed-off-by: Hector Valcarcel hmvalcarcel@gmail.com
Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.26.0 to 10.27.0.
- [Release notes](https://github.com/go-playground/validator/releases)
- [Commits](go-playground/validator@v10.26.0...v10.27.0)

---
updated-dependencies:
- dependency-name: github.com/go-playground/validator/v10
  dependency-version: 10.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-docs@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-docs
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@refucktor refucktor self-assigned this Jul 7, 2025
@refucktor refucktor requested a review from a team as a code owner July 7, 2025 17:43
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-actions
Copy link

github-actions bot commented Jul 7, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 2.34s
✅ JSON prettier 4 1 0 0 0.52s
✅ MARKDOWN markdownlint 1 0 0 0.66s
✅ REPOSITORY checkov yes no no 11.74s
✅ SPELL cspell 18 0 0 3.32s
✅ YAML yamllint 12 0 0 0.76s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.37.0 to 0.38.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases)
- [Commits](testcontainers/testcontainers-go@v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go
  dependency-version: 0.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 71.60883% with 360 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rnal/provider/postgresql_user_function_resource.go 72.54% 72 Missing and 26 partials ⚠️
...rnal/provider/postgresql_event_trigger_resource.go 68.97% 62 Missing and 23 partials ⚠️
internal/provider/postgresql_role_resource.go 74.16% 64 Missing and 21 partials ⚠️
internal/provider/postgresql_role_types.go 27.02% 18 Missing and 9 partials ⚠️
internal/provider/messages.go 0.00% 22 Missing ⚠️
...al/provider/postgresql_event_trigger_datasource.go 81.81% 10 Missing and 4 partials ⚠️
...nternal/provider/postgresql_user_function_types.go 62.96% 7 Missing and 3 partials ⚠️
internal/provider/helpers.go 61.11% 6 Missing and 1 partial ⚠️
...nternal/provider/postgresql_event_trigger_types.go 84.44% 5 Missing and 2 partials ⚠️
internal/provider/provider.go 93.90% 3 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ
internal/provider/provider.go 88.46% <93.90%> (+4.15%) ⬆️
internal/provider/helpers.go 56.00% <61.11%> (-10.99%) ⬇️
...nternal/provider/postgresql_event_trigger_types.go 84.44% <84.44%> (ø)
...nternal/provider/postgresql_user_function_types.go 62.96% <62.96%> (ø)
...al/provider/postgresql_event_trigger_datasource.go 81.81% <81.81%> (ø)
internal/provider/messages.go 0.00% <0.00%> (ø)
internal/provider/postgresql_role_types.go 27.02% <27.02%> (ø)
...rnal/provider/postgresql_event_trigger_resource.go 68.97% <68.97%> (ø)
internal/provider/postgresql_role_resource.go 74.16% <74.16%> (ø)
...rnal/provider/postgresql_user_function_resource.go 72.54% <72.54%> (ø)

dependabot bot and others added 4 commits July 21, 2025 12:41
…/postgres

Bumps [github.com/testcontainers/testcontainers-go/modules/postgres](https://github.com/testcontainers/testcontainers-go) from 0.37.0 to 0.38.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases)
- [Commits](testcontainers/testcontainers-go@v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go/modules/postgres
  dependency-version: 0.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/hashicorp/terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/hashicorp/terraform-plugin-framework/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-framework/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-framework@v1.15.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-framework
  dependency-version: 1.15.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/hashicorp/terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework) from 1.15.1 to 1.16.1.
- [Release notes](https://github.com/hashicorp/terraform-plugin-framework/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-framework/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-framework@v1.15.1...v1.16.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-framework
  dependency-version: 1.16.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Hector Valcarcel <hector.valcarcel@proton.me>
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.

1 participant