Skip to content

[AERIE-1906] Resolve LGTM errors#220

Merged
pcrosemurgy merged 15 commits intodevelopfrom
refactor/aerie-1906-lgtm-errors
Jul 7, 2022
Merged

[AERIE-1906] Resolve LGTM errors#220
pcrosemurgy merged 15 commits intodevelopfrom
refactor/aerie-1906-lgtm-errors

Conversation

@pcrosemurgy
Copy link
Contributor

@pcrosemurgy pcrosemurgy commented Jun 14, 2022

  • Tickets addressed: AERIE-1906
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

Resolves LGTM errors reported here.

Verification

All tests passing.

Documentation

None.

Future work

Resolve LGTM warnings (see https://lgtm.com/projects/g/NASA-AMMOS/aerie/alerts/?mode=tree).

@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 4 times, most recently from 6b94c65 to 6bff7d3 Compare June 14, 2022 20:28
@pcrosemurgy pcrosemurgy marked this pull request as ready for review June 15, 2022 18:52
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 2 times, most recently from 631eead to a63524b Compare June 15, 2022 18:53
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 5 times, most recently from 26443e1 to 562d041 Compare June 15, 2022 23:23
@Twisol
Copy link
Contributor

Twisol commented Jun 15, 2022

By the way, the Javadoc for SerializedValue still refers to its ancient previous name, SerializedParameter. Could you update that in this PR by any chance? 🙏

@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 2 times, most recently from 104ace1 to 6bc99f4 Compare June 15, 2022 23:57
@pcrosemurgy
Copy link
Contributor Author

By the way, the Javadoc for SerializedValue still refers to its ancient previous name, SerializedParameter. Could you update that in this PR by any chance? 🙏

Done :)

@pcrosemurgy
Copy link
Contributor Author

pcrosemurgy commented Jun 16, 2022

There's an interesting failure I'm looking into now:

Method 'gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue.of(double)' must be InterfaceMethodref constant
java.lang.IncompatibleClassChangeError: Method 'gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue.of(double)' must be InterfaceMethodref constant
	at gov.nasa.jpl.aerielander.mappers.seis.ChannelRateValueMapper.serializeValue(ChannelRateValueMapper.java:42)
	at gov.nasa.jpl.aerielander.mappers.seis.ChannelRateValueMapper.serializeValue(ChannelRateValueMapper.java:12)
	at gov.nasa.jpl.aerie.merlin.framework.Registrar$1.serialize(Registrar.java:57)
	at gov.nasa.jpl.aerie.merlin.driver.engine.SimulationEngine.serializeProfile(SimulationEngine.java:616)
	at gov.nasa.jpl.aerie.merlin.driver.engine.SimulationEngine.computeResults(SimulationEngine.java:455)
	at gov.nasa.jpl.aerie.scheduler.simulation.IncrementalSimulationDriver.getSimulationResultsUpTo(IncrementalSimulationDriver.java:152)
	at gov.nasa.jpl.aerie.scheduler.simulation.SimulationFacade.computeSimulationResultsUntil(SimulationFacade.java:249)
	at gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver.getConflicts(PrioritySolver.java:503)
	at gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver.satisfyGoalGeneral(PrioritySolver.java:425)
	at gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver.satisfyGoal(PrioritySolver.java:286)
	at gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver.solve(PrioritySolver.java:245)
	at gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver.getNextSolution(PrioritySolver.java:112)
	at gov.nasa.jpl.aerie.scheduler.AerieLanderRulesTest.schedule(AerieLanderRulesTest.java:43)
	at gov.nasa.jpl.aerie.scheduler.AerieLanderRulesTest.firstRule(AerieLanderRulesTest.java:51)

Not familiar with must be InterfaceMethodref constant, will dig deeper.

Line 42 of ChannelRateValueMapper.java contains:

                    if (!map.containsKey("outRate")) {

Where map is of type Map<String, SerializedValue>.

@Twisol
Copy link
Contributor

Twisol commented Jun 16, 2022

IncompatibleClassChangeError is like NoSuchMethodError in that it should only ever happen because you compiled code against one version of a class and then loaded it into a JVM with another. Make sure that your model JARs have been recompiled.

@pcrosemurgy
Copy link
Contributor Author

Ahh that's right! This JAR is likely the one that's causing this snag: scheduler/src/test/resources/gov/nasa/jpl/aerie/scheduler/aerie-lander-0.11.1-SNAPSHOT.jar.

@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch from 6bc99f4 to 47ea483 Compare June 16, 2022 01:34
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch from 8f58531 to 8a78421 Compare June 16, 2022 01:53
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 4 times, most recently from 77a4059 to c2ab31f Compare July 7, 2022 17:45
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch 4 times, most recently from 341587e to 7eca46e Compare July 7, 2022 18:56
@pcrosemurgy pcrosemurgy force-pushed the refactor/aerie-1906-lgtm-errors branch from 7eca46e to 4692d9e Compare July 7, 2022 19:14
@pcrosemurgy
Copy link
Contributor Author

Finally got the e2e tests figured out here :) Also note that #238 has been pulled out of this PR.

Copy link
Collaborator

@mattdailis mattdailis left a comment

Choose a reason for hiding this comment

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

Nice work, Paul

@pcrosemurgy pcrosemurgy merged commit c772960 into develop Jul 7, 2022
@pcrosemurgy pcrosemurgy deleted the refactor/aerie-1906-lgtm-errors branch July 7, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants