Skip to content

Make the /search api return the full source file of the reference#1306

Merged
christian-calabrese merged 4 commits intomainfrom
return-full-source-url-kb
Feb 24, 2026
Merged

Make the /search api return the full source file of the reference#1306
christian-calabrese merged 4 commits intomainfrom
return-full-source-url-kb

Conversation

@christian-calabrese
Copy link
Copy Markdown
Contributor

No description provided.

@christian-calabrese christian-calabrese requested a review from a team as a code owner February 6, 2026 07:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: d858fa1

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

This PR includes changesets to release 1 package
Name Type
@pagopa/dx-mcpserver 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

@github-actions
Copy link
Copy Markdown
Contributor

Tip

✅ All Terraform module locks are up to date

No module changes detected - everything is in sync!

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
Lock Terraform Registry modules..........................................Passed

Generated on Tue Feb 24 11:28:19 UTC 2026
Run lock_modules on folder: infra/resources/dev/

@github-actions
Copy link
Copy Markdown
Contributor

Tip

✅ All Terraform module locks are up to date

No module changes detected - everything is in sync!

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
Lock Terraform Registry modules..........................................Passed

Generated on Tue Feb 24 11:28:23 UTC 2026
Run lock_modules on folder: infra/resources/prod/

@github-actions
Copy link
Copy Markdown
Contributor

Tip

✅ All Terraform module locks are up to date

No module changes detected - everything is in sync!

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
Lock Terraform Registry modules......................................................Passed
Terraform Providers Lock (on staged .terraform.lock.hcl files).......................Passed
- hook id: terraform_providers_lock_staged
- duration: 0.1s

No .terraform.lock.hcl files to process.

Terraform fmt........................................................................Passed
terraform_docs on modules............................................................Passed
terraform_docs on resources......................................(no files to check)Skipped
Terraform validate with tflint.......................................................Passed
Terraform validate...................................................................Passed
Terraform validate with trivy........................................................Passed

Generated on Tue Feb 24 11:28:30 UTC 2026
Run all checks on modified files

@github-actions
Copy link
Copy Markdown
Contributor

📖 Terraform Plan (infra/resources/dev) - success

Show Plan
  # module.mcp_server.aws_iam_policy.lambda_s3_access will be created
  + resource "aws_iam_policy" "lambda_s3_access" {
      + arn              = (known after apply)
      + attachment_count = (known after apply)
      + description      = "IAM policy for Lambda to generate pre-signed URLs for S3 knowledge base objects"
      + id               = (known after apply)
      + name             = "dx-d-euc1-lambda-s3-access-policy-01"
      + name_prefix      = (known after apply)
      + path             = "/"
      + policy           = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = [
                          + "s3:GetObject",
                        ]
                      + Effect   = "Allow"
                      + Resource = "arn:aws:s3:::dx-d-euc1-docs-kb-s3-01/*"
                    },
                  + {
                      + Action   = [
                          + "s3:ListBucket",
                        ]
                      + Effect   = "Allow"
                      + Resource = "arn:aws:s3:::dx-d-euc1-docs-kb-s3-01"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + policy_id        = (known after apply)
      + tags             = {
          + "BusinessUnit"   = "DevEx"
          + "CostCenter"     = "TS000 - Tecnologia e Servizi"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Dev"
          + "ManagementTeam" = "Developer Experience"
          + "Source"         = "https://github.com/pagopa/dx/blob/main/infra/resources/dev"
        }
      + tags_all         = {
          + "BusinessUnit"   = "DevEx"
          + "CostCenter"     = "TS000 - Tecnologia e Servizi"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Dev"
          + "ManagementTeam" = "Developer Experience"
          + "Source"         = "https://github.com/pagopa/dx/blob/main/infra/resources/dev"
        }
    }

  # module.mcp_server.aws_iam_role_policy_attachment.lambda_s3_access will be created
  + resource "aws_iam_role_policy_attachment" "lambda_s3_access" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "dx-d-euc1-lambda-mcp-server-role-01"
    }

  # module.mcp_server.awscc_bedrock_data_source.docs must be replaced
-/+ resource "awscc_bedrock_data_source" "docs" {
      ~ created_at                           = "2025-12-23T15:56:21.671272593Z" -> (known after apply)
      ~ data_source_configuration            = {
          + confluence_configuration  = (known after apply)
          ~ s3_configuration          = {
              + bucket_owner_account_id = (known after apply)
              + inclusion_prefixes      = (known after apply)
                # (1 unchanged attribute hidden)
            }
          + salesforce_configuration  = (known after apply)
          + share_point_configuration = (known after apply)
          + web_configuration         = (known after apply)
            # (1 unchanged attribute hidden)
        }
      ~ data_source_id                       = "UAEJB6J11W" -> (known after apply)
      ~ data_source_status                   = "AVAILABLE" -> (known after apply)
      + description                          = (known after apply)
      + failure_reasons                      = (known after apply)
      ~ id                                   = "CBFLV0W1VR|UAEJB6J11W" -> (known after apply)
        name                                 = "dx-d-euc1-docs-bedrock-kb-01-dx-docs-data-source"
      + server_side_encryption_configuration = (known after apply)
      ~ updated_at                           = "2025-12-23T15:56:21.671272593Z" -> (known after apply)
      ~ vector_ingestion_configuration       = {
          ~ chunking_configuration              = { # forces replacement
              + fixed_size_chunking_configuration   = (known after apply)
              ~ hierarchical_chunking_configuration = {
                  ~ level_configurations = [
                      ~ {
                          ~ max_tokens = 1500 -> 4000
                        },
                      ~ {
                          ~ max_tokens = 300 -> 500
                        },
                    ]
                  ~ overlap_tokens       = 60 -> 150
                }
              + semantic_chunking_configuration     = (known after apply)
                # (1 unchanged attribute hidden)
            }
          + context_enrichment_configuration    = (known after apply)
          + custom_transformation_configuration = (known after apply)
          + parsing_configuration               = (known after apply)
        }
        # (2 unchanged attributes hidden)
    }

Plan: 3 to add, 0 to change, 1 to destroy.

Warning: Reference to undefined provider

  on aws.tf line 12, in module "mcp_server":
  12:     aws.us_east_1 = aws.us-east-1

There is no explicit declaration for local provider name "aws.us_east_1" in
module.mcp_server, so Terraform is assuming you mean to pass a configuration
for "hashicorp/aws".

If you also control the child module, add a required_providers entry named
"aws.us_east_1" with the source address "hashicorp/aws".

@github-actions
Copy link
Copy Markdown
Contributor

📖 Terraform Plan (infra/resources/prod) - success

Show Plan
No changes detected.

@christian-calabrese christian-calabrese merged commit 9ba9415 into main Feb 24, 2026
18 checks passed
@christian-calabrese christian-calabrese deleted the return-full-source-url-kb branch February 24, 2026 11:39
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.

2 participants