Use kotlin.collections typealiases of java.util types by default

Part of the #401 effort.  This PR removes references to java.util collection types by default in generated Kotlin code.

Codecov Report

Merging #411 (aaf80ac) into master (cefa407) will increase coverage by 0.05%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master     #411      +/-   ##
============================================
+ Coverage     59.61%   59.67%   +0.05%
  Complexity      784      784
============================================
  Files            60       60
  Lines          5477     5480       +3
  Branches        858      858
============================================
+ Hits           3265     3270       +5
+ Misses         1965     1962       -3
- Partials        247      248       +1

Impacted Files
Coverage Δ
Complexity Δ

.../com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt
82.46% <50.00%> (+0.20%)
140.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 cefa407...aaf80ac. Read the comment docs.


add entity parameters to orchestrator requests, and other changes

Orchestrators need to know some information about the backend entity capabilities to properly handle entity operations.
This PR allows the backend to convey this information to the front end via some extra content on the orchestrator requests.

Also added  a few more fixes:

continuation token must be nullable
scheduled time should be a parameter for starting new orchestrations
we are now returning a few more metadata properties for entities


Update logic-apps-limits-and-config.md

Added Canada outboud IP addresses

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@swylezol : Thanks for your contribution to the Azure documentation! The author, @jeffhollan, has been notified to review your proposed change.

#sign-off


[RFC] New event-based history storage

This is something I've had in mind for the last few days, but it's still incomplete.
Right now the history table is populated with question snapshots. This seems suboptimal:

We'll probably want to normalize the questions data eventually, e.g. extract options in a separate table (for performance and to unlock the possibility of more complex SQL queries), and it's unclear how to adapt the current history schema for that
history table is denormalized and includes a lot of duplicate data; also, it grows proportionally to the frequency with which we fetch the sources, and so doesn't play well with plans from #35
Performance will probably suffer too; this might affect #28, though I'm not sure by how much

Alternative: implement an event-based storage which tracks only the changes in fields.
E.g., list of fields for the new table:

pk (serial id)
question_id
field (can be title, description, stars)
value (new value)
timestamp

Unique index by question_id + field.
This table would be populated only if the field value has changed. If the field hasn't changed from the previous fetch then there's no need to save it again.
This proposal is incomplete:

it doesn't explain how to track "deep" properties, e.g. if question had a change in one of the option titles, it's unclear what to put in field
I'm still confused on "we just fetched the new question data with its entire forecasts history from the platform" (because the platform provides the historical data) vs "we fetched the new question data and store its snapshot in our history table" — these are two different scenarios, ideally we need to handle both and abstract it away from the end users

I'll think about this some more before doing any code changes, and I'll wait until I become more familiar with the specifics of different platforms that we support. Just throwing this idea out there to gestate for now.

Also, this is a better approach if we ever get more platforms with realtime capabilities (e.g., with webhooks for every event that happens on the platform), or if we implement pseudo-realtime capabilities ourselves (e.g., "fetch metaculus frontpage ordered by activity, and refetch only the questions which we haven't seen yet").


Add a script to generate missing P3Talk instances.

Some talks don't have corresponding P3Talks resulting in errors. We should find them and create missing P3's soon.

I think we're no longer using P3Talks in ep2019 - if anything, it might be a better idea to remove the model. @artcz WDYT?


Inventory Support

Are there any plans to update to support item drops and the inventory? Valve opened up access to this a few months ago.

I can look into implementing it. Can't make any promises about how long that will take though ...


Add the option for restarting the timer when it runs out with persistence for active instances.

Is there any possibility of giving the option for saving the state of instance when the timer runs out. And give an extra option to the user to restart the timer along with the previously active instances and work.
Or maybe give an option for extending the timer and session when 10 or so minutes are left before timer runs down.
Consider the below scenario:

A user have n number of active instances for m hours.
Now, when m = 3, the session will be closed regardless of the number of active instances.
But what if the user wanted to continue his work beyond 3 hours?
Is there any possibility of doing the provision for restarting the time left but persisting the active work.

Just a thought.

@iamShantanu101 the idea behind PWD is for it to be a playground where you can try stuff or use it to give a presentation about docker or any of it's features. The original idea of the session timeout is mainly because we don't want bots or malicious users to take ownership of the machine and start doing things like mining bitcoins (it happened in the past)
I also understand that after the session expires in 4 hours (which seems like a reasonable time) you can just create a new one and it'd be nice to resume the work you were doing. But at the same time, if you need to work more 4 hours in PWD, it feels like you're not using it for what it was intended to.
I'm not sure about this, as stated before, the idea is for it to be "stateless". Maybe, if this specific use case becomes requested a lot, we could evaluate to do persisted sessions and maybe charge something for that, but for the moment I'd prefer to leave it as it and stick with the original idea

@marcosnils Surely, this is intended to be a playground and with due respect looks good. Monetizing the feature of persistence might or might not play well with the users. This was just a thought anyways. Lets see how this goes further.

Do you have a specific use case in mind? What are you doing with pwd that
takes more than 4 hours?
On Fri, Jan 13, 2017, 08:11 Shantanu Deshpande<EMAIL_ADDRESS>wrote:

@marcosnils https://github.com/marcosnils Surely, this is intended to
be a playground and with due respect looks good. Monetizing the feature of
persistence might or might not play well with the users. This was just a
thought anyways. Lets see how this goes further.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/franela/play-with-docker/issues/80#issuecomment-272419323,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIhp91aaIe5tONy8wsp6e9Sx7hMQ-afks5rR1vigaJpZM4LiuuN
.

@xetorthio As I mentioned, this was just a thought. Of course "stateless" is how pwd works. Look at the evolution of Docker. It was all "stateless". It still is the better way to go. And as the evolution continues, docker is catering the need for "stateful" applications too. Obviously peoples have a use case to deploy stateful applications with Docker. Its just that I am quite unsure about how and when peoples might come with the same kind of approach here. I was just discussing a possibility.

Yeah. As @marcosnils said, let's wait until a valid use case shows up with
need of a stateful or long lived playground
On Fri, Jan 13, 2017, 09:37 Shantanu Deshpande<EMAIL_ADDRESS>wrote:

@xetorthio https://github.com/xetorthio As I mentioned, this was just a
thought. Of course "stateless" is how pwd works. Look at the evolution of
Docker. It was all "stateless". It still is the better way to go. And as
the evolution continues, docker is catering the need for "stateful"
applications too. Obviously peoples have a use case to deploy stateful
applications with Docker. Its just that I am quite unsure about how and
when peoples might come with the same kind of approach here. I was just
discussing a possibility.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/franela/play-with-docker/issues/80#issuecomment-272433901,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIhp0MM0G9xiUL4bJtEMyvE-4fhtk3Uks5rR3AagaJpZM4LiuuN
.

@marcosnils Thanks for this excellent initiative with the PWD. I would also like to know if there can be an option to set the session configurable up to a max of certain time. It probably does not have to be exposed on the hosted browser version (and I agree with all the concerns in this thread) but will be very useful for self hosted instances on local machines where one has a demo environment set up and may we want to demonstrate certain other capabilities in association with docker which might take time for the students or users in a workshop to set it up and only to expire in 4 hours and again they have to set it up twice.

Thanks for this excellent initiative with the PWD

It's a join effort with @xetorthio and some other contributors :muscle: .

I would also like to know if there can be an option to set the session timeout configurable up to a max of certain time

That is already supported and configurable. Check https://github.com/play-with-docker/play-with-docker/blob/c0aaf0a3a4a1cf172b06f4873f28bb5b19ca1152/api.go#L51-L55


Documentation update, at least Atom 1.8.0 requires a restart for this feature to work

Requires restart of Atom

Could you elaborate a bit more (preferably with reproduction steps) on the issue? At this point I am not sure what is not working for you.

Just saying to elaborate on the documentation page. When I installed it on Atom 1.8.0 I needed to restart Atom for it to be able to be used, didnt see that step in the installation part.


Use Vercel dynamic og image generation for our docs

https://vercel.com/blog/introducing-vercel-og-image-generation-fast-dynamic-social-card-images

Note - this is done but design needs to be improved, branch here.


[Solution idea] Back camera cannot be streamed

Hey OWR-Team,
we're currently working with OWR in a productive project and therefore investigating on problems with the back camera.
On the current state, the back camera cannot be streamed, since prepare_media_sessions_for_local_sources has a boolean have_video that prevents the seconds video device from being prepared in prepare_media_session_for_source.
If we hardcode the index for the back camera into prepare_media_sessions_for_local_sources, so it's being prepared instead of the front camera (which is normally the first device), the video of the back camera is correctly sent to the remote.
So, from my perspective, both cameras must be prepared (into 2 different media sessions?!) and the method setVideoCaptureSourceByName should also update the camera that is sent and not only the one thats shown locally.
I'm willing to work on a solution for this, if I get support from your side (especially about the basic idea of the fix)!
@superdump @stefanalund Are you aware of the problem and do you agree on my solution idea?
PS: What steps are necessary for a camera change while the stream is running (new session description etc.?)
Thanks in advance!

There must be a regression as this was working before. Is the Selfie example app also not worming anymore?
https://github.com/EricssonResearch/openwebrtc-examples/tree/master/ios/Selfie

@stefanalund Selfie can only show the two cameras and not stream them via WebRTC, right? Are we talking about the same meaning of "streaming" here? 😄
What I meant was definitely sending the stream via WebRTC and there were always problems regarding the back camera as far as I can remember...
Any thoughts on my question regarding the camera change during a running stream?

@tobi512 yes, Selfie only shows the camera stream locally but it is using the same API's as for doing a remote WebRTC session. Unless there is a bug (regression) it should be possible to use the same API for setting the camera source also for remote sessions.

Thanks for the quick answer! @stefanalund
I'll check everything again at work tomorrow and come back at you, but I'm pretty sure setVideoCaptureSourceByName only sets the local source and not the remote...

The local stream should™ be the basis for the remote stream...

@stefanalund Sorry for the late reply...
I just tested with the current NativeDemo and sadly did succeed in even making a video connection using demo.openwebrtc.org:
On Chrome I get OperationError: Error processing ICE candidate OperationError: Failed to set remote offer sdp: Called in wrong state: STATE_SENTOFFER
On Firefox InvalidStateError: Cannot add ICE candidate in state stable.
Are there any known errors at the moment? Couldn't verify my issue therefore...

I have tested between ios nativedemo and chrome. Unluckily, i get the same error "OperationError: Error processing ICE candidate" in chrome after i press "call" in ios nativedemo. May i ask if there is any solution to tackle this problem? Thx


Create a new instance of AdventBase inheritor for each benchmark iteration

For solutions that use a cache that resides in a member of the solution class (i.e. the class inheriting from AdventBase), the cache is reused across benchmark iterations. This leads to inaccurately fast benchmarks, as the cached computations will be performed in the warmup phase, and the computations will not be included in the measured iterations.
See the Part 2 solution of https://github.com/MarkusG/AoCNet/commit/93a81f7dc404dbeb4195a9d7e46ae6fb7fd7b675 for an example. The _stoneCounts cache is instantiated and populated once during the warmup phase, and then reused during the actual run, which makes the actual run trivial.
This would be solved by ensuring a new instance of the solution is created for each benchmark iteration.

Unfixable unfortunately, BenchmarkDotNet only benchmarks the individual methods and has no controls over how or when it instantiates things outside of that, you can wipe your cache at the start of Part1/2 to ensure an accurate benchmark.


OkHostnameVerifier does not check common-name of certificates

The current implementation of the OkHostnameVerifier does not appear to conform to RFC 2818, Section 3.1
From that document:

If a subjectAltName extension of type dNSName is present, that MUST
be used as the identity. Otherwise, the (most specific) Common Name
field in the Subject field of the certificate MUST be used. Although
the use of the Common Name is existing practice, it is deprecated and
Certification Authorities are encouraged to use the dNSName instead.

As of 3.14.0, in the implementation of OkHostnameVerifier, only the subject alternate names are being used.

This is by design and follows the lead of browsers such as Firefox and Chrome
https://textslashplain.com/2017/03/10/chrome-deprecates-subject-cn-matching/

This change was specifically made in 3.10.0, i.e. it's not a bug or an oversight.
https://github.com/square/okhttp/blob/master/CHANGELOG.md

New: Don't fall back to common name (CN) verification for hostnames. This behavior was deprecated with RFC 2818 in May 2000 and was recently dropped from major web browsers.


Hot module reloading causes issues?

This isn't quite a bug report yet, more of a request for if anyone else has seen anything like this, or might know what causes it.
I am encountering an unfortunate interaction, or so it seems, between webpack and react-hot-loader on one side, and redux-little-router on the other, specifically Fragment using withConditions.
It seems like a hot reload of a React component using the hot reload HOC can cause Fragment components to refuse to render their contents.
I have a case where I use two opposed functions for withConditions criteria, but neither Fragment will render after a hot reload of either a parent or child of them. This only happens when hot-reloading, and causing any other re-render (i.e. changing any props etc.) causes the right Fragment to render correctly.
Any ideas, thoughts, seen something similar, etc?

Thanks for the report @gertsonderby As of December 10, 2018, this project is no longer under active maintenance and we will no longer be moving forward with issue requests. Thank you for helping to make redux-little-router better!


Add Flow type definitions

Closes #165.
It would be great if anyone with Flow knowledge could review this.
And to explain how the test works, basically any comment that has $ExpectError in it requires that the line directly below it to have a type error. If there is no type error in the line below $ExpectError, the test will fail. The reverse is also true – if there is a type error with no $ExpectError above it, the test will fail.
Let me know if there is anything you would like for me to change about this!

Thank you, @saadq! We appreciate your work on this 🙌


feat: Extension to Alert - Allow imgSrc to be provided

Type: feat
Ionic Version: 2.x
Platform: all
I wish to be able to use the alert but add inputs that allow a user to pick an option based on an img (this could be rendered by the avatar component or thumbnail or just an img tag...personally I've settled on thumbnail). This could be supported in the checkbox and radio button lists (e.g. picking an avatar, a background picture etc).

Hi, thanks for the issue! Unfortunately we won't be adding this support to the Alert component. We recommend using a modal instead to achieve complex structures. We will be adding the ability to make a modal inset in issue https://github.com/driftyco/ionic/issues/5423.
Sorry and thanks again! :smile:


ARROW-5901: [Rust] Add equals to json arrays.

Checks whether an arrow array equals to an json array. This is motivated when I'm developing integration tests of parquet arrow reader. I use protobuf to generate both parquet data and json data, read parquet data to arrow, compare it with json data to verify the correct ness.

@sunchao @andygrove @nevi-me Please take a look when you get a chance.

Codecov Report

Merging #4940 into master will decrease coverage by 5.03%.
The diff coverage is 63.05%.

@@             Coverage Diff             @@
##           master    #4940       +/-   ##
===========================================
- Coverage   87.46%   82.43%    -5.04%
===========================================
  Files         994       86      -908
  Lines      140562    25068   -115494
  Branches     1418        0     -1418
===========================================
- Hits       122943    20664   -102279
+ Misses      17257     4404    -12853
+ Partials      362        0      -362

Impacted Files
Coverage Δ

rust/arrow/src/array/array.rs
92.63% <100%> (+0.06%)
:arrow_up:

rust/arrow/src/array/equal.rs
79.68% <69.84%> (-3.26%)
:arrow_down:

rust/arrow/src/datatypes.rs
74.67% <9.09%> (-3.96%)
:arrow_down:

python/pyarrow/ipc.pxi

cpp/src/arrow/csv/chunker-test.cc

cpp/src/parquet/column_page.h

cpp/src/parquet/bloom_filter-test.cc

cpp/src/arrow/array/builder_decimal.cc

r/src/symbols.cpp

cpp/src/arrow/io/test-common.h

... and 902 more

Continue to review full report at Codecov.

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

@wesm I noticed that you changed the title, but I can't see difference. Could you tell me the different so that I will not make the mistake again?

@liurenjie1024 he changed the JIRA number, from 5091 to 5901

@sunchao are you merging it, or should I?

@nevi-me go ahead to merge it


File is Uploaded Automatically in server but in Client Side It Shows failed

Hello,
I am trying to upload files from fine Uploader and and It Automatically Uploads in the backend while it shows failed to upload in the browser.Also when I set autoUpload :false I cannot upload it manually how can I upload the files manually as Fine Uploader Demo.
here is my code :
import React, { Component } from 'react';
import FineUploaderTraditional from 'fine-uploader-wrappers';
import Gallery from 'react-fine-uploader';
import 'react-fine-uploader/gallery/gallery.css';
const uploader = new FineUploaderTraditional({
options: {
debug: false,
autoUpload:false,
chunking: {
enabled: true
},
deleteFile: {
enabled: true,
endpoint: 'http://localhost:5000/files'
},
request:{
endpoint:'http://localhost:5000/files'
},
// validation: {
//     allowedExtensions: ['jpeg', 'jpg', 'gif', 'png','tif'],
// },
retry: {
enableAuto: false,
showButton: false
},
resume: {
enabled: true
},
callbacks: {
onComplete: function(id, name, response) {
if (response.success) {
alert("UPLOAD SUCCESS");
}
else {
alert("Problem uploading stuff");
}
}
}
}
})
export default class UploadComponent extends Component {
componentWillUpdate(newProps, newState){
if( newProps.readySubmit ) {
console.log('InputFineUploader onSubmit', uploader)
uploader.uploadStoredFiles()
}
}
render() {
return (

);
}
}
It is same as the documentation from React Fine Uploader.
when I set the autoUpload True It shows error in the client side but images get uploaded in the server
https://imgur.com/a/5Zchb
as shown in the image in the link
I want to Upload file using the extra upload button so I can bind it with the form I read the documentation from https://docs.fineuploader.com but this did not help.
Can you say what is the issue with my code.
Thanks.

If the files are reaching their destination successfully but Fine Uploader declares the upload a failure, that indicates your server is not returning a JSON response with a “success” property of true. You can also turn off this requirement as of 5.16.0. See https://docs.fineuploader.com/branch/master/api/options.html#request.requireSuccessJson

Thank You! It worked :+1:

How do I upload it manually ?


How to use properly the query object for multiple ids?

Hi,
i'm struggling with the query object, i want to use it to send a push to multiple ids of Meteor.users collection.
Let's say i have an array users = [ 'id1', 'id2', 'id2'];
I tried to set the push.send like this
//in my method pushAddExpense
Push.send({
				from: 'x',//not used
				title: 'Expense Added',
				text: 'title',
				badge: 1,
				payload: {
					groupId: groupId,
					userId: userId
				},
				query: {
					userId: {$in : users}
				}
			});

As you can see i'm using mongo syntax to make the query object but i get the following error
Exception while invoking method 'pushAddExpense' Error: key $in must not start with '$'
In the stack trace
at [object Object].Mongo.Collection.(anonymous function) [as insert] (packages/mongo/collection.js:574:1)

Probably i'm missing something, am i?

duplicate of #39

Hi @giggioz I've made a fix for this issue, can you give<EMAIL_ADDRESS>a go to confirm if it's solving the issue?

Works here.

Hi, i still have the problem, here's my settings :
NOTE: i'm using Meteor <IP_ADDRESS> now
Using<EMAIL_ADDRESS>My Method
Push.send({
				from: 'x',//not used
				title: 'Expense Added',
				text: username + ' added an expense in ' + groupName,
				badge: 1,
				payload: {
					groupId: groupId,
					userId: userId
				},
				query: {
					userId: {$in : users}
				}
			});

my server log
SENDING PUSH users = [ 'e7u7AdRdFjKRc8NLc', 'wK666qLdSwyBE3zQz', 'fXMMpMXEJnsLJ6wLr' ]
Exception while invoking method 'pushAddExpense' Error: Match error: Expected object, got string in field query
at checkSubtree (packages/check/match.js:275:1)
at packages/check/match.js:296:1
at Function..each..forEach (packages/underscore/underscore.js:113:1)
at checkSubtree (packages/check/match.js:290:1)
at check (packages/check/match.js:32:1)
at _validateDocument (packages/raix:push/lib/common/notifications.js:9:1)
at EventEmitter.Push.send (packages/raix:push/lib/common/notifications.js:67:1)
at [object Object].Meteor.methods.pushAddExpense (app/lib/methods.js:470:9)
at [object Object].methodMap.(anonymous function) (packages/meteorhacks:kadira/lib/hijack/wrap_session.js:160:1)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)

Thanks @giggioz Should be fixed now in 2.6.4


export *.tour to markdown with link "view in GitHub"

The "View Notepad" has a link to the local file with "View file".
You could add "View in Github" for some simple scenarios.
For example I have a step with these local data:
"file": "mem6/src/lib.rs",
"line": 299,
To view the same in github this is the link:
https://github.com/LucianoBestia/mem6_game/blob/master/mem6/src/lib.rs#L297
So I presume that if I could add to the tour file this data:
"git_folder":"LucianoBestia/mem6_game/blob/master/"
Then is possible to easily concatenate and create the link to Github.
And this to be used in the Notepad exported as html or markdown.

Hi there, thanks for the suggestion! To clarify, are you wanting the ability to view tour steps and code inside Github as well?

I don't know about an interactive use of CodeTour in GitHub. Cannot imagine that.
For me is enough to have a generated static HTML file of the "notebook" from VSCode.
The file can be easily shared, saved and uploaded anywhere.
And there to have links to the GitHub code: filename and line number.
In that way this is universally and globally useful.

I don't have experience in VSCode extensions and Typescript. So I cannot make a PR.
But I made a proof-of-concept tiny CLI in rust. The code is here:
https://github.com/LucianoBestia/codetour_export_to_md
I tried to write something about codeflow prior, but it was horrible. I didn't want to copy/paste the code because in no time it will be obsolete and misleading:
https://github.com/LucianoBestia/mem6_game/blob/master/CodeFlow.md
Now with CodeTour I exported it to md and looks like this. Amazing:
https://github.com/LucianoBestia/mem6_game/blob/master/codetour_start_route_template_render.md.
And it has the links to the source code in GitHub. So everybody could follow it.
I would appreciate if you give it a look.

Hi @LucianoBestia, thank you for this! This is still a new feature, so we will look into adding greater functionality.


Can the default generation ID in JDL modify the generation method?

This is generated by default
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

Hibernate custom primary key generation strategy

Not at the moment no

All right.


Css not loading

I have integrated server side example code to my project but it seems css is not being loaded can anyone figure out this issue

I think I answered this in the slack channel.


Where do I place my my c7n_mailer message templates?

This is how I installed c7n_mailer.
cd /app
virtualenv c7n_mailer
source c7n_mailer/bin/activate
git clone https://github.com/capitalone/cloud-custodian
cd cloud-custodian/tools/c7n_mailer
pip install -r requirements.txt
python setup.py develop
cd /app/c7n_mailer
c7n-mailer --config /root/mailer.yml --update-lambda
The source directory was placed under /app/cloud-custodian and c7n_mailer was installed under /app/c7n_mailer
Now....what path do I put my message templates?

I have figured this out for those that run into this same problem.  The way to recompile templates and use them is not very well documented so here goes:

Pull the cloud-custodian repo from git
Place your template(s) in cloud-custodian/tools/c7n_mailer/msg-templates
run python setup.py clean && python setup.py develop
c7n_mailer --config  --update-lambda

Every time you need to update a template or add/delete/whatever a template, make sure you follow steps 2-4.

@clembm2w feel free to add a PR into the mailer's README, issues like this can get lost easily so having it in the docs would be useful.


one click installer for remote URL import

make it possible to click a url and as a result FoF will import the remote URL settings passed along as a parameter.
no need to click options -> settings -> ...
https://form-o-fill.github.io/import?url=http......

Will be in 2.6.0
http://form-o-fill.github.io/import-remote-rules/


ddev get --remove uses current directory as base for removal_actions, should use .ddev

Is there an existing issue for this?

[X] I have searched the existing issues

Output of ddev debug test
Expand `ddev debug test` diagnostic information
[COPY-PASTE HERE THE OUTPUT OF `ddev debug test`]

Expected Behavior
removal_actions should act in a predictable directory, which is normally assumed to be the project .ddev
Actual Behavior
It actually acts in the current directory where ddev get --remove was executed, so may not successfully do a number of things.
Steps To Reproduce
Use this in install.yaml
removal_actions:
  - echo "pwd=$PWD"

Then cd .ddev/web-build
ddev get --remove <addon> will show it not being in expected directory
Anything else?
No response

ddev get --remove also inappropriately creates a .ddev directory in the current directory.

ddev get --remove also inappropriately creates a .ddev directory in the current directory.
Also ddev get --list inappropriately creates a .ddev dir

How to test this behavior?
When I try to run these commands in .ddev/web-build, the dir .ddev/web-build/.ddev is not created.
Am I missing something?

rfay@rfay-tag1-m1:~/tmp$ rm -rf .ddev
rfay@rfay-tag1-m1:~/tmp$ ddev get --list >/dev/null
rfay@rfay-tag1-m1:~/tmp$ ls -l .ddev/
total 0
drwxr-xr-x  2 rfay  staff  64 Oct  4 22:33 addon-metadata

rfay@rfay-tag1-m1:~/workspace/d10/web$ rm -rf .ddev
rfay@rfay-tag1-m1:~/workspace/d10/web$ ddev get --remove adminer
Removed add-on adminer
rfay@rfay-tag1-m1:~/workspace/d10/web$ ls -l .ddev/
total 0
drwxr-xr-x  2 rfay  staff  64 Oct  4 22:35 addon-metadata

Thank you for the details!
Unfortunately I cannot reproduce it yet.
# outside of any ddev project
~/tmp$ ls -la
total 12
drwxr-xr-x  3 stas stas 4096 Oct  4 20:47 .
drwx------ 49 stas stas 4096 Oct  5 18:51 ..
drwxr-xr-x  2 stas stas 4096 Oct  4 21:21 ddevtest

~/tmp$ ddev get --list >/dev/null

~/tmp$ ls -l .ddev/
ls: cannot access '.ddev/': No such file or directory

~/tmp$ ls -la
total 12
drwxr-xr-x  3 stas stas 4096 Oct  4 20:47 .
drwx------ 49 stas stas 4096 Oct  5 18:52 ..
drwxr-xr-x  2 stas stas 4096 Oct  4 21:21 ddevtest

# inside a ddev project
~/code/ddev/ddev-get-project$ mkdir web && cd web

~/code/ddev/ddev-get-project/web$ ddev get ddev/ddev-adminer >/dev/null && ddev get --remove ddev/ddev-adminer
Removed add-on ddev/ddev-adminer

~/code/ddev/ddev-get-project/web$ ls -l .ddev/
ls: cannot access '.ddev/': No such file or directory

~/code/ddev/ddev-get-project/web$ ls -la
drwxr-xr-x 2 stas stas 4096 Oct  5 19:01 .
drwxr-xr-x 6 stas stas 4096 Oct  5 19:01 ..

I am wondering if this is macOS problem or some specific DDEV version?
I tested it on Linux with the two versions.
$ ddev --version
ddev version v1.22.3-18-gd0af978b1 # latest

$ ddev --version
ddev version v1.22.3 # stable

Pretty weird! I guess it could be something arm64 related or mac related, but since it is so easy for me to replicate I expected it to happen easily to you.

Regardless, it wouldn't surprise me if you the eagle-eyed could spot the flaw just by reading the code.

I cannot reproduce on gitpod (amd64 linux)

And I don't understand where .ddev/addon-metadata can come from in ddev get --list.
There is no place where it can be created.

I'm going to open a PR for the issue in the title.
Because we are probably discussing something else.

Tried it on amd64 and arm64 macOS test runners and couldn't recreate there either. Tried on linux arm64, couldn't do it there. So maybe it's just my machine?

So maybe it's just my machine?

Maybe something with the user environment.
You can create a new user on your machine and try to recreate it there.

The main part was fixed by

https://github.com/ddev/ddev/pull/5402

Now to figure out the rest, https://github.com/ddev/ddev/issues/5342#issuecomment-1730304216

There's more than one way this can happen.
Opened

https://github.com/ddev/ddev/issues/5419

Closing this one, thanks for fixing the original issue here.


Container Running But Server Stops

After running for about 10 minutes, the server will randomly stop working. Nothing is in the logs and the container says it is running and healthy. When I open Minecraft the server shows up as offline both from the internet and locally. Maybe it is just disconnecting somehow? A restart of the container fixes the problem for the next 10 minutes.
Running: spigot 1.16 with essentials and nothing else

Can you provide the docker run command or compose file you use to create the container?

Here it is:
docker run -e EULA=TRUE -e TYPE=SPIGOT -p 25565:25565 -v /home/docker/minecraft/data:/data --name minecraft --restart=always -e OPS=<username> itzg/minecraft-server:latest

That all seems right, so I can't think of what's going on. Unless the container/server logs happen to say something around that 10 minute point, then it seems to a networking mystery.

I have confirmed this to be an issue with docker's networking configuration, not your image. Sorry about that!


Websocket message queue using streams and Delay between messages

After INVITE from an app, server sends proxy-authorization challenge and app sends ACK and INVITE with proxy-authorization. However sometimes the Server doesn't recieve the second invite(It recieves the ACK tho). The delay fixes this issue, possibly because server needs delay between these two messages.

This should be accepted


Add context support, ErrUnauthorized and Doer interface for http.Client

Extend API for context usage.
Make Errors an error instance.

Coverage decreased (-7.6%) to 59.603% when pulling 0cc56add75045f8b6c28bd59bd0054829efccd76 on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Coverage decreased (-0.09%) to 67.105% when pulling 98380c1edd82d06d207b5fce03ae002b0f40c40b on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Coverage decreased (-0.09%) to 67.105% when pulling 98380c1edd82d06d207b5fce03ae002b0f40c40b on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Tried to split commits as much as possible, add documentation, also add tests this time.
If I could make it better, please, don't hesitate to comment it.
Thank you!

Coverage decreased (-0.09%) to 67.105% when pulling 12d49ffaf608bfbd6aebe979f52d7d105649e69b on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Coverage decreased (-0.09%) to 67.105% when pulling 67b650e8c7ad08d5500b6e03c11e21b0fe183d98 on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Coverage decreased (-0.09%) to 67.105% when pulling 84ac3b00d15f340a21245456e0511f0e24e17af5 on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Coverage decreased (-0.09%) to 67.105% when pulling 84152d587bf460dcc7b634b6d6295b471e9aa4e4 on anpryl:master into 73e6538f7b94a687d1439872dee0a73e680e1fb1 on tambet:master.

Merged. This is a breaking API change, but it includes some necessary API improvements such as adding support for passing a context. Updating should be easy, and those who don't want to will have this library vendored anyway.
Thanks for your awesome contribution @anpryl!


Properly collect/identify used DWARF entries.

The patch:

Upgrades gimli
Adds dependency scanner
Improves performance of address lookups

Looks good!


mediaContainer.js:335 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

when mp3 play ended , console error
mediaContainer.js:335 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

v6 react-jPlayer will fix this and will be released sometime late next week hopefully. Thanks.

@pengteling It's fixed in V6 now if you get the latest. It's not really an error though and can be safely ignored if you see it again.


[DT Betweenlands] Prevent cut down Rubber Trees from being tapped.

Title.
I would count this as an exploit, but it doesn't make sense for you to be able to extract Rubber from a cut down Rubber Tree.

Intended behavior


DEVPROD-5295: Fix type error

DEVPROD-5295
This fixes a type error introduced in this mainline commit

Out of curiosity do you know why these passed on the previous pr?

The GH checks no longer require pulling main and tests passed with no merge conflicts.


Add find activity diagram

Codecov Report

Merging #161 (984d299) into master (8091530) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #161   +/-   ##
=========================================
  Coverage     65.24%   65.24%
  Complexity      380      380
=========================================
  Files            77       77
  Lines          1289     1289
  Branches        125      125
=========================================
  Hits            841      841
  Misses          415      415
  Partials         33       33

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 8091530...984d299. Read the comment docs.


Workboxjs

Google released a better version of their sw-precache called Workboxjs. Should this be implemented?

I would ideally remove service-workers completely from this project. It's getting too big for a starter.


Update text-analytics-how-to-call-api.md

Add a concrete example of what the JSON schema should look like, for clarity. Might be useful for people/customers who are not working with json/api daily. Or just skimming through the docs super quick. :)

Thanks @tanyado
This update looks good to me!
#sign-off


Add flatTraverse operation

I’m not sure what exactly is the problem. I have the following output:
> prettier --list-different "./{src,test,examples,tutorial}/**/*.ts"

src/Traversable2v.ts
test/Traversable2v.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>prettier: `prettier --list-different "./{src,test,examples,tutorial}/**/*.ts"`
npm ERR! Exit status 1

@julienrf you can run npm i fix-prettier to fix the CI error

Thanks for the review @gcanti. I want to add one more test case, turning an Either<string, Option<Either<string, number>>> into an Option<Either<string, number>>. The problem is that calling flatTraverse(option, either) doesn’t compile because the kinds of Either and Option are not aligned. What should I do?

@julienrf Alas when combining two type classes such Applicative and Traversable there's a combinatorial explosion of overloads.
5 Traversables variants x 5 Applicatives variante = 25 overloads
Actually, thinking twice, I don't think it worths it, thanks for ths PR though.


updated package to reflect current license

Closes #3

@viralvin, thanks for this pull request!

Are you interested in API design? We have an ongoing effort to create a Transportation Service Provider API, as part of our Mobility as a Service Alliance. If so, I am glad to help onboard you to our community :-)


Implement dynamodb based request and metric stores

implemented dynamodb backend for request and metric stores
float type is not supported by dynamodb, values are cast to and from Decimal type, precision is not important because it's mainly timestamps
the request table has secondary indexes on the user and status fields to enable querying (constant lookup time)
the metrics table has a secondary index on the request_id
the index definitions are motivated by access patterns observed elsewhere in the codebase
user_id field is duplicated at the top level to use as the hash key for a global secondary index for the request table
request_id field on the metrics table is dropped if NULL, this makes the index sparse
the user index query takes precedence on the status index query since the former is more restrictive
the wipe functions are not implemented because the testing is done in units against moto and are thus not needed
the endpoint url config can be used to run against a local instance of dynamodb
collect_metric_info is not yet implemented, dynamodb reports metrics directly to Cloudwatch, could be needed if another monitoring system is used

 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.


Support passing FileOpener for local cache

@calvinjia  PTAL

alluxio-bot, merge this please

alluxio-bot, cherry-pick this to branch-2.4 please


Chunking tests across processes

Do you want to request a feature or report a bug?
Feature
What is the current behavior?
While tests are executed in parallel across cores on a single machine, they can't be batched and executed across multiple processes or machines.
For large codebases with lots of tests, would could achieve better parallelization. Many CI environments provide environment variables around parallelization ($x of $n). For instance, check out Buildkite's docs on parallelizing builds.
Would this be something that Jest would consider supporting? Has it been attempted in the past? Are there any issues to take into consideration before attempting a PR?

You can use -w to create as many processes as you'd like but given that most tests are CPU bound (unless they go to the network), this may actually be harmful for performance. We don't have a way to parallelize across machines but I would absolutely support a PR for this kind of stuff as it has the potential for massive impact at FB. Do you have a plan to build this?

Not planning on changing this at the moment.

@chrislloyd @cpojer I know this ticket is quite old, but wanted to share this article with anyone who would like a workable (albeit hacky) way to split Jest across multiple CI containers:
https://labs.contactually.com/parallelizing-jest-across-multiple-ci-containers-551e7d3e4cb0


Report CI status back to pull requests

Currently, not happening. E.g. the build for https://github.com/Particular/dotnetTemplates/pull/4 is failing.
/cc @Particular/host-maintainers @Particular/deployment-maintainers

@adamralph I just tweaked the github settings for the project. Does #4 look better to you now?

Looks good @dbelcham. Thanks!


Automate build

Based on what we dicussed in #71 here is the WIP state so that everyone can follow along and give feedback. These things still need to be tackled:

[x] Building video subtitle files based on the translations
[x] Optimization steps: Minify HTML and static assets (images, css, js)
[x] Local dev server with file watchers
[x] Building HTML files based on the translations

[x] Render and integrate footer on pages

Once the build steps are done we need a proper review as I don't know about implicit things in the current build process I might have missed.

[x] Add GitHub Actions to automatically build and deploy the site

[ ] Add GH_PAT secret to the pipeline

[ ] Replace the Transifex token

do not commit the env file, that should be a local thing per user. git igore it

Alright, this is ready for review :)
See the build instructions, test this and let me know what you think.

Wow that was fast, thank you 🎉
From what I can see all works like it should 💯 👍
Nitpick: not sure why but after npm install the package-lock.json is modified and adds a lot of those optional: true, e.g. (I use nodeJS v10.17.0):
        "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },

sites directory:
In your commit message you wrote you keep it temporarily to be able to compare. Changing sources does not change that copy of the dist files it seems. Not sure if intentional or they should also update even if kept temporarily. Probably this is intended like it is now.
gh-pages vs docs / GH actions:
Related to the above, I saw in the workflow you go with the gh-pages branch as option which is fine I think. But as discussed in the issue here we could keep the site dir and rename it to docs and could use that for gh pages, at least until the workflow works.
For me debugging/developing GH actions/workflow is a bit tedious as you need to commit debugging stuff to see what's going on. E.g. make it trigger on a feature branch to trigger/test it (not on master like now) etc..
But yes, if the workflow is tested and sure it works this should be fine too I guess.

@ndeet

sites directory

Yes, that's intentional – everything in there is from the old build and I just stored it to have something to compare against while working on this.
Once we merge this I'd also like to clean things up a little, but I did not want to move too many files around as this would distract from the main purpose of this PR.

Nitpick: not sure why but after npm install the package-lock.json is modified and adds a lot of those optional: true, e.g. (I use nodeJS v10.17.0):

That might be because of different node versions (I'm using 12.x), I'll take a look when I clean things up. Nevertheless the package-lock.json is supposed to be part of the repo, so that everyone is using the same dependency versions.

gh-pages vs docs / GH actions

I don't have a preference and think it'll work either way. I can take a look at the other approach and eventually change the action.
@Kukks

dockerize the build and deployment

As long as we are deploying to GH Pages this is the simplest way imho. Nevertheless as you said: Dockerizing the build can be added on top once we merge this.

@dennisreimann
thanks for the feedback

That might be because of different node versions (I'm using 12.x), I'll take a look when I clean things up. Nevertheless the package-lock.json is supposed to be part of the repo, so that everyone is using the same dependency versions.
yeah I know, that's why it wondered that it changed after npm install as it should be the source for the current install and not modified. At least in PHP land with composer I did not see this happening. Anyway, like you said probably nodeJS or npm version thing.

@vswee what are your thoughts?

Brilliant job lads 💯💚. What's the next step as far as the Transifex bit is concerned?


confirm prompt fixes

2 fixes:

repeated failed attempts - fix is to add a deep copy
accepting numbers on confirm prompt

Pull Request Test Coverage Report for Build 41263

0 of 0   changed or added relevant lines in 0 files are covered.
12 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.08%) to 50.655%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Microsoft.Bot.Builder.Dialogs/Prompts/Prompt.cs
12
76.34%

Totals

Change from base Build 41249:
0.08%

Covered Lines:
4676

Relevant Lines:
9231

💛  - Coveralls


About the loss format

Hi, thanks for your great work!I have a problem that I see the format of the box is (cx, cy, w, h) in the paper, when computing loss. But I find the difference in your code which is (x, y, x, y)?
eg:
#   The target boxes are expected in format (center_x, center_y, w, h), normalized by the image size.

assert 'pred_boxes' in outputs
idx = self._get_src_permutation_idx(indices)
src_boxes = outputs['pred_boxes'][idx]
target_boxes = torch.cat([t['boxes_xyxy'][i] for t, (_, i) in zip(targets, indices)], dim=0)

losses = {}
loss_giou = 1 - torch.diag(box_ops.generalized_box_iou(src_boxes, target_boxes))
losses['loss_giou'] = loss_giou.sum() / num_boxes

image_size = torch.cat([v["image_size_xyxy_tgt"] for v in targets])
src_boxes_ = src_boxes / image_size
target_boxes_ = target_boxes / image_size

loss_bbox = F.l1_loss(src_boxes_, target_boxes_, reduction='none')
losses['loss_bbox'] = loss_bbox.sum() / num_boxes

return losses

Hi~
Actually (cx, cy, w, h) and (x1, y1, x2, y2) can be converted by box_ops.box_cxcywh_to_xyxy and box_ops.box_xyxy_to_cxcywh.

y (cx, cy, w, h) and (x1, y1, x2, y2) can b

Em~thank you, I mean I should use the format (x1, y1, x2, y2) to compute l1 loss as your code instead of  (cx, cy, w, h).

yep~

yep~

thanks


Add missing Ukrainian translation

🎉  thanks a bunch!

Thanks for the great tool!
I wish I had it 3-4 years ago :)


waiter for ssm that waits until an agent is online

A simple waiter config to wait until an ssh agent is in status Online.
I use it to make sure I can send commands to the instance.
model = botocore.waiter.WaiterModel({
    "version": 2,
    "waiters": {
        "AgentIsOnline": {
            "delay": 15,
            "operation": "DescribeInstanceInformation",
            "maxAttempts": 40,
            "acceptors": [
                {
                    "expected": "Online",
                    "matcher": "pathAny",
                    "state": "success",
                    "argument": "InstanceInformationList[].PingStatus"
                },
                {
                    "expected": "ConnectionLost",
                    "matcher": "pathAny",
                    "state": "retry",
                    "argument": "InstanceInformationList[].PingStatus"
                },
                {
                    "expected": "Inactive",
                    "matcher": "pathAny",
                    "state": "failure",
                    "argument": "InstanceInformationList[].PingStatus"
                  }
            ]
       }
    }
})

waiter = botocore.waiter.create_waiter_with_client('AgentIsOnline', model, ssm_client)
waiter.wait(Filters=[ { 'Key': 'InstanceIds', 'Values': [ instance_id ] } ])

Codecov Report

Merging #1502 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1502   +/-   ##
========================================
  Coverage    71.44%   71.44%
========================================
  Files          128      128
  Lines        14181    14181
========================================
  Hits         10131    10131
  Misses        4050     4050

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 6783d88...683a9db. Read the comment docs.


Error -7 after native update

Hi, and congrats for this great plugin !
Problem
After installing a native update (in config.xml : same id with new version and android-versionCode attributes), hcp returns error -7 : Can't copy files from previous release to the new release.
Steps to reproduce

install a native version 1.0 of an app : version="1.0.0" and android-versionCode="10"
make hcp update its code version
close the app
compile a new version 1.1 : same id, version="1.1.0" and android-versionCode="11"
install this new version 1.1 on the device :
=> hcp detects correct new native version (1.1)
=> hcp detects current and old hcp releases ("current web version" and "previous web version"). Is this normal ? I understand it should not, as we have a new native version
=> hcp downloads a new code version (this is ok)
=> hcp fails to install the new code version : error -7 "can't copy files from previous release to the new release"

System info
Platform : Android 4.4.2
Cordova 6.3
HCP lastest (just built with git url)
Built with PhonegapBuild
This seems to be a bug, as native version update (through appstore) is impossible. The only way is to uninstall the app before installing the new native version.
Am i wrong somewhere ?
thanks for you help

Hi again,
After some more tests, it seems that this issue was because hcp code update for v1.1 was the same as hcp code update for v1.0 (same content_url).
With different code updates (content_url), it is ok.
Anyway it should not happen (as i understand the update workflow). It may be still a bug, but a minor bug.
For instance, if someone compiles a new native version for a minor plugin update, the whole cordova plugins JS API could be the same, and the JS code (hcp code) could stay exactly the same.

Hi,
There is a PR https://github.com/nordnet/cordova-hot-code-push/pull/225 with a fix for this problem. Although, I think the problem is in some other place. Will investigate and get back to you.

Also, PR https://github.com/nordnet/cordova-hot-code-push/pull/231 . Same thing.

Fix released in v1.5.2.


apiviewgo supports tree tokens

Closes #8654. Examples of the new format: azblob, azcore
I fixed a bug in today's parser that creates duplicate types for aliases, however this PR doesn't address other bugs or feature gaps. I haven't found anything newly broken by this PR.
This PR also closes #3142 by adding a new test that generates JSON output and fails when that changes.

Is there any coverage data or apiview scenario coverage data?

We can generate coverage for unit tests but that's statement coverage (currently 89.3%), not useful here because there are so many conditions. We can validate our output against the JSON schema (have done) but there's no scenario coverage a la codegen, I guess because there's no consistency in input (source code) across parsers.
I suppose someone could write language-agnostic tests validating JSON details like "all LineId values are unique" and "all NavigateToId values are also LineId values". @praveenkuttappan, what do you think?


refactor: extract equipscope to enum

EquipScope is an int used by the maximizer taking values -1 to 2.
-1 is used for the CLI call to indicate the maximization isn't just speculation, but the equipment returned should be equipped immediately. The others (0/1/2) are from the GUI and indicate that the maximization is speculative and whether the maximization should consider inventory / creatable / pullable or buyable items.
It's multi-purpose. Make it slightly clearer what's going on by making it an enum.
Taking feedback on the names; they're not great.

Maybe ANY, SPECULATE_INVENTORY, SPECULATE_CREATABLE, SPECULATE_ANY?

EQUIP_NOW, SPECULATE_INVENTORY, SPECULATE_CREATE, SPECULATE_ANY

Changed to Veracity's suggestions. The first can't be ANY because it only checks inventory, not all possible creations. I think EQUIP_NOW fits nicely "equip what is available to equip".


Regex improvements.

Minor optimization related to regex patterns and a couple of typo fixes.

/test

/test

I think we don't do merges from main into the PR - Instead rebase the PR on current main and force push it :)

Sorry, didn't know that...

/test

Sorry, didn't know that...

That's fine - you still nned do it though; running the tests doesn't really help at the moment, since the rebasing will require you to run them again.
 I did it.

:sweat_smile: It should just be one commit in this PR if you rebased correctly

/test


[Bug] Race condition in idempotent mediator commands

In section entitled Implement idempotent Commands there is a race condition - the code checks whether the command was already processed, and if not, processes it. Between the check and the database write another identical command could be processed.
A scenario in which multiple commands are fired is one where it is more probable than not that they are fired very close together in time. So this race condition is not an edge case, it's a bug waiting to happen.
I suggest an alternative where you try to perform the operation, and allow it to fail because of a unique key violation.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b3920c19-388e-0e84-960f-0bb0c8340fe0
Version Independent ID: c728d4ba-50e8-798d-72a0-c4a5b6f13ca2
Content: Implementing the microservice application layer using the Web API
Content Source: docs/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-application-layer-implementation-web-api.md
Product: dotnet
Technology: dotnet-ebooks
GitHub Login: @nishanil
Microsoft Alias: nanil

Hi @lonix1, thanks for the feedback!
I think this leans more towards an edge case, because it'd happen if the same message was delivered twice in quick succession by RabbitMQ, but I agree that it can happen and when it does, it's the kind of bug that's extremely hard to reproduce and fix.
Would you like to submit a PR to the eShopOnContainers repo with your proposed solution?


Investigate uploading new images from Whitehall to Asset Manager

This is a bit of a placeholder to prompt us to investigate what's required to change the Whitehall app to upload new images to Asset Manager. We imagine updating this issue and possibly creating new issues as the work required becomes clearer.

This spike is relevant to this issue: https://github.com/alphagov/whitehall/compare/spike-use-asset-manager-for-attachments

Yesterday @chrisroos & I built on top of the spike from #186 in relation to this issue in the following branches:

https://github.com/alphagov/asset-manager/tree/serve-whitehall-images-from-asset-manager
https://github.com/alphagov/govuk-puppet/tree/serve-whitehall-images-from-asset-manager
https://github.com/alphagov/whitehall/tree/serve-whitehall-images-from-asset-manager
https://github.com/alphagov/gds-api-adapters/tree/serve-whitehall-images-from-asset-manager

One of the issues we ran into yesterday was how to serve up the Whitehall thumbnail-placeholder.png image after we've moved Whitehall images to be served from Asset Manager. In the end we added it to Asset Manager as a Rails asset, although there are a few problems with doing that.
I just had a look at the static app and noticed it serves up some generic images and some content-specific images. I wonder whether that might be a better place.

Closing now that the investigation is finished and we've started working on #200.


Do not double load teaspoon_env

When loading from the console, we need to load the Rails env, so we load the app's teaspoon_env. When we load teaspoon_env, the app then loads all engines, including teaspoon. Previously, this double loaded teaspoon_env and caused multiplicative effects on configurations that accumulate values, like #hooks.

Updates the predicate method rails_loaded? to always return a boolean

Converts environment.rb to group methods on the singleton (class << self)

Fixes #332

:+1: The only thing I'm so-so on is the class << self -- reason being it's more difficult in terms of readability to someone not super experienced in ruby. Up to you on if you want to change it though.
Nice work!

Word. I'll change that and merge.

@mikepack I honestly don't mind it, that was just feedback.

It sounds like you really hate it, so I'm going to remove it and never do it in the future. :trollface:

haha

FYI, couldn't completely remove class << self as it's the only want to define an attr_accessor on a module.

Fair enough. Somewhat related, we should move away from active_support as we go too. Feel free to do that in other PRs.


coyim: 0.3.11 -> 0.4

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/coyim/coyim/releases.

WARNING: Package has meta.broken=true; Please manually test this package update and remove the broken attribute.

meta.description for coyim is: "a safe and secure chat client"
meta.homepage for coyim is: "https://coy.im/"
meta.changelog for coyim is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.4 with grep in /nix/store/whk7hfhxmgjkfhkrisx6x0wcala2w5qg-coyim-0.4
found 0.4 in filename of file in /nix/store/whk7hfhxmgjkfhkrisx6x0wcala2w5qg-coyim-0.4

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
0 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
coyim

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/whk7hfhxmgjkfhkrisx6x0wcala2w5qg-coyim-0.4 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A coyim https://github.com/r-ryantm/nixpkgs/archive/bcc77acd34be49dc175988205b0bfc83bc497f14.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/whk7hfhxmgjkfhkrisx6x0wcala2w5qg-coyim-0.4
ls -la /nix/store/whk7hfhxmgjkfhkrisx6x0wcala2w5qg-coyim-0.4/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package marked as broken and skipped:

coyim

Maintainer pings

@ofborg build coyim

Closed by #190665.


Can the .htaccess file in a11y be removed?

There is an .htaccess file in the a11y extension (unpacked/extensions/a11y/mathmaps/.htaccess) but I wonder why it is there. Shouldn't it be up to each installation to determine if CORS headers are needed? And if they are, wouldn't they rather be at the top level?

That sounds like an accidental addition.
@dpvc ?

That's Volker's directory, originally.  I'm wondering if was part of an attempt on his part to get the .json to load on cdnjs.

cc @zorkow

Yes, we needed that to avoid CORS problems when pulling symbol mappings into SRE.
But we should really only need that on the actual distribution directory.

Yes, we needed that to avoid CORS problems when pulling symbol mappings into SRE.
But we should really only need that on the actual distribution directory.

So it can be removed here?

Fixed upstream.


autoPatchelfHook: improve arch/ABI compatibility

Motivation for this change
Fully enabling crossSystem support for autoPatchelfHook came with some perhaps unintended consequences of being a bit more aggressive about patching ELF files from architectures/ABIs that differ from the target (previously, those files would be ignored because ldd usually couldn't handle them).
This change adds architecture and rough OS ABI detection to the script so that it doesn't try to blindly replace the interpreter of files that can't possibly use that interpreter, and also makes sure it doesn't accidentally use libraries of other architectures/ABIs.
I also took the liberty of eliminating the last shellcheck error from the file (which, granted, I also introduced). :-)
Some examples of packages that will be able to build correctly under this change:

cqrlog
dmd
fishnet

cc @symphorien
Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

/rebase-staging

/rebase staging

@symphorien Sorry, I missed your earlier comment when I added that most recent commit! Did you want me to target this PR against the staging branch instead?

Hum there used to have a github action to do it automatically, but maybe it does not exist anymore. Yes in theory PRs with > 500 rebuilds should target staging.

:+1: Makes sense, I changed the base branch to staging. It looks like I should have done that before I force-pushed my rebased branch, so my apologies the rest of you that just got flagged as reviewers on this! :sob:

No worries, it's a pretty common footgun. FYI you can rebase onto git merge-base master staging and force push before changing the base branch, to avoid the reviewer explosion.


Algolia indexing: reopened PR

I have already merged a very similar PR #1489 onto master (accidentally), and then rolled back the merge in #1491. This reopens the changes in #1489 as a new PR on a new branch, so that the errors can be fixed.
Original PR description:
This PR emerged from the draft PR for the search spike. https://github.com/DFE-Digital/teacher-vacancy-service/pull/1471
Jira ticket URL:
https://dfedigital.atlassian.net/browse/TEVA-659
Changes in this PR:
This PR includes the necessary code for indexing Vacancy (sending our data to Algolia).
To see the Vacancy index, including examples of records: https://www.algolia.com/apps/QM2YE0HRBW/explorer/browse/Vacancy
You will need to be invited to Todd's Algolia team. One record copied below.
{
      "first_supporting_subject": null,
      "job_roles": null,
      "job_title": "Business Studies Teacher",
      "second_supporting_subject": null,
      "working_patterns": [
        "full_time"
      ],
      "expiry_date":<PHONE_NUMBER>,
      "last_updated_at":<PHONE_NUMBER>,
      "listing_status": "published",
      "newly_qualified_teacher_status": false,
      "permalink": "business-studies-teacher-whitley-academy",
      "publication_date":<PHONE_NUMBER>,
      "school": {
        "name": "Whitley Academy",
        "address": "Abbey Road",
        "county": "West Midlands",
        "local_authority": "Coventry",
        "phase": "secondary",
        "postcode": "CV3 4BD",
        "region": "West Midlands",
        "town": "Coventry"
      },
      "start_date":<PHONE_NUMBER>,
      "subject": "Business Studies",
      "_geoloc": {
        "lat": 52.38614499118846,
        "lng": -1.486365476684278
      },
      "objectID": "fff5bc2f-7b7e-48f1-b7bf-c80f85a1d399",
}

To index Vacancy attributes for consumption by Algolia (you'll need to get the necessary API keys from secrets repo):
To index Vacancy for the first time, run this in the console:
Vacancy.reindex

To reindex Vacancy (without deleting removed objects):
Vacancy.reindex!

Next steps:

[x] Ensure that we are configured to use automatic indexing, which comes by default with the algoliasearch-rails but can be disabled if we are overwriting method hooks. So that updating, creating, and deleting a record result in appropriate changes to the Algolia vacancy index.
[ ] Add tests which make sure Algolia is notified when a new record is added.
[ ] Ensure (either in automatic tests or manually) that changes in development database only affect Vacancy_development and prod only affects prod etc.

Before merging, I tested that this last commit Allow environment variables not to be present wouldn't break the site / stop Algolia from indexng, by pushing the code to staging.