amadeus-java icon indicating copy to clipboard operation
amadeus-java copied to clipboard

enums for Contact.DeviceType and Document.DocumentType

Open steve-donovan opened this issue 3 years ago • 9 comments

Fixes #199

Changes for this pull request

Contact has deviceType as String; Document has documentType as String. Unfriendly to API consumer, as noted by remark in discord channel.

steve-donovan avatar Aug 24 '22 18:08 steve-donovan

@minjikarin any clues on why this fails here but not locally? I thought maybe my env was screwed but i took a brand new fork and same failure on PR

steve-donovan avatar Aug 24 '22 19:08 steve-donovan

Hi @steve-donovan,

I was doing some tests, but they failed. it is something related with Sonar.

Did you see something new from your side?

Juan Antonio

jabrena avatar Aug 25 '22 12:08 jabrena

Hi @steve-donovan,

I was doing some tests, but they failed. it is something related with Sonar.

Did you see something new from your side?

Juan Antonio

Have you tried running the sonarqube task locally? We're missing an env var? Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator

I'll spend some time on it in a couple of hours or so

steve-donovan avatar Aug 25 '22 12:08 steve-donovan

@steve-donovan, the changes in the code are Ok, it is pending the SonarCloud gate.

Honestly, It is weird, this morning I didn't change any line from master and Sonar failed:

  • PR: https://github.com/amadeus4dev/amadeus-java/pull/203/files
  • Sonar execution: https://github.com/amadeus4dev/amadeus-java/runs/8013507972?check_suite_focus=true

Maybe, something changed in Sonar side.

The repository about Github actions, doesn't provide a way to report an issue: https://github.com/SonarSource/sonarcloud-github-action

I need to create a question here: https://community.sonarsource.com

jabrena avatar Aug 25 '22 14:08 jabrena

to summarise - these types of problems suck 😕

steve-donovan avatar Aug 25 '22 14:08 steve-donovan

Did you try the log suggestion? Does the sonar task work if you use gradle 8+?

> Task :sonarqube FAILED
:sonarqube (Thread[Execution worker for ':',5,main]) completed. Took 51.381 secs.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

steve-donovan avatar Aug 25 '22 15:08 steve-donovan

Good suggestion @steve-donovan

I will add in a branch.

--warning-mode all

jabrena avatar Sep 01 '22 07:09 jabrena

It is working fine in local:

./gradlew build sonarqube -Dsonar.login=SONAR_TOKEN

> Task :compileJava
Note: /Users/jbrenamoral/Documents/DATA/RESEARCH/amadeus-java/src/main/java/com/amadeus/Response.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jbrenamoral/Documents/DATA/RESEARCH/amadeus-java/src/main/java/com/amadeus/resources/Resource.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :sonarqube
Unable to parse source file : 'src/test/java/com/amadeus/ParamsTest.java'
Parse error at line 13 column 45: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/referenceData/locations/hotels/ByHotelsIT.java'
Parse error at line 93 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/referenceData/locations/hotels/ByCityIT.java'
Parse error at line 91 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/ConfigurationTest.java'
Parse error at line 63 column 49: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java'
Parse error at line 103 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/shopping/FlightOfferSearchIT.java'
Parse error at line 95 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/shopping/SeatMapsIT.java'
Parse error at line 115 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/AmadeusTest.java'
Parse error at line 22 column 45: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/shopping/HotelOfferSearchIT.java'
Parse error at line 89 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/dutyOfCare/diseases/Covid19ReportIT.java'
Parse error at line 90 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/ResponseTest.java'
Parse error at line 185 column 40: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/referenceData/locations/pointsOfInterest/BySquareIT.java'
Parse error at line 97 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/airline/DestinationsIT.java'
Parse error at line 113 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/shopping/activities/BySquareIT.java'
Parse error at line 96 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/referenceData/locations/CitiesIT.java'
Parse error at line 89 column 23: Lambda expressions are allowed only at source level 1.8 or above
Unable to parse source file : 'src/test/java/com/amadeus/referenceData/locations/hotels/ByGeocodeIT.java'
Parse error at line 97 column 23: Lambda expressions are allowed only at source level 1.8 or above
Use of preview features have been detected during analysis. Enable DEBUG mode to see them.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 54s
9 actionable tasks: 8 executed, 1 up-to-date

I am going to remove sonarqube from PR

jabrena avatar Sep 01 '22 09:09 jabrena

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Sep 01 '22 10:09 sonarqubecloud[bot]