array of structs should not be array of pointers to struct

Fixed sized arrays and structs should be stored inline rather than
storing a pointer to them. Any many cases this reduces the number of
allocation required, the amount of pointer chasing we need to do and
most importantly, makes it possible to use the same data layout for
solana system calls.
This has the following effects on the type system:

a variable declared as int[2] a is a pointer to an array of two
elements with type Type::Array(Type::Int(256), Some(2)).
a structure declared as struct S { bool f1; int[2] f2; } is now
a single structure and f2 is no longer a pointer to another object.
when f2 of structure S is accessed, sema gives it the type:
Type::Ref(Type::Array(Type::Int(256), Some(2))). This is still a
simple pointer (as would have been without the Type::Ref. The
Type::Ref() means is can be used as an l-value, else it would be
un-assignable.
however, assigning to this type does mean copying the entire member
rather than just a pointer.
in many instances, pointer chasing is no longer necessary

This is a minimal implementation which needs further optimization. For
example, this code:
    struct S { int[2] a; bool b; }

    S s = S([1,2], true);

This will allocate an [1,2] array and then copy it into the larger
struct. This allocate/copy should be avoided. The same issue appears in
many other situations:
    struct S { int[2] a; bool b; }

    function lit() returns (int[2]) {
            return [1, 2]
    }

    S s = S(lit(), true);

and
    contract C {
            struct S { int[2] a; bool b; }
            int[2] b;

            function foo() public {
                    S s = S(b, true);
            }

In each instance, we should allocate a single struct and then pass the
pinter for the a member to the struct literal generation, function call,
or the codegen for reading from storage. This would avoid the unnecessary
copy.

I know all tests have passed, but do you think you can add a test that explicitly verifies the behavior you implemented? Usually, we should try to test all branches of our code.

This is  implicitly tested by the existing tests. However, maybe it's time for some tests that check llvm IR. Let me have a look.

I know all tests have passed, but do you think you can add a test that explicitly verifies the behavior you implemented? Usually, we should try to test all branches of our code.

This is implicitly tested by the existing tests. However, maybe it's time for some tests that check llvm IR. Let me have a look.

I've added an llvm test which checks the type of the structs in structs, arrays of structs etc. Ready for review again.


[HotFix] [SVCS-TBD] Use White Background For Zoomed Images

Ticket
https://openscience.atlassian.net/browse/SVCS-TBD
Purpose
cc and h/t @Johnetordoff for discovering this
Fix the issue where zooming does not work properly for .GIFs with transparent background. Here is the example on staging OSF.  This bug only affects non-exported types: .GIF and .ICO. For exported ones, the export type .JPEG does not have transparency so the background is set to white by default.
Normal

Zoom - Before

Changes

The fix simply set a white background when the zoom image's style class is generated on the page.

Zoom - After

Side effects
No
QA Notes
Test that image rendering and zooming works as expected.

.GIF with transparent background: https://staging.osf.io/3ca45/
.GIF with non-transparent background: https://staging.osf.io/3r9m7/
Plus a few other static images

Deployment Notes
No

Coverage remained the same at 71.211% when pulling 973d3116eb69435d7d484c5168b1fa34af41a4d9 on cslzchen:hotfix/image-zoom-gif into 9d6a66cdc251454c6731248e6e67c6114a370726 on CenterForOpenScience:master.


GroupReadsByUmi failing on one sample

Description of the bug
This may be related to #52, but posting it separately as I'm not sure.
I’m finding this error on one of my 8 duplex samples on GroupReadsByUmi:
  [2024/05/28 06:12:25 | FgBioMain | Info] GroupReadsByUmi failed. Elapsed time: 0.06 minutes.
  Exception in thread "main" java.lang.IllegalStateException: A01659:139:HT77KDRX3:1:2160:16260:22326 did not have a primary R1 record.

which is odd to me, because that bam file contain two reads with A01659:139:HT77KDRX3:1:2160:16260:22326:
A01659:139:HT77KDRX3:1:2160:16260:22326	163	chr1	10034	60	9M1D103M1D25M7S	=	10034	139	CCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACAGTACGG	FFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFF:FFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FF:FFFFF:FF:FFFFF:FFFFFFFF:FFFFF:FF::F:FFFFF,FF:F::F,,:F,,FF,,:,,,,	XA:Z:chr3,+10442,9M1D5M1D43M1I71M15S,4;chr4,-190122667,11S35M4I20M1D74M,7;chr1,-248946041,7S16M1D77M1D12M1D32M,7;	MC:Z:7S9M1D103M1D25M	MD:Z:9^T103^C25	NM:i:2	MQ:i:60	AS:i:123	XS:i:102	RX:Z:CAGTA-AATGC	RG:Z:A
A01659:139:HT77KDRX3:2:2214:9299:21261	163	chr1	16440	41	144M	=	16440	144	TCTACAGTTTGAAAACCACTATTTTATGAACCAAGTAGAACAAGATATTTGAAATCGAAACTATTCAAAAAATTGAGAATTTCTGACCACTTAACAAACCCACAGAAAATCCACCCGAGTGCACTGAGCACGCCAGAAATCAGG	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FF	XA:Z:chr9,+16551,144M,2;chr16,+16123,144M,2;chr2,-113596853,144M,2;chr15,-101974377,144M,2;chr12,+16555,144M,2;chrX,-156023484,144M,3;chr1,+186962,144M,4;chr12_GL877875v1_alt,+6555,144M,2;	MC:Z:144M	MD:Z:55G88	NM:i:1	MQ:i:41	AS:i:139	XS:i:134	RX:Z:TGTGC-AAGGA	RG:Z:A-6B738825
A01659:139:HT77KDRX3:1:2160:16260:22326	83	chr1	10034	60	7S9M1D103M1D25M	=	10034	-139	TATGCCTCCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAAC	,:F:,,FFFFFFFFF,FF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FF,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF	XA:Z:chr3,-10508,7S137M,7;chr4,+190122662,4M1D35M4I20M1D74M7S,8;chr3,-10458,21S43M1I71M8S,2;chr1,+248946041,16M1D77M1D12M1D26M13S,5;	MC:Z:9M1D103M1D25M7S	MD:Z:9^T103^C25	NM:i:2	MQ:i:60	AS:i:123	XS:i:105	RX:Z:CAGTA-AATGC	RG:Z:A

All 8 of these samples were sequenced over two lanes, so they are merged together. Curiously this is the only file that fails in this way, the other 7 samples are fine.
If I manually sort the merged bam file, then GroupReadsByUmi will resort the bam file itself and then work correctly.
Command used and terminal output
No response
Relevant files
No response
System information
Running fastquorum v1.0.0 on Nextflow 23.10.1 with apptainer as the container engine.

I think it’s absolutely related. One temporary fix would be to swap in fgbio SortBam for template coordinate merging for now. It isn’t as fast (not multithreaded) but would work when merging lanes. Perhaps even better as a stop gap would be just o use samtools sort, which works, to re-sort after the merge?

Ok, thanks.
Currently samtools merge is being ran non-multithreaded anyway, at least the first time (process_low, and it uses task.cpus-1).

I don’t think we have a merge tool in fgbio, so it’ll have to re-sort.

Ok. My surprise is that it worked on 7/8 samples.
I think there is an issue with using igenomes too, but I'll dig into that on Monday.

You're right, this is relate tot #52 and https://github.com/samtools/samtools/pull/2062

Hi I'm new to nf-core workflows and I'm also encountering this bug.
[2024/07/31 08:02:03 | FgBioMain | Info] GroupReadsByUmi failed. Elapsed time: 0.05 minutes.   Exception in thread "main" java.lang.IllegalStateException: A00232:194:H2LGVDSXC:1:1671:4797:18004 did not have a primary R1 record.
Could you elaborate on how to swap in 'fgbio SortBam'? Is this something I can specify in my config file?

I think it’s absolutely related. One temporary fix would be to swap in fgbio SortBam for template coordinate merging for now. It isn’t as fast (not multithreaded) but would work when merging lanes. Perhaps even better as a stop gap would be just o use samtools sort, which works, to re-sort after the merge?

Thanks!

This was fixed in the branch that @nh13 had made, but he seems to have deleted it now.
The upstream fix is in samtools, but samtools haven't made a release yet.
Nils, I think we should release a 1.0.1 version sooner than samtools might actually get round to releasing it.

Could you elaborate on how to swap in 'fgbio SortBam'? Is this something I can specify in my config file?

No, you can't do this with a config, it requires an edit to the workflow itself.

@SPPearce here's the closed PR: https://github.com/nf-core/fastquorum/pull/54.  I was hoping that smatools would be released by now, but its volunteer so I can relate.  I've asked for a release from here: https://github.com/samtools/samtools/issues/2090.  perhaps we wait a few days and then do a release?

Fixed in #68


Use G4endl with G4cout

This gives the proper G4WT prefixes.

Actually the build failed due to:
CMake Error at examples/Example3/CMakeLists.txt:39 (add_executable):
  CMake doesn't support IPO for current compiler

This is due to this line in example3 cmake:
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
It looks like cmake changed the policy to generate an error if the compiler does not support it, as per: https://cmake.org/cmake/help/latest/policy/CMP0069.html
@hahnjo do you mind looking into this?

Actually the build failed due to:
CMake Error at examples/Example3/CMakeLists.txt:39 (add_executable):
  CMake doesn't support IPO for current compiler

This is due to this line in example3 cmake: set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) It looks like cmake changed the policy to generate an error if the compiler does not support it, as per: https://cmake.org/cmake/help/latest/policy/CMP0069.html

Sure, but this is not related to this pull request, is it?

Sure, but this is not related to this pull request, is it?

No, this PR triggered it.

Sure, but this is not related to this pull request, is it?

No, this PR triggered it.

Not really, it was already there yesterday: http://cdash.cern.ch/index.php?project=AdePT&date=2023-07-12 (it also wouldn't make sense for this change to trigger a CMake problem...)

I meant it revealed it, it was triggered probably by an upgrade of cmake on the test machines. Did not notice it was there in the nightlies. The question is, we fix it by removing the cmake line in the example, or applying IPO only where available? It is easy just to remove, but maybe we will need it in future for other examples? What is your take?

I don't know, I don't think we need it right now. But example3 is by Guilherme, so I don't really know why it is there in the first place.

@amadio do we need this CMAKE_INTERPROCEDURAL_OPTIMIZATION option in example3?


Can't assign different units to behavioral events

We currently do not have the ability to assign units to Behavioral Events (such as for Din, Dout, Acceleration, and Gyroscope data). Our metadata files do have the Units section but we currently leave it as 'unspecified'. As far as I understand, even if unit information was provided, it does not populate downstream in the .nwb files.
Suggested modification: Assign a unit to each type of 'behavioral_event' in the metadata. For example:

Din and Dout: the values lie between 0 and 1 and 'unspecified' is a reasonable choice of unit
Accelerometer: spike-gadgets headstages use +/- 2G full range with an in-practice resolution per step 2/32767 g (0.000061 g). The unit should be 'g' and we would need to multiply the recorded values with 0.000061 g.
Gyroscope: spike-gadgets headstages use +/- 2000 degrees per turn (dps) with an in-practice resolution of 0.061 deg/sec. The unit should be 'd/s' and we would need to multiply the recorded values with 0.061 deg/sec.

and ensure that this information is populated downstream in the .nwb files.

Could separate analog data into separate nwb time series for each type of analog signal


bracket movement

Should double (and future triple elimination) brackets move when displayed?
Yes, unfortunately this assumption is inherently nested with the assumptions we make about progression. E.g. in double elimination; dropping losers in WB in the top position in their designated LB matches causes the LB bracket to slowly move upwards to 'meet the WB winner' at the vertical midpoint. Which is nice. Not moving the brackets allow the brackets to be viewed nicely split at the y-axis (so the LB moves leftward from the right to meet the final).
Allowing both types is likely just a (very careful) modification to the internal down and right functions, but if we should allow both types is really the question here. Especially if we want more advanced elimination types later (like triple elimination).
The unmoved brackets may quickly look silly with large participant numbers, and it's hard to track where WB losers are dropped as it's at the other side of the screen. It's also hard to conceive of nicely designed non-moving elimination grids that do not move when the number of brackets is > 2.
Anyone with some thoughts on this? Why one style over another? Are both required? Will both they work in higher numbered elimination types?

There is now another way with the downMix option anyway.


Identify collection configuration for DAAC collection name, what files to archive, DAAC SNS, etc.

Create an API endpoint for user to provide collection archive configuration values
Create schema for storing collection archive configuration
https://github.com/podaac/cloud-notification-message-schema/tree/master/samples

Message formats:
submission format: https://github.com/podaac/cloud-notification-message-schema?tab=readme-ov-file#notification-message-fields
response format: https://github.com/podaac/cloud-notification-message-schema?tab=readme-ov-file#response-message-fields

I'm wondering if we need to create "collections" to DAAC before we can start sending granules..
If so, will DAACs accept our way of creating too many collections?

The DAAC collection creation is an involved process resulting in a formal agreement between mission and DAACs on what the collection names are. For our purpose, we just care that the data producer has worked that out with the DAACs and they know the DAAC collection identifier.

{
  "collection": "<DAAC collection name that user has created, and provided via configuration>",
  "identifier": "< Granule ID starting with Unity identifiers or simply a UUID? example: URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100:abcd.1234.efgh.test_file05>",
  "submissionTime": "<Lambda will generate this: 2024-05-16T16:04:44.776376>",
  "provider": "<Should be provided by user. But this is not mandatory. example: unity>",
  "version": "<one of 1.0, 1.1, 1.2, 1.3>",
  "product": {
    "name": "<recommendation is Granule ID: URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100:abcd.1234.efgh.test_file05>",
    "dataVersion": "<This is not mandatory. Should we include? Currently, it is simply the date. example:<PHONE_NUMBER>>",
    "files": [
      {
        "name": "abcd.1234.efgh.test_file05.data.stac.json",
        "type": "data",
        "uri": "s3://unity-dev-cumulus-unity-william-test-1/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100:abcd.1234.efgh.test_file05/abcd.1234.efgh.test_file05.data.stac.json",
        "checksumType": "md5",
        "checksum": "<Currently checksum and size of some files are unknown and -1. It needs to be fixed or omitted>",
        "size": -1
      },
      {
        "name": "abcd.1234.efgh.test_file05.nc.cas",
        "type": "metadata",
        "uri": "s3://unity-dev-cumulus-unity-william-test-1/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100:abcd.1234.efgh.test_file05/abcd.1234.efgh.test_file05.nc.cas",
        "checksumType": "md5",
        "checksum": "unknown",
        "size": -1
      },
      {
        "name": "abcd.1234.efgh.test_file05.nc.stac.json",
        "type": "metadata",
        "uri": "s3://unity-dev-cumulus-unity-william-test-1/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100/URN:NASA:UNITY:UDS_LOCAL_TEST:DEV:UDS_COLLECTION___2404251100:abcd.1234.efgh.test_file05/abcd.1234.efgh.test_file05.nc.stac.json",
        "checksumType": "md5",
        "checksum": "unknown",
        "size": -1
      }
    ]
  }
}

Should the configuration filter be based on granules name regex + collection name regex?

Or ONly based on granules name regex?

Should there be an option to select which of the files to be stored in DAAC? example: based on file extensions like .nc, .h5, .xml, but not .stac.json
Will there be different SNSes depending on the configuration?

https://www.figma.com/board/LlVM66Q9qV0UQn7JQ6NHuw/DAAC-Archiver-Workflow?t=YRZ4LkzMCEHC1xMv-0

Are we going to listen to all messages from SNS?
Should we filter the messages that are not unity? How to create a filter?
How should the filter be? is it based on granule id which starts with Unity identifier?

daac config endpoint should be /data/<collect-id>/daac
User can optionally add "type" + "file extension" to choose selective files to be archived to DAAC.
There is only 1 SNS at this moment, but it will be changed at run time.
Needs to cehck if sqs from shared services account can connect to arbitrary SNS?

Use Percolator for future extension. Currently, only "match" collection ID.
Shared Service has SNS which is shared via settings page.
DAAC's lambda will send message to UDS SNS, and UDS will submit to DAAC's SNS.

How strict should the control be with users CRUD-ing the daac configs?


[Snyk] Security upgrade @angular-devkit/build-angular from 0.1000.8 to 12.0.0

Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

frontend/package.json
frontend/package-lock.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

170/1000  Why? Confidentiality impact: None, Integrity impact: High, Availability impact: None, Scope: Unchanged, Exploit Maturity: Proof of Concept, User Interaction (UI): None, Privileges Required (PR): None, Attack Complexity: Low, Attack Vector: Network, EPSS: 0.01055, Social Trends: No, Days since published: 2, Reachable: No, Transitive dependency: Yes, Is Malicious: No, Business Criticality: High, Provider Urgency: High, Package Popularity Score: 99, Impact: 5.99, Likelihood: 2.83, Score Version: V5
Improper Verification of Cryptographic Signature SNYK-JS-ELLIPTIC-8187303
Yes
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

⛔ Snyk has found 1 issues.

Icon
Severity
Issues

Critical
0

High
1

Medium
0

Low
0

⛔ security/snyk check is completed. Snyk found 1 issues. (View Details)
✅ license/snyk check is completed. No issues were found. (View Details)


[SPARK-48851][SQL] Change the value of SCHEMA_NOT_FOUND from namespace to catalog.namespace

What changes were proposed in this pull request?
The pr aims to change the value of SCHEMA_NOT_FOUND from namespace to catalog.namespace.
Why are the changes needed?
As discussing https://github.com/apache/spark/pull/47038#discussion_r1670544805, we should provide more friendly and clear prompt error message.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Update existed UT & Pass GA.
Was this patch authored or co-authored using generative AI tooling?
No.

thanks, merging to master!

thanks, merging to master!

Thank you for your review.
I will fix similar scenarios (when table not exist), by adding catalog name for the table to make it more consistent and reasonable.
https://github.com/apache/spark/blob/4c99c4df7f9cda9b35bc7401c92da22ea683861b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala#L257-L267

This change is not only a user-facing change, it actually breaks the exception handling in external catalogs like:
try {

} catch {
  case e: NoSuchDatabaseException => // ignore or handle

}


Implement API attacher for new native Eclipse projects

Part of #682
This issue covers adding App Engine APIs to a new native project.
Tasks:

update the new project wizard UI
upon creating the project, add the selected APIs to the build path

Is this related to what we saw in the UX study with libraries?

It will fix some of the problems we have seen there, but it originates from the intention of downloading APIs for App Engine, Endpoints and Objectify instead of pulling them from CloudSDK. However this will not make us independent of CloudSDK and the path issues we have seen will need to be addressed separately.


Generalize table check in _get_tables_from_stack

Allows us to remove xfail from the GPU case in test_tables_from_stack

Codecov Report

Merging #333 (79cf0cf) into main (0c05787) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
- Coverage   95.74%   95.73%   -0.01%
==========================================
  Files          65       65
  Lines        2841     2839       -2
  Branches      429      429
==========================================
- Hits         2720     2718       -2
  Misses         75       75
  Partials       46       46

Impacted Files
Coverage Δ

dask_sql/context.py
99.13% <100.00%> (ø)

dask_sql/physical/rel/custom/predict.py
95.45% <0.00%> (-0.11%)
:arrow_down:

dask_sql/utils.py
100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c05787...79cf0cf. Read the comment docs.


Bookstore: styling

What is done in this PR?
Added missing JSX elements to the project (without adding extra functionality) and implemented all styles based on Zeplin's design (this includes all elements + the same styling).
Note: If you are using a small screen (Laptop) to open this project you need to zoom out the browser window to see the complete design because this project is not responsive and maybe does not fit the small screen.
Thank you for reviewing.

Thank you


Added a way to set a fixed timezone

I ran into the issue that tests would fail on our CI server, because it was located in a different timezone. By passing a second parameter to MockDate.set(), you can fix the timezone offset, e.g. MockDate.set(new Date(), -60)

Thanks for the pull!  Published on npm @2.0.1

@boblauer Would be neat to have full mock timezone shifting for tests. You may be able to reuse pieces from https://www.npmjs.com/package/timezone-mock? I tried to use that package with MockDate but it didn't work - I assume they both update the underlying date prototypes and would need to have the functionality included in this package directly.

I also tried using  moment-timezone but that didn't work either:
import moment from 'moment-timezone'
import MockDate from 'mockdate'
import formatDateTime from '.'

const checkOutput = (nowDateTime, output, timezone = 'America/Los_Angeles') => {
  const now = moment(nowDateTime)
  const nowWithTimezoneShift = now.tz(timezone)
  MockDate.set(nowWithTimezoneShift)
  const input = '2017-08-01T22:03:49.799Z'
  expect(formatDateTime(input)).toBe(output)
  MockDate.reset()
}

test('formats date times from today', () => {
  checkOutput('2017-08-01T22:03:49.799Z', '4:03 PM')
})

test('formats date times from yesterday', () => {
  checkOutput('2017-08-02T22:03:49.799Z', 'Yesterday, 4:03 PM')
})

const longOutput = '8/1/2017, 4:03 PM'

test('formats date times from last week', () => {
  checkOutput('2017-08-07T22:03:49.799Z', longOutput)
})

test('formats date times older than a week', () => {
  checkOutput('2017-11-15T22:03:49.799Z', longOutput)
})

test('formats date times older than the current year', () => {
  checkOutput('2019-01-11T22:03:49.799Z', longOutput)
})

test('formats date times according to local timezone', () => {
  checkOutput('2017-08-01T22:03:49.799Z', '10:03 AM')
})

All of these tests should be failing as the 4:03 PM is mountain time, not America/Los_Angeles.

The problem with your test above is that now and nowWithTimezoneShift are both the same moment in time:
const now = moment()
const nowWithTimezoneShift = now.tz('America/Los_Angeles')
now.toDate().getTime() //<PHONE_NUMBER>834
nowWithTimezoneShift.toDate().getTime() //1501693855834

When you specify a date as, for example, 2017-08-07T22:03:49.799Z, you are specifying a given moment in time, because you are specifying it in a given timezone.  What you want to be doing instead (I think) is specifying the time relative to some other timezone that is not UTC.  For example:
moment.tz('2017-11-15T22:03:49.799Z', 'America/Los_Angeles').toDate() //1510783429799
moment.tz('2017-11-15T22:03:49.799Z', 'America/Chicago').toDate().getTime() //1510783429799

moment.tz('2017-01-01', 'America/Los_Angeles').toDate().getTime() //1483257600000
moment.tz('2017-01-01', 'America/Chicago').toDate().getTime() //1483250400000

@boblauer My latest code with the suggestion still gets 4:03 PM for each time (which is my local time so the timezone is not being updated)
import moment from 'moment-timezone'
import MockDate from 'mockdate'
import formatDateTime from '.'

const checkOutput = (nowDateTime, output, timezone = 'America/Los_Angeles') => {
  const now = moment(nowDateTime)
  const nowWithTimezoneShift = now.tz(timezone)
  MockDate.set(nowWithTimezoneShift)
  const input = '2017-08-01T22:03:49.799Z'
  expect(formatDateTime(input)).toBe(output)
  MockDate.reset()
}

test('formats date times from today', () => {
  checkOutput('8/1/2017', '3:03 PM')
})

test('formats date times from yesterday', () => {
  checkOutput('8/2/2017', 'Yesterday, 3:03 PM')
})

const longOutput = '8/1/2017, 3:03 PM'

test('formats date times from last week', () => {
  checkOutput('8/7/2017', longOutput)
})

test('formats date times older than a week', () => {
  checkOutput('11/15/17', longOutput)
})

test('formats date times older than the current year', () => {
  checkOutput('1/3/2019', longOutput)
})

test('formats date times according to local timezone', () => {
  checkOutput('7/31/2017', 'Yesterday, 12:03 PM', 'Asia/Magadan')
  checkOutput('8/1/2017', '4:03 PM', 'America/Boise')
  checkOutput('8/1/2017', '4:03 PM', 'America/Costa_Rica')
  checkOutput('8/1/2017', '5:03 PM', 'America/Chicago')
  checkOutput('8/1/2017', '6:03 PM', 'America/New_York')
  checkOutput('8/1/2017', '6:03 PM', 'America/Costa_Rica')
  checkOutput('8/2/2017', '2:03 AM', 'Africa/Algiers')
})

I think I have a better grasp of what is going on now.  The problem is that formatDateTime is (I'm assuming) written to only care about the current machine's timezone.  I'm guessing you're doing some date subtraction to determine if the date passed in was from today, yesterday, or further back than that, and adjusting the output based on that.
So setting "now" to a given timezone probably won't matter, because whether it's currently 1:15 central time or 2:15 eastern time, Aug 2nd, 4:03 PM local time is still going to be formatted as 4:03 (today) for both of those timezones.
My best suggestion would be to write these tests with a single timezone in mind (not a specific timezone, just assuming they will be run for whatever time zone the machine says it is in, like dates are by default), and then run the test multiple times for multiple timezones by setting the TZ environment variable explicitly before running the tasks.
https://stackoverflow.com/questions/8083410/how-can-i-set-the-default-timezone-in-node-js

@boblauer formatDateTime is just using moment's calendar:
/* @flow */
import moment from 'moment'

const formatDateTime = (dateTime: string) =>
  moment(dateTime).calendar(null, {
    sameDay: 'LT',
    lastDay: '[Yesterday, ]LT',
    lastWeek: 'l[, ]LT',
    sameElse: 'l[, ]LT',
  })

export default formatDateTime

I was able to use the TZ environment variable as you suggested to at least get the tests working consistently locally and in CI but had to remove all my timezone tests since it can't be set during runtime.

Here is what I have for anyone interested:
import MockDate from 'mockdate'
import formatDateTime from '.'

const checkOutput = (today, output) => {
  MockDate.set(today)
  const input = '2017-08-01T22:03:49.799Z'
  expect(formatDateTime(input)).toBe(output)
  MockDate.reset()
}

test('formats date times from today', () => {
  checkOutput('8/1/2017', '3:03 PM')
})

test('formats date times from yesterday', () => {
  checkOutput('8/2/2017', 'Yesterday, 3:03 PM')
})

const longOutput = '8/1/2017, 3:03 PM'

test('formats date times from last week', () => {
  checkOutput('8/7/2017', longOutput)
})

test('formats date times older than a week', () => {
  checkOutput('11/15/17', longOutput)
})

test('formats date times older than the current year', () => {
  checkOutput('1/3/2019', longOutput)
})

Hi there, do you know where can I find a list of valid values that I can pass to process.env.TZ?

I mean, I can find things like https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, but I don't know whether this is the values that the lib will be matching against. And I don't understand what lib is doing this matching agains process.env.TZ so I can't really check the source.

The timezone matching is built into node.  I would assume that it uses that list from wikipedia.
If you want to test a given timezone, you can run this from the terminal:
~ $ TZ="Africa/Abidjan" node -e "console.log(new Date().toString())";
Thu Aug 31 2017 14:45:36 GMT+0000 (GMT)

If you enter a timezone that's not recognized, you'll get the date back in UTC:
~ $ TZ="Bogus/Timezone" node -e "console.log(new Date().toString())";
Thu Aug 31 2017 14:46:10 GMT+0000 (UTC)

Hope that helps.


Solar without powerwall not showing up as entity in energy dashboard

Hi,
My solar system (no powerwall) shows up via this component however not all entities show up in the energy dashboard. Below is a link home assistant asks me to include when creating this issue.
https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics

I also have this issue. I've reviewed the code and I can't understand why it wouldn't work. the Documentation about Long-Term-Statistics say:
"To opt-in for statistics, the sensor must have state_class set to one of the valid state classes: measurement, total or total_increasing. "
and
"The state_class property must be set to measurement, and the device_class must not be either of energy, gas, or monetary"
and I'm assuming the relevant bit of code in the project here is: https://github.com/alandtse/tesla/blob/dev/custom_components/tesla_custom/sensor.py
lines 335-337 where it says
self._attr_device_class = SensorDeviceClass.POWER
self._attr_state_class = SensorStateClass.MEASUREMENT
self._attr_native_unit_of_measurement = POWER_WATT
If anyone can direct me to where we should look i'm happy to help

The energy dashboard only accepts certain types of “statistics sensors”. Specifically for solar, ones that provide a measurement over a time period like kWh. The sensors this integration exposes are just the Watt measurement the Tesla API exposes. For the grid consumption specifically, it only reports a positive (grid import) or negative value (grid export), but the HA energy dashboard needs a separate sensor for grid export and grid export. You have to create a template sensor to break this up into two separate sensors for the HA energy dashboard to use.

So after upgrading to v3.0 by solar sensor stopped working.
Here's the snippet that I used to covert to a long term sensor:
- platform: integration
  source: sensor.my_home_solar_power
  name: roof_solar_panel_kwh
  unit_prefix: k
  round: 2

@shred86 since you worked on the rewrite #250 any ideas what might have broken?

I just ended up disabling the broken entities and renaming the new ones to the old ones.


Support reStructuredText input

Markdown is far too limiting in features set, but reStructureText is more robust with built-in features (at least for CommonMark, else it is yet another Markdown fork with questionable compatibility with other renderers)

Built-in metadata  instead of ad-hoc YAML
Built-in file includes for organization
Admonition/callouts
Figure syntax
Image sizing options
Citations for quotations (block quotes)
Footnotes
Definition lists
Table of contents support (could be used for shortcuts)

This tool takes markdown as input and there's no plans to add any other format, in particular because markdown (along with its support for html comments/tags) is enough for what this tool tries to do.


Mchavda splunk/imperva waf test cases 424

@rfaircloth-splunk last commit 091053b might require some modification. your help would be much appreciated


Fix homepage design static

Nice work. However, please run the linter on your fine before pushing. So you can handle any linting issues first. Reopen the pull request after you've fixed the issue.


[5.2] CSPRNG Enchancements

Adds paragonie/random_compat as a polyfill for PHP 7's interface in PHP 5 projects
Make sure Str::equals() treats bytes as binary strings (mb_strlen($str) -> mb_strlen($str, '8bit'))

These changes should be safe to backport into earlier versions (random_compat was designed to function even on ancient versions of PHP, to encourage adoption even on ancient frameworks).

Thinking more about this, I wonder if it would be a good idea to actually make this change on 5.1, and then on 5.2, remove the openssl type work around completely, and totally rely on this package (or php 7).
What do you think @taylorotwell?

I didn't originally realise it would be this simple a change, though I guess, I d'no why I didn't think that, lol. :)


Running installer does nothing on Windows Vista by default

Download an Edge Code build (or Brackets, presumably) on a Windows Vista machine
Run the installer

Result: nothing happens
Expected: installer UI appears
Workarounds:

Right-click > Properties > Unblock.  Then run it again.
Move the MSI file to a non-NTFS drive, then run it.  (The "downloaded from Internet" tainting metadata is NTFS-only).

I tested on Vista Enterprise edition with default UAC settings, using IE 8.  It's possible that other similar setups (e.g. Vista Home or download using Chrome) would not reproduce this.
This was reported by an Edge Code user in the wild here: http://forums.adobe.com/message/4893231#4893231
This appears to be a problem that afflicts other MSI-based installers.  For example:

http://mdn.morovia.com/kb/install-msi-File-requires-System-Admin-Privileges-Windows-Vista-10602.html
Edge Inspect has the same problem: http://forums.adobe.com/thread/1093268#4848316 (although their installer codebase is almost identical to ours, so that might not prove much)

But given the sparsity of Google hits, it seems unlikely that all MSIs are afflicted by this.  It does appear that some installers are able to detect this situation and show UI, but it's not clear if they're MSIs:

http://kb.winzip.com/kb/entry/241/
http://flippingbook.com/help/publisher-2/faq/installation-on-windows-vista-is-interrupted/

I am still having the problem while installing Zoom on Win. Vista + SP1 + SP2.
Now the installation process starts well, but gives an error and does not install.
While checking on Zoom's system requirements, it asks for Vista + SP1 or higher. So, Zoom should install in mt Vista + SP2.
Please help.
Regards
Rajeev
Whatsapp: +91 98100 73055


[complete-doc]: add support for constuctor doc

PR checklist

[x] Addresses an existing issue: fixes #4781
[x] enhancement
[x] Includes tests
[ ] Documentation update

Overview of change:
Added new doctype => ARGUMENT_CONSTRUCTORS = "constructors"
Below is the descriptor
    public static ARGUMENT_DESCRIPTOR_CONSTRUCTOR = {
        properties: {
            [DESCRIPTOR_TAGS]: {
                properties: {
                    [TAGS_FOR_CONTENT]: {
                        items: {
                            type: "string",
                        },
                        type: "object",
                    },
                    [TAGS_FOR_EXISTENCE]: {
                        items: {
                            type: "string",
                        },
                        type: "array",
                    },
                },
            },
            [DESCRIPTOR_PRIVACIES]: {
                enum: [ALL, PRIVACY_PRIVATE, PRIVACY_PROTECTED, PRIVACY_PUBLIC],
                type: "string",
            },
            [DESCRIPTOR_OVERLOADS]: {
                type: "boolean",
            },
        },
        type: "object",
    };

Code changes generally LGTM, thanks for sticking to the existing styles! A few small comments here and there; the biggest thing is that protected is missing testing.

Done


soa <IP_ADDRESS> documentation update for docker based multihost deployment

This PR contains the SOA <IP_ADDRESS> documentation steps, for deploying a SOA domain in a multi-node environment.

@Djelibeybi  Thanks for the feedback, I have incorporated your feedback into the README.
Please review.

@rdas0405 needs to approve all the changes too, then I can merge.


PDO exception when loading test fixtures and using Mysql init commands

I have run into a strange issue. When I add more than one PDO::MYSQL_ATTR_INIT_COMMAND commands in my configuration, like this:
'db' => [
    'class' => 'yii\db\Connection',
    'charset' => 'utf8',
    'attributes' => [
        PDO::MYSQL_ATTR_INIT_COMMAND => '
            SET SESSION sql_mode = \'STRICT_TRANS_TABLES\';
            SET SESSION time_zone = \'+0:00\';
        '
    ]
],

Then I get the following error when running codeception functional tests that try to load global fixtures.
:~/clone/tests/codeception/frontend$ codecept run --debug

  [PDOException]
  SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active.  Consid
  er using PDOStatement::fetchAll().  Alternatively, if your code is only ever going to run against mysql, you m
  ay enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

Exception trace:
 () at [path]/vendor/yiisoft/yii2/db/Connection.php:597
 PDO->exec() at [path]/vendor/yiisoft/yii2/db/Connection.php:597
 yii\db\Connection->initConnection() at [path]/vendor/yiisoft/yii2/db/Connection.php:530
 yii\db\Connection->open() at [path]/vendor/yiisoft/yii2/db/Connection.php:837
 yii\db\Connection->getMasterPdo() at [path]/vendor/yiisoft/yii2/db/Connection.php:824
 yii\db\Connection->getSlavePdo() at [path]/vendor/yiisoft/yii2/db/Command.php:208
 yii\db\Command->prepare() at [path]/vendor/yiisoft/yii2/db/Command.php:816
 yii\db\Command->queryInternal() at [path]/vendor/yiisoft/yii2/db/Command.php:350
 yii\db\Command->queryAll() at [path]/vendor/yiisoft/yii2/db/mysql/Schema.php:198
 yii\db\mysql\Schema->findColumns() at [path]/vendor/yiisoft/yii2/db/mysql/Schema.php:97
 yii\db\mysql\Schema->loadTableSchema() at [path]/vendor/yiisoft/yii2/db/Schema.php:140
 yii\db\Schema->getTableSchema() at [path]/vendor/yiisoft/yii2/test/ActiveFixture.php:146
 yii\test\ActiveFixture->getTableSchema() at [path]/vendor/yiisoft/yii2/test/ActiveFixture.php:121
 yii\test\ActiveFixture->resetTable() at [path]/vendor/yiisoft/yii2/test/ActiveFixture.php:76
 yii\test\ActiveFixture->load() at [path]/vendor/yiisoft/yii2/test/FixtureTrait.php:93
 tests\codeception\common\_support\FixtureHelper->loadFixtures() at [path]/tests/codeception/common/_support/FixtureHelper.php:72
 tests\codeception\common\_support\FixtureHelper->_beforeSuite() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/Subscriber/Module.php:32
 Codeception\Subscriber\Module->beforeSuite() at n/a:n/a
 call_user_func() at /home/rof/.composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:164
 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /home/rof/.composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:53
 Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/SuiteManager.php:152
 Codeception\SuiteManager->run() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/Codecept.php:166
 Codeception\Codecept->runSuite() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/Codecept.php:149
 Codeception\Codecept->run() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/Command/Run.php:262
 Codeception\Command\Run->runSuites() at /home/rof/.composer/vendor/codeception/codeception/src/Codeception/Command/Run.php:191
 Codeception\Command\Run->execute() at /home/rof/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /home/rof/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /home/rof/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /home/rof/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /home/rof/.composer/vendor/codeception/codeception/codecept:27

Any idea what could be using the problem? The issue only happens on Codeship CI server and with any two commands in the configuration. When I remove any one, the issue dissapears.
Setting PDO::MYSQL_ATTR_USE_BUFFERED_QUERY to true did not help. Also setting emulatePrepare to true did not help.
Yii 2.0.3
PDO::ATTR_CLIENT_VERSION: mysqlnd 5.0.11-dev - 20120503
PDO::ATTR_DRIVER_NAME: mysql
PDO::ATTR_SERVER_VERSION: 5.6.19-0ubuntu<IP_ADDRESS>

Thanks!

Not sure if there is a way to solve this. Sounds like it is a problem with PDO rather than Yii.
You could use initConnection with EVENT_AFTER_OPEN event to do the same. http://www.yiiframework.com/doc-2.0/yii-db-connection.html#initConnection()-detail

You could run those extra queries another way:
'db' => [
    'class' => 'yii\db\Connection',
    'charset' => 'utf8',
    'on '.\yii\db\Connection::EVENT_AFTER_OPEN => function () {
        Yii::$app->db->createCommand('SET SESSION sql_mode = \'STRICT_TRANS_TABLES\'')->execute();
        Yii::$app->db->createCommand('SET SESSION time_zone = \'+0:00\'')->execute();
    },
],

After a quick google I found a related SO question. Maybe you can't execute more than one query this way, try setting both values in a single SET SESSION call or use Yii events.

Yes, you are correct, this is due to https://bugs.php.net/bug.php?id=48859
The following seems to work:
        'db' => [
            'class' => 'yii\db\Connection',
            'charset' => 'utf8',
            'attributes' => [
                PDO::MYSQL_ATTR_INIT_COMMAND => '
                    SET SESSION sql_mode = \'STRICT_TRANS_TABLES\', time_zone = \'+0:00\';
                '
            ]
        ],

Thanks for your help and sorry for the confusion.

@cebe maybe it's worth adding example usage for EVENT_AFTER_OPEN somewhere in the docs. I find it quite common and it's hard to figure out for beginners.

Isn't SET with multiple arguments the correct way for doing this?

Both solutions are be correct but using PDO::MYSQL_ATTR_INIT_COMMAND is specific to MySQL.

Relates #3695

Hi

hi

Hello, I am facing the same problem.. any update on this??

I have added an example to the guide: a1066c5

Is there any way to import database(sql file) using query ??

I am getting following error while importing..
Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

see here: https://github.com/yiisoft/yii2/issues/3695#issuecomment-45892842

when I tried
\Yii::$app->db->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);
it show me setAttribute is not defined.

you have to call \Yii::$app->db->open() before, to ensure pdo instance is created.

Ok.. I called it. Now it give PDO class not found..

most probably because you are in a namespace, add a backslash before it: \PDO

Yes, it resolved PDO class error.. Thanks.
There is some strange issue I found in Active Record Query. Can I write here or generate new issue ??

One issue per one problem.


Proposal: Decorate methods with JetBrains.Annotations.StringFormatMethodAttribute

Proposal to decorate the log methods with the StringFormatMethodAttribute.
Example:
[StringFormatMethod("message")]
public static void LogDebug(this ILogger logger, EventId eventId,
           Exception exception, string message, params object[] args)

You get then help from Resharper, including validation of the format message.
Is a PR accepted on this one? (after merge of https://github.com/aspnet/Logging/pull/338 I guess)

Interestingly, in the particular case of the logging APIs they are not string.Format arguments and those are specifically dis-recommended. That is, instead of The value of {0} is {1} you should pass in The value of {foo} is {bar}. This allows structured logging to have named key/value pairs.
But to answer the more general question: each repo has slightly different views on the JetBrains annotations because different parts of the team work on them. The data-oriented repos (e.g. EF) use them heavily, but most others do not use them at all. This largely varies based on who uses R#. As such, I'd leave it to the folks who work the most on this repo to chime in on that specific aspect.

Thanks for the feedback!
At NLog we use the JetBrains annotations are there is no downside on it. (And IMO everyone should use R#)

The downside is having a lot of annotations :smile:

Thanks @304NotModified for the suggestion! Agreed with Eilon, since the recommended approach is using c# string interpolation, I don't think this particular attribute would be useful, and would also be needed to added all over the place. Backlogging this for now.

.Log is not string.Format methods and marking them with StringFormatMethod would be wrong.


Strong Name Microsoft.Azure.Mobile.Client

hi,
Cant use this library
1>CSC : error CS8002: Referenced assembly 'Microsoft.Azure.Mobile.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null' does not have a strong name.
1>CSC : error CS8002: Referenced assembly 'Microsoft.WindowsAzure.Mobile.Files, Version=<IP_ADDRESS>2, Culture=neutral, PublicKeyToken=null' does not have a strong name.
Since this is library code, the expected is that all those are strong name to facilitate its use accross more deployment scenarios (ours, enterprise app that requires strong name all stuff)
thanks in advance
jorge costa

We are not developing this library any further.  All future development is done over on azure/azure-mobile-apps.  There, the new libraries have Microsoft.Datasync.Client and Microsoft.AspNetCore.Datasync (depending on whether you are dealing with the client or server).


Pointer moves in fixed directions and with fixed set of speed

Following are the problems that i have faced using this software:

the pointer moves in only 8 fixed directions, if i had my target very close to me and somewhere between these 8 possible directions, there's no way for my pointer to reach there without juggling around a few times.
speed of the pointer is fixed i.e. can only take some discrete values and cannot be changed gradually, no matter how hard i try pressing the "e" key to slow it down as it approaches the target, i fail to press it at the right moment so that i may land exactly on my target, making it a bit finicky to use

I just love this software and the concept behind it but was facing these issues lately, i wanted it to be a complete replacement to my mouse. I understand that some of the issues cannot be mitigated easily because of how this software is designed, i just wanted to make sure if i am using it right or not. Was this able to replace your mouse in your setup?
I am using the default config [tried changing it as well but didn't help much]

Hi, I understand the problems you are facing, but I have not found a way to make it work better, there are just some limitations when using a keyboard, since a key has only two states, pressed or not pressed. So you won't get the speed like with a real mouse, but with some practice one can get fast enough to work fluently and hit a target very fast.
I avoid using the mouse pointer where I can (e.g. vim bindings, tiling window manager), in this case mouseless can totally replace a real mouse. Though I use a real mouse from time to time when I have to use a GUI which relies heavily on the mouse pointer.
So I think the most important point to make it work better is practice, and maybe experimenting with different speeds and acceleration times.


Feature suggestion: Retry mechanism

It because Google AI Gemini API is error prone. Every GenAI app should implement retry mechanism. Would you consider implement retry mechanism as a built-in feature in your library?
https://github.com/mscraftsman/generative-ai/blob/8c33634100dcfe9f9f4707d53a9fc06f396ae6fc/src/Mscc.GenerativeAI/GenerativeModel.cs#L509-L517

Hi @doggy8088
Thanks for the suggestion. Yes, I was thinking about a retry mechanism already and considering something like Polly. However, right now I'd like to keep dependencies on other packages as small as possible and this package supports .NET Framework 4.7.2, .NET Standard 2.0, and .NET 6 or higher.
Do you have suggestions on how to implement a "native" retry mechanism?

I think a built-in caching mechanism would be more convenient. It could be a optional argument to enable/disable this feature. Or provide a standalone method to do that. It could be a helper method or static method or extension method.
For the retry mechanism, this should be abstract to the developer. The method only throw exception when it reached max retry limit.

I'm going to look into that and open a feature branch.
The retry pattern for asynchronous calls in C# seems to be an interesting approach to solve this.
In case that you have code snippets or solid code samples, please feel free to post. That would be very much appreciated.

Here is my code snippet for retry mechanism:
public async Task<string> Run(double temperature = -1, int retries = 5, string[] stopSequences = null)
{
    string endpoint = $"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro-001:generateContent?key={this.ApiKey}";

    var request = new GeminiRequest()
    {
        Contents = this.Contents.ToArray(),
        GenerationConfig = this.DefaultGenerationConfig,
        SafetySettings = this.DefaultSafetySettings
    };

    if (temperature >= 0)
    {
        request.GenerationConfig.Temperature = temperature;
    }

    if (stopSequences is not null)
    {
        request.GenerationConfig.StopSequences = stopSequences.ToList();
    }

    var json = request.ToJson();

    using (HttpClient client = new HttpClient())
    {
        var content = new StringContent(json, Encoding.UTF8, "application/json");
        var message = await client.PostAsync(endpoint, content);

        responseContent = await message.Content.ReadAsStringAsync();
        this.LogResponseJson(responseContent, logId: logId);

        if (!message.IsSuccessStatusCode)
        {
            if (retries <= 0)
            {
                throw new Exception($"Gemini Error: {message.StatusCode}\n\n{message.Content.ReadAsStringAsync().Result}");
            }

            Thread.Sleep(5000);

            return await Run(temperature, retries - 1, stopSequences);
        }
    }

    GeminiResponse response = GeminiResponse.FromJson(responseContent);

    var firstCandidate = response.Candidates.First();

    bool status = false;
    switch (firstCandidate.FinishReason)
    {
        case FinishReason.SAFETY:
            // Util.HorizontalRun(true, request, response).Dump();
            break;
        case FinishReason.MAX_TOKENS:
            // Util.HorizontalRun(true, request, response).Dump();
            break;
        case FinishReason.RECITATION:
            // Util.HorizontalRun(true, request, response).Dump();
            break;
        case FinishReason.OTHER:
            // If you see BlockedReason.OTHER, the query or response may violate the terms of service or be otherwise unsupported.
            // https://ai.google.dev/docs/troubleshooting#safety_issues
            // Util.HorizontalRun(true, request, response).Dump();
            break;
        case FinishReason.UNSPECIFIED:
            // Util.HorizontalRun(true, request, response).Dump();
            break;
        case FinishReason.STOP:
            status = true;
            break;
    }

    if (!status)
    {
        if (retries <= 0)
        {
            throw new FinishReasonException($"Error: {firstCandidate.FinishReason}");
        }

        Thread.Sleep(5000);

        return await Run(temperature, retries - 1);
    }

    return firstCandidate.Content.Parts.First().Text;
}

Dear @doggy8088
Thanks for the code snippet. I'm trying to get my head around several things here.

When shall a retry be conducted. Depending on the returned HTTP status code there are not many options available or making sense to attempt a retry. The main reasons would be an HttpIoException or timeout related issues. As for any HTTP 4xx or HTTP 5xx I don't quite see the justification for a retry though. Perhaps an HTTP 429 could be of interest.
Do you see other reasons?
The handling of FinishReason seems to be contrary to the intended purpose (while reading the Python sources). I agree that the current implementation needs improvement in that area.
Your approach seems to work for non-streaming requests only. Or am I missing something?

As mentioned before, I like the idea to add the retry design pattern to the package. I'm currently a bit undecided about the actual how and the implementation.
Again, thanks for your contribution.
PS: The way how HttpClient is used can cause trouble regarding port exhaustion on the client. There are safer ways.

In my personal experience, almost every circumstance needs retry. There are so many false positives error returned from Google AI Gemini API.  In my current implementation, I retry everything when I get non-200 response.

I see.
In case of an HTTP 400 Bad Request or an HTTP 404 Not Found, I wouldn't go for a retry. Same in case of an HTTP 500 Server error or similar.
I get your reasoning, and I'm giving it a bit more thought. In general, I like the retry design pattern, and yes I'd like to implement it as well into the package. Bear with me a little.

I agreed with you about the HTTP 400 and 404. But for HTTP 500, that definitely need implement retry with backoff mechanism.


Release v0.3.0.

@qwandor Happy to look at this if you really want, but not sure I'm competent to do a good review: I've never worked with embedded USB. Let me know how to proceed.

I've never worked with embedded USB either, but this is just a version bump and minor cleanup so I'll go ahead and release it.


feat: update rusty_v8

includes fixes for tla bugs introduced in 12.9

So maybe fix: update rusty_v8?


Revert "[SR-6420] Ensure that the pthread_key is initialised once"

Reverts apple/swift-corelibs-foundation#1325
I am leaving this open temporarily, as a placeholder for figuring out the root cause of the original regression.

Alright, file the JIRA please.

Filed SR-6491


error with connection $scope in the controller.

no display when the data source is a query from a service from the controller.
but if I send an array burned from controller. works , but not if the array dynamically built it from some service.

i have same issues

I am also facing the same issue, when options pass as vm.options from a service, it displays none. I checked and vm.options has value.


Define migration strategy and start the process

There is already a clear list, we just need to organize the priorities and preestablish the teams (see: #5)

First 25 repositories already migrated in Nov 🎉

All the repos in scope for Guidesmiths are already migrated 🎉

@UlisesGascon , should be close this issue as it has already been solved?

yeah! this can be closed :-)


Link compatibility with routers

Routing libraries provide components for spa navigation(example), but they don't have the same styles as the Link from uikit.
To get a stylized component, a hard-coded class name "yc-link yc-link_view_normal" is passed to it.
I suggest adding an optional render prop to Link (after merge https://github.com/gravity-ui/uikit/pull/600) to connect such components with the style guide.

@LakeVostok Are you looking for smth like this https://reactrouter.com/en/main/hooks/use-link-click-handler ?

Reopen this if it still a problem


Discovered root policy does not know about new bridges, filesystem changes

In #190 a discovered root policy was introduced. This examines the total disk space and what network bridges exist. This has the unfortunate effect that newly created bridges are not usable by albatross. On the other hand it has the positive effect that bridges that are created by other services that are launched after albatross are not usable by albatross, for example bridges created by libvirt or docker.
Similarly, this doesn't observe changes to the filesystem. Today, I created a 64 GB filesystem for /var/lib/albatross/block, but the root policy says 40 GB as is the size of the root filesystem.

Thanks for your report. Yes, indeed, there are limitations. But I wonder what should be done... we can busily loop for detecting changes, but then if e.g. mollymawk is connected, it would as well busily need to gather the root policy...
With the current behaviour, albatross needs to be restarted if the bridges / file system changes.

The question is not only what to do if block storage has increased in size / new network bridges are available, but as well what to do when block storage size gets decreased / bridges are removed?


Qt theming not available

The fallback theme is ugly as heck:

A possible workaround is to force using Gtk themes via gtk-common-themes content snap

Problem launching QT snaps in Wayland - snap - snapcraft.io
Wayland, dconf and XDG_RUNTIME_DIR - snapd - snapcraft.io
Snapcraft update and bump to 2.4.0-preview by droidmonkey · Pull Request #2249 · keepassxreboot/keepassxc

It's better, not best, but better.


Avoid using constructor to redirect from dashboard/reports

Base constructor needs a Page parameter: let's use validateRequest instead

Can we use view() like we do in most other single page controllers?

Can we use view() like we do in most other single page controllers?

Sure! (Even if validateRequest occurs a bit sooner than view, thus saving a couple of calls)
PR updated.

Any reason we shouldn't use $this->redirect() like we do elsewhere? We're not going to stop supporting it and it's used all throughout the rest of the Dashboard.

Any reason we shouldn't use $this->redirect() like we do elsewhere?

Well, the problem with $this->redirect() is that the response is sent and the execution stops immediately.
The middlewares (FrameOptionsMiddleware, CookieMiddleware, ...) don't have a chance to process the response.
IMHO this is not a great problem in this particular case, but for a clean and consistent process we should avoid calling exit/die and pass the response to the middlewares.
A solution would be to change the AbstractController::redirect() method to something like this:
public function redirect()
{
    $args = func_get_args();
    $r = call_user_func_array(array('Redirect', 'to'), $args);
    throw new ResponseReadyException($r);
}

and the DefaultDispatcher::dispatch() method (or the DispatcherDelegate::next() method?) to something like this:
public function dispatch()
{
    try {
        // ...current code...
    } catch (ResponseReadyException $x) {
        return $x->getResponse();
    }
}

There's tons of third party code out there using $this->redirect(). It
reads a lot better than redirectClean() as well (as I'm not sure what that
really means.) There's gotta be a way to support $this->redirect from
within a controller method without having to call lots of extra framework
code
On Wed, Oct 5, 2016 at 6:51 AM, Michele Locati<EMAIL_ADDRESS>wrote:

Here's what I mean: https://github.com/mlocati/
concrete5/commits/middleware-aware-redirect
In particular see mlocati@d14821a
https://github.com/mlocati/concrete5/commit/d14821a6ffdd8d72d6721d94fdc920fcd9c2bff9
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/concrete5/concrete5/pull/4433#issuecomment-251680614,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgNwXTZWwAIVumpItqeU6z3l5J-Ym6jks5qw6t8gaJpZM4KKyl2
.

We should find a way to get back to the middleware...
My sample branch adds a new function (call it redirectClean, redirect2... whatever), that throws an exception intercepted by the dispatcher... It's the only way I can see to do get back directly to the dispatcher (but for sure @KorvinSzanto's good ideas are welcome).
We can't simply throw this new exception inside the current redirect method, because it will break current code like this:
public function action()
{
    try {
        if (!User::isLoggedIn()) {
            $this->redirect('/login');
        }
        // action code
    }
    catch (\Exception $x) {
        // show the error
    }
}

I splitted this PR in two: #4483 and #4484


Hosting view hierarchy for platform view : 0 Using PlatformView on Android with Kotlin

Steps to Reproduce

using PlatformView for showing my Android Native View From third party Native android SDK.
Currently UI is integrated, but it's not consistent, UI not always shows, here is logs please check.

I/PlatformViewsController: Hosting view in view hierarchy for platform view: 0
E/FrameEvents: updateAcquireFence: Did not find frame.

Expected results: <!-- what did you want to see? --
I want to see my UI always when i try to open
Actual results:
Currently UI is very random only show's some time.

Code sample
internal class NativeView(context: Context, id: Int, creationParams: Map?)  PlatformView {
val creationParams = args as Map<String?, Any?>?
return NativeView(context, viewId, creationParams)
}
}
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: const MyView(),
);
}
}
class MyView extends StatelessWidget {
const MyView({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
// This is used in the platform side to register the view.
const String viewType = '';
// Pass parameters to the platform side.
const Map<String, dynamic> creationParams = <String, dynamic>{};
return PlatformViewLink(
  viewType: viewType,
  surfaceFactory: (context, controller) {
    return AndroidViewSurface(
      controller: controller as AndroidViewController,
      gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
      hitTestBehavior: PlatformViewHitTestBehavior.opaque,
    );
  },
  onCreatePlatformView: (params) {
    return PlatformViewsService.initSurfaceAndroidView(
      id: params.id,
      viewType: viewType,
      layoutDirection: TextDirection.ltr,
      creationParams: creationParams,
      creationParamsCodec: const StandardMessageCodec(),
      onFocus: () {
        params.onFocusChanged(true);
      },
    )
      ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
      ..create();
  },
);

}
}

Logs
I/okhttp.OkHttpClient: <-- END HTTP (1398-byte body)
I/PlatformViewsController: Hosting view in view hierarchy for platform view: 0
D/Surface: lockHardwareCanvas
E/OpenGLRenderer: fbcNotifyFrameComplete error: undefined symbol: fbcNotifyFrameComplete
E/OpenGLRenderer: fbcNotifyNoRender error: undefined symbol: fbcNotifyNoRender
E/FrameEvents: updateAcquireFence: Did not find frame.
D/Surface: lockHardwareCanvas
E/FrameEvents: updateAcquireFence: Did not find frame.
D/DecorView[]: onWindowFocusChanged hasWindowFocus true

Can you please elaborate on this by providing a GitHub repository for a complete example code that contains Flutter and Platform (Android) code?
Also, please provide the output of flutter doctor -v as well. Thank you!

