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

tests: add acquire tests #1741

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

tests: add acquire tests #1741

wants to merge 2 commits into from

Conversation

acpana
Copy link
Collaborator

@acpana acpana commented May 8, 2024

This patch adds an acquire test for step based testing.

acpana added 2 commits May 8, 2024 21:51
Captured with:

```bash
$ WRITE_GOLDEN_OUTPUT=1 GOLDEN_REQUEST_CHECKS=1 E2E_KUBE_TARGET=envtest E2E_GCP_TARGET=real RUN_E2E=1 go test -test.count=1 -timeout 360s -v ./tests/e2e -run TestE2EScript/scenarios/direct/logging/acquire 2>&1
```

Signed-off-by: Alex Pana <[email protected]>
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from acpana. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment on lines +129 to +141
PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-to-acquire?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

{
"filter": "resource.type=gae_app AND severity\u003c=INFO",
"metricDescriptor": {
"labels": [],
"metricKind": "DELTA",
"unit": "1",
"valueType": "INT64"
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

surprised to see this PUT from the dcl controller while acquiring. Curious what the diff computed was that required an upgrade, it looks like it's adding the labels slice at first sight.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, maybe we need the PR that logs the diff in the controller to be sure.

@acpana
Copy link
Collaborator Author

acpana commented May 8, 2024

I ran this against real and then turned on the direct controller to prove that acquisition works in the happy path for using a direct controller for LLM.

@acpana acpana marked this pull request as ready for review May 9, 2024 17:31
@justinsb justinsb added this to the 1.118 milestone May 10, 2024
@@ -265,6 +271,40 @@ func TestE2EScript(t *testing.T) {
})
}

// applies objects directly to the cloud provider
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we instead apply and then abandon them? Even if we use a custom verb to do that, this feels like it's duplicating our direct controller layer (?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could do that but technically we will be testing the acquisition or adoption of a resource that we created and then un-managed. As opposed to to acquiring a previsouly unknown resource to us. Although I am not convinced that this distinction is meaningful That is, we can probably use the scenario you proposed to better effect.

If we do want to acquire a "clean" resource, I can expose the adapter or reuse some of the ResourceContext methods I added in #1768

Comment on lines +129 to +141
PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-to-acquire?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

{
"filter": "resource.type=gae_app AND severity\u003c=INFO",
"metricDescriptor": {
"labels": [],
"metricKind": "DELTA",
"unit": "1",
"valueType": "INT64"
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, maybe we need the PR that logs the diff in the controller to be sure.

@justinsb
Copy link
Collaborator

My inclination here is that we use the fact that this passes for confidence in our release, but we don't merge this in 1.118. WDYT @acpana ?

@acpana
Copy link
Collaborator Author

acpana commented May 15, 2024

Yes, this should not be a blocker for 1.118.

@yuwenma yuwenma modified the milestones: 1.118, 1.119 May 16, 2024
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.

None yet

3 participants