Skip to content

Switch to New Upbound DevEx #97

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

Merged
merged 15 commits into from
Mar 12, 2025
Merged

Switch to New Upbound DevEx #97

merged 15 commits into from
Mar 12, 2025

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Mar 10, 2025

Description of your changes

Switched this configuration to new Upbound DevEx including Project, CompositiionTest and E2ETest API.

Highlights:

  • Embedded function with advanced strongly typed KCL code
  • Composition render
  • Composition tests
  • E2ETests using
  • Upbound OIDC for e2e tets
  • No build submodule
  • ~30% code reduction
  • Upbound-centric, devex focused README
  • GitHub Workflows for Composition tests and E2E tests

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

up test run tests/*
  ✓   Parsing tests
  ✓   Checking dependencies
  ✓   Generating language schemas
  ✓   Building functions
  ✓   Building configuration package
  ✓   Pushing embedded functions to local daemon
  ✓   Assert test-xnetwork
 SUCCESS
 SUCCESS  Tests Summary:
 SUCCESS  ------------------
 SUCCESS  Total Tests Executed: 1
 SUCCESS  Passed tests:         1
 SUCCESS  Failed tests:         0
up test run tests/* --e2e
...
2025/03/11 13:40:09     | 13:40:09 | apply | @chainsaw                | CREATE    | OK    | v1/Namespace @ chainsaw-subtle-cobra
2025/03/11 13:40:09     | 13:40:09 | apply | Apply Resources          | TRY       | BEGIN |
2025/03/11 13:40:09     | 13:40:09 | apply | Apply Resources          | APPLY     | RUN   | azure.platform.upbound.io/v1alpha1/XNetwork @ uptest-azure-network
2025/03/11 13:40:09     | 13:40:09 | apply | Apply Resources          | CREATE    | OK    | azure.platform.upbound.io/v1alpha1/XNetwork @ uptest-azure-network
2025/03/11 13:40:09     | 13:40:09 | apply | Apply Resources          | APPLY     | DONE  | azure.platform.upbound.io/v1alpha1/XNetwork @ uptest-azure-network
2025/03/11 13:40:09     | 13:40:09 | apply | Apply Resources          | CMD       | RUN   |
...
 SUCCESS
 SUCCESS  Tests Summary:
 SUCCESS  ------------------
 SUCCESS  Total Tests Executed: 1
 SUCCESS  Passed tests:         1
 SUCCESS  Failed tests:         0

Composition tests E2E tests run with label were tested in ytsarev#1

@ytsarev ytsarev changed the title New devex Switch to New Upbound DevEx Mar 11, 2025
name: ref-azure-network
spec:
parameters:
id: ref-azure-network-from-xr
region: westus
deletionPolicy: Delete
Copy link
Member

Choose a reason for hiding this comment

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

You don't need this when using up composition render when you add the --xrd we will extract the defaults for the fields

Copy link
Member Author

Choose a reason for hiding this comment

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

Should --xrd be the default? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, scratch that, it is an explicit path

      --xrd=PATH                   A YAML file specifying the
                                   CompositeResourceDefinition (XRD) to validate
                                   the XR against.

Copy link
Member Author

Choose a reason for hiding this comment

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

Readme and sample XR updated

networkv1beta2.VirtualNetwork {
metadata = _metadata("${params.id}-vnet")
spec = _add_common_spec_fields(networkv1beta2.NetworkAzureUpboundIoV1beta2VirtualNetworkSpec {
forProvider = networkv1beta2.NetworkAzureUpboundIoV1beta2VirtualNetworkSpecForProvider {
Copy link
Member

Choose a reason for hiding this comment

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

You don't need the typed for every sub property it's enough on the root of the resource - If you using : the lsp will not add these by default

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed redundant explicit embedded field typing 👍

ytsarev added 9 commits March 11, 2025 22:49
* Add Composition Test workflows
* Replace e2e test workflow with up cli based one

Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
Also simplify sample XR

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev requested a review from haarchri March 12, 2025 10:33
@ytsarev ytsarev marked this pull request as ready for review March 12, 2025 10:34
@ytsarev ytsarev requested a review from a team as a code owner March 12, 2025 10:34
haarchri
haarchri previously approved these changes Mar 12, 2025
Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev merged commit 25f7da9 into upbound:main Mar 12, 2025
2 of 4 checks passed
@ytsarev ytsarev deleted the new-devex branch March 12, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants