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

[BUG] Gradle build failure - clean, no cache, skip test -> fails #7536

Closed
planetf1 opened this issue Mar 17, 2023 · 5 comments
Closed

[BUG] Gradle build failure - clean, no cache, skip test -> fails #7536

planetf1 opened this issue Mar 17, 2023 · 5 comments
Assignees
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity.

Comments

@planetf1
Copy link
Member

planetf1 commented Mar 17, 2023

Existing/related issue?

No response

Current Behavior

Gradle build can fail in some cases where build cache is disabled,or build has not been run before and tests are explicitly skipped

The error reported is:

lots of these:

symbol:   class BeansToAccessOMRS  location: class TestBeansToAccessOMRS/Users/jonesn/IdeaProjects/egeria/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test/src/test/java/org/odpi/openmetadata/fvt/opentypes/server/TestBeansToAccessOMRS.java:10658: error: cannot find symbol        NamingStandardRuleSet namingStandardRuleSetEntity = beansToAccessOMRS.getNamingStandardRuleSet(testuserid, testguid1);        ^

then

1000 errors
7 warnings
only showing the first 1000 errors, of 9189 total; use -Xmaxerrs if you would like to see more

> Task :open-metadata-test:open-metadata-fvt:open-types-fvt:open-types-test:compileTestJava FAILED

Screenshot 2023-03-17 at 10 45 40

Expected Behavior

Build should also correctly handle dependencies and built what is needed

Steps To Reproduce

./gradlew clean build -x test -x javadoc --no-build-cache

Environment

- Egeria: 4.0-SNAPSHOT (main)
- OS: macOS + Linux
- Java: 17

Any Further Information?

Our build pipelines succeed as they make use of a shared build cache

  • PRs use a read only cache to improve build time relative to main
  • Merge builds use a read/write cache
  • Release should use no-cache. This is intentional to ensure cleanliness, and is less time critical
@planetf1 planetf1 added bug Something isn't working triage New bug/issue which needs checking & assigning labels Mar 17, 2023
@planetf1
Copy link
Member Author

Originally reported by @lpalashevski

Regardless of whether cache is enabled or disabled, the build should work. All tasks need to clearly define inputs and outputs, plus there are additional task dependencies.

The open types test is a little obscure - in terms of what is source vs test -- for example we're still building the open types generator which arguably isn't needed if not running tests. It also builds every time even when other files are not changing, this is partly as the java program that does this is a black box as far as gradle is concerned.

I will look at whether a simple additional dependency can help, but the proper fix probably involves some refactoring of these components

planetf1 added a commit to planetf1/egeria that referenced this issue Mar 17, 2023
planetf1 added a commit to planetf1/egeria that referenced this issue Mar 21, 2023
@planetf1
Copy link
Member Author

Currently the open fvt types have been commented out until we can resolve issues fully.
This may require refactoring of the types (and breaking up may be beneficial too)

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 23, 2023
@lpalashevski lpalashevski removed no-issue-activity Issues automatically marked as stale because they have not had recent activity. triage New bug/issue which needs checking & assigning labels May 23, 2023
@planetf1
Copy link
Member Author

@lpalashevski assigning as I think you noticed this first.
Currently the open fvt types are disabled, so this issue does not occur.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Jul 23, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity.
Projects
None yet
Development

No branches or pull requests

2 participants