Skip to content

feat: Add MergeTrain options#285

Open
BigGold1310 wants to merge 1 commit into
crossplane-contrib:masterfrom
BigGold1310:merge-trains
Open

feat: Add MergeTrain options#285
BigGold1310 wants to merge 1 commit into
crossplane-contrib:masterfrom
BigGold1310:merge-trains

Conversation

@BigGold1310
Copy link
Copy Markdown
Contributor

@BigGold1310 BigGold1310 commented Feb 20, 2026

Description of your changes

Add support for MergeTrainsEnabled, MergeTrainsSkipTrainAllowed, and MergePipelinesEnabled fields to the GitLab Project resource.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Signed-off-by: Cyrill Näf <cyrill.naef@gmail.com>
@henrysachs
Copy link
Copy Markdown
Collaborator

@BigGold1310 is this ready for review?

@henrysachs
Copy link
Copy Markdown
Collaborator

@BigGold1310 I would love to merge this, is this fine for you?

@BigGold1310 BigGold1310 marked this pull request as ready for review March 31, 2026 14:48
@BigGold1310
Copy link
Copy Markdown
Contributor Author

@henrysachs Ready for review.

Copy link
Copy Markdown
Collaborator

@henrysachs henrysachs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @BigGold1310 — this looks very close.

I may be missing something, but I think there are still two controller-side gaps:

  1. isProjectUpToDate() in pkg/namespaced/controller/projects/projects/project.go (and the generated mirror in pkg/cluster/controller/projects/projects/zz_project.go) still does not compare mergeTrainsEnabled, mergeTrainsSkipTrainAllowed, or mergePipelinesEnabled.
    That means a spec change limited to these fields would still be treated as up to date, so EditProject would never be called for that change.

  2. lateInitialize() in the same controller files does not seem to backfill these new fields into spec.forProvider when they are unset.
    So adopted/imported resources, or projects relying on GitLab defaults, would not get these values initialized the same way as nearby optional project settings.

The API / CRD / client wiring looks good to me — it just seems the reconcile path is not fully wired for the new fields yet.

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