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

Excluded integTest from build script to handle the security plugin dependency #418

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Jan 17, 2024

Description

Excluded integTest from build script to handle the security plugin dependency.

Refer opensearch-project/neural-search#543 for more details.

Issues Resolved

Fixes #410

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Jan 17, 2024
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (789fc4d) 71.85% compared to head (cb91013) 71.85%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #418   +/-   ##
=========================================
  Coverage     71.85%   71.85%           
  Complexity      614      614           
=========================================
  Files            79       79           
  Lines          3084     3084           
  Branches        237      237           
=========================================
  Hits           2216     2216           
  Misses          763      763           
  Partials        105      105           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbwiddis dbwiddis linked an issue Jan 17, 2024 that may be closed by this pull request
@owaiskazi19 owaiskazi19 merged commit ab5ac39 into opensearch-project:main Jan 20, 2024
24 of 25 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 20, 2024
…pendency (#418)

* Excluded integTest from build script

Signed-off-by: Owais Kazi <[email protected]>

* Handled zipArhcive failure for secuirty plugin

Signed-off-by: owaiskazi19 <[email protected]>

* Removed security plugin check

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: owaiskazi19 <[email protected]>
(cherry picked from commit ab5ac39)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 pushed a commit that referenced this pull request Jan 20, 2024
…urity plugin dependency (#424)

Excluded integTest from build script to handle the security plugin dependency (#418)

* Excluded integTest from build script



* Handled zipArhcive failure for secuirty plugin



* Removed security plugin check



---------



(cherry picked from commit ab5ac39)

Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@@ -347,7 +348,6 @@ testClusters.integTest {

// Installs all registered zipArchive dependencies on integTest cluster nodes except security
configurations.zipArchive.asFileTree.each {
if(!it.name.contains("opensearch-security")) {
Copy link
Member

Choose a reason for hiding this comment

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

Hey @owaiskazi19 instead of new secureIntegTestPluginArchive configuration, I assume just changing the if statement to if(it.name.contains("opensearch-security")) should work. Can you please check?

Copy link
Member Author

Choose a reason for hiding this comment

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

@prudhvigodithi here we have to install all the plugins except security plugin. zipArchive would have security plugin in it.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, +1 to @owaiskazi19 . Initially we kept it how @prudhvigodithi you mentioned above. But the problem, here we just need security plugin to run integ tests, therefore zip archive tries to find it at the compile time also. Therefore, we need to change the tag to securePluginTestArchive

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @vibrantvarun and @owaiskazi19 I'm afraid introducing new configuration secureIntegTestPluginArchive might never be called. Also I noticed the logic is called in ext (extra properties) where as I see similar code in integTest, If not needed we can completely remove the in ext.

testClusters.integTest {
    testDistribution = "ARCHIVE"

    // Optionally install security
    if (System.getProperty("security.enabled") != null && System.getProperty("security.enabled") == "true") {
        configureSecurityPlugin(testClusters.integTest)
    }

    // Installs all registered zipArchive dependencies on integTest cluster nodes except security
    configurations.zipArchive.asFileTree.each {
            plugin(provider(new Callable<RegularFile>(){
                    @Override
                    RegularFile call() throws Exception {
                        return new RegularFile() {
                            @Override
                            File getAsFile() {
                                return it
                            }
                        }
                    }
                })
            )

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
5 participants