Skip to content

Conversation

robyww
Copy link
Contributor

@robyww robyww commented Oct 14, 2025

IRSA-7208: Support additional MOCs

  • Add support for additional MOCs
  • some refactoring and clean up network retrieval code (follow up to FIREFLY-1869)
  • fixed some test

Other Tickets

Review

  • The refactoring make this PR seem bigger than what it is
  • Focus on any file that includes the word 'HiPS'

Testing

@robyww robyww self-assigned this Oct 14, 2025
@robyww robyww requested a review from kpuriIpac October 14, 2025 19:02
@lrebull
Copy link
Contributor

lrebull commented Oct 14, 2025

it works for me! although i note that the moc overlay is really, really, really slow. like, almost longer than my ADHD timescale.

@robyww robyww added bug multi-ticket This PR implements multiple Jira tickets labels Oct 15, 2025
@robyww robyww added this to the 2025.5 milestone Oct 15, 2025
@robyww robyww force-pushed the IRSA-7208-MOCs-available branch from d6216e7 to ed702de Compare October 15, 2025 22:46
Copy link
Contributor

@kpuriIpac kpuriIpac left a comment

Choose a reason for hiding this comment

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

Looks good! Tested the MOCs, and the additional bug tickets as well, but have some comments about them below:

Firefly-1863: I couldn't recreate this bug on ops/dev, but it seems to be working here.

IRSA-7339 and Firefly-1881: Could you build a ZTF and Spherex to test these two?

Approving the PR with some other minor comments, would be nice to test ZTF and Spherex (I was able to recreate those bugs on ops/dev).

StringBuilder out= new StringBuilder();
int cnt=0;
for(var a : r.getSendHeaders().entrySet()) {
var k = a.getKey();;
Copy link
Contributor

Choose a reason for hiding this comment

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

small fix, accidental double semi colon here.

Comment on lines 231 to 233
if (r.isReservedKey(k) && !k.equalsIgnoreCase("<none>") &&
!k.equalsIgnoreCase("content-type") && !k.equalsIgnoreCase("content-length") &&
!k.equalsIgnoreCase("Last-Modified") ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I spent some time studying this...should it be

if ( !r.isReservedKey(k) ... followed by the other conditions, instead?

Copy link
Contributor Author

@robyww robyww Oct 17, 2025

Choose a reason for hiding this comment

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

you right! but the name is right the function is reversed.

} catch (URISyntaxException | MalformedURLException ignore) {
return null;
}
return Util.Try.it(() -> new URI(urlStr).toURL()).getOrElse((URL)null);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we the trim and null check made sense (at least the trim, I understand the Try util will take care of the null exception. So suggested change :

if (urlStr == null) return null;
return Util.Try.it(() -> new URI(urlStr.trim()).toURL()).getOrElse((URL)null);

You can skip the first line, but might make sense to keep the .trim() in there.

Copy link
Contributor Author

@robyww robyww Oct 17, 2025

Choose a reason for hiding this comment

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

good suggestion

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: get() returns null by default if there's an exception. .getOrElse() is used when you want a different default value.

sources: getDefaultMOCList(),
label: 'Featured MOC '
},
adhocMocIncludeAdditionSources: 'irsa',
Copy link
Contributor

Choose a reason for hiding this comment

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

minor text suggestion:

this could be changed to adhocMocIncludeAdditionalSources everywhere.

- includes reponse to feedback

More work;
- fixes Firefly-1870
- fixes Firefly-1863
- fixes IRSA-7339
- fixes Firefly-1881
- fixes test failing
@robyww robyww force-pushed the IRSA-7208-MOCs-available branch from 13bcc02 to 143274a Compare October 17, 2025 14:50
@robyww robyww merged commit 1bae682 into dev Oct 17, 2025
@robyww robyww deleted the IRSA-7208-MOCs-available branch October 17, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement multi-ticket This PR implements multiple Jira tickets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants