Skip to content

[BWC and API enforcement] Introduce checks for enforcing the API restrictions#11175

Merged
andrross merged 1 commit intoopensearch-project:mainfrom
reta:issue-9304
Dec 7, 2023
Merged

[BWC and API enforcement] Introduce checks for enforcing the API restrictions#11175
andrross merged 1 commit intoopensearch-project:mainfrom
reta:issue-9304

Conversation

@reta
Copy link
Copy Markdown
Contributor

@reta reta commented Nov 13, 2023

Description

Introduce checks for enforcing the API restrictions, at this stage the failing checks are advisory only (they don't break the build), but that would need to be changed later on, example below:

Note: Processing Log4j annotations                                                                                                                                         
Note: Annotations processed                                                           
Note: Processing OpenSearch Api annotations                                           
Note: The element org.opensearch.common.inject.Module is part of the public APIs but is not maked as @PublicApi, @ExperimentalApi or @DeprecatedApi (referenced by org.opensearch.plugins.Plugin) 
Note: Processing Log4j annotations                                                                                                                                                                                                                                                                                                                    
Note: No elements to process                                                                                                                                                                                                                                                                                                                          
Note: Processing OpenSearch Api annotations

Related Issues

Closes #9304

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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 API Issues with external APIs enhancement Enhancement or improvement to existing feature or request Plugins labels Nov 13, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 13, 2023

Compatibility status:

Checks if related components are compatible with change d0865a0

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/performance-analyzer.git]

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2523a54: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 0fc54eb: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 8bc186f: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 13, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (f7f3500) 71.37% compared to head (d0865a0) 71.34%.
Report is 1 commits behind head on main.

Files Patch % Lines
...n/annotation/processor/ApiAnnotationProcessor.java 88.18% 1 Missing and 14 partials ⚠️
...search/core/common/io/stream/BytesStreamInput.java 40.00% 7 Missing and 2 partials ⚠️
...ch/index/translog/BufferedChecksumStreamInput.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11175      +/-   ##
============================================
- Coverage     71.37%   71.34%   -0.03%     
- Complexity    59113    59129      +16     
============================================
  Files          4893     4894       +1     
  Lines        277831   277962     +131     
  Branches      40367    40404      +37     
============================================
+ Hits         198288   198313      +25     
- Misses        63042    63141      +99     
- Partials      16501    16508       +7     

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

@reta reta force-pushed the issue-9304 branch 2 times, most recently from df6a6c6 to e591f65 Compare November 13, 2023 19:17
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for df6a6c6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e591f65: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e591f65: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e591f65: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 5478d7a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 6b6f2d1: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e9502e9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta
Copy link
Copy Markdown
Contributor Author

reta commented Nov 15, 2023

❌ Gradle check result for e9502e9: FAILURE

#11221

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c7c8cbd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta reta force-pushed the issue-9304 branch 2 times, most recently from 7031a6a to b7530f9 Compare November 15, 2023 20:34
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 7031a6a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for b7530f9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta
Copy link
Copy Markdown
Contributor Author

reta commented Nov 15, 2023

❌ Gradle check result for b7530f9: FAILURE

#11208
#8945

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2023

✅ Gradle check result for a3e22f7: SUCCESS

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2023

❕ Gradle check result for d0865a0: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testWriteRead

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Copy Markdown
Member

@andrross andrross left a comment

Choose a reason for hiding this comment

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

Nice job on the tests! Looks quite comprehensive

@andrross andrross added the backport 2.x Backport to 2.x branch label Dec 7, 2023
@andrross andrross merged commit 33e9578 into opensearch-project:main Dec 7, 2023
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-11175-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 33e9578b6f3b5c9756dabc00521915dd18b3ed93
# Push it to GitHub
git push --set-upstream origin backport/backport-11175-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-11175-to-2.x.

reta added a commit to reta/OpenSearch that referenced this pull request Dec 7, 2023
…rictions (opensearch-project#11175)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 33e9578)
reta added a commit to reta/OpenSearch that referenced this pull request Dec 7, 2023
…rictions (opensearch-project#11175)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 33e9578)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
dblock pushed a commit that referenced this pull request Dec 8, 2023
…rictions (#11175) (#11514)

(cherry picked from commit 33e9578)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
deshsidd pushed a commit to deshsidd/OpenSearch that referenced this pull request Dec 11, 2023
…rictions (opensearch-project#11175)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…rictions (opensearch-project#11175)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…rictions (opensearch-project#11175)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Issues with external APIs backport 2.x Backport to 2.x branch backport-failed enhancement Enhancement or improvement to existing feature or request Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BWC and API enforcement] Introduce checks for enforcing the API restrictions

2 participants