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

Make registry modules lock scripts resilient #196

Merged
merged 50 commits into from
Jan 16, 2025

Conversation

christian-calabrese
Copy link
Contributor

@christian-calabrese christian-calabrese commented Dec 19, 2024

List of changes

  • Registry modules locking script made more resilient
  • Allow the script to be correctly invoked via pre-commits configs
  • Made infra/scripts versioned via changeset
  • Switch all modules invocations from git to registry source

Motivation and context

The lock modules script will be executed at every push and every plan or apply executed via github actions.
For this reason, it must be as resilient as possible to not cause issues in the ci/cd process.

To configure this pre-commit in your repo, it's possible to follow the following extract of the .pre-commit-config.yaml file:

repos:
  - repo: https://github.com/pagopa/dx
    rev: 0.0.1
    hooks:
      - id: lock_modules
        exclude: ^.*/(_modules|modules|\.terraform)(/.*)?$
        files: src/(common|core|github_runner|identity|migration|repository)

Type of changes

  • Add new resources
  • Update configuration to existing resources
  • Remove existing resources

Does this introduce a change to production resources with possible user impact?

  • Yes, users may be impacted applying this change
  • No

Other information

Copy link

changeset-bot bot commented Dec 19, 2024

🦋 Changeset detected

Latest commit: f3e37a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
pre_commit_scripts Patch
github_selfhosted_runner_on_container_app_jobs Patch
azure_function_app_exposed Patch
azure_app_service_exposed Patch
azure_postgres_server Patch
azure_storage_account Patch
azure_api_management Patch
azure_cosmos_account Patch
azure_function_app Patch
azure_app_service Patch
azure_core_infra Patch
azure_event_hub Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@christian-calabrese christian-calabrese changed the title feat: make pre-commit scripts versioned Make registry modules lock scripts resilient Jan 3, 2025
@christian-calabrese christian-calabrese marked this pull request as ready for review January 14, 2025 18:14
@christian-calabrese christian-calabrese requested review from a team as code owners January 14, 2025 18:15
@christian-calabrese christian-calabrese merged commit 1d56ff3 into main Jan 16, 2025
4 checks passed
@christian-calabrese christian-calabrese deleted the fix-pre-commit-lock branch January 16, 2025 13:36
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.

3 participants