Skip to content

Commit f8a12c0

Browse files
authored
Merge pull request #1806 from Caltech-IPAC/FIREFLY-1793-rubin-fixes
Firefly-1793: Fixes some rubin issues
2 parents c362ca1 + d7a54da commit f8a12c0

File tree

7 files changed

+33
-15
lines changed

7 files changed

+33
-15
lines changed

docs/release-notes.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99

1010
## Version 2025.3
11-
- 2025.3.4 - (June 26, 2025), _docker tag_: `2025.3.4`, `2025.3`, `latest`
11+
- 2025.3.5 - (July 1, 2025), _docker tag_: `2025.3.5`, `2025.3`, `latest`
12+
- 2025.3.4 - (June 26, 2025), _docker tag_: `2025.3.4`
1213
- 2025.3.3 - (June 20, 2025), _docker tag_: `2025.3.3`
1314
- 2025.3.2 - (June 16, 2025), _docker tag_: `2025.3.2`
1415
- 2025.3.1 - (June 9, 2025), _docker tag_: `2025.3.1`
@@ -73,13 +74,15 @@
7374

7475

7576
### _Patches 2025.3_
77+
- 2025.3.5
78+
- Fixed: Images: mouse readout with some compressed images- Firefly-1793,Firefly-1792,Firefly-1789 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1804))
7679
- 2025.3.4
7780
- Timeseries: improve save table filename- Firefly-1354 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1802))
7881
- Better messaging for Position Cols in TAP Spatial Search- Firefly-1677 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1803))
79-
- Fixed: TAP and SIA issues- Firefly-1786 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1804))
82+
- Fixed: TAP and SIA issues- Firefly-1786, rubin DM-51532 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1804))
8083
- Fixed: Image expansion in bi-view mode fails ([commit](https://github.com/Caltech-IPAC/firefly/commit/1d2c3f222cb6d8611f0361ffa4ad5aaa63d278f5))
8184
- 2025.3.3
82-
- Sanitize header values when logging and handle HiPS /properties url- Patch ([PR](https://github.com/Caltech-IPAC/firefly/pull/1801))
85+
- Sanitize header values when logging and handle HiPS /properties url- (rubin DM-51480) Patch ([PR](https://github.com/Caltech-IPAC/firefly/pull/1801))
8386
- Improve Redis configuration and administration features- FIREFLY-1779 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1794))
8487
- 2025.3.2
8588
- Fixed: TAP: Upload fails when using a `*` in the ADQL statement- Firefly-1581 ([PR](https://github.com/Caltech-IPAC/firefly/pull/1796))

src/firefly/java/edu/caltech/ipac/firefly/core/background/JobManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class JobManager {
6565
public static final String BG_INFO = "background.info";
6666
public static final String ALL_JOB_CACHE_KEY = "ALL_JOB_INFOS"; // cache key for all job infos
6767
public static final long CLEANUP_INTVL_MINS = AppProperties.getIntProperty("job.cleanup.interval", 60); // run cleanup once every 60 minutes
68-
private static final int KEEP_ALIVE_INTERVAL = AppProperties.getIntProperty("job.keepalive.interval", 30); // default keepalive interval in seconds
68+
private static final int KEEP_ALIVE_INTERVAL = AppProperties.getIntProperty("job.keepalive.interval", 60); // default keepalive interval in seconds
6969
private static final int WAIT_COMPLETE = AppProperties.getIntProperty("job.wait.complete", 1); // wait for complete after submit in seconds
7070
private static final int MAX_PACKAGERS = AppProperties.getIntProperty("job.max.packagers", 10); // maximum number of simultaneous packaging threads
7171
private static final int JOB_EXPIRY_HOURS = AppProperties.getIntProperty("job.expiry.hours", 24*14); // Time in hours to keep a job after it has ended. Default to 14 days.

src/firefly/java/edu/caltech/ipac/firefly/server/RequestOwner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
package edu.caltech.ipac.firefly.server;
55

6-
import edu.caltech.ipac.firefly.core.Util;
76
import edu.caltech.ipac.firefly.data.userdata.UserInfo;
87
import edu.caltech.ipac.firefly.server.events.FluxAction;
98
import edu.caltech.ipac.firefly.server.events.ServerEventManager;
@@ -266,6 +265,7 @@ private void notifyClient(UserInfo userInfo) {
266265
action.setValue(getSsoAdapter().getLoginUrl(""), "login_url");
267266
action.setValue(getSsoAdapter().getLogoutUrl(""), "logout_url");
268267
}
268+
LOG.info("notifyClient new User info: " + userInfo);
269269
ServerEventManager.fireAction(action);
270270
}
271271

src/firefly/java/edu/caltech/ipac/firefly/server/servlets/CommandService.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
package edu.caltech.ipac.firefly.server.servlets;
55

66
import edu.caltech.ipac.firefly.server.ServerCommandAccess;
7-
import edu.caltech.ipac.firefly.server.util.Logger;
7+
import edu.caltech.ipac.firefly.server.ServerContext;
88
import edu.caltech.ipac.firefly.server.SrvParam;
9+
import edu.caltech.ipac.firefly.server.util.Logger;
910
import org.json.simple.JSONObject;
1011

1112
import javax.servlet.http.HttpServletRequest;
@@ -67,7 +68,13 @@ protected void processRequest(HttpServletRequest req, HttpServletResponse res) t
6768
String cmd = sp.getCommandKey();
6869
ServerCommandAccess.HttpCommand command = ServerCommandAccess.getCommand(cmd);
6970
command.processRequest(req, res, sp);
70-
Logger.briefDebug(String.format("CommandService: %s : %dms", cmd, System.currentTimeMillis() - start));
71+
var sso= ServerContext.getRequestOwner().getSsoAdapter();
72+
String userInfoStr= "";
73+
if (sso!=null) {
74+
var ui= sso.getUserInfo();
75+
if (ui!=null) userInfoStr= ui.toString();
76+
}
77+
Logger.briefInfo(String.format("CommandService: %s (%s): %dms", cmd, userInfoStr, System.currentTimeMillis() - start));
7178
} catch (Exception ex) {
7279
LOGGER.error(ex);
7380
HashMap<String, String> errors = new HashMap<>();

src/firefly/java/edu/caltech/ipac/visualize/plot/plotdata/FitsReadFactory.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.io.File;
2020
import java.io.IOException;
21+
import java.util.Arrays;
2122

2223
/**
2324
* @author Trey Roby
@@ -38,8 +39,10 @@ public static FitsRead[] createFitsReadArray(Fits fits) throws FitsException {
3839

3940
public static FitsRead[] createFitsReadArray(BasicHDU<?>[] HDUs, File f, boolean clearHdu) throws FitsException {
4041
if (HDUs == null) throw new FitsException(BAD_FORMAT_MSG);
42+
var headersSizesList= Arrays.stream(HDUs).map(hdu -> hdu.getHeader().getSize()).toList();
43+
var headersOffsetsList= Arrays.stream(HDUs).map(hdu -> hdu.getHeader().getFileOffset()).toList();
4144

42-
BasicHDU<?> [] imageHDUs= FitsReadUtil.getImageHDUArray(HDUs, true);
45+
BasicHDU<?> [] imageHDUs= FitsReadUtil.getImageHDUArray(HDUs, true, headersSizesList, headersOffsetsList);
4346
BasicHDU<?> hdu;
4447
Header zeroHeader= getZeroHeader(HDUs) ;
4548
confirmHasImageData(imageHDUs,HDUs);

src/firefly/java/edu/caltech/ipac/visualize/plot/plotdata/FitsReadUtil.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ public static UncompressFitsInfo createdUncompressVersionOfFile(BasicHDU<?>[] HD
103103
fits.write(retFile);
104104
closeFits(fits);
105105
Fits retReadFits= new Fits(retFile);
106-
return new UncompressFitsInfo(retFile,fits.read(), retReadFits);
106+
BasicHDU<?>[] inHDUs= retReadFits.read();
107+
return new UncompressFitsInfo(retFile,inHDUs, retReadFits);
107108
}
108109

109-
public static BasicHDU<?>[] getImageHDUArray(BasicHDU<?>[] HDUs, boolean onlyFireCubeHdu) {
110+
public static BasicHDU<?>[] getImageHDUArray(BasicHDU<?>[] HDUs, boolean onlyFireCubeHdu, List<Long> headersSizesList, List<Long> headersOffsetsList) {
110111
ArrayList<BasicHDU<?>> HDUList = new ArrayList<>();
111112

112113
String delayedExceptionMsg = null; // the exception can be ignored if HDUList size is greater than 0
@@ -144,7 +145,7 @@ else if (naxis == 1) {
144145

145146

146147
if (goodImage) {
147-
insertPositionIntoHeader(header, j, hdu.getFileOffset());
148+
insertPositionIntoHeader(header, j, headersSizesList.get(j), headersOffsetsList.get(j));
148149

149150
int naxis3 = header.getIntValue("NAXIS3", -1);
150151
if ((naxis > 2) && (naxis3 > 1)) { //it is a cube data
@@ -167,10 +168,9 @@ else if (naxis == 1) {
167168

168169

169170

170-
private static void insertPositionIntoHeader(Header header, int pos, long hduOffset) {
171+
private static void insertPositionIntoHeader(Header header, int pos, long headerSize, long hduOffset) {
171172
if (hduOffset < 0) hduOffset = 0;
172173
if (pos < 0) pos = 0;
173-
long headerSize = getHeaderSize(header);
174174
int bitpix = header.getIntValue("BITPIX", -1);
175175
header.addLine(new HeaderCard(SPOT_HS, headerSize, "Header block size on disk (added by Firefly)"));
176176
header.addLine(new HeaderCard(SPOT_EXT, pos, "Extension Number (added by Firefly)"));
@@ -350,7 +350,7 @@ private static float[] reversePixData(int naxis1, int naxis2, float[] float1d) {
350350
}
351351

352352
public static long getHeaderSize(Header header) {
353-
return header.getOriginalSize() > 0 ? header.getOriginalSize() : header.getSize();
353+
return header.getOriginalSize() > 0 ? header.getOriginalSize() : header.getSize();
354354
}
355355

356356

src/firefly/js/ui/FireflyRoot.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useEffect} from 'react';
22
import {ScopedCssBaseline, extendTheme, CssVarsProvider, useColorScheme, GlobalStyles} from '@mui/joy';
3+
import {getBoolean, isDefined, toBoolean} from '../util/WebUtil';
34
import {AppPropertiesCtx} from './AppPropertiesCtx.jsx';
45

56
import {defaultTheme} from './ThemeSetup.js';
@@ -16,8 +17,12 @@ import '@fontsource/inter/800.css'; // Bolder
1617

1718
export function FireflyRoot({sx, children, ctxProperties={}}) {
1819

19-
const customTheme = getAppOptions().theme?.customized?.();
20+
const appOps= getAppOptions();
21+
const customTheme = appOps.theme?.customized?.();
2022
const theme = extendTheme(customTheme || defaultTheme());
23+
if (isDefined(appOps.showUserInfo)) { // the showUserInfo option will override the property default
24+
ctxProperties= {...ctxProperties, showUserInfo:toBoolean(appOps.showUserInfo)};
25+
}
2126

2227
return (
2328
<AppPropertiesCtx.Provider value={ctxProperties}>

0 commit comments

Comments
 (0)