 flutter doctor -v
[✓] Flutter (Channel stable, 3.7.1, on Ubuntu 22.04.2 LTS 5.19.0-35-generic, locale en_IN)
    • Flutter version 3.7.1 on channel stable at /home/martial/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7048ed95a5 (5 weeks ago), 2023-02-01 09:07:31 -0800
    • Engine revision 800594f1f4
    • Dart version 2.19.1
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/martial/Android/Sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /snap/android-studio/125/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (version 2022.1)
    • Android Studio at /home/martial/Documents/android-studio
    • Flutter plugin version 72.0.2
    • Dart plugin version 221.6096
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /snap/android-studio/125/android-studio
    • Flutter plugin version 72.1.1
    • Dart plugin version 213.7433
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (3 available)
    • 22041216I (mobile) • HAXOVGYPCMQSXSZ5 • android-arm64  • Android 12 (API 31)
    • Linux (desktop)    • linux            • linux-x64      • Ubuntu 22.04.2 LTS 5.19.0-35-generic
    • Chrome (web)       • chrome           • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Can you please elaborate on this by providing a GitHub repository for a complete example code that contains Flutter and Platform (Android) code? Also, please provide the output of flutter doctor -v as well. Thank you!

 flutter doctor -v
[✓] Flutter (Channel stable, 3.7.1, on Ubuntu 22.04.2 LTS 5.19.0-35-generic, locale en_IN)
    • Flutter version 3.7.1 on channel stable at /home/martial/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7048ed95a5 (5 weeks ago), 2023-02-01 09:07:31 -0800
    • Engine revision 800594f1f4
    • Dart version 2.19.1
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/martial/Android/Sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /snap/android-studio/125/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (version 2022.1)
    • Android Studio at /home/martial/Documents/android-studio
    • Flutter plugin version 72.0.2
    • Dart plugin version 221.6096
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /snap/android-studio/125/android-studio
    • Flutter plugin version 72.1.1
    • Dart plugin version 213.7433
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (3 available)
    • 22041216I (mobile) • HAXOVGYPCMQSXSZ5 • android-arm64  • Android 12 (API 31)
    • Linux (desktop)    • linux            • linux-x64      • Ubuntu 22.04.2 LTS 5.19.0-35-generic
    • Chrome (web)       • chrome           • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Please provide a complete example code as well. You may also try my example and compare with yours code to check the cause of the issue.

This issue i raised to check what is value 0.
I open the project and check in log there's is
PlatformViewsController com.example.test_platformviews       I  Hosting view in view hierarchy for platform view: 0
So i want to know what is view: 0 here?.

Steps to reproduce.
https://github.com/surajsahani/flutter-aar-demo.git

Use this link for my project demo.
Now install and open app, there's currently one button which will render correctly for first time.
Now kill the app and reopen application again, and UI will not show 2nd time.

I see you are using com.lib.loopsdk.core.customViews.TriggerButton on your sample code (activity_main.xml), it comes from 3rd library. And it isn't shown on the layout even the first time. Can you confirm it works on Android native project?
When I add a normal Button, it's displaying well:
<Button
    android:id="@+id/button_first"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/next"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

Yes it works in Native Code, here's complete source code, please check
https://github.com/surajsahani/Native-SDK-demo.git
Also attaching video for native code
https://user-images.githubusercontent.com/22853459/223324843-f9783351-4e17-4636-9169-6cfbd947a102.mp4

Thanks for providing the native project. I run it and can see the Android native project works normally.
But I still can't see that button displayed on all 3 of my devices when running Flutter project. What's your device information (OS, model)?
Are there any corresponding remote repository dependencies of these dependencies that you can use?
    implementation files('libs/logger-debug.aar')
    implementation files('libs/fct-loop-sdk-debug.aar')

Also, please retry this on the latest stable and master channels to check if it still persists or not.

This is my testing device information.
Device - Redmik50i
Specs below.

I am already in stable channel attachment below

However i will try again with master channel

After switching to master channel, issue still not fixed.

Demo video of master channel attaching below
https://user-images.githubusercontent.com/22853459/223414953-be9183ff-a49a-427d-9523-adc4c12317ab.mp4

I can see that button is shown but need to run with profile mode. And the issue doesn't happen even when bringing app to the background and back to the foreground (as steps you did in the video).
Verified on Realme 6, Android 11, profile mode.

Demo
https://user-images.githubusercontent.com/104349824/223614065-fe96dab5-ffee-4301-b82e-d866d6e3eade.mp4

Please retry and confirm if it also works for you on profile mode.

In Profile mode also View is not be rendered after reopening app.
https://user-images.githubusercontent.com/22853459/223653062-0d011a44-782d-4165-b0a7-8563a2237ae5.mp4
this behavior should be same in all mode like debug profile, release because i need  release mode for further development process.

I see that you also have another issue here https://github.com/flutter/flutter/issues/121973 and it seems to be similar to this one. Duplicate issues should be grouped into a single issue, so everyone can focus on identifying the problem.
Also, since the issue can be reproducible on another device as well (demo at https://github.com/flutter/flutter/issues/121973#issuecomment-1459655819) and it was labeled, I will close this issue in favor of  #121973. If there are any different points that I miss here, please write in the comments and I will reopen this for further discussion.


[GSoC] Common Verilog Generation API and Implementation in temp-sense-gen

Part of #211.
Changes

Added a common Python module in openfasoc/generators/common.
Added a common function for Verilog generation using Mako templates.
Added Mako as a dependency in requirements.txt.
Used the new Verilog generation function in the temp-sense-gen generator.
Converted temp-sense-gen Verilog source code to Mako templates.
Added tests for the new Python module in tests/ which are run by the pytest module in the CI (test_code.yml workflow)
Updated the documentation in docs/ to reflect the changes in filename and the new Mako-based templating format.

Results

The changed temp-sense-gen generator flow runs without any issues.

@alibillalhammoud can you review too?

Apologies for the late response, I didn't knew that I was requested a review on this. Let me review this by today.

@saicharan0112 thanks! Any comments?


$0 rendered as $--

Is there a way to use format-money and have $0 render as $0 ad not $--?
Thanks!

Sorry, I probably missed this 6 months ago while on holidays and when I went back I declared github notifications bankruptcy.
I think that accounting.js can do that, but I'm no expert. Probably the docs can help: http://openexchangerates.github.io/accounting.js/


Get rid of TokenizerHelper

Codecov Report

Merging #24 (133bc87) into main (273635d) will decrease coverage by 0.43%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main      #24      +/-   ##
============================================
- Coverage     95.23%   94.79%   -0.44%
+ Complexity      372      365       -7
============================================
  Files            24       23       -1
  Lines          1071     1019      -52
============================================
- Hits           1020      966      -54
- Misses           51       53       +2

Impacted Files
Coverage Δ

src/Token/Tokenizer.php
96.93% <100.00%> (+0.10%)
:arrow_up:

src/Environment/StubbedEnvironment.php
91.30% <0.00%> (-8.70%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 273635d...133bc87. Read the comment docs.


Fix compilation warnings, fix FrameBitmap and improve docs

This fixes the FrameBitmap which resolves the problems with the heap and memory mapping errors.
It also improves GDB support.

not sure what is up with the build but it should be working


dequeue: acknowledge messages that fail to process

This commit refactors ingest so that we also ack messages that we cannot
process. This ensures that the messages that fail don't get stuck at the
top of the queue. Messages that fail are not cleaned up, so they will
get re-queued eventually. This helps un-block processing of messages.
Signed-off-by: Lucas Servén Marín<EMAIL_ADDRESS>

We should still avoid adding the url of the failed item to the webhook event

We should still avoid adding the url of the failed item to the webhook event

When the process fails, there is no URL so we skip adding it because u is nil. Do we want to make this more explicit?


restic stats EOF

Output of restic version
$ restic version
restic 0.9.2 compiled with go1.10.3 on linux/amd64
How did you run restic exactly?
RESTIC_REPOSITORY, RESTIC_PASSWORD, RESTIC_STAUTH, RESTIC_USER, RESTIC_KEY
restic snapshots --> list all snapshots (no issue)
restic stats --mode raw-data --json
EOF
What backend/server/service did you use to store the repository?
QNAP Object Storage App (OpenSwift keystone v1).
Expected behavior
I expected to see the normal/json output.
Actual behavior
It seems to timeout after a minute:
$ time restic stats --mode raw-data --json
repository a84f0978 opened successfully, password is correct
EOF
real	1m4.149s
user	0m59.944s
sys	0m1.935s
Steps to reproduce the behavior
Anytime I run the command it exits with same timings.
Do you have any idea what may have caused this?
A 60s timeout. I'm through a VPN but both lines are 30/30Mbit. Same command launched remotely returns the correct values. Adding strace to the command results in a few...
futex(0xf91720, FUTEX_WAIT, 0, {0, 100000}) = -1 EAGAIN (Resource temporarily unavailable)
Do you have an idea how to solve the issue?
Maybe the issue is on the QNAP old and buggy swift v1 stack, anyway it seems only a timeout issue and maybe it could be easly fixed.
Did restic help you or made you happy in any way?
:)

Since we haven't received any feedback in a long time I'm closing this issue for now. Please add a comment or open a new issue if the problem persists. Thanks!


Enable PV for registry storage backend.

By default, installer use EmptyDir for registry storage and this is not suitable during stop=>start scenario where user have some images to imagestream. We already have 30 pv, one of them can be used for registry side.
$ oc get deployment image-registry -oyaml | grep -A3 -i volumes
  volumes:
  - emptyDir: {}
    name: registry-storage

Fixed by #116

Looks like we need to change the configs.imageregistry.operator.openshift.io as mentioned in the https://docs.openshift.com/container-platform/4.2/registry/configuring-registry-storage/configuring-registry-storage-baremetal.html documents.

Fixed by #121


More delegate methods and improved UX

First, great library.  Thanks for building it. After incorporating it into my own project I discovered a few things I wanted to change.  Added a few items below:
More delegate methods: (1) When search results return exactly one matching item (2) When user taps on search result in list (3) When user taps on map and geocode returns a result (4) User selects an annotation on the map that was added from a search result.
Map improvement: when user taps on search table entry, hide the table and zoom the map to that location
UX improvements: (1) added a public accessible ratio to control how large the expanded stack can be relative to the height of the view. (2) Don’t popup alert dialog when user clicks on the map and geocode search comes back - instead let delegate decide what to do. (3) Removed code that causes an undesirable behavior: when user scrolls in the table view and hits the top, the table slides out of view.

Updated to keep controller/self as first parameter, and moved CLLoationCoordinate2D to Extensions folder as suggested.
Regarding optionals on delegate methods.....could do that but would make the protocol @objc.  Not sure if that would be a breaking change anyway.


Rectangle-Rectangle Collision AABB Optimization

In case two rectangles are axis aligned, their collision detection can be optimized with a simple AABB check instead of a SAT check.

Implemented in the commit 93a5afcdcfeac0be6defbf8e346a22ff198ca7c3.


Add firstOrFail and sole methods

Description
This PR introduces the firstOrFail() and sole() methods, which shares a similar API to Laravel Collections.
Examples
firstOrFail:
collect().firstOrFail();

// Error ("Item not found.")  thrown

collect([1]).firstOrFail();

// 1

sole:
collect([1, 2]).sole();

// Error ("Multiple items found.") thrown

collect([1, 2]).sole(item => item > 2);

// Error ("Item not found.") thrown

collect([1, 2, 3, 4]).sole(item => item > 3);

// 4

collect([1]).sole();

// 1

Let me know if you have any questions/comments/concerns. Thanks for your time! ❤

Note: I didn't create custom errors to throw (i.e. ItemNotFoundError/MultipleItemsFoundError) like Laravel throws for its exceptions. Let me know if you'd like this implemented 👍

Hi, @stevebauman
Thank for a great PR.
I have a couple of requests to be compliant with the Laravel API.
Both methods are missing parameters.
Missing paramenters for firstOrFail method.
Look at Laravel source;
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Collections/Collection.php#L1180
Add tests where all parameters are used in different ways.
You may look at Laravel test suite;
https://github.com/laravel/framework/blob/8.x/tests/Support/SupportCollectionTest.php#L161
Missing parameters for sole method.
Look at Laravel source;
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Collections/Collection.php#L1151
Add tests where all parameters are used in different ways.
You may look at Laravel test suite;
https://github.com/laravel/framework/blob/8.x/tests/Support/SupportCollectionTest.php#L75

Hi, @stevebauman
Thank for a great PR.
I have a couple of requests to be compliant with the Laravel API.
Both methods are missing parameters.
Missing paramenters for firstOrFail method.
Look at Laravel source;
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Collections/Collection.php#L1180
Add tests where all parameters are used in different ways.
You may look at Laravel test suite;
https://github.com/laravel/framework/blob/8.x/tests/Support/SupportCollectionTest.php#L161
Missing parameters for sole method.
Look at Laravel source;
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Collections/Collection.php#L1151
Add tests where all parameters are used in different ways.
You may look at Laravel test suite;
https://github.com/laravel/framework/blob/8.x/tests/Support/SupportCollectionTest.php#L75

Hey @ecrmnn! Ok I can add the parameters in.
Though, the following methods in CollectJS don't follow the same parameter convention that exists in Laravel:

contains() - Missing operator
doesntContain() - Missing operator
duplicates() - Missing callback
every() - Missing operator and value

Great!
They were correct once, but Laravel Collections keep getting improved all the time so unfortunetly some methods are missing some parameters. I'm sporadically working on updating these.
For new methods though, we should follow the current API.

Ok, I've refactored the methods to follow the Laravel API to the "T". I've also refactored the tests to be identical to Laravel's test suite that you've linked.
This refactoring also includes the extraction of the where comparisons to a new helper method named directly after Laravel's helper method operatorForWhere, which returns a "filter" callback, executing the comparison operation against the given operator.
Let me know if you'd like any further adjustments. Thanks for your time! ❤


Not refunded yet

@monyxcoin can u restore the btc I deposited in the image below, that 140 monyx is when it is in ICO stage at $0.60.

@loydz21 check

@monyxcoin Sir?


fix(node): will no longer error mixing RxJS 6.3 and 6.2

updates isTrustedSubscriber to check for _addParentTeardownLogic

resolves #4077

we don't need check for both for prior version?

@kwonoj not really, if _addParentTeardownLogic is present, the other one will be there. Unless someone tries to write their own clever, forked version of RxJS and mix it with 6.3.

gotcha. Go for it 🚢

Coverage remained the same at 96.96% when pulling 111971b9f68a75dde110d95a55fe14ded83d4914 on benlesh:fix-hansl-stuffs into 4dde71be074936d9911642f98491f8c67942b433 on ReactiveX:master.


livebook: doesn't work as a service

Describe the bug
livebook doesn't seem to work as a module
Steps To Reproduce
Steps to reproduce the behavior:

follow livebook service example
enter any env variables or use environment file with any variables
nixos-rebuild switch

first of all, its systemd unit does not appear to start by default. so i did systemctl --user daemon-reload and systemctl --user start livebook.service
but it doesn't work, i can't access it either by IP or by domain, which is set up in my nginx configuration as a reverse proxy. some strange things happen while the unit is active [1st screenshot]. also there's nothing in the journal except info messages about the unit itself
as i see it, livebook fails to start, but the service is active because something is going on with /dev/urandom inside this ..livebook-wrapped-wrapped wrapper script
i tried to make it work several different ways: from using environment option instead of my environment file to writing my very own systemd unit in NixOS configuration file, also using home-manager like so:
  # ...
  systemd.user.services = {
    livebook = {
      Install = { WantedBy = [ "default.target" ]; };

      Service = {
        ExecStart = "${pkgs.livebook}/bin/livebook start";
        KillMode = "mixed";
        Restart = "always";
        EnvironmentFile = "/var/lib/livebook.env";
      };
    };
  };
  # ...

but that doesn't work too. surely i tried starting livebook manually - LIVEBOOK_PORT=3333 LIVEBOOK_PASSWORD=pretty_password LIVEBOOK_DATA_PATH=/var/www/livebook livebook start
and it works as expected [2nd screenshot]
Expected behavior

livebook module/service works and is accessible
custom systemd livebook unit works and is accessible

Screenshots

Additional context
NixOS 24.05.3214.575f3027caa1 (Uakari) x86_64 running on a VPS
Notify maintainers
cc @Munksgaard
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.41, NixOS, 24.05 (Uakari), 24.05.3214.575f3027caa1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

@q60: Thank you for reporting this issue. I am ashamed to admit that I have actually known about this for a while now, without doing anything about it. Now that someone else is having problems with the service, I'll prioritize getting something done soon.
I'm not actually sure what's going wrong, but it seems like the service hangs in the tr command. As far as I remember it ends up using 100% cpu and just loop forever. I'll try to take a look at it later this week.

@scvalex Perhaps you have encountered this issue as well?

I've seen this before and I think it was because livebook was trying to generate a LIVEBOOK_COOKIE in some weird way.
This is my current configuration which works:
      services.livebook = {
        enableUserService = true;
        package = pkgs.livebook;
        environmentFile = "/home/scvalex/repo/infra/secrets/passwords/livebook";
        extraPackages = with pkgs; [ gnumake gcc git ];
      };

LIVEBOOK_PASSWORD = "a long string which is my password"
LIVEBOOK_NODE = "livebook"
LIVEBOOK_PORT = 30123
LIVEBOOK_IFRAME_PORT = 30124
LIVEBOOK_COOKIE = "livebook"

@q60 Could you try manually setting a LIVEBOOK_COOKIE in your service setup, please?

@Munksgaard a screenshot from btop filtering cpu usage
not so much is used
@scvalex i've tried setting up a cookie and you can see it works - https://livebook.hiiaka.xyz/ :pleading_face:
thanks!!!! >~<

The issue seems to have been described and debugged here: https://github.com/livebook-dev/livebook/issues/2691
The solution is to set IgnoreSIGPIPE=false in the systemd service configuration.  I'll mint a PR.


Gulp Stylesheet tasks

Compiling, processing, and moving fies necessary for using custom sylesheets as well including tailnd css for development. Production sequencing to be done later on a seperate PR.

currently working on the main WP style.css functions for the main thame and the child theme

WP Child style.css function completed and working for both development and production. Next up is work on the styles.css file for the main theme section.


Have ~/.config/clearine/clearine.conf as alternative config path?

Is it possible to add ~/.config/clearine/clearine.conf  as another config path?
This would allow users who use stow to manage their dotfiles to manage their clearine config with ease as well :)

is ~/.config/clearine.conf isn't enough for you ?
Okay then


String.naturalCompare is not a function

so, I have this task:
gulp.task('inject-all', function () {
return gulp.src('app/index.html')
.pipe(
$.inject(
gulp.src('.tmp/**/.js')
.pipe($.plumber())
.pipe($.naturalSort())
.pipe($.angularFilesort()),
{
ignorePath: '../.tmp',
relative: true,
}))
.pipe(
$.inject(
gulp.src('.tmp//styles/*.css', {read: false}),
{
ignorePath: '../.tmp',
relative: true,
}))
.pipe(gulp.dest('app'));
});
when gulp run .pipe($.naturalSort()), i have this error in console:
TypeError: String.naturalCompare is not a function
at /Users/diel/Documents/localhost/public/teste/node_modules/gulp-natural-sort/index.js:16:21
at Array.sort (native)
at Stream.onEnd (/Users/diel/Documents/localhost/public/teste/node_modules/gulp-natural-sort/index.js:15:11)
at _end (/Users/diel/Documents/localhost/public/teste/node_modules/gulp-natural-sort/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/diel/Documents/localhost/public/teste/node_modules/gulp-natural-sort/node_modules/through/index.js:74:5)
at DestroyableTransform.onend (/Users/diel/Documents/localhost/public/teste/node_modules/gulp-plumber/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
at DestroyableTransform.g (events.js:260:16)
at emitNone (events.js:72:20)
at DestroyableTransform.emit (events.js:166:7)
at /Users/diel/Documents/localhost/public/teste/node_modules/gulp-plumber/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
you can help me? i don't understand because Yesterday this error did not exist, but today this error occurred even the task being identical.
thanks.

Hello - I just added a pull request to fix this issue.
https://github.com/emgeee/gulp-natural-sort/pull/2
Just waiting on acceptance of the pull request...
Thanks.

I went ahead and merged @mcgrews3 PR. @dielduarte can you confirm this fixes your issue?

yes, this merge resolves my problem. thanks @mcgrews3  and @emgeee

Great

Just curious if this has been published to npm as of time of ticket closing? We're seeing the same behavior currently.
/var/spool/ecbuild/bamboo-agent-home/xml-data/build-dir/CENG-WU183-RUNWEFT/cloud-webui/node_modules/gulp-natural-sort/index.js:16
      return String.naturalCompare(a.relative.toLowerCase(), b.relative.toLowe
                    ^
TypeError: Object function String() { [native code] } has no method 'naturalCompare'

@jmartin4563 you update for 0.1.1?

i just did, worked like a charm, thanks for the quick turnaround!! :+1:


Remove all btn

I rule and have completed some work on Case Manager that's ready for review!
A couple additional things from @tingaloo 's work in #1274 --

renames existing clear_call_list method to be clearer about intent, and adds a clear_call_list method that does what this is supposed to
removes need for associated user id in params, running off current user...  Not sure why and am not in a mind to fix it tonight.
This pull request makes the following changes:

Adds remove all patients from your call list btn
some other assorted cleanup

TK integration test, model test.

It relates to the following issue #s:

Fixes #1202

Man you really want that associated user id gone lol

Codecov Report

Merging #1336 into master will decrease coverage by 8.59%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #1336     +/-   ##
=========================================
- Coverage   88.42%   79.82%   -8.6%
=========================================
  Files          61       61
  Lines        1356     1393     +37
=========================================
- Hits         1199     1112     -87
- Misses        157      281    +124

Impacted Files
Coverage Δ

app/models/user.rb
98.91% <100%> (+0.02%)
:arrow_up:

app/controllers/users_controller.rb
66.66% <100%> (+2.38%)
:arrow_up:

app/controllers/external_pledges_controller.rb
0% <0%> (-96.3%)
:arrow_down:

app/controllers/configs_controller.rb
0% <0%> (-89.48%)
:arrow_down:

app/models/concerns/callable.rb
52.94% <0%> (-47.06%)
:arrow_down:

app/models/concerns/notetakeable.rb
55.55% <0%> (-44.45%)
:arrow_down:

app/models/concerns/statusable.rb
69.23% <0%> (-30.77%)
:arrow_down:

app/models/concerns/urgency.rb
47.36% <0%> (-26.32%)
:arrow_down:

app/models/concerns/history_trackable.rb
83.33% <0%> (-16.67%)
:arrow_down:

app/models/concerns/exportable.rb
81.48% <0%> (-14.82%)
:arrow_down:

... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2eb277b...76e3fe8. Read the comment docs.

@tingaloo haha sure do. I'd like to get it out of the add patient to call list stuff too but that's a more involved change that touches a lot of stuff, so maybe later.
I think this is good to go, would you mind reviewing if you get a chance? It's pretty much everything you did with the slight routing change, but would love a second set of eyes.

Yep, clear call list is the frontend action, and clean call list between
shifts empties things out when someone hasn't logged in in a bit.
I couldn't really come up with better names on the spot, haha -- do you
think there's a better option here?
On Sat, Dec 23, 2017, 1:27 PM Lew<EMAIL_ADDRESS>wrote:

@tingaloo commented on this pull request.
Left a little confused about the additional methods, an explanation would
be great for those.
In app/models/user.rb
https://github.com/DCAFEngineering/dcaf_case_management/pull/1336#discussion_r158586926
:

@@ -143,7 +142,7 @@ def ordered_patients(lines = LINES)
ordered_patients
end

def clear_call_list

def clean_call_list_between_shifts

I'm trying to understand the difference between #clear_call_list and
#clean_call_list_between_shifts.
The only time #clean_call_list_between_shifts is called is during the
test cases is because there is additional logic dealing with last sign in?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/DCAFEngineering/dcaf_case_management/pull/1336#pullrequestreview-85427529,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADsA9MlooVT4h9zvdWHNrCKbKPH14pNdks5tDUYlgaJpZM4RElLf
.

@tingaloo yeah, 'nuke an associated set' doesn't really have a REST verb associated with it, so this kinda thing is a little tough! Thanks for your eyes on this.


[BEAM-7154] Updating Go SDK errors (Part 3 - Final)

Updating standard Go error functionality (errors.New and fmt.Errorf) to use the newly added Beam "errors" package. This PR covers the core subdirectory under sdks/go/pkg/beam.
I tried to keep the actual changes as straightforward as possible:

If a call isn't wrapping another error, replace it with New or Errorf. This should be functionally identical.
If a call is wrapping another error, replace it with either Wrap or WithContext using my best judgement. I generally used Wrap when the wrapped error originates from third-party code (i.e. any non-Beam package), and I tried to use WithContext otherwise.
WithContext messages make the most sense in present tense (e.g. "doing foo", "reading bar"). This means I had to adjust some messages slightly, as little as I could without losing any useful information.
For existing error messages that combined context and errors, I moved the context part to a separate line using WithContext, to improve legibility.

This is the last PR for migrating to the new errors package.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

R: @lostluck


[bugfix]update node_controller.go

Reproduction steps:

Start mysql-operator.
Start the mysql instance.
Wait for all mysql instances to run successfully.
Close mysql-operator (to simulate network failure, node down, etc.).
Restart the node containing the mysql instance(Machine reboot).
The mysql instances on these nodes will start automatically, but since init will set configfure to 0.
Wait for all these nodes to stop changing.
Start mysql-operator, which will not automatically repair the current cluster because it is listening to the updated pod.
and the mysql cluster is in an unhealthy state due to configfure=0.

closes/fixes #xyz

[x] I've made sure the CHANGELOG.md will remain up-to-date after this PR is merged.

@cndoit18

operator will do noting @cndoit18

@cndoit18

@cndoit18 I have done changelings.

@cndoit18 any suggestion？

@cndoit18
@milero

@cndoit18
@milero
PTAL

does it fix this issue https://github.com/bitpoke/mysql-operator/issues/416 ?

does it fix this issue #416 ?

We are using bitpoke operator 0.6.3 and encountered bug #416 today, so no, it does not fix the issue.


[stable/elasticsearch-curator] curator fails with "requests_aws4auth"…

… python module error #16672
The docker image being used is untergeek/curator:5.7.6.
It doesn't cleanup indices and fails with error above.
On top of that, it has no associated Dockerfile or Git repository
which is on the face of quite unsafe.
The new image bobrik/curator:5.7.6 works fine and widely used.
It has Dockerfile associated with it and github repo.
Signed-off-by: Divyang Patel<EMAIL_ADDRESS>
What this PR does / why we need it:
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #16672

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @gianrubio