Skip to content

Conversation

@droberts195
Copy link

This is the Java side of elastic/ml-cpp#593
with a fallback so that ml-cpp bundles with either the
new or old directory structure work for the time being.
A few days after merging the C++ changes a followup to
this change will be made that removes the fallback.

This is the Java side of elastic/ml-cpp#593
with a fallback so that ml-cpp bundles with either the
new or old directory structure work for the time being.
A few days after merging the C++ changes a followup to
this change will be made that removes the fallback.
@droberts195 droberts195 added >non-issue :Core/Infra/Core Core issues without another label :ml Machine learning v8.0.0 v7.5.0 v7.4.1 labels Sep 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@droberts195
Copy link
Author

I've labelled this >non-issue as the overall change will appear in the release notes under elastic/ml-cpp#593.

if (it.relativePath.segments[-2] == 'bin') {
// bin files, wherever they are within modules (eg platform specific) should be executable
it.mode = 0755
} else if (platform == 'darwin' && it.relativePath.segments[-2] == 'MacOS') {
Copy link
Member

@jasontedor jasontedor Sep 25, 2019

Choose a reason for hiding this comment

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

I wonder if this should be combined with previous if (||) so that we don't ever have to worry about maintenance on the previous block being forgotten in this block too? I can't think of a case where they'd deviate, but we can separate them if they need to be that way.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

Looks good, I left one suggestion, no need for another round though (I trust your judgement but would appreciate feedback one way or the other).

final String parentDirName = file.getParent().getFileName().toString();
if ("bin".equals(parentDirName)) {
setFileAttributes(file, BIN_FILES_PERMS);
} else if (Constants.MAC_OS_X && "MacOS".equals(parentDirName)) { // MacOS is an alternative to bin on macOS
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here, I wonder if this would be better suited as an || with the if.

Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

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

I see a couple of comments about removing code before release. How will we ensure this happens?

@droberts195
Copy link
Author

I see a couple of comments about removing code before release. How will we ensure this happens?

I'll raise the PR to do it as soon as this one is merged.

For some context look at the cross links to other issues in private repos in this PR. You will see that this is part of a major exercise. It won't get left half finished.

I agree if the comments were more like "remove this in 8 months time" then they'd likely get forgotten and something to stop that would be needed.

@droberts195 droberts195 merged commit 38655da into elastic:master Sep 25, 2019
@droberts195 droberts195 deleted the new_macos_controller_location branch September 25, 2019 11:04
droberts195 pushed a commit to droberts195/elasticsearch that referenced this pull request Sep 25, 2019
This change removes the temporary controller
location fallback introduced in elastic#47013.

Relates elastic/ml-cpp#593
@droberts195
Copy link
Author

I have merged this to master now to maximise the amount of time for it to propagate into local clones on developers' laptops. I will backport immediately after 7.4.0 is released.

@jasontedor
Copy link
Member

jasontedor commented Sep 25, 2019

I see a couple of comments about removing code before release. How will we ensure this happens?

As @droberts195 mentions, in this case since its one step of work that he's actively working on, we would trust that he would continue with that work and wrap it up.

For longer-running situations, we would add asserts to the codebase that would fail the build. For example assert that the current version is less than 9 if we wanted to make sure that something got removed from the codebase for version 9.0 of Elasticsearch.

droberts195 pushed a commit that referenced this pull request Sep 27, 2019
This is the Java side of elastic/ml-cpp#593
with a fallback so that ml-cpp bundles with either the
new or old directory structure work for the time being.
A few days after merging the C++ changes a followup to
this change will be made that removes the fallback.
droberts195 pushed a commit that referenced this pull request Oct 1, 2019
This is the Java side of elastic/ml-cpp#593
with a fallback so that ml-cpp bundles with either the
new or old directory structure work for the time being.
A few days after merging the C++ changes a followup to
this change will be made that removes the fallback.
droberts195 pushed a commit that referenced this pull request Oct 4, 2019
This change removes the temporary controller
location fallback introduced in #47013.

Relates elastic/ml-cpp#593
droberts195 pushed a commit that referenced this pull request Oct 4, 2019
This change removes the temporary controller
location fallback introduced in #47013.

Relates elastic/ml-cpp#593
droberts195 pushed a commit that referenced this pull request Oct 4, 2019
This change removes the temporary controller
location fallback introduced in #47013.

Relates elastic/ml-cpp#593
droberts195 pushed a commit that referenced this pull request Nov 1, 2019
This is the Java side of elastic/ml-cpp#593
with a fallback so that ml-cpp bundles with either the
new or old directory structure work for the time being.
A few days after merging the C++ changes a followup to
this change will be made that removes the fallback.
droberts195 pushed a commit that referenced this pull request Nov 1, 2019
The tar.gz in 6.8 contains ML binaries for all platforms,
so that check for the MacOS directory should not check the
platform.
droberts195 pushed a commit that referenced this pull request Nov 1, 2019
This change removes the temporary controller
location fallback introduced in #47013.

Relates elastic/ml-cpp#593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants