Skip to content

Conversation

@denik
Copy link
Contributor

@denik denik commented Feb 27, 2025

Changes

Rewrite bundle/tests/python_wheel_test.go into acceptance tests. The same configs are used, but the test now runs 'bundle deploy' and in addition to checking the files on the file system, also checks that the files were uploaded and records jobs/create request.

There is a new test helper bin/find.py which filters out paths based on regex, asserts on number of expected results. I've added it because 'find' on Windows behaves differently, so this helps avoid cross-platform differences.

@denik denik marked this pull request as draft February 27, 2025 12:00
@denik denik changed the base branch from main to denik/acc-improve-404 February 27, 2025 12:22
@denik denik force-pushed the denik/acc-improve-404 branch from cb5d4d6 to 18515e8 Compare February 27, 2025 12:24
@denik denik force-pushed the denik/acc-python-wheel branch from a74be26 to db270e3 Compare February 27, 2025 12:35
@denik denik temporarily deployed to test-trigger-is February 27, 2025 12:35 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 27, 2025 12:37 — with GitHub Actions Inactive
@denik denik force-pushed the denik/acc-python-wheel branch from 852e8ec to db270e3 Compare February 27, 2025 13:10
@denik denik temporarily deployed to test-trigger-is February 27, 2025 13:10 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 27, 2025 13:15 — with GitHub Actions Inactive
Base automatically changed from denik/acc-improve-404 to main February 27, 2025 13:16
@denik denik temporarily deployed to test-trigger-is February 27, 2025 13:19 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 27, 2025 13:30 — with GitHub Actions Inactive
@denik denik force-pushed the denik/acc-python-wheel branch from a8d2479 to 916021c Compare February 27, 2025 13:31
@denik denik temporarily deployed to test-trigger-is February 27, 2025 13:31 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 27, 2025 14:29 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 27, 2025 14:45 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 09:28 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 10:04 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 10:10 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 10:18 — with GitHub Actions Inactive
@denik denik force-pushed the denik/acc-python-wheel branch from 270677e to be7b6a9 Compare February 28, 2025 10:41
@denik denik temporarily deployed to test-trigger-is February 28, 2025 10:41 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 10:56 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 11:04 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 11:08 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 11:12 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 11:40 — with GitHub Actions Inactive
@denik denik force-pushed the denik/acc-python-wheel branch from 60c5697 to fe50cb1 Compare February 28, 2025 15:02
@denik denik temporarily deployed to test-trigger-is February 28, 2025 15:02 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 16:28 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 28, 2025 16:32 — with GitHub Actions Inactive
@denik denik marked this pull request as ready for review February 28, 2025 16:33
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

LGTM

Leaving the stamp of approval to @andrewnester.


if args.expect is not None:
if args.expect != len(result):
sys.exit(f"Expected {args.expect}, got {len(result)}")
Copy link
Contributor

Choose a reason for hiding this comment

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

The inclusion of an expectation in this command feels off.

Could we compose this with a function/command/helper that asserts on the number of lines in an output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this is not a generic command, this is an acceptance test helper. Given its narrow context, I think it's okay.

If we see more use cases where a separate line-counting script would makes things simpler, we can always extract that.

type: whl
path: "./my_test_code"
build: "python3 setup.py bdist_wheel"
build: python setup.py bdist_wheel
Copy link
Contributor

Choose a reason for hiding this comment

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

Is python3 not aliased?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no 'python3' in virtualenv on Windows (as we learned in #2034).

Deployment complete!
Updating deployment state...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/python-wheel/default/files...
Uploading my_test_code-0.0.1-py3-none-any.whl...
Copy link
Contributor

Choose a reason for hiding this comment

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

The order is a bit confusing now, shall we do the package name replacement instead in these lines and then the output will be determenistic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it's not ideal. I see this as -- we record a set of steps to be taken, ignoring the order.

do the package name replacement

I'd rather see the names, given that we focus on multiple wheels being supported there. If we replace both, we won't catch situation if it uploaded one wheel twice instead of two separate wheels once.

@denik denik added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit 8f8f24c Mar 3, 2025
9 checks passed
@denik denik deleted the denik/acc-python-wheel branch March 3, 2025 11:17
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