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

test: add integration tests for upgrades #2260

Merged
merged 3 commits into from
Sep 12, 2024
Merged

test: add integration tests for upgrades #2260

merged 3 commits into from
Sep 12, 2024

Conversation

matklad
Copy link
Member

@matklad matklad commented Aug 29, 2024

Adds a real multiversion binary to our integration tests, and implements a simplistic upgrade test.

Ideally, this should be moved to our upcoming system-tests, but let's have at least a smoke test in the meantime: #2270

@matklad matklad force-pushed the matklad/uptest branch 11 times, most recently from 5dd20a8 to 8d44507 Compare August 30, 2024 12:41
@matklad matklad changed the title ci: use multiversioned binary for integration tests @matklad test: add integration tests for upgrades Aug 30, 2024
@matklad matklad changed the title @matklad test: add integration tests for upgrades test: add integration tests for upgrades Aug 30, 2024
@matklad matklad force-pushed the matklad/uptest branch 5 times, most recently from f9d837d to d9d1fdf Compare September 5, 2024 13:46
@matklad
Copy link
Member Author

matklad commented Sep 5, 2024

Seems not too fail locally!

I think this'll make our CI quite a bit slower, but I'll like to ignore that for now, and revisit some time later hollistically, with the goal of making the overall CI faster.

@matklad matklad force-pushed the matklad/uptest branch 4 times, most recently from 1b8ec6b to dcc0402 Compare September 9, 2024 14:28
@@ -31,7 +32,7 @@ jobs:
# Docker restricts io_uring by default, running unconfined then.
options: --security-opt seccomp=unconfined
steps:
- run: apk add -U git
- run: apk add -U git -U github-cli
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the second -U is redundant.

build.zig Outdated
.tracer_backend = .none,
.hash_log_mode = .none,
});
const tigerbeetle_past = download_release(b, "latest", options.target, options.mode);
Copy link
Contributor

Choose a reason for hiding this comment

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

We do use tigerbeetle_past above for the same thing, but for multiversioning naming, I think previous works better when referring to a previous release.

past internally refers to the non-current releases within a multiversion release.

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, I got confused thinking that _past is the right name here, thanks!

}
// When we fetch llvm-objcopy in build.zig, there isn't an easy way to mark it as
// executable, so do it here.
try shell.file_make_executable(cli_args.llvm_objcopy);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be done with a system command chmod +x in build_tigerbeetle_executable_get_objcopy? I'm not sure if that's better... But it feels weird to have a build step that gets you the binary and you then need to make sure it's executable outside of that.

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 the current solution is better than chmod, because system dependencies feel like a worse problem to me. But yeah, this is pretty hacky.

The proper way to do that would be to write a custom chmoding step, but that seems relatively large amount of code for little gain, given that the end-game is to not use vendored objcopy at all.

I'll write the custom step if you think thats worthwhile though!

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll write the custom step if you think thats worthwhile though!

I think it's OK as-is for now! We do want to get rid of that step anyhow at some point. (and if someone else tries to use it in the meantime, figuring out the error will hopefully discourage them 😄.)

Comment on lines 291 to 292
// Against this upgrading cluster, we are running a benchmark load and check that it finishes
// with zero status.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Against this upgrading cluster, we are running a benchmark load and check that it finishes
// with zero status.
// Against this upgrading cluster, we are running a benchmark load and checking that it finishes
// with a zero status.

}
}

// context.shell.cwd.deleteTree(context.tmp) catch {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to clear our tmp dir?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦

Two motivations here:

- to keep integration tests as close to the real world as possible
- to allow integration-testing of upgrades!
@cb22
Copy link
Contributor

cb22 commented Sep 12, 2024

Looks like some merge conflicts with tracer_backend

@matklad
Copy link
Member Author

matklad commented Sep 12, 2024

should be good now!

@matklad matklad added this pull request to the merge queue Sep 12, 2024
Merged via the queue into main with commit 9698028 Sep 12, 2024
25 checks passed
@matklad matklad deleted the matklad/uptest branch September 12, 2024 13:55
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.

2 participants