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] Remove redundant cluster checks #98694

Conversation

DiannaHohensee
Copy link
Contributor

@DiannaHohensee DiannaHohensee commented Aug 21, 2023

For the type label, would this be >test or >non-issue? I was perusing the type labels here

…de*, which implicitly calls validateClusterFormed().
@DiannaHohensee DiannaHohensee self-assigned this Aug 21, 2023
@elasticsearchmachine elasticsearchmachine added v8.11.0 needs:triage Requires assignment of a team area label labels Aug 21, 2023
@DiannaHohensee DiannaHohensee added the Team:Distributed Meta label for distributed team label Aug 21, 2023
@elasticsearchmachine elasticsearchmachine removed the Team:Distributed Meta label for distributed team label Aug 21, 2023
@DiannaHohensee DiannaHohensee added the :Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) label Aug 21, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team label Aug 21, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Aug 21, 2023
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

For the type label, would this be >test or >non-issue? I was perusing the type labels here

The difference is fairly subtle, but >non-issue is normally some kind of small or user-invisible change but may alter production code so we wouldn't backport it in general, whereas >test changes only touch test code and are fine to backport. Since there's no backport proposed here, it doesn't really matter. I'd call it >test.

Change itself LGTM but I have a couple of tiny admin nits (also from the team docs):

  • It's good to aim for a commit title of ~50 chars (not always possible, but we can definitely get closer to 50 here)

  • It's almost always worth adding a longer body to the commit message with some extra context and links and so on. Here it would be good to link to the issues I mentioned in the comment that gave rise to this PR:

I think they were necessary when they were added in #22182, but #49248 changed that.

@DaveCTurner
Copy link
Contributor

Oh and one other thing: you're free to choose whatever branch-naming convention you want, but I find yyyy/mm/dd/some-words-and-hyphens integrates best with IntelliJ's branch browser:

image

I have this in my ~/.zshrc to help:

function git-new-branch() {
(
  set -euxo pipefail
  name="$*"
  branchname=$(date +%Y/%m/%d)/$(echo $name | sed -e 's/ /-/g')
  git checkout -b $branchname
)
}

That way I can type git-new-branch some words and spaces and it adds the date and hyphens for me.

@DiannaHohensee DiannaHohensee added the >test Issues or PRs that are addressing/adding tests label Aug 22, 2023
@DiannaHohensee
Copy link
Contributor Author

DiannaHohensee commented Aug 22, 2023

Thanks for the pointers! How about this commit message:

[TEST] Remove redundant cluster checks

Removes ensureStableCluster() calls in ClusterAllocationExplainIT
testing after startNode*() calls. The stabilization checks were
originally necessary when the tests were added in #22182. However,
#49248 later enhanced validateClusterFormed(), which startNode*()
implicitly calls, to perform similar checks to ensureStableCluster()

I believe I'll have to add the body when I click the merge button, at this point. I expect people usually include all of this in the first commit message when publishing a PR? Only way I can think to have it reviewed.

@DiannaHohensee DiannaHohensee changed the title Remove redundant ensureStableCluster() calls in testing after startNode*, which implicitly calls validateClusterFormed() [TEST] Remove redundant cluster checks Aug 22, 2023
@DiannaHohensee
Copy link
Contributor Author

but I find yyyy/mm/dd/some-words-and-hyphens integrates best with IntelliJ's branch browser

Ahh, that does look nicer. Thanks for the script!
Yeah, I was browsing one of your PRs and liked how you named your branches, but I fiddled with the date ordering.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner
Copy link
Contributor

I believe I'll have to add the body when I click the merge button, at this point. I expect people usually include all of this in the first commit message when publishing a PR? Only way I can think to have it reviewed.

Ideally it matches the title and description of the PR - that's the default behaviour in Github (if the branch has one commit when you open the PR) but it can be updated if needed.

If you press the merge button manually then you can adjust things, but if you want to use the auto-merge label then the bot will just copy the title and description of the PR into the commit message.

@DiannaHohensee DiannaHohensee merged commit fa238a7 into elastic:main Aug 22, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Meta label for distributed team >test Issues or PRs that are addressing/adding tests v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants