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

Multi-platform CI #1293

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Multi-platform CI #1293

merged 5 commits into from
Nov 28, 2023

Conversation

cretz
Copy link
Member

@cretz cretz commented Nov 15, 2023

What was changed

  • Add build script with support for check, unit test, integration test (including w/ dev server), and coverage helpers
  • Change CI to run on all three of ubuntu, mac, and windows
    • Coverage only on Ubuntu + Go 1.21
    • Docker compose only on Ubuntu + Go 1.21, dev server on all
  • Change code here and there for multi-platform and dev server support on integration tests
  • Delete Makefile

When ready to merge, will change the required build targets in GH branch protection

Checklist

  1. Closes Test CI on all platforms we support #1098

@cretz cretz force-pushed the multi-ci branch 11 times, most recently from 7c2f1ed to 911d83e Compare November 17, 2023 22:10
@@ -169,6 +169,7 @@ func isFileAutogenerated(_ string) bool {
}

func mustProcessPath(path string) bool {
path = filepath.ToSlash(path)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was not Windows-safe before

@@ -71,7 +71,6 @@ func TestGRPCInterceptor(t *testing.T) {
require.Len(t, timers, 1)
require.Equal(t, metrics.TemporalRequestLatency+"_my_suffix", timers[0].Name)
require.Equal(t, map[string]string{metrics.OperationTagName: "Check"}, timers[0].Tags)
require.Greater(t, timers[0].Value(), 0*time.Second)
Copy link
Member Author

Choose a reason for hiding this comment

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

On some platforms, this would actually appear to the metric collector as 0 seconds in flaky/fast cases

Comment on lines -146 to -147
require.Never(t, tryWrite(completionChans[1]), 2*time.Second, 100*time.Millisecond,
"Should be no reader on the task1's completion channel as task0 holds the ctx lock")
Copy link
Member Author

Choose a reason for hiding this comment

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

The way that this poor require.Never is written, the callback can technically be invoked even after this is returned, which was causing race conditions with the closing of the channel later. Decided this part of the test isn't really needed to test the rest.

Comment on lines +2687 to +2689
// TODO(cretz): There is a bug with search attribute names on standard
// visibility with eager workflow start
options.EnableEagerStart = false
Copy link
Member Author

Choose a reason for hiding this comment

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

if err != nil {
if err = ts.registerNamespace(); err != nil {
return err
} else if err = ts.ensureSearchAttributes(); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

For dev server, the CustomKeywordField search attribute isn't present like it is in docker compose

@cretz cretz marked this pull request as ready for review November 17, 2023 23:08
@cretz cretz requested a review from a team as a code owner November 17, 2023 23:08
@@ -2685,6 +2686,9 @@ func (ts *IntegrationTestSuite) TestDeterminismUpsertSearchAttributesConditional
options.SearchAttributes = map[string]interface{}{
"CustomKeywordField": "unset",
}
// TODO(cretz): There is a bug with search attribute names on standard
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we replace with the issue link

@cretz
Copy link
Member Author

cretz commented Nov 27, 2023

I have to go mod tidy some stuff and maybe fix other things w/ remove-gogo merge before CI passes, but won't merge w/out re-review if I have to alter anything serious.

// Find the root directory from this directory
_, thisFile, _, _ := runtime.Caller(0)
b.thisDir = filepath.Join(thisFile, "..")
b.rootDir = filepath.Join(b.thisDir, "../../../")
Copy link
Contributor

Choose a reason for hiding this comment

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

You could call into git rev-parse --show-toplevel instead. We know it's a git repo

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this code is much clearer than making a git call. It's really easy to just get a relative directory of a current file.

@cretz cretz force-pushed the multi-ci branch 2 times, most recently from a72d146 to e276951 Compare November 28, 2023 15:20
@cretz cretz merged commit 33e8360 into temporalio:master Nov 28, 2023
12 checks passed
@cretz cretz deleted the multi-ci branch November 28, 2023 16:36
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.

Test CI on all platforms we support
3 participants