-
Notifications
You must be signed in to change notification settings - Fork 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
Register Manifests during ucp startup sequence #8120
base: main
Are you sure you want to change the base?
Register Manifests during ucp startup sequence #8120
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8120 +/- ##
==========================================
+ Coverage 60.04% 60.11% +0.07%
==========================================
Files 581 584 +3
Lines 38536 38784 +248
==========================================
+ Hits 23138 23316 +178
- Misses 13698 13749 +51
- Partials 1700 1719 +19 ☔ View full report in Codecov by Sentry. |
4c242d7
to
4cef599
Compare
4cef599
to
1e20af2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is an improvement. Let's keep iterating on Monday.
f432f1e
to
15bf5c0
Compare
15bf5c0
to
31c016b
Compare
31c016b
to
ddba2d1
Compare
ddba2d1
to
2b6ddf2
Compare
2b6ddf2
to
2027d07
Compare
2027d07
to
626eaa3
Compare
626eaa3
to
fd4ef05
Compare
fd4ef05
to
4f9399d
Compare
4f9399d
to
bda5c6f
Compare
820ce9a
to
0295fe2
Compare
// connection and an error if one occurs. | ||
func (ws Workspace) Connect() (sdk.Connection, error) { | ||
func (ws Workspace) Connect(ctx context.Context) (sdk.Connection, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you find any places in code that call connect but don't call test-connection?
I think this is a good refactor, but I'm trying to figure out if it's safe to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, all current calls were followed by another call to test connection
func Test_ResourceProvider_RegisterManifests(t *testing.T) { | ||
server := testhost.Start(t, testhost.TestHostOptionFunc(func(options *ucp.Options) { | ||
options.Config.Initialization.ManifestDirectory = "testdata/manifests" | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 👍
createRadiusPlane(server) | ||
|
||
// Wait for the manifest to be registered | ||
time.Sleep(5 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this with require.Eventually
instead?
Picking a hardcoded value has a lot of downsides:
- If it's too short, the test will be unreliable
- If it's too long, we end up waiting a lot
You can use require.Eventually
with a long-ish timeout and it will be mitigate both of these issues. eg: retry every 1 second with a 30 second deadline.
client, err := r.ConnectionFactory.CreateApplicationsManagementClient(ctx, *r.Workspace) | ||
if err != nil { | ||
return err | ||
// Initialize the client factory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this comment to explain why this is being done inside Run
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more small things to look at. This is almost there!
0295fe2
to
ff99f6b
Compare
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
Signed-off-by: lakshmimsft <[email protected]>
ff99f6b
to
2975a86
Compare
2975a86
to
fb26995
Compare
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Signed-off-by: lakshmimsft <[email protected]>
fb26995
to
1939ae8
Compare
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
Type of change
Fixes: Part of UDT
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: