Is there a way to specify cipher suites for TLS 1.3

If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
<EMAIL_ADDRESS>where the issue will be triaged appropriately.
Title: Is there a way to specify cipher suites for TLS 1.3?
Description:

According to https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto, cipher_suites parameter is ignored when negotiating TLS 1.3. Is there a way to configure cipher suites for TLS 1.3? Specifically, I want to forbid using TLS_CHACHA20_POLY1305_SHA256.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

I'll leave this for the TLS experts however my understanding is that the cipher's for TLS 1.3 are not configurable by design. I recall a discussion with @PiotrSikora where he confirmed that specifying cipher suites like below would be ignored in TLS 1.3
"tls_params": {
    "cipher_suites": [
        "[ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]",
        "[ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]",
        "ECDHE-ECDSA-AES256-GCM-SHA384",
        "ECDHE-RSA-AES256-GCM-SHA384"
    ],
    "tls_maximum_protocol_version": "TLSv1_3",
    "tls_minimum_protocol_version": "TLSv1_2"
},

Correct, TLS 1.3 ciphersuites in BoringSSL are hardcoded (see:  BoringSSL's ssl.h#1496).
OpenSSL added SSL_set_ciphersuites to configure TLS 1.3 ciphesuites, but that API is missing in BoringSSL. cc @davidben
It's a good question regarding TLS 1.3 and TLS_CHACHA20_POLY1305_SHA256. Perhpas we shouldn't have allowed TLS 1.3 in FIPS builds and the default maximum supported version was incorrectly changed from TLS 1.2 to TLS 1.3 in #12114?
@agl do you have any thoughts on that?

It will be great for BoringSSL to provide the API to configure TLS 1.3 ciphersuites just like OpenSSL. It's ok for us to allow TLS 1.3 in FIPS builds and we could manually set the maximum TLS version to TLS 1.2 if it's really needed.

Hi,
Re-opening to get traction on this ticket.
@PiotrSikora / @agl : Could you confirm the possibility of removing TLS_CHACHA20_POLY1305_SHA256 in the FIPS build? Or allowing a way to configure the TLS 1.3 ciphers?

BoringSSL recently added SSL_CTX_set_compliance_policy(ssl_compliance_policy_fips_202205), which does exactly that, but it won't be available in FIPS builds until BoringCrypto fips-20220613 is validated, which might take up to a year.

@PiotrSikora Could you clarify the need to wait for new validation? Looks like the diff touched only the ssl-related files and not anything under crypto/fipsmodule, so can we just consume the latest BoringSSL reusing the previously validated BoringCrypto?

I'm absolutely not an authoritative person on the topic, but my conservative interpretation of FIPS validations is that you must use the specific commit SHA that has been validated.
Also, BoringCrypto is the name used for FIPS validated version of BoringSSL, but it's the same library, so you cannot use crypto bits from 2019 with TLS bits from 2022.

@PiotrSikora could you suggest, how to watch validation status fips-20220613 BoringCrypto?

could you suggest, how to watch validation status fips-20220613 BoringCrypto?

See NIST's page and search for "BoringCrypto".

@PiotrSikora could you suggest, how to watch validation status fips-20220613 BoringCrypto?

https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4407
fips-20220613 is https://boringssl.googlesource.com/boringssl/+/853ca1ea1168dff08011e5d42d94609cc0ca2e27
The "Software Versions" on the certificate lists 853ca1ea1168dff08011e5d42d94609cc0ca2e27

@reedloden I believe the fips-20220613 certification won't be sufficient to actually use any of TLS 1.3 ciphers to claim FIPS.
Although SSL_[CTX_]_set_compliance_policy is available in the branch, it looks like the actual TLS 1.3 KDF commit into fipsmodule made after that branch cut https://boringssl.googlesource.com/boringssl/+/480344d4fa03319efa29cdca41f051c41f5bf95a.


java.lang.NoClassDefFoundError exception

Hi
Thanks for this great wrapper, first of all
The issue I've been messing around in a last couple of days is the exception mentioned in the subject, which is thrown in runtime. The trivial things like playing dependencies definitions and their scopes in pom.xml did not help, the local maven repositories and paths seem to be OK.
The stack is as the following:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class ```
com.squareup.jnagmp.LibGmp
	at com.squareup.jnagmp.Gmp.<init>(Gmp.java:175)
	at com.squareup.jnagmp.Gmp.<init>(Gmp.java:33)
	at com.squareup.jnagmp.Gmp$1.initialValue(Gmp.java:133)
	at com.squareup.jnagmp.Gmp$1.initialValue(Gmp.java:131)
	at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
	at java.lang.ThreadLocal.get(ThreadLocal.java:170)
	at com.squareup.jnagmp.Gmp.modPowInsecure(Gmp.java:95)

The relevant pom.xml section:
<dependencies>
		<dependency>
			<groupId>com.squareup.jnagmp</groupId>
			<artifactId>jnagmp</artifactId>
			<version>2.1.0</version>
		</dependency>
..........
		<dependency>
			<groupId>com.squareup.jnagmp</groupId>
			<artifactId>bouncycastle-rsa</artifactId>
			<version>2.1.0</version>
		</dependency>
</dependencies>

Any ideas?
Thanks

@Koshak118 are you on the latest version?  Those line numbers make no sense based on the current source code I'm looking at.

Hi @dragonsinth
Sorry for the delayed answer, was with a limited access to the internet for a couple of days
Upgrading the code to the latest version didn't fix a crash; what did fix it is trying to run the code on Mac rather than on Windows, so it looks like it was an environment setup issue
As far as I am concerned you can close the issue
Thanks for the assistance

Ah, yes.  We don't provide a pre-built binary libgmp for Windows.  You'd need to build libgmp yourself.


Fixed incorrect implementation of Content-Type check in MediaService

1. Why is this change necessary?
https://github.com/shopware/platform/issues/2196
2. What does this change do, exactly?
Changes a incorrect Content-Type check fron $contentType === 'application/json' to strpos( $contentType , 'application/json' ) === 0
3. Describe each step to reproduce the issue or behaviour.
https://github.com/shopware/platform/issues/2196
4. Please link to the relevant issues (if any).
https://github.com/shopware/platform/issues/2196
5. Checklist

[x ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[-] I have created a changelog file with all necessary information about my changes
[-] I have written or adjusted the documentation according to my changes
[-] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Switch to github.token

Coverage remained the same at 100.0% when pulling 28c9b25c3bf55c86bd828baa42dc6bc698a19546 on switch-to-github-token into 2504956d8a5a2a54b379ee1c88cf75358c057f6e on main.


[index] instrument merger with stats and make interface more like compiler

this change instruments dictionary merger to retrieve stats about number of deleted/overwritten keys

Coverage decreased (-0.07%) to 93.12% when pulling ae12bb23b2d90880f1d66e6d5604b6248e531c71 on hendrikmuhs:index-instrument-merger into 1037513e208db2795dd264acd355e3456df94b96 on KeyviDev:index.

Some explanation for that change:
This goes beyond 'useful information' but has the following usecase: An 'append merge' - which only concatenates value stores - is much cheaper than a real merge. With instrumenting the merger and being able to get the stats about merging, the caller can track 'wasted space' in the value store.
E.g. the segment merger in the index can decide to do 'append merges' until certain thresholds are reached and then do a real merge to free up the wasted space.
FWIW I decided against letting the merger embed the stats. The caller can do that via manifest.

Sounds cool!

LGTM


New routes not detected on Windows

Noticed this with Epic Stack and was able to nail down the issue as remix-flat-routes. Weird that no one caught this before:
What version of Remix are you using?
v1.18.1
Are all your remix dependencies & dev-dependencies using the same version?

[X] Yes

Steps to Reproduce
(As a sanity check, I was able to confirm that this is unrelated to v2_dev server.)

On a Windows environment, clone the bug repo https://github.com/xHomu/remix-v2-server/tree/flat-route-bug
npm install; npm run dev
Create app/routes/test.tsx and a basic export default component.
Visit localhost:3000/test

Expected Behavior
See the test route.
Actual Behavior
404 Not Found thrown.

If we restart the dev server manually, localhost:3000/test renders correctly.
Edits to existing route files work as expected.
If we comment out flat routes in remix.config and repeat steps 1-4, localhost:3000/test renders correctly without error.

Possible related issue from remix core: https://github.com/remix-run/remix/pull/6293/files

Ok, there are a couple of things.

It appears that Remix wants the filename normalized to / separators, even on Windows. I normalize the route id, but keep the filename as the original path. I'll update that.
In your remix.config, you need to make sure you to update ignoredRoutesFiles to ['**/*'] (ignore all files). Otherwise, the v2 convention will pick them up. You can still ignore files by passing them in options to the flatRoutes() function.

Ops, fixed #2. Any idea why this only occurs during dev and not if we manually restart?

I just updated my workaround with a fix. I have a feeling the new dev server expects / paths only to determine if it was a route file that changed.

Let me know if that fixes the issue, and I'll be sure to include that in the next update.

Before I forgot, Happy Independence Day!

Thanks. Yeah, I've got a couple of other changes then I'll push out the fix.

Will the next package be released pretty quickly, or we should go ahead and implement the workaround for now for the Epic Stack?

Ok, I pushed out v0.5.9 which includes the fix.

Can confirm v0.5.9 fixed the bug. Thanks again, @kiliman!


The book doesn't show in inventory page

Do you want to fix this issue? I will assign you if you want to work.


Add support for Nuxt3

Is your feature request related to a problem? Please describe.
As a user I want to be use Druxt with Nuxt 3.
Describe the solution you'd like

[ ] Test Druxt modules with Nuxt 3

Describe alternatives you've considered
N/A
Additional context
https://v3.nuxtjs.org/

Hi @Decipher, we are currently trying to migrate only the "druxt" package to evaluate how much effort a migration would be.
When we are ready, we will document the migration path here, and we can discuss the next steps. Currently, we are not sure if a side by side migration (vue2, vue3) is possible or either makes sense. But let discuss this later.
What do you think? Thanks!

Hi  @Decipher we decided to build our Component Library with vue-demi and skip the migration for now. Maybe vue-demi would also be a option for  druxt.

Hi @christianwiedemann,
Thanks for the update. I have not looked at vue-demi, but I will keep it in mind once I have the available bandwidth to give this issue.
Fingers crossed I have time to investigate further in the coming weeks.

Hi, Nuxt 3 is RC so status of this issue can be updated.
https://nuxtjs.org/announcements/nuxt3-rc/

Hi @Triloworld,
It's important that Druxt 1.0.0 is finalised before I personally can commit to Nuxt 3 / Vue 3.
It's definitely going to happen as a high priority after 1.0.0 though, and would appreciate any help in developing, documenting and testing.

Nuxt 3 is here! https://nuxt.com/v3

Looking forward to testing an beta

Do you know when the 2.0.0 is going to be developed ? Need some help @Decipher

Hi @gaetansenn,
Sorry I missed your message. I am taking steps towards the 2.0.0 development, and would absolutely love any help anyone is willing to provide.
I will be prototyping over the next few weeks to give me a better idea of what is required and how long I expect the work to take, but my development resources are limited due to day job and life.

Hi all,
I am nearing completion of the @nuxt/kit upgrade to Druxt and all core modules.
There will be breaking changes with the release as @nuxt/kit requires Node >=18 and requires a different module structure.
I invite everyone to test the code locally and provide feedback @ https://github.com/druxt/druxt.js/pull/697
This change is the precursor to Nuxt 3 support, of which development has already commenced and is well underway with the intent of a release that will support both Nuxt 2 and Nuxt 3 to simplify the upgrade process.


FE does not handle the case where the user does not have a balance of the gas token on the source network

Our UI does not handle the case where a user tries to send funds from one chain to another but does not have assets to pay for gas (xDai on xDai, etc.).
There are a few issues I will mention below, but see the attached video for the full flow.
Issues

MM does not allow you to execute the "approval" transaction by disabling the button. This may be a MM specific thing.
Sending a transaction produces and "Internal JSON-RPC error". I believe this is unrelated to the account balance.

I have verified that issue (1) above is solved by adding xDai to my account.
Possible Solution
Check the balance of the user prior to sending any transaction. Verify that they have the funds to perform the transaction and block MM from ever appearing & show something in the UI if they do not have enough funds.
https://user-images.githubusercontent.com/9441295/117226607-d942d680-adc9-11eb-9760-fc5f52737ad3.mov

No longer an issue. Closing.


Only main documentation is building

Currently only the main documentation is building. It would be good to get multisphinx working or create new steps in the release procedure to update previous versions of the docs.
FYI @larsoner

@rob-luke if it's okay, I'll:

Port over the MNE-Python doc build infrastructure (i.e., only build main and maint/0.2, each pushing to its own subfolder of mne-nirs GH pages branch)
Remove all sphinx-multibuild stuff
Copy over the static docs from the git history of the GH pages branch so that links to things like 1.2.0 work
Change release notes to a wiki so that every change does not cause a commit/CI run
Update release notes with instructions for how to archive the current stable site

Is this plan okay with you?
If so, this plan will take care of this issue and #436

This would be amazing @larsoner , the closer we can mirror MNE-python infrastructure the better.
Except step 4, can we leave the procedure in the repo? As I often work from my laptop with spotty internet and like to have access to procedures still. But I'm only +0.8 on this, you can veto if you want.

No it's okay, I can [ci skip]. It probably doesn't get changed too often so doesn't waste too many resources...

Thanks


When calling endpoint from python (client) to dotnet (server) via unix-domain-socket I get Received RST_STREAM with error code 1

What version of gRPC and what language are you using?
dotnet

Grpc.AspNetCore.Server: 2.58.0
Grpc.Core.Api: 2.58.0
Grpc.Net.Common: 2.58.0
Grpc.Tools: 2.59.0

python3

grpcio: 1.59.0
grpcio-tools: 1.59.0
protobuf: 4.24.4

What operating system (Linux, Windows,...) and version?
OS: Ubuntu 22.04.3 LTS
Kernel: 6.2.0-34-generic #34~22.04.1-Ubuntu
What runtime / compiler are you using (e.g. python version or version of gcc)

dotnet 7.0.402
python 3.10.12

What did you do?

start grpc-server in dotnet, listening on a unix-domain-socket (works)
start a python client, connecting to the dotnet-server via the unix-domain-socket (channel creation works)
try to call a grpc-endpoint on the server (does not work)

I included a zip file with a small dotnet and python project, where the error is reproducible.
Both projects will need to have access to the same /tmp-folder in order to access the same unix-domain-socket.

start the dotnet project GrpcServer
execute the main.py from the python project

What did you expect to see?
I expected that I can make a request from the python client to the dotnet server via the unix-domain-socket.
What did you see instead?
When calling the method on the stub, I get the following exception:
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    information_response: InformationResponse = test_endpoint_stub.GetInformation(InformationQuery(
  File ".venv/lib/python3.10/site-packages/grpc/_channel.py", line 1161, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File ".venv/lib/python3.10/site-packages/grpc/_channel.py", line 1004, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.INTERNAL
	details = "Received RST_STREAM with error code 1"
	debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-10-20T14:55:33.607722177+02:00", grpc_status:13, grpc_message:"Received RST_STREAM with error code 1"}"
>

I also executed the python script with  GRPC_TRACE=all; GRPC_VERBOSITY=DEBUG, the full log is attached.
Anything else we should know about your project / environment?

I tried to start the dotnet server with GRPC_TRACE=all; GRPC_VERBOSITY=DEBUG but nothing happened, any pointers?
In the zip file included is also a small dotnet client, which connects via the same unix-domain-socket and can successfully execute the request.

dotnet-projects.zip
python.zip
full.log

Please file grpc-dotnet issues on grpc/grpc-dotnet repo


Date not save in creation

Laravel Version: 5.4.25
Voyager Version: 0.11.12
PHP Version: 7.1.5
Database Driver MySQL & Version: 5.6.32

Description:
Trying to use BREAD and create record with date, date not saving , but it saved in edit.

Labels: possible bug

@Maghraby, now that 1.0 has been released, could you please retest?

@fletch3555 will retest it today.

Thank you


CLIMATE-745 Report an Issue Link and @copyright year are incorrect in ocw-ui

This PR fixes https://issues.apache.org/jira/browse/CLIMATE-745

Merged build triggered. Test Failed.

Merged build started. Test Failed.

Merged build finished. Test Failed.


Retry create issue to cope with duplicate keys

This is a workaround for the potential race condition in models/issue.go (#7887).
Sadly, there seems to be no universal way of telling a duplicate key from other kinds of errors, so the way I did it was to assume all errors can be retried.
I could write some small util with hardcoded error number detection as suggested here. For instance, we could do this for MySQL:
if driverErr, ok := err.(*mysql.MySQLError); ok { // Now the error number is accessible directly
	if driverErr.Number == 1045 {
		// Handle the permission-denied error
	}
}

It doesn't look so good. Some examples:
MySQL
Error number: 1169
Message: Can't write, because of unique constraint, to table '%s'
MSSQL
Error number: 2601
Message: Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.
also
Error number: 2627
Message: Violation of %ls constraint '%.*ls'. Cannot insert duplicate key in object '%.*ls'.
PostgreSQL
Error number: 23505
Message: duplicate key value violates unique constraint "%s"
You get the idea.

Codecov Report

Merging #7898 into master will increase coverage by <.01%.
The diff coverage is 53.33%.

@@            Coverage Diff            @@
##           master   #7898      +/-   ##
=========================================
+ Coverage    41.4%   41.4%   +<.01%
=========================================
  Files         478     478
  Lines       63944   63950       +6
=========================================
+ Hits        26473   26480       +7
  Misses      34021   34021
+ Partials     3450    3449       -1

Impacted Files
Coverage Δ

models/issue.go
50.11% <53.33%> (+0.15%)
:arrow_up:

models/repo_list.go
73.09% <0%> (+1.01%)
:arrow_up:

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 a678ea4...78ee228. Read the comment docs.

I'm not sure this will completely solve the issues if e is a session in a transaction for two reasons:

I suspect a failed insert in the transaction will cause rollback of the entire transaction.
You might not actually get the error until the transaction tries to commit because it's at that point that the constraints are fully tested.

I think you have to put the retry at the router level.

Maybe we could add test for this to confirm it.

Maybe we could add test for this to confirm it.

That would be a problem. I couldn't figure out a good way of unit testing this, other than adding some ugly hook in newIssue() to force the error. I've been looking around but didn't find anything convincing. Suggestions are welcomed.
PS: This is the "ugly hooks" solution I thought of (definitely not pretty):
// There's no good way to identify a duplicate key error in database/sql; brute force some retries
dupIndexAttempts := issueMaxDupIndexAttempts
for {
	maxIndex, err := getMaxIndexOfIssue(e, opts.Issue.RepoID)
	if err != nil {
		return err
	}
	opts.Issue.Index = maxIndex + 1
	// Milestone and assignee validation should happen before insert actual object.
	// *********************************************************************
	_, err = e.Insert(opts.Issue)
        err = testHookShouldFail(err) // **** MY EYES, MY EYES! ****
        if err == nil {
		break
	}
	// *********************************************************************
	dupIndexAttempts--
	if dupIndexAttempts <= 0 {
		return err
	}
}

I suspect a failed insert in the transaction will cause rollback of the entire transaction.
You might not actually get the error until the transaction tries to commit because it's at that point that the constraints are fully tested.

@zeripath I think this is not the case: for many verbs (e.g. DELETE, UPDATE) you get the number of affected rows immediately after execution, INSERT does that as well, but its usage is less obvious (e.g. INSERT with conditions, or INSERT from SELECT). By looking into xorm code, the Insert is ultimately translated to a session.exec(sqlStr, args...), so I don't think there's any buffering involved.

I thought we should not pass the issue id explicitly, but rather letting the database do the assignment for us. Is that possible (and sane)?

I thought we should not pass the issue id explicitly, but rather letting the database do the unique id generation for us. Is that possible (and sane)?

@typeless This is not the ID value (which the database does set with an auto-increment) but the correlative issue number for that repository. i.e issue 1, issue 2, issue 3, push request 4, issue 5, etc.

@guillep2k oh, I see. So it's not the primary key but still required to be unique right?

@typeless Yes, and they should be consecutive too (i.e. not random). Since it's calculated by running max(index), there's a statistical chance that two instances could attempt the same "next" number and collide. That's the reason for the retry loop, which is not very elegant but might scale better than other alternatives.

I tried to add an integration test for it.
func TestNewIssueConcurrent(t *testing.T) {

        prepareTestEnv(t)
        session := loginUser(t, "user2")

        f := func(ctx context.Context, cancel context.CancelFunc, wg *sync.WaitGroup) {
                defer wg.Done()

                for i := 0; i < 200; i++ {
                        select {
                        case <-ctx.Done():
                                return
                        default:
                                issueUrl := testNewIssue(t, session, "user2", "repo1", fmt.Sprintf("Title %d", i), "Description")
                                if issueUrl == "" {
                                        cancel()
                                        return
                                }
                        }
                }
        }

        wg := &sync.WaitGroup{}
        ctx, cancel := context.WithCancel(context.Background())
        defer cancel()

        wg.Add(2)
        go f(ctx, cancel, wg)
        go f(ctx, cancel, wg)
        wg.Wait()
}

it turns out the newIssue operation is quite slow, so probably not suitable to be included in the test suite. And sometimes it would hang unexpectedly. It might be a bug in the test or another undiscovered bug.

I tried to add an integration test for it.

@typeless Very interesting. The problem I see is that this might or might not trigger the issue even before the PR, and that will depend a lot on server load, speed, luck, database used, etc. It won't be very reliable.
On mssql I could use some trigger to produce the error using the session's CONTEXT_INFO and a BEFORE INSERT trigger, so we could test the functionality in the integrations tests as a special case. This would have the advantage that the "ugliness" will reside in the test and not in the actual code. However, I think connection pooling might be a problem and I can't reliably test on all mssql versions.
PostgreSQL has the current_setting() function that also looks promising.

Can we make the id calculation during the insert by using a subrequest and retrieving the assigned id later ? Doing so the lock for the insert will be used for the subrequest for the id calculation and prevent any reading during the whole process.

this SO answer gives some insight.
We should be able to calculate the serial number per repo from the other fields: (id, Repo_id).

Can we make the id calculation during the insert by using a subrequest and retrieving the assigned id later ? Doing so the lock for the insert will be used for the subrequest for the id calculation and prevent any reading during the whole process.

@sapk  You mean in the tests or in the main code? I don't know if that's possible without resorting to engine specific features.

Now that I think of it, in plain SQL, I'd do:
insert into issue (repoid, index, title, body) values (4, (select max(index)+1 from issue as i2 where i2.repoid = 4), 'Some title', 'Some text');

This should be atomic in the database unless chaos isolation is selected, even if no transaction is in place. Downside is the direct SQL statement. I'll make another PR testing this.

@guillep2k that the kind of SQL query I was thinking and even if it a raw sql query it is a simple solution.
The SQL trigger suggested by @typeless could also be a good solution but I never tested across all SQL engine we support (it seems supported at least) and it should be setup at the db init.

For testing, you can re-use/inpire you from the pattern test that @typeless implemented for a sqlite lib improvement https://github.com/mattn/go-sqlite3/pull/439/files#diff-bd96d50843020c6a7e1423b5b913d554R121 and call multiple time newIssue

@guillep2k that the kind of SQL query I was thinking and even if it a raw sql query it is a simple solution.
The SQL trigger suggested by @typeless could also be a good solution but I never tested across all SQL engine we support (it seems supported at least) and it should be setup at the db init.

I'm messing around with xorm to make this work. I'll probably have to ask @lunny for some changes there so I can add an override expression to the inserted value (xorm currently doesn't let me do that, but has some boilerplate for it). Something like:
func (session *Session) InsertWithSubExpr(bean interface{}, exprlist map[string]*Builder) ...

Then I could do:
subexpr := make(map[string]*builder.Builder)
subexpr["Index"] = builder.Select("MAX(`index`) + 1").From("`issue`").Where(builder.Eq{"`repo_id`": opts.Issue.RepoID})
_, err = e.InsertWithSubExpr(opts.Issue, subexpr)

or something around those lines.

OK, so I've made several tests and it looks like the most robust way to do this would be with a manual insert. Something like:
INSERT INTO `issue` (`repo_id`, `poster_id`, ... ,`name`, `content`, ... ,`index`)
        SELECT $1, $2, ..., $14, $15, ..., MAX(`index`) + 1 FROM `issue` WHERE `repo_id` = $1;

Where $1, $2, etc. are the positional parameters. Then the value of index must be retrieved by querying the database back with getIssueByID() or something similar.
This is not directly supported by xorm, but I think all databases will handle this method correctly (here are some fiddlers for MySQL, MSSQL, Oracle, PostgreSQL, SQLite).
This should save us from retrying an insert on the edge case of a collision, but at the cost of performing a double query (insert + select) in all cases. It is however a neater solution than others I've played with.
Problems:

It's not easy to get hard information about the atomicity of an INSERT AS SELECT statement for all databases; it should be atomic in all cases, however.
Without a patch on xorm to handle this directly, the SQL statement should be constructed in the Gitea code. Xorm has some helpers to avoid engine specific syntax to get in the way, so the problem is reduced to properly maintaining the column to field association when building the SQL statement.
One thing that xorm does not help with (not without a patch) is the auto-increment columns, i.e. Issue.ID. Each engine has its own quirks for handling them (LAST_INSERT_ID(), RETURNING ID, parsing the text output...). Since the INSERT would be handled by an Exec(), retrieving the inserted ID should be taken care of manually. Having this code on Gitea would be very clumsy.

So, in my opinion this problem has a relatively good solution, but it should be handled by the ORM and not by Gitea. Other than that, the "retry hack" proposed by @lunny looks like a reasonable compromise.

Opened an issue in xorm for this, in case it is considered a valuable addition:
https://gitea.com/xorm/builder/issues/58

@sapk @guillep2k https://github.com/go-xorm/xorm/pull/1401

@sapk @guillep2k @typeless go-xorm/xorm#1401

That's great, @lunny. I've tested the new feature with this and it worked perfectly.

Can you add the tests in this PR to validate ?

Can you add the tests in this PR to validate ?

@sapk, I don't think I should, since this PR does not eliminate the problem but only mitigates/reduces it. Chances are that integrations will start to fail for everybody in a random fashion because of the added test.

Follow up for the interested
I don't know if there's anybody left here interested in alternatives to solve the potential duplicate key problem, but if this PR (retry insert in case of error) is not convincing, I've found another way to solve this problem that's testable, scalable, universal and reliable... but conceptually more complicated.
It might be an over-engineered solution. I'm just being thorough by considering all the edges. This PR (retrying insert in case of error) might be all that we need, so... I leave it to you guys to decide if we need another solution.
The other solution
The short story is:
First, issue.index must be NULLABLE.
We insert the issue with NULL in the index column. This will never cause a duplicate key error because NULL values do not get indexed:
INSERT INTO issue (repo_id, index, ...) values ({repoID}, NULL, ...) RETURNING id

The engine will return the value for id as usual.
After the insert, we calculate the proper value for index with the following query:
SELECT COALLESCE(MAX(index),0) + COUNT(*) - COUNT(index) AS "index_value"
FROM issue WHERE repo_id = {repoID} and id <= {ID}

Then we update the issue with the calculated value:
UPDATE issue SET index = {index_value} WHERE id = {ID}

If anybody is interested I can explain this concept with more detail, but I must warn you: it's a long read.
Advantages:

Universal: all databases will support it.
Does not generate locks or depend on them.
Can be used without transactions.
The concept is easily unit testable without stressing the server (but must be tested independently of the newIssue() function).
It will never generate duplicates.

Disadvantages:

It's hard to follow.
It requires two updates for each issue (INSERT + UPDATE).
If something interrupts the process in the middle (e.g. power failure), between the INSERT and the UPDATE, the issue will be left with a NULL index (but the process can be resumed at Gitea's startup with no problem).
Queries that scan the issues table should be aware of this process by filtering out rows that have a NULL in the index column to avoid getting mutating results.

I can work on this concept if it raises enough interest, but I'm afraid I'm just boring you by now.

I've combined the x.SetExpr().Where().Insert() method with the multiple retries, and removed unnecessary code related to the index calculation. This should greatly reduce the incidence of errors because the SELECT is now closer to the INSERT in the database. But the retries are still necessary because of locks problems as shown in #7959.

Make LGTM work.

We still need a test for creating issues on multiple go routines.

The file name should be issue_stress_test.go, otherwise it will not be run I think.

I know it is know the perfect solution but what about putting them as a benchmark ? It will have a loop for multiple execution. It will not block CI but can easily be tested against new solution.

No I a mean adding it as a benchmark (they are not run on CI) that are basicly loop of tests. For exemple like the func BenchmarkRepoMigrate.

Another way is to use a build TAG such as stress to distinguish it from the other tests.


Should a new version use /combined?

I’d like your feedback on this. Switching to the /combined page of a movie has a few advantages – but also a few disadvantages.
This is just a quick brain dump, no research or so has been done.
Advantages

The regular expressions are easier, which probably leads to longer lifetime of them. This means, the script wouldn’t need that much attention anymore.
For example, the function getCast() could return everything instead of only the first x of a movie – without a second request to IMDb.
The /combined page might list more stuff than the overview.

Disadvantages

There actually exists stuff on the overview page, that doesn’t exist on the /combined page. For example, the budget.

So, what are your thoughts? Or do you have better insights than I do at the moment?

Nevermind, see https://github.com/FabianBeiner/PHP-IMDB-Grabber/tree/dev.


fix: Add msAppId and subscriptionId to PublishingProfileCompleted telemetry

Description
Add msAppId and subscriptionId to PublishingProfileCompleted
Task Item
#minor
@garypretty

Coverage remained the same at 51.122% when pulling 7054563b943aa674bfe63f878bdad5f9a46a6552 on durnford/fix/telemetry into 122ba6ea751932046736f502ec29d751cecef6bb on main.


Issue with the display of PDF. getting two colors white and grey background

I have been using this from 2-3 years without any issue but with the recent commit on sept. I started facing a new issue.
whenever I'm downloading a pdf, its getting generated properly but the background of the pdf is in to colors as shown below

For us the solution was changing scale to 2.


EDDM: store the n-ago of when drift/warning began (L120)

Author Owner
As in self.buffer_size of STEPD

This is effectively already stored as self.retraining_recs, the difference being that if the detector "hammers" between warning and None we lose that information.
I don't think this is reasonably solve-able with the detector itself, but one might fiddle with the outer loop to define a more "permissive" drift region.


chore(elixir): improve Wire.Decoder error handling

Proposed Changes

Make Wire.decode errors raisable -   #888
@mjc @mrinalwadhwa
Have you thought of something different like inspecting binary data in Ockam.Wire.Binary.V2.decode?
@mrinalwadhwa you pointed out Inspect.Opts module in this case. Did you think of something like piping the binary data through
|> Inspect.Algebra.to_doc(%Inspect.Opts{})
with specific options in Inspect.Opts ?

@feniks65 thank you for sending this PR!
I think it may be better if we follow the standard library's convention of raising from a function with a ! .. so decode would return {:ok, message} | {:error, error} while decode! would delegate to decode and raise if the return value is not {:ok, message}
What do you think?

How about now?
I have introduced an additional function decode! as you have suggested which should distinguish the result of the call to the basic decode().
If an error will be returned from decode() then an exception will be raised.

Hi @feniks65 sorry for losing track of this PR.
The changes look great!
I rebased and merged 652ee29217b5994f44501be71bad8fcbcab964a1
Thank you 🙏


Fixing #15281

Signed-off-by: Serguei Bezverkhi<EMAIL_ADDRESS>Closes: #15281
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@howardjohn  That should fix validation ipv6 issue.

@sbezverk: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-galley-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-galley-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test integ-galley-k8s-tests_istio

@sbezverk: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-galley-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-galley-k8s-tests_istio

integ-mixer-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-mixer-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sbezverk: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-galley-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-galley-k8s-tests_istio

integ-mixer-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-mixer-k8s-tests_istio

integ-security-k8s-tests_istio
2851b83e595a14359c33412bef0f11d008f9dd76
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test integ-security-k8s-tests_istio


shouldn't generate the default language folder

if the .yml like this:
plugins:
  - i18n:
      default_language: en
      languages:
        en: english
        fr: français

the default language folder http://<IP_ADDRESS>:8000/en is unnecessary just the fr is ok. OR , give an option ? like:
  - i18n:
      default_language: en
      default_language_bulid: false
      languages:
        en: english
        fr: français

maybe, don't set to languanes ?
  - i18n:
      default_language: en
      languages:
        fr: français

Hi @zimocode
Oh I see, indeed now I understand what you want :+1: I'll add an option okay
You'll have that today

@zimocode thanks again. After thinking about it I find it easier just to build the languages listed in the languages map..
I have documented and tested the feature. Happy version 0.5 mate !

This solution creates an issue where:
When following the instructions at https://github.com/ultrabug/mkdocs-static-i18n#not-building-a-dedicated-version-for-the-default-language, this leaves us without the possibility of giving default_language a custom label.
Or in other words, we cannot label the usual en selection with English appropriately.

Hello @jrappen Did you find a workaround ?

... you can simply ...

@brospars You cannot. The default language has a different path, compare (for example):

./
./en/
./fr/

and from my testing in October does not copy the settings from its subdir counterpart.

@brospars Your approach doesn't set a default_language.

@jrappen since this has been asked for multiple times I guess I'm being stubborn on this one and should offer an option to tackle this.
There are two ways we could make this happen:

add a default_language_alternate_name option
introduce a build_language_paths option which would be a list of the locales we want a /version for; allowing users to keep on having the languages option set for every language and only select the languages they actually want a /version for

Which would you guys prefer ?
friendly ping to @Stanzilla , @AngryMane , @Andre_601 in case they care to share their pov

not really interested tbh

I don't think I quite understand what the question is

sorry @Stanzilla ; the question is about having an option to allow users who do not wish to have a /version of their default language to have a way to still set the name they want to display for it on their material language switcher (when using the default generation one, not setting it by hand)

What would it display otherwise? Feels inconsistent if that was different?

What would it display otherwise? Feels inconsistent if that was different?

it would display "en" instead of "English" if using a config like this where I want only /fr and not /en since my default / is en
  - i18n:
      default_language: !ENV [DEFAULT_LANGUAGE, "en"]
      default_language_only: !ENV [DEFAULT_LANGUAGE_ONLY, false]
      languages:
        fr: français

@jrappen I see you reacted with a confused emoj
I personally like @brospars' idea very much as it could provide a consistent way to add options to each language without adding yet other options...
I would stick with the usual alternate key names (name, link) and we could also extend it to allow users to select if they want to build this language or not as well.
The default version would simply be named default to reflect this too!
Ofc, we would make that backward compatible so that users wanting a simpler config format could still use it.
Example :
  - i18n:
      default_language: en
      languages:
        default:
          - name: english
          - link: ./
          - build: true
        fr:
          - name: français
          - link: ./fr
          - build: true
        en:
          - label : english
          - path: ./en
          - build: false
        de: deutsch # Backward compatibility

HI there,
Have you noticed that if you try to apply the following configuration:
plugins:

i18n:
default_language: en
languages:
fr: Français

You don't get the switch when you are on the french version of the page?

@ehguille what version of the plugin do you refer to? please open a new issue with details

My bad, I was using navigation.instant and just checked that is not compatible with this plugin :)

Further discussions please fowarded to https://github.com/ultrabug/mkdocs-static-i18n/pull/89


syslog messages do not parse correctly when IPv4 addresses are in process name

Example of the issue
This line parses fine:
<14>Mar 25 19:08:39 ServerName conman[1324]: INFO     conman - lhvpn-<IP_ADDRESS>-nodes-86 is now running successfully
This does not, and is sent to the sc4s:fallback sourcetype
<29>Mar 25 19:08:39 ServerName <IP_ADDRESS>.nodes-86[4035]: Options error: --ca fails with '/etc/config/lhvpn/<IP_ADDRESS>.nodes-86.ca': No such file or directory (errno=2)
I have observed this from multiple servers and log types.

This is incorrect and not allowed in BSD format syslog. What is the source product have you communicated the defect to the vendor?

sc4s fallback is for the sourcetypes which are not identified by the parsers and thats why it adds PRI and message.

Regardless, SC4S is still providing less functionality than syslog-ng writing out files are picked up by a monitor input

All the supported vendors are documented , if something is breaking please feel free to share the sample sanitised log and we will try to fix it.

I have provided this. What additional information do you require?

source product for example.

I understand your concern, we will keep this issue open and discuss internally.
sc4s was designed to work in the said way and it is working as designed, we will check what we can do here and keep posted.

The log format is not bsd formatted. In a unconfigured syslog-ng instance no processing other than logging the raw message occurs sc4s performs complex processing on the structured data for multiple use cases using syslog-ng. I'm sure splunk would be happy to help as they have with hundreds of non compliant sources. They need some help from you or the vendor. They need enough message samples from a packet capture to see all the defects in the source and they need to know the vendor and product to document the support.

So, won't fix. Got it.

To be very specific its not a fix because its not wrong. However sc4s is designed to handle these conditions by forcing a developer to make correct choices. If you interested in the enhancement you just to to answer the rather simple questions asked. Your interactions imply you are more interested in this not being resolved than seeing a resolution for non technical reasons.  (Not a Splunker)

I have provided the required information in order to fix/enhance/(insert your preferred term here) however the responses that I continue to receive are difficult to interpret as anything other than being deliberately obtuse in order to avoid resolving the stated issue.

@RaygunDuck the handling outliers can be tricky you could help by being specific with the source vendor and product to allow proper documentation for dealing with this non standard format and testing for regression in future releases. "syslog" is defined in RFC5424 as a standard, your incorrectly relying on rfc3164 which is not a standards track document. More than one sample is useful in many cases when source products are not following the standard there is more than one defect and the defects are not consistent its common to need a packet capture to find all the potential issues.  SC4S is extensible you can add the parser support yourself as well. Another valid choice is to refer the issue back to the origin and ask them to send   standard syslog

As per the current guidelines if the problem is with metadata and nonstandard RFC formats, we suggest to write custom parsers , splunk_metadata.csv to correct it.


Hidden

The sentence : Rejoignez notre communauté is hidden @Carms-dev

on the page.

The same thing happen

As discussed over email, this is resolved when you remove the "zoom in" in your browser.


"Login-Attempts-Based Authentication" template doesn't work

The required claim has been merged and removed later due to avoid 5.8.0 migration. Need to re-add it to enable this feature OOTB.
The related issue is:
https://github.com/wso2/product-is/issues/3951

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


New Script: calibre-server

🛠 Note:
We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal!
🎮 Note for game-related scripts: These have a lower likelihood of being merged.

✍ Description
Create a new script that adds calibre-server as an LXC

🛠 Type of Change
Please check the relevant options:

[ ] Bug fix (non-breaking change that resolves an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
[x] New script (a fully functional and thoroughly tested script or set of scripts)

✅ Prerequisites
The following steps must be completed for the pull request to be considered:

[x] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
[x] Testing performed (I have thoroughly tested my changes and verified expected functionality.)
[x] Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)
Provide any extra context or screenshots about the feature or fix here.

hey @michelroegl-brunner , thank you for taking a look through my PR. I had actually set this up as a draft and wasn't expecting anyone to review. I will update with your recommended changes when I get the chance!


Frontend: Zero distance

When you select distance = 0 in the frontend, the frontend passes distance = 3 to the backend.

im going to check that now

it's already fixed in #89 :see_no_evil:


Source Instead of Prebaked Assemblies

Hi there,
We have an idea on how to improve Mirror by removing the need to build assemblies externally.
The main benefit we get from not building them outside of Unity, is being able to step through the code at runtime, setting break points, etc.
Also, adapting the code would be naturally easier and quicker that way.
To achieve this, we imported the source into our Unity project, and wrote .asmdef files to let Unity build the assemblies for us.
This works perfectly fine with Weaver and Cecil as well.
Is that something you'd be interested in integrating?
If so, we'd be ready to start a pull request to get this into the repo.
Cheers,
Andi

@soma-web  asmdef will not work in unity 2017.4,  which is our main target,  that is why we did not use the source. We can't merge your pull request for that until we drop 2017.4
That said,  I did the work you are describing and a little more for 2018.2  here:
https://github.com/paulpach/Mirror/tree/2018_async

aah ok, I see.
Thanks for the hint, we'll have a look on your repo.
Thanks!

ok, that one was obvious,
what I meant the git-hooks/scripts you implemented to get the official mirror repo in sync with your private fork using the asmdef files. Because the folder structure completely differs between those two projects?

It is the same commands.   git knows the files got moved and it applies the changes to the files in the new location.


update code based on updated config file

Closes #716

The host part in main configuration file of Haaukins project needs to be updated with following:

host:
  http:
    endpoint: localhost
    port:
      insecure: 8080
      secure: 8081
  grpc:
    endpoint: localhost
    port: 5454

Looks fine!


[firestore-bigquery-export] Disable changelog table

[READ] Step 1: Are you in the right place?
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
[REQUIRED] Step 2: Extension name
This feature request is for extension: firestore-bigquery-export
What feature would you like to see?
I'd like there to be an option to remove the changelog table in BigQuery as I'm only interested in current state of Firestore being visible in BigQuery, and my changelog would fill up fast and use a lot of space in BigQuery.
How would you use it?
Would use it to disable changelog dataset, as I'm only interested in the current content.

Yes please.

+1

We will have to investigate what's possible here, as I believe the changelog is how the latest views etc are generated. Appreciate that this is popular request, we're looking into it :)

I would be very great, here we just want the latest version of a document and I've had to setup a job that deletes old snapshots periodicly.

To solve this problem, I use a scheduled query that cleans the data once a month. If you have a lot of data, you can reduce the interval and range (reducing the interval without reducing the range will lead to an increase in the cost of completing the task, since it passes through a large amount of data).
The query performed by the task: (*replace projectID and prefix_table_1, prefix_table_2, etc. with your own project ID and tables):
CALL `projectID`.`firestore_export`.`clean_changelog_all`(['prefix_table_1_raw_changelog','prefix_table_2_raw_changelog']);

The procedure that starts the cleanup of each table: (*replace projectID with your own project ID):
CREATE OR REPLACE PROCEDURE `projectID.firestore_export.clean_changelog_all`(tableNames ARRAY<STRING>)
BEGIN
  FOR t IN (SELECT * FROM UNNEST(tableNames) AS name)
  DO
    CALL `projectID.firestore_export.clean_changelog`(t.name);
  END FOR;
END;

The procedure for clearing the table: (*replace projectID with your own project ID and (optional) INTERVAL -1 MONTH):
CREATE OR REPLACE PROCEDURE `projectID.firestore_export.clean_changelog`(tableName STRING)
BEGIN
  DECLARE query STRING;
  SET query = CONCAT("DELETE FROM `projectID.firestore_export.", tableName, "` ","\n",
  "WHERE (document_name, timestamp) IN","\n",
  "(","\n",
  "  WITH latest AS (","\n",
  "    SELECT MAX(timestamp) as timestamp, document_name","\n",
  "    FROM `projectID.firestore_export.",tableName,"`","\n",
  "    GROUP BY document_name","\n",
  "  )","\n",
  "  SELECT (t.document_name, t.timestamp)","\n",
  "  FROM `projectID.firestore_export.",tableName,"` AS t","\n",
  "  JOIN latest  ON (t.document_name = latest.document_name )","\n",
  "  WHERE t.timestamp != latest.timestamp","\n",
  "  AND DATETIME(t.timestamp) < DATE_ADD(CURRENT_DATETIME(), INTERVAL -1 MONTH)","\n",
  ");");
  EXECUTE IMMEDIATE query;
END;

I will also note that deleting the previous version every time you write a new one takes quite a long time, so I do not recommend going this way.
And also that update operations are quite slow in BigQuery and are not supported in tables using streaming insertion, so this option is also not suitable.

This is the manual solution I used.
DELETE FROM your_dataset.your_table
  WHERE STRUCT(document_name, timestamp) NOT IN (
      SELECT AS STRUCT document_id, MAX(timestamp) AS timestamp
      FROM your_dataset.your_table
      GROUP BY document_name
  )

https://stackoverflow.com/a/78232504/10222449


Remove usage of validate_integer for compatibility with older stdlib

hmm, looks okay... but is there no other way to get this working with older versions?

No good.
Never simply remove datavalidation.
Please use is_integer function from stdlib which was introduced in stdlib 2.1.
This should be old enough.

Well, one could use is_integer and possibly additional manual range checks to achieve the same functionliality. Or we could check if we can update our stdlib to version 4.6.0, but I guess that's not something we do in a snap? @tuxmea @nmesstorff ?

Apart from the pending travis-build, are you ok with this updated PR, @rwaffen @tuxmea ?

looks a bit complicated but okay...

@michael-os what do you think, first merge this one here or #151 ?

OK for me.

@rwaffen yeah, that's why I didn't want to do it when I noticed that the validate_integer function has become available only recently :smile:
As far as #151 is concerned just go ahead and merge your change first. I can rebase mine afterwards

oh, one can merge this one without rebase...


In advisor view, Plan search results should be sorted by Time Updated from latest to earliest

Treat this as a refactor request, not a bug.
Repro Step

Launch app
Log in as an Advisor
Search for some Plans

Expected results:
By default, Plan results should be sorted by Time Updated in descending order, i.e. later changed Plans should be put above earlier changed Plans.

Actual results:
Plan results are sorted by Time Updated in ascending order, i.e. later changed Plans are currently below earlier changed Plans.

I now recall why I setup this way.
My assumption is that advisors will spend most of their time in app using search to find plans to review.
So for example they may want to go through all of the plans with the status "Awaiting Review"
In that instance it is better to show older plans, not newer plans. Otherwise old plans would never get reviewed.


Invalid formatting with comments

I just encountered a minor bug, I think:
#test("some",
// "args",
)

gets formatted as
#test("some", // "args",)

which is syntactically invalid.

Fixed with 965970de0145d1d95858829efd9a4eb6b039946b.
If the problem still exists, please reopen the issue.


a new dedicated workqueue only for async write commit, and block clients while committing changes

Based on Ankita's initial async commit code, this PR contains a few new enhancements are introduced in this MR. Please review to see if the implementation makes sense

a new dedicated writeworkqueue only for async write commit
block clients while committing writes in background thread

@JohnSully Hi John, this PR is like a continuation of async commit which includes a specific workqueue for async commit and client blocks. @paulmchen


Execute systemd with --user when using user service

Fixed executed commands when using "UserService".
Added --user when calling systemd on actions like: start, stop, etc.
Example: systemd start --user myservice
Without this, in my environment, the services were being installed correctly on the user, but I couldn't start/stop them

Coverage increased (+0.05%) to 14.049% when pulling 091889fb67ae70f6efa8de08a1e0fcc9534a369d on oliverkra:master into a1c091bc7f8b6d1a8d28b47d8cf22068608051ef on kardianos:master.


Adding Zone01Normandie

Adding Zone01 to the list

@VivienFreb First stage of verification passed, official domain is zone01rouennormandie.org as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision. Proof of domain ownership: https://zone01rouennormandie.org/

@VivienFreb Thank you for your patience while waiting for a review and processing your request. Pull request merged.


In Source example, failure mounting "contract-resources" volume

Describe the bug
I'm going through the example, with MiniKube and Strimzi; YAML file installation.
The example output in the "Installing Kafka Source" section lists two deployments, but the latest version of the YAML files actually launches kafka-source-dispatcher as a StatefulSet. It fails to launch cleanly with
MountVolume.SetUp failed for volume "contract-resources" : configmap "kafka-source-dispatcher-0" not found

Expected behavior
The Kafka Source should start without errors.
To Reproduce
The installation procedure and YAML files are in this repo.
Knative release version
v1.7.0
Additional context
Two issues likely here:

Documentation out fo date, should reflect the StatefulSet.
Possibly a missing instruction on the contents of this configmap.

I have gone through the installation a few times to figure out if I had missed a step and failed to install one of the required resources before getting to the source installation step.

Hi @kpassapk, thanks for reporting, the warning event can be ignored, the kafka-source-dispatcher stateful set when there are no resources will be scaled to 0 so that warning is temporary.
regarding "Documentation out fo date, should reflect the StatefulSet." good catch, would you mind contributing to this change in the knative/docs repository?


[Route Hook] Route hook after not triggered with some res methods

What I want to do?
I want to create a custom hook called after some routes on a large REST web API, in order to conditionally remove sensible data on everything we send back to the user. I'm using this page as a reference: https://sailsjs.com/documentation/concepts/extending-sails/hooks/hook-specification/routes
What's the issue?
The after part of the hook is not called (the before is). After performing various tests (see next section "To reproduce"), I think this is related to the res.json() function.
To reproduce
I have created a minimal example here using the sails new command: https://github.com/Clm-Roig/sails-route-hook-test
Action code

Hook code
module.exports = function (sails) {
  return {
    routes: {
      before: {
        "GET /*": function (req, res, next) {
          sails.log.info("before");
          return next();
        },
      },
      after: {
        "GET /*": function (req, res, next) {
          sails.log.info("=== after");
          return next();
        },
      },
    },
  };
};

Just uncomment / comment the desired line in api/controllers/foo-action to see what's going on.
The custom hook is located in api/hooks/custom-hook.

Node version: 16.14.2
Sails version (sails):  1.5.2
ORM hook version (sails-hook-orm): 4.0.1
Sockets hook version (sails-hook-sockets): 2.0.1
Organics hook version (sails-hook-organics): not found in my package-lock
Grunt hook version (sails-hook-grunt): 5.0.0
Uploads hook version (sails-hook-uploads):   not found in my package-lock
DB adapter & version (e.g. sails-mysql@5.55.5<EMAIL_ADDRESS>(not used here)
Skipper adapter & version (e.g. skipper-s3@5.55.5):  0.9.1

Hi, any update on this please ? :slightly_smiling_face: I will really appreciate a feedback, even a small one, in order to know if I should do a workaround or wait a little.

Hi @Clm-Roig,
For this, we recommend you use custom responses instead of the routes.after hook. https://sailsjs.com/documentation/concepts/extending-sails/custom-responses
Routes.after is how blueprints work, it lets you assign overridable shadow routes within your route that can be overridden with explicitly set routes in config/routes.js

Thanks for the idea @eashaw. I was hoping for something catching everything, even the res.json() because of security concern about sensible data in our app.
We will move our few res.json() to res.ok() and custom it appropriately :slightly_smiling_face:

What is the resolution for this one? I am trying to add a hook for after, but the hook is not executing.
I am trying to capture some metrics for the service, mainly to capture the response time. My idea is to add the start time to the request in the before hook and in the after hook, push a metric for the total time taken. Please let me know if there is anything which is already in place.


feature(Backend): Add method in to Expenses controller, find by category

Codecov Report

Merging #89 (ba9a5a3) into main (3f5d54f) will decrease coverage by 0.15%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main      #89      +/-   ##
============================================
- Coverage     46.57%   46.41%   -0.16%
  Complexity       78       78
============================================
  Files            39       39
  Lines           292      293       +1
  Branches          7        7
============================================
  Hits            136      136
- Misses          152      153       +1
  Partials          4        4

Impacted Files
Coverage Δ
Complexity Δ

...dicedev/kakebo/controllers/ExpensesController.java
0.00% <0.00%> (ø)
0.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 3f5d54f...ba9a5a3. Read the comment docs.


Test cases

Pull Request Test Coverage Report for Build 193

9 of 13 (69.23%) changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.2%) to 70.873%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/main/java/seedu/address/model/AddressBook.java
5
7
71.43%

src/main/java/seedu/address/storage/XmlSerializableAddressBook.java
4
6
66.67%

Totals

Change from base Build 192:
0.2%

Covered Lines:
1988

Relevant Lines:
2805

💛  - Coveralls


Exception realsense2.dll after long term running.

Required Info |
-- | --
Camera Model | D435
Firmware Version | <IP_ADDRESS>
Operating System & Version | Windows 10 (x64)
Kernel Version (Linux Only) |
Platform | PC
SDK Version | <IP_ADDRESS>
Language | C++/CLI
Segment | Robot
Issue Description
After the problems I`ve posted here in Connection loss after long term running. (<=2h) #2345
I started to do long term tests with only the (way to short) cable which is delivered with the
D435. After some time (last run after 2,7h)  I get the following exception:

Unfortunately I dont manage to chatch it. Heres the callstack and disassembly:

After this exception I try to replug the camera, and when I do that the depth image tool
shows incomprehensible way that the device is connected to a USB 2.1 port and in due
to that it`s no longer possible to run the full resolution. Only after some replugs the correct
port version (3.2) is shown:

But I thinks this isn`t affected by the exception, because of this issue: #2311
The settings of the device are still the same as I used here:
https://github.com/IntelRealSense/librealsense/issues/2345
I hope that this device will run stable one day - because we planned to order it in a bigger
amout after our testapplication works nice with this device.

You may be able to reduce the likelihood of the camera being detected in USB2 mode if you plug the camera in quickly and firmly instead of slowly.  A better way to avoid resetting the camera with unplug-replug though is to use a hardware_reset() instruction at the start of a script.
https://communities.intel.com/message/557115#557115
The discussion linked to below about long-term running may also be of use to you.
https://communities.intel.com/message/560215#560215

I'm very glad that the connection-loss aspect of your problems is resolved by your cable choice.
Long-term running was mentioned in an online RealSense webinar that Intel held yesterday.  It was said that the camera should be able to run indefinitely as long as it remains within temperature tolerances, and problems that disrupt running are usually related to an issue happening on the PC, such as a USB glitch.
Looking at the ASIC and projector temperature readings in the image provided in the other post, I noticed that the ASIC chip seems to be running a bit hot at 43.   With a test of my own camera, running at high resolution, it was running the ASIC at a temperature of 30 at cold startup.
In the 400 Series' data sheet document, the maximum recommended 'operating temperature' is 35 degrees.  So if the values in the Viewer are in degrees, then I could foresee the possibility for glitches setting in if this vital chip is running at 43 degrees after some hours of operation.
In the webinar session during discussion about long-running, it was recommended that a large heat-sink component is purchased (the heat sink being the part that draws heat away from the circuit board).  In choosing a heat sink, it was suggested to base the decision on the maximum power output of the USB specification, in order to be able to cope with worst-case scenarios.
Installing a custom heatsink may be easier for the caseless Module Kit versions of 400 Series cameras than it is for the D435, which is of course a cased unit and not supposed to be opened up.  So with the cased units, long-run stability relies on keeping the camera within temperature tolerances and making the PC part of your setup as reliable as possible.

Hello MartyG,
I`m trying to observe the temperate with different cooling options I got. But unfortunately
I get the rs2::wrong_api_call_sequence_error in codeline "depth_sensor_temperature = rs2_get_option((const rs2_options*)sen..". What I am doing wrong? I do this after initializing the device and every time before grabbing a frame:
float depth_sensor_temperature;
rs2_sensor_list *sensor_list = rs2_query_sensors(dev, &e);
int num_of_sensors = rs2_get_sensors_count(sensor_list, &e);

for (int i = 0; i < num_of_sensors; i++)
{
	rs2_sensor* sensor = rs2_create_sensor(sensor_list, i, &e);
	is_depth_sensor_found = rs2_is_sensor_extendable_to(sensor, RS2_EXTENSION_DEPTH_SENSOR, &e);

	if (is_depth_sensor_found)
	{
		depth_sensor_temperature = rs2_get_option((const rs2_options*)sensor, RS2_OPTION_ASIC_TEMPERATURE, &e);
		cout << "Temperatur ASIC [" << i << "]: " << depth_sensor_temperature << endl;
	}

	rs2_delete_sensor(sensor);
}

rs2_delete_sensor_list(sensor_list);

Hello MartyG,
since yesterday I cooled the camera down with a fan and held the temperature constant at 31°C.
But after 19hours 37minutes the exception in realsense2.dll occured again (from now 10 minutes ago).
The PC Im using is a Beckhoff industrial device with Win10 (x64) and should be very stable - were
using them since more than 10 years (always the up to date version).

I guess you mean you have been using Beckhoff industrial PCs for more than ten years, and not that you've been using the same PC for 10 years.  :)
I read back through this case from the start.  I see your error with the RealSense2.dll is occurring in an application called NativeApplicationTest.exe.  Is this a custom application that you have written yourself to test the camera?
The next diagnostic step I would recommend would be to monitor your PC's memory usage whilst the program is running.  This will tell you whether or not a 'memory leak' in your program is causing instability and eventual program crash.  A memory leak is a bug in a program where the memory is not being released correctly when an operation in a process closes.  Over time, more and more of the PC's memory is consumed until the program can no longer run.

Youre right, of course we are not using the same PC for more than ten years. But this one we are using now for about 1,5 years in other vision applications and with other cameras (Ethernet, USB, Firewire) without any problems.
The application is written by myself. For the long-run tests it only acquires images from the D435 and
visualizes it in a window and updates a clock for time measuring as well as the memory used by the application. The PC has 32GB DDR4 RAM and the usage (6,9GB for the whole system and my application) is constantly stable during the run - there is no memory leak, otherwise the amount of used memory would rise (as you still wrote) or an exception like AccessViolationException or OutOfMemoryException would be thrown.
 The D435 is 5m from the PC away (therefore the 5m USB-cable).

The causes that have been ruled as unlikely to be the source of the error include:

Temperature
PC stability (presumably including USB ports if it is an industrial PC)
Memory leaks

It is also probably not a corrupt Windows registry generating the exception, as the exception error is usually displayed when you try to launch the program if the registry is at fault, rather than after the program has been running for hours.
Your application does not sound like it is stressing the PC and camera too much, so using an industrial-grade USB cable may not make a difference in this case (industrial-grade USB equipment is used in critical applications where frame drops can not be allowed, such as medical scanners).
From my knowledge of past cases involving long-running, typically the behavior described (the program stopping after half a day instead of days) happens when there are multiple cameras being used instead of a single camera.   Since you are only using a single camera, that raises the question of whether something else (e.g other devices) are using the USB ports too and putting a similar strain on the system to that which multiple cameras place.

This may be somewhat related. I don’t know but I thought I would link to it here. The fix in that case for the Long cable was a new USB3 cable.
https://github.com/IntelRealSense/librealsense/issues/2345#issuecomment-421264104

I remember dealing with a case where I recommended a locking cable that screwed into the little holes either side of the camera's USB port on its side.  In that case, a user in Germany had a mobile robot I believe, and was losing connection because the USB cable at the camera end was coming loose.

Hi MartyG,
thank you for the answers! I still saw and read your linked postings - the same behaviour I got with the cable which is delivered with the D435. With the new one its gone.
But I dont get USB-disconnects anymore - only the realsense2.dll error we wrote about. The camera doesnt loose connection (since I got the new cable) when the exception rises. The only devices which
are plugged to the PCs USB-ports are keyboard and mouse - Ill will disconnect all other devices for
the next test.
@agrunnet: It was me that reported the error you linked ;D.

Thanks goetzmi for the feedback.  A keyboard and mouse may not place much demand on the USB ports in the same way that a high-power device such as an external hard drive would.  It may be worth doing the test anyway, since my own PC is plagued with USB mouse disconnects-reconnects recently (I suspect my elderly USB hub as the cause, as it happens with all mice).
It occurs to me that another cause of a camera disconnecting over time is if it goes to sleep due to inactivity because of power-saving settings in Windows.
In the older generations of RealSense camera, if no input was being made to the keyboard and mouse then the camera could go to sleep even if it was in active use if power-saving settings permitted sleep.  This was because there was no input that Windows cold recognize as 'activity', unlike a keyboard key press or a move of the mouse.  So you could be continuously waving your arms in front of the camera and it could still go to sleep if power-saving was enabled and there was no touch of the mouse or keyboard.

I'm not a Visual Studio user so my apologies if this suggestion is not practical: would it be possible to avoid the exception crash by turning off exception throwing in Visual Studio? It's a 'dirty' way of developing (error messages are useful, if annoying) but if the program is otherwise working fine, disabling exceptions in your project mat be okay.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/13b1b4cb-4efa-47e3-901e-375dfa63988f/how-to-turn-off-quotbreak-when-exception-is-thrownquot-option-for-custom-exception?forum=vsdebug

Thank your for your suggestion, but this is the last option Ill do - in due to the reason its "dirty".
The x64 build now succeed and Ill attach to the process with the VS solution of it. Maybe Ill get the trigger of this behaviour this way.

Okay, now I got the SDK builded and all symbols of it loaded into my application. Lets see what causes the error - usually in 20h we will know more.

At times like this, you wish for a time machine so you can skip ahead.  smiles   Looking forward to hearing your results!

Oh yes! You can say that again!

Since today I had two exceptions. The first Ill mention in the lines below does stop my application and I had to restart it. The exception raises inside the synthetic_source class, which Im not using as far as I know:
- Exception:

- Callstack:

- Codelines where it happens:

The second exception doesnt stop the application - it goes on executing after ignoring it
or tell the debugging to continue. It happens in a private function of the align class and
uses private member - not a single one thats given to from my code.
- Callstack:

- Codelines where it happens:

Hopefully the Intel team can offer some advice on this one, as it requires a depth of familiarity with the SDK code that I don't have.

3.) Finally I got 5 minutes ago the exception with the same callstack output which I initially mentioned with this issue:
- Exception:

- Callstack:

- Codelines where it happens:

Hopefully the Intel team will look at this soon!

If this is an option for the intel team - I can offer that they connect to the system Im using.
I let it now run until the exception rises again and will stop it then there, so that (just if they want)
can have a closer look to it.

[Realsense Customer Engineering Team Comment]
Hi @goetzmi,
Per #2345, you don't see the USB disconnect issue with the proper USB cable. Using realsense-viewer (the latest, ex: librealsense 2.16.0) also has this exception issue?
Per your new long-run test, does all image processing happens on the graphics?
Can you enable the realsense log file (export LRS_LOG_LEVEL=DEBUG) and once the exception happens, dump the dmesg?
You can still continue monitor the temperature based on below code:
auto dbg = dev.asrs2::debug_protocol();
std::vector<uint8_t> cmd = { 0x14, 0, 0xab, 0xcd, 0x2a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
auto res = dbg1.send_and_receive_raw_data(cmd);
int temp = res1[4];
std::cout << "Device Temperature: " << temp << std::endl;

'Using realsense-viewer (the latest, ex: librealsense 2.16.0) also has this exception issue?'
The viewer just stops working, but doens`t show the exception in a dialog when this happens.
'Can you enable the realsense log file (export LRS_LOG_LEVEL=DEBUG) and once the exception happens, dump the dmesg?'
-> Of course, where and how can I enable the log file?
Thank you for the code!

I'm very sorry you have been kept waiting for a further response.  A new version of the SDK (2.16.1) was released yesterday.  Would it be possible to try it and see whether your problems persist.  Thanks!
https://communities.intel.com/thread/129313

Of course.

The first thing I noticed with the new Version, is that the following message now pops up every second and ist the same which I initially posted here:

If I ignore it and force the debugger not to stop at this exception the application runs well. But thats not what I mean by a clean solution.

If you can run for long periods (3 days, for example) when the exception is turned off and experience no ill effects, the warning message is probably not worth worrying about.  Sometimes you can't fix everything.

Lets see what happens during the next days..

Hello MartyG. The device now runs stable - its not very nice with the exception which the realsense2.dll throws in background but its doing its job if you ignore it in VisualStudio2017.
Little summary of the solution steps for everyone who runs into this behaviour too:
1.) Get this cable to avoid connection losses in due to LTE-frequences and the cable lenght:
https://www.ntcdistributing.com/usb-3-1-type-c/a-to-c/usb-3-1-a-male-to-c-male-with-dual-screw-locking-cable/
2.) Build some cooling around the camera for long duration runs to hold it below 35°C. I used
a simple 12V powered one.
3.) The current SDK-Version seems to handle some error which still occurs, but is now catched.
In my oppinion you can close this thread - thank you very much for your help and patience!
Best regards,
goetzmi

Awesome news!  Thanks so much for your own patience and repeated testing.  I'm really glad that you achieved satisfactory results.  Thanks a lot too for sharing your solution method    :)

Here I got some realsense logfiles for you - maybe they`re helpful:
2018-10-09-08_24_48.log
2018-10-12-08_23_57.log
2018-10-12-13_17_50.log
2018-10-15-08_28_04.log
2018-10-11-13_31_18.log
2018-10-11-13_31_45.log

Thanks again!!   :)


Custom string formats

Reasons for making this change
This is based off https://github.com/mozilla-services/react-jsonschema-form/pull/1130, following it as a pattern for passing through additional configuration to AJV.
A prior PR, #889, attempted to add this. However I disagree with the guidance there to use custom widgets. That approach does not allow custom defined formats to be validated outside of the widget. Sure, validation logic can be implemented within and only emit values onChange on valid input. But should a parent form, custom validation functions, etc. not have awareness of validation status for all fields?
#889 opted to ignore custom formats altogether which I agree is ill-advised. AJV implements an addFormat method however that can associate validation patterns (and more) with named formats. This suppresses AJV warnings about these formats and validates data. Using formats also allows AJV to be used externally for validation in other contexts, e.g. on a backend.
Granted this is all similar to schema definitions but the key benefit is automatic assignment of custom widgets without requiring these to be specified as uiSchema wherever a definition is referenced. AJV's own custom validation functions, etc. may also be useful for advanced usage.
Lastly, https://github.com/json-schema-org/json-schema-spec/issues/563 documents broader need for this capability in JSON Schema. This library itself has added color and data-url. Meta-schemas are not a viable solution as the above issue notes. A separate vocabulary definition file format may be specified in draft-08 but in the meantime being able to register such custom vocabularies with AJV would fill the need and give users of this library a solution until draft-08 arrives.
Checklist

[x] I'm updating documentation

[x] I've checked the rendering of the Markdown text I've added

[x] I'm adding or updating code

[x] I've added and/or updated tests
[x] I've updated docs if needed
[x] I've run npm run cs-format on my branch to conform my code to prettier coding style

[x] I'm adding a new feature

[ ] I've updated the playground with an example use of the feature

:warning: I am opening this early, before https://github.com/mozilla-services/react-jsonschema-form/pull/1130 is merged, to demonstrate this separate (but somewhat related) use case and see whether this is an acceptable solution before doing anything further.

Something of a blocker I ran into trying to add this to the playground — there's not a way currently to define config that is not serializable to JSON. For additionalFormats I can specify validation patterns as a string, which AJV converts to RegEx.
But custom widgets must also be registered in order to use these formats in react-jsonschema-form. In my usage of custom formats I typically map these patterns or apply other configuration to instances of a TextWidget of my own implementation. I could add some examples of this to app.js as is done for the GeoPosition / custom component example. But the playground isn't really representative of real world use with this approach.
I think a broader overhaul of the playground is warranted, using something like react-live to allow some access to react-jsonschema-form. schema and uiSchema could still be editable externally and validated as JSON. Happy to take this on, I've done similar work for an internal UI library and have a design background so it would certainly be an improvement =)

Looks good, although of course we will need to wait for #1130 to be merged first before merging this one.

@pushred -- since #1130 has been merged with some changes, do you mind making your changes again off of master and updating this PR to reflect that?

@pushred just bumping this!

@epicfaace thanks for the diligence!
I've rebuilt the branch off the latest and adapted my changes to use the new AJV instance. I hoisted that call outside of the meta schema handling so that both types of additions are applied to it. I considered adding a test to validate both function concurrently but wasn't sure about adding it to the meta schemas describe block and didn't want to duplicate the setup there. Let me know if you think that's valuable — I think including it in the meta schemas block would be best if so.
I also followed the lead of meta schemas and now accept new formats on prop updates.
Lastly, I renamed the prop and some code to customFormats vs. copying the additional prefix. This is shorter and consistent with AJV's docs.

@pushred looks good, thanks for the good work!
I don't think it's necessary to make a test to check for meta schemas and custom formats concurrently. However, could you please add a test in this style? (something like "should update allowed custom formats when customFormat is changed"): https://github.com/mozilla-services/react-jsonschema-form/blob/92233e40e75854b50754a836a9b999c11eff75e7/test/Form_test.js#L1983

@epicfaace good call on the prop update test, that caught a big oversight! Custom formats would not have been applied to validations on prop updates. Added the test and a fix for that.

Thanks!


Initial version of command-behavior.tests.sh

This adds a unit tests to valid OpenAPS commands operate as expected. It provides dummy data to the commands, and test the output values to ensure the commands incorporated the test data correctly.
This is not intended to test the function of libraries the commands rely on to process the data.  Rather, it only test the commands process arguments correctly and provides representative samples of the expected data.  It doesn't test the validity of the data since that is accomplished in unit test for the processing libraries.

@scottleibrand,
This has a test function now for each of the javascript commands in oref0.  It's ready for review and comment.

Rebased onto dev to resolve merge conflict.

Can you merge dev to master now that I've merged all the yargs PRs and clean up the resulting conflicts?

@scottleibrand, rebased onto updated dev and resolved the merge conflicts.


Allow admins to customize application completion text

Is your feature request related to a problem? Please describe.
Residents want more information about next steps after they submit applications. This needs to be program specific.
Describe the solution you'd like
Allow admins to write custom text for that page.
Additional context
This text:

Done when
What conditions need to be met before this issue can be closed?

Here is a mock example of where we could show that there are next steps for a given program (ideally this would be combined with an email notification):

Clicking "Next steps" here would lead applicants to a new page with content created by the program admin. On the program admin side, we could offer this feature within the status tracking experience. One question I have is whether "Next steps" would only be available for approved applications or just all applications that are submitted?

The use case I was thinking about it for an applicant to have this information right after they submit, before the status is knows. Things to include there:

Timeframe for the decision to be known
How the decision will be shared with them (will they get email? do they need to come back to civiform? will it be automatically applied to their bill?)
Phone/email they can use to contact Program owners to ask clarifying questions

This was from UXR we did in Bloomington:

Gotcha! How's something like this?

Yes, that would work. Do we intend applicants to be redirected here after they complete the application? I think it's important for them to see this right after they hit submit.

We can also put this information in the confirmation page, but this shows up in their program dashboard.


Documentation for AWS::Serverless::Api Return Values is missing

I can't find any documentation for what attributes I can access using Fn::GetAtt with a AWS::Serverless::Api (or I've not been using the right search terms)
Most documentation pages have a "Return Values" section, but the documentation for Serveless::Api doesn't have one.
I've tried out Fn::Ref and found it returns the RestApiId from the ApiGateway::RestApi resource, but don't know what else is available.
Can the documentation be updated to include that section with details of what you can access using GetAtt (or be clear if GetAtt isn't supported)?

@crbunney Thanks for bringing this! We will fix it.

Fixed!


Cast to Any

TS Handbook:

The 'any' type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type-checking during compilation.

Though when I want to opt-out I often have to cast using <any> which isn't very readable (e.g. (<any>window).myProperty).
Is there a better way to opt-out of type checking?

window["myProperty"]

window["myProperty"]

Thanks but I don't think this shows the intention like the cast to any does. Also it produces different js.
Would it be possible to add an any-operator, like ^ or something similar? e.g. ^window.myProperty

I don't think we're going to add extra syntax for turning off typechecking -- there's already a lot of options.
Are you aware you can augment existing types?
interface Window {
  myProperty: any;
}

I don't think we're going to add extra syntax for turning off typechecking -- there's already a lot of options.

What else is there except for two listed above?

Are you aware you can augment existing types?

Yes but we are trying to avoid that.
While definitions (like those on https://github.com/borisyankov/DefinitelyTyped) look good at first they often (usually?) go out of sync with reality really quickly.
TypeScript works really well for our own projects but for 3rd party libraries it hurts more than it helps.

Yes but we are trying to avoid that.

Why?
I don't see how #window.myProperty is any different from (<any> window).myProperty either.  You said you were trying to solve readability issues.  How is that any more readable?

There's <any>, there will soon be an as operator (#3201), the string indexing notation suggested, updating the .d.ts file, augmenting the interface yourself, or assigning into a variable of type any.
If a .d.ts file is out of date with regard to the library, the answer is to fix it. Be the pull request you want to see in the world.

@kitsonk

Yes but we are trying to avoid that.

Why?

Like I said, 3rd party definitions are almost always out of sync. Having the compiler give you wrong error messages is frustrating.
I like Typescript because it allows me to use types where they provide value and opt-out/use pure JS when I don't need them.

@RyanCavanaugh thank you for the info.
Will it allow x as any.property or do I need (x as any).property?

If a .d.ts file is out of date with regard to the library, the answer is to fix it. Be the pull request you want to see in the world.

When TS catches on and the d.ts is maintained by the library then that's great. Otherwise it's not worth it IMO.

The syntax would be (x as any).property.
DefinitelyTyped gets over a dozen commits per day; I'm honestly surprised you're running into this with any frequency. Which libraries are you using, out of curiosity?

The syntax would be (x as any).property.

As the implementation appears to be unfinished, would it be possible to increase the precedence for the as operator so that the parentheses are optional?

DefinitelyTyped gets over a dozen commits per day; I'm honestly surprised you're running into this with any frequency. Which libraries are you using, out of curiosity?

I don't remember all of them but there were issues with jquery, lodash or underscore, pixie, bluebird, es6-shim and a few others.

The logical interpretation of x as Something.Foo is that the type name is Something.Foo. I don't know of any language that puts dot as lower-precedence operation than a binary expression.

@RyanCavanaugh TS heavily rely on type assertion when writing DOM-related code, this is also rarely the case in other languages. In my experiences, type assertion is a major produtivity-reduction factor of TS, so I think high-precedence type assertion can justify itself to some extend.
On the other hand, we can also reduce type assertions by improving the library(lib.d.ts) instead of the language, as I suggested in https://github.com/Microsoft/TypeScript/issues/424#issuecomment-102908565 , and discussed in #3220 and #3263 . I really hope TS team to take this problem seriously.

TS heavily relies on type assertion when writing DOM-related code, this is also rarely the case in other languages. In my experiences, type assertion is a major produtivity-reduction factor of TS, so I think high-precedence type assertion can justify itself to some extend.

Actually, I would argue totally differently.  The strong type assertion, aligned to what the standards are, is one of the biggest productivity boosters and sort of the whole purpose of TypeScript.  I am just an outsider, but to be honest, @duanyao none of your arguments make logical sense.  Now you are inserting yourself in random issues which have nothing to do with the DOM (the individual was feeling that 3rd party typings were not being updated enough in which he wanted an "easier" way to break strong typing, though clearly his definition of easy is quite what most other people would consider easy).
If you don't like TypeScript, then maybe you shouldn't use TypeScript.  I think you are trying to justify changing TypeScript into something that isn't TypeScript.  Sorry to be so direct.

@kitsonk Be calm, I think you misread my point completely.
I definitely love strong type and and the tooling support of TS, or TS won't be my major programming language. However, type assertion(or casting) is definitely not the beautiful part of any strongly typed languages; instead, it is the enemy of type safety and OO. If a language(or a library) requires developers to write a lot of type assertions (and in a verbose way), I would say something is sub optimal here.
The standards (I think you are referring to DOM and WebIDL etc.) are language neutral, and more or less aligned to JS. I think there is nothing wrong to adjust the interfaces of a concrete language slightly to match the real use cases, instead of 100% direct mapping to the standards. TS has already do this in lib.d.ts.
Is this issue have nothing to do with DOM? The reporter talked about window object and jquery, so I'd assume this issue came from DOM programming. Finally, the reporter and RyanCavanaugh also talked about high-precedence type assertion, which is also a problem I care about.

Looks like there is no action/information needed from this issue. closing.


Bug with empty adoc files / only a first row title

Hi,
I've been looking to debug the following build failure in my Asciidoctor Maven project (plugin version <IP_ADDRESS>) for 2 hours...  And I've finally found a simple issue on asciidoctor pdf.
BUILD FAILURE:
[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:<IP_ADDRESS>:
process-asciidoc (generate-pdf-doc) on project asciidoctor-pdf-example: Executio
n generate-pdf-doc of goal org.asciidoctor:asciidoctor-maven-plugin:<IP_ADDRESS>:proc
ess-asciidoc failed: (NoMethodError) undefined method `margins' for nil:NilClass

