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

orchestration e2e test. #520

Merged
merged 12 commits into from
May 3, 2024
Merged

orchestration e2e test. #520

merged 12 commits into from
May 3, 2024

Conversation

ser-io
Copy link
Member

@ser-io ser-io commented Apr 26, 2024

No description provided.

@ser-io ser-io force-pushed the ho-integration-test-PR branch 7 times, most recently from a7b60bd to 416ebb1 Compare April 26, 2024 23:47
@ser-io ser-io marked this pull request as ready for review April 29, 2024 15:23
@ser-io ser-io force-pushed the ho-integration-test-PR branch 2 times, most recently from 356d4a4 to 63d51c1 Compare April 29, 2024 15:33
@ser-io ser-io force-pushed the ho-integration-test-PR branch 6 times, most recently from 7722377 to f6ee60c Compare April 29, 2024 18:16
@ser-io ser-io force-pushed the ho-integration-test-PR branch 4 times, most recently from e2bb7f7 to 9460af0 Compare May 1, 2024 20:51
@ser-io ser-io requested a review from jemoreira May 1, 2024 20:54
@ser-io ser-io requested a review from WeiChungHsu May 1, 2024 21:13
docker/arm-server/BUILD Outdated Show resolved Hide resolved
@ser-io ser-io requested a review from ikicha May 2, 2024 01:15
exit 1
}

http_port="61$(($RANDOM%10))$(($RANDOM%10))$(($RANDOM%10))"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if http_port collides?

Copy link
Member Author

Choose a reason for hiding this comment

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

in presubmits there should not be collisions as this is the only test requiring port numbers, we should have a more elaborated solution for allocating ports when having more tests down the line. My next step, would be to use Golang to write these tests as we should avoid having more complex logic written in bash.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you leave a TODO comment here, unless you have a plan to do that right after this change? I think it may cause a mysterious error for debuggers if we forget.

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'm working on the Golang rewrite where we are not going to use randomly picked ports, so this bash code is going away.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great! No worries then :)

.github/workflows/presubmit.yaml Show resolved Hide resolved
#

source "shflags"

DEFINE_boolean verbose "true" "show the stdout/stderr from the sub-tools" "v"
DEFINE_string out_dir "${PWD}/out" "indicates where to save the built debs" "o"
Copy link
Collaborator

Choose a reason for hiding this comment

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

A random idea: Couldn't it be based on the path of build-debs-with-docker.sh, not PWD but $(realpath $(dirname $0))?

Not urgent, but I think this change will make our code better, since we won't need pushd or popd change in the following commit; Make build-debs-with-docker a standalone tool.

Copy link
Member Author

@ser-io ser-io May 2, 2024

Choose a reason for hiding this comment

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

used ${PWD}/out as default for legacy reason

I think the default should be empty and make the flag mandatory, this way the caller always know where the to get the artifacts from, otherwise the caller always need to read into the code to know where the output should be which is not ideal.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the default should be empty and make the flag mandatory

Making the flag as mandatory sounds good. Meaning of my suggestion was, avoiding creating multiple out_dirs depending on the relative path at least.

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 is a valid request which could be implemented later on. for this PR though I wanted to keep the same behavior when none of the flags are passed.

@ser-io ser-io requested a review from 0405ysj May 2, 2024 18:48
Copy link
Collaborator

@0405ysj 0405ysj left a comment

Choose a reason for hiding this comment

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

I think there are some unresolved comments from me, but I think they're minor ones and it's not a concrete opinion. If you think my opinions aren't proper, just keep your thoughts and just submit this :)

@ser-io
Copy link
Member Author

ser-io commented May 3, 2024

I think there are some unresolved comments from me, but I think they're minor ones and it's not a concrete opinion. If you think my opinions aren't proper, just keep your thoughts and just submit this :)

thanks for reviewing! responded to your comments and I'll go ahead and merge the PR.

ser-io added 12 commits May 2, 2024 21:29
- Use `guest_` prefix rather than `_on_guest` suffix.
- Avoid permission errors by mounting a host directory the vsoc-01 user
  might not have permission to write to, copy the deb files from the guest
  instead.
- build-debs-with-docker.sh was meant to be run from its parent
  directory only as part of the `docker/build.sh` tool.
- `bazel build docker/debs-builder-docker:debs_tar`

- The new rule generates a tar file with .deb files that could be
  installed in a docker image.
- `bazel build docker:orchestration_image_tar`

- The new rule creates a new docker image with orchestration
  capabilities.
@ser-io ser-io merged commit 33745d6 into google:main May 3, 2024
6 checks passed
@ser-io ser-io deleted the ho-integration-test-PR branch May 3, 2024 19:44
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.

4 participants