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

🔄 synced file(s) with upbound/sa-up #51

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

upbound-bot
Copy link

synced local file(s) with upbound/sa-up.

Changed files
  • synced local Makefile with remote shared/configurations/Makefile
  • synced local .github/renovate.json5 with remote shared/configurations/renovate.json5
  • created local .github/CODEOWNERS from remote .github/CODEOWNERS

This PR was created automatically by the repo-file-sync-action workflow run #12015434335

Copy link

upbound/configuration-aws-database #51

Change Summary

  • Major refactoring of the Makefile to provide comprehensive targets for development, testing, and deployment including new e2e testing capabilities, KCL support, and improved documentation
  • Added CODEOWNERS file assigning ownership to @upbound/team-customer-success
  • Enhanced renovate.json5 configuration with package grouping rules and improved regex patterns for version management

Potential Vulnerabilities

  • File: .github/CODEOWNERS:1
  • Code: * @upbound/team-customer-success
  • Explanation: While not a direct vulnerability, assigning all files to a single team could potentially lead to reduced code review scrutiny. Consider splitting responsibilities across different teams for critical components.

Code Smells

  1. Makefile Duplication:
  • File: Makefile:203-244
  • Code: Multiple help target definitions and complex conditional logic
  • Explanation: The help system implementation is split across multiple targets (help, help.local) which could be consolidated for better maintainability.
  1. Complex Regex Pattern:
  • File: .github/renovate.json5:51-53
  • Code: "regexManagers": ["#\\s*renovate:\\s*datasource=(?<datasource>[^\\s]+)\\s+depName=(?<depName>[^\\s]+)\\s*\\n\\s*version:\\s*\"(?<currentValue>[^\"]+)\""]
  • Explanation: The complex regex pattern for version management could be difficult to maintain and debug. Consider breaking it down into simpler patterns or using structured configuration where possible.

Debug Logs

  • No explicit debug logs found in the changes

Unintended Consequences

  1. Version Lock Issue:
  • File: Makefile:117-119
  • Code: ```
    CROSSPLANE_CLI_VERSION = v1.17.1
    CROSSPLANE_VERSION = v1.17.1-up.1
    UPTEST_VERSION = v1.1.2
- Explanation: Hard-coding version numbers could lead to dependency conflicts if not regularly maintained. Consider implementing a more flexible version management strategy.

2. Build Process Change:
- File: `Makefile:14-25`
- Code: ```
# Required variables:
# - PROJECT_NAME: Name of your Crossplane configuration package
#
# Example project.mk:
#   PROJECT_NAME = custom-config
  • Explanation: The new build system requires project.mk file which might break existing CI/CD pipelines or local development environments that haven't been updated to include this file.

Risk Score: 4

The changes are primarily infrastructure and tooling related, with no direct impact on runtime behavior. While there are some concerns about the build system changes and ownership structure, they can be addressed through proper documentation and team communication. The risk is moderate due to the extensive Makefile changes that could potentially impact build and deployment processes.

@kaessert
Copy link
Collaborator

Manual testing:

$> make check-examples
18:32:26 [ .. ] Checking if package versions in dependencies match examples
18:32:27 [ OK ] Package versions are sane
$> make render.show
---
apiVersion: aws.platform.upbound.io/v1alpha1
kind: SQLInstance
metadata:
  annotations:
    render.crossplane.io/composition-path: apis/composition.yaml
    render.crossplane.io/function-path: examples/functions.yaml
  name: configuration-aws-database-mariadb
  namespace: default
spec:
  parameters:
    autoGeneratePassword: true
    engine: mariadb
    engineVersion: 10.11.6
    networkRef:
      id: configuration-aws-database
    passwordSecretRef:
      key: password
      name: mariadbsecret
      namespace: default
    region: us-west-2
    storageGB: 5
  writeConnectionSecretToRef:
    name: configuration-aws-database-mariadb
status:
  conditions:
  - lastTransitionTime: "2024-01-01T00:00:00Z"
    message: 'Unready resources: RDSInstanceSmall, compositeSQLInstanceDbSubnetGroup'
    reason: Creating
    status: "False"
    type: Ready
---
apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
metadata:
  annotations:
    crossplane.io/composition-resource-name: RDSInstanceSmall
  generateName: configuration-aws-database-mariadb-
  labels:
    crossplane.io/composite: configuration-aws-database-mariadb
  ownerReferences:
  - apiVersion: aws.platform.upbound.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: SQLInstance
    name: configuration-aws-database-mariadb
    uid: ""
spec:
  forProvider:
    allocatedStorage: 5
    autoGeneratePassword: true
    dbName: upbound
    dbSubnetGroupNameSelector:
      matchControllerRef: true
    engine: mariadb
    engineVersion: 10.11.6
    instanceClass: db.t3.micro
    passwordSecretRef:
      key: password
      name: mariadbsecret
      namespace: default
    publiclyAccessible: false
    region: us-west-2
    skipFinalSnapshot: true
    username: masteruser
    vpcSecurityGroupIdSelector:
      matchLabels:
        networks.aws.platform.upbound.io/network-id: configuration-aws-database
---
apiVersion: rds.aws.upbound.io/v1beta1
kind: SubnetGroup
metadata:
  annotations:
    crossplane.io/composition-resource-name: compositeSQLInstanceDbSubnetGroup
  generateName: configuration-aws-database-mariadb-
  labels:
    crossplane.io/composite: configuration-aws-database-mariadb
  ownerReferences:
  - apiVersion: aws.platform.upbound.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: SQLInstance
    name: configuration-aws-database-mariadb
    uid: ""
spec:
  forProvider:
    description: An excellent formation of subnetworks.
    region: us-west-2
    subnetIdSelector:
      matchLabels:
        networks.aws.platform.upbound.io/network-id: configuration-aws-database

@kaessert
Copy link
Collaborator

/test-examples

@kaessert kaessert requested a review from ytsarev November 25, 2024 18:01
@kaessert kaessert merged commit f170ac5 into main Nov 26, 2024
2 checks passed
@ytsarev ytsarev deleted the repo-sync/sa-up/default branch November 26, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants