Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release_23.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 2, 2023
2 parents 4017cf2 + a662d80 commit 38380b6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 17 deletions.
1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"d3-zoom": "^3.0.0",
"d3v3": "npm:d3@3",
"date-fns": "^2.28.0",
"date-fns-tz": "^1.3.3",
"decode-uri-component": "^0.2.1",
"dom-to-image": "^2.6.0",
"dompurify": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { mount } from "@vue/test-utils";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
import { parseISO } from "date-fns";
import { formatInTimeZone } from "date-fns-tz";
import { format, parseISO } from "date-fns";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";

Expand Down Expand Up @@ -68,7 +67,7 @@ describe("DatasetInformation/DatasetInformation", () => {
it("Date should be formatted", async () => {
const date = datasetInfoTable.find(".utc-time").text();
const parsedDate = parseISO(`${datasetResponse.create_time}Z`);
const formattedDate = `${formatInTimeZone(parsedDate, "Etc/Zulu", "eeee MMM do H:mm:ss yyyy")} UTC`;
const formattedDate = format(parsedDate, "eeee MMM do H:mm:ss yyyy zz");
expect(date).toBe(formattedDate);
});

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/UtcDate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { shallowMount } from "@vue/test-utils";
import { getLocalVue } from "tests/jest/helpers";

import UtcDate from "./UtcDate.vue";
import { format, parseISO } from "date-fns";

describe("UTCDate component", () => {
const localVue = getLocalVue();
Expand All @@ -17,6 +18,6 @@ describe("UTCDate component", () => {
expect(wrapper.text()).toContain("years ago");

await wrapper.setProps({ mode: "pretty" });
expect(wrapper.text()).toBe("Wednesday Oct 21st 16:29:00 2015 UTC");
expect(wrapper.text()).toBe(format(parseISO("2015-10-21T16:29:00.000Z"), "eeee MMM do H:mm:ss yyyy zz"));
});
});
8 changes: 3 additions & 5 deletions client/src/components/UtcDate.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { formatDistanceToNow, parseISO } from "date-fns";
import { formatInTimeZone } from "date-fns-tz";
import { computed } from "vue";
import { format, formatDistanceToNow, parseISO } from "date-fns";
interface UtcDateProps {
date: string;
Expand All @@ -12,13 +11,12 @@ const props = withDefaults(defineProps<UtcDateProps>(), {
mode: "date",
});
// Component assumes ISO format date, but note that in Galaxy this won't have
// TZinfo -- it will always be Zulu
const parsedDate = computed(() => parseISO(`${props.date}Z`));
const elapsedTime = computed(() => formatDistanceToNow(parsedDate.value, { addSuffix: true }));
const fullISO = computed(() => parsedDate.value.toISOString());
const pretty = computed(() => `${formatInTimeZone(parsedDate.value, "Etc/Zulu", "eeee MMM do H:mm:ss yyyy")} UTC`);
const pretty = computed(() => format(parsedDate.value, "eeee MMM do H:mm:ss yyyy zz"));
</script>

<template>
<span v-if="mode == 'date'" class="utc-time" :title="elapsedTime">
{{ fullISO }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function onSkipBoolean(value: boolean) {
id="__conditional"
:value="conditionalDefined"
title="Conditionally skip step?"
help="Set to true and connect a boolean parameter that determines whether step will be skipped"
help="Set to true and connect a boolean parameter that determines whether the step should run. The step runs if the parameter value is true and will be skipped if the parameter value is false"
type="boolean"
@input="onSkipBoolean"></FormElement>
<!-- We don't seem to have a disabled text field
Expand Down
5 changes: 0 additions & 5 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4703,11 +4703,6 @@ data-urls@^3.0.2:
whatwg-mimetype "^3.0.0"
whatwg-url "^11.0.0"

date-fns-tz@^1.3.3:
version "1.3.6"
resolved "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-1.3.6.tgz"
integrity sha512-C8q7mErvG4INw1ZwAFmPlGjEo5Sv4udjKVbTc03zpP9cu6cp5AemFzKhz0V68LGcWEtX5mJudzzg3G04emIxLA==

date-fns@^2.28.0:
version "2.29.1"
resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.29.1.tgz"
Expand Down
4 changes: 4 additions & 0 deletions lib/galaxy/tools/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,15 @@ def handle_output(name, output, hidden=None):
job.state = job.states.SKIPPED
for output_collection in output_collections.out_collections.values():
output_collection.mark_as_populated()
for hdca in output_collections.out_collection_instances.values():
hdca.visible = False
object_store_populator = ObjectStorePopulator(trans.app, trans.user)
for data in out_data.values():
object_store_populator.set_object_store_id(data)
data.extension = "expression.json"
data.state = "ok"
data.blurb = "skipped"
data.visible = False
with open(data.dataset.file_name, "w") as out:
out.write(json.dumps(None))
job.preferred_object_store_id = preferred_object_store_id
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/web_stack/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _assign_mem_self_handler(self, obj, method, configured, queue_callback=None,
HANDLER_ASSIGNMENT_METHODS.MEM_SELF,
configured,
)
if flush():
if flush:
_timed_flush_obj(obj)
queue_callback()
return self.app.config.server_name
Expand Down

0 comments on commit 38380b6

Please sign in to comment.