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

Modernize Crossplane conformance suite #31

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jbw976
Copy link
Member

@jbw976 jbw976 commented Oct 9, 2024

Description of your changes

This PR updates the Crossplane conformance test suite and build logic to be aligned and compliant with Crossplane v1.17. The tests are all now compliant with a Crossplane v1.17 control plane. The current builds in this repo were last verified to work with Crossplane v1.2, so there were a number of updates to incorporate from those 15 intermediary minor releases.

This will stay in draft status for the remaining work items:

  • iterate on CI updates and verify correctness
  • verify checks in each test to see if further new checks should be added
  • add a test case that exercises Functions

Major changes to call out:

  • Conformance test cases target API behavior from Crossplane v1.15-v1.17, the currently supported upstream Crossplane versions
    • this includes API additions such as composition revisions, environment configs, and external secret stores
  • New test cases have been added for Functions, as they didn't exist at the time this conformance suite was created
    • install a function and verify it becomes installed and healthy
    • create a composition that uses pipeline mode to compose resources with functions
  • Provider conformance tests have been removed, the main focus of this suite will now be core Crossplane itself
  • go module dependencies updates to modern versions, e.g. crossplane-runtime:v1.17.0
  • Build submodule switched from https://github.com/upbound/build to https://github.com/crossplane/build
  • Build and CI versions updated to similar versions used in more recent Crossplane ecosystem projects, e.g. golang 1.23.2, ubuntu-24.04 runners, etc.
  • Additional CI checks have been added such as codeql and trivy-scan-fs

I have:

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

How has this code been tested

I have run all tests locally against a v1.17 Crossplane control plane with the following command:

❯ go test -v -run ^Test tests/*

Everything passes with the exception of TestConfiguration, which will not pass until we update index.docker.io/crossplane/conformance-testdata-configuration:latest after merging the CI changes included in the PR. I have gotten that test case to pass locally though by temporarily using xpkg.upbound.io/jaredorg/conformance-testdata-configuration:v0.0.1, which is essentially the same thing.

@jbw976
Copy link
Member Author

jbw976 commented Oct 9, 2024

oh wow, off to a pretty poor start for the CI in https://github.com/crossplane/conformance/actions/runs/11259504031/job/31308621246?pr=31 🙄

GitHub Actions has encountered an internal error when running your job.

- this is to avoid the conflict with xpkg-action's and crossplane's
  install.sh download of the crank binary to a file called crossplane

Signed-off-by: Jared Watts <[email protected]>
@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.

- install a function and verify it becomes installed and healthy
- create a composition that uses pipeline mode to compose resources
  with functions

Signed-off-by: Jared Watts <[email protected]>
@jbw976 jbw976 marked this pull request as ready for review October 15, 2024 14:45
@jbw976
Copy link
Member Author

jbw976 commented Oct 15, 2024

@negz I've moved this PR out of draft after getting it to state I'm feeling decent about. I'll continue some more clean up work, but the bulk of what I wanted to accomplish here is now completed.

Let me know if you'd like a sync session to walk through these changes effectively together, or how I can help make your review easier. Thank you! 🙇

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