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

[WIP] fix cluster list release tests for k8 #1407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BelSasha
Copy link
Contributor

@BelSasha BelSasha commented Nov 13, 2024

I don't know if it was intentional, but in the cluster factory, k8 clusters were not created by name. This caused some cluster list tests to fail when running them with --level local (specifically for k8 on demand clusters).

Changes I made:

  1. Trying to create k8 clusters from name first.
  2. Cleanup of the ondemand_cluster factory method.

After the change I introduced in this PR:

  1. cluster list tests passed for me. Have not seen any consistency issues. (Ran those tests few times).
  2. Generally, cluster tests looks ok. (Ran pytest -v --level release -k "clustertest" locally, used den_tester)

@carolineechen @jlewitt1

Copy link
Contributor Author

BelSasha commented Nov 13, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

**kwargs,
)
try:
c = Cluster.from_name(name=name)
Copy link
Contributor Author

@BelSasha BelSasha Nov 13, 2024

Choose a reason for hiding this comment

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

decided to use Cluster.from_name(name=name) instead of OnDemandCluster.from_name for constancy in the cluster_factory.py.

Need to decide wether to leave it as Cluster.from_name(name=name) or change it to OnDemandCluster.from_name(name=name) everywhere. In my opinion the latter makes more sense because as Josh mentioned we use OnDemandCluster constructor if we catch a ValueError. Is there a reason for using Cluster.from_name?

@BelSasha BelSasha marked this pull request as ready for review November 13, 2024 12:08
@BelSasha BelSasha marked this pull request as draft November 13, 2024 13:29
@BelSasha BelSasha force-pushed the sb/cli-release-tests-fix branch 2 times, most recently from deb10b3 to 043f692 Compare November 13, 2024 15:38
@BelSasha BelSasha marked this pull request as ready for review November 13, 2024 15:46
@BelSasha BelSasha changed the title fix cluster list release tests for k8 [WIP] fix cluster list release tests for k8 Nov 13, 2024
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.

1 participant