Let's explain the issue with the asciidoctor-pdf-example from Asciidoctor Maven Examples.
Let's modify the content of a random .adoc file from this project:
If I empty the file content , build failure:

If I only put a main title in this in the file, build failure:
= Main Title

If I only put a second title content in the file, build success:
== Main Title

If I put a main title with content in the file, build failure:
= Main Title
a

If I put a main title, skip a line, and put content in the file, build success:
= Main Title

a

I therefore suppose this small issue comes from Asciidoctor PDF ! HTML works well.

This definitely seems like an Asciidoctor PDF issue. I'll mark it as a bug and schedule to get it fixed for the beta.

This was fixed by https://github.com/asciidoctor/asciidoctor-pdf/commit/31d7c2740ddb2353dfe8c0425b7bb1fa4450dea5, which was included in the alpha.13 release.


Milestone overall status doesn't update

Describe the Bug:
Probability (how likely the bug is to happen, scored from 1-5):
(For example, probability of 5 is something like "it happens to all users every time they log in."
Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")
Effect (how bad the bug is when it does happen, scored from 1-5):
(For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected."
Effect of 1 is "It makes some styling look a little bit weird.")
Steps to reproduce the behaviour:
Screenshots:
https://www.loom.com/share/138499759f424805908724e687d6fb8e
Additional information:

OS: [e.g. iOS]
Browser: [e.g. chrome, safari]
Version: [e.g. 22]
Additional context

@BCerki this seems to be the same as #825?

@pbastia, yes, duplicate

Thank you! Closing