Update putfile stream enhancements

:boom: READY FOR REVIEW :boom:
Related to issue #58
Summary
The PutFile RPC allows a developer to send a PutFile request using an offset and length.  Sending a series of PutFile requests allows a developer to split a large file into smaller blocks.  While having the ability to split large files into chunks is a great feature supported by SDL, the bookkeeping and management of offsets and lengths for each individual file is a cumbersome process that should be abstracted from app developers.  Having a mobile API that creates and sends a stream of PutFile requests reduces a large burden on app developers while working with the PutFile RPC.
Objective:
Provide a simple mobile public facing API that allows a developer to send a file via SDL to the vehicle head unit utilizing a stream of PutFile requests.
Existing PutFile (request & response) Definition:
 <function name="PutFile" functionID="PutFileID" messagetype="request">
    <description>
    	Used to push a binary data onto the SYNC module from a mobile device, such as icons and album art
    	Not supported on first generation SYNC vehicles.
    	Binary data is in binary part of hybrid msg.
    </description>

    <param name="syncFileName" type="String" maxlength="255" mandatory="true">
      <description>File reference name.</description>
    </param>

    <param name="fileType" type="FileType" mandatory="true">
      <description>Selected file type.</description>
    </param>

    <param name="persistentFile" type="Boolean" defvalue="false" mandatory="false">
      <description>
      	Indicates if the file is meant to persist between sessions / ignition cycles.
      	If set to TRUE, then the system will aim to persist this file through session / cycles.
      	While files with this designation will have priority over others, they are subject to deletion by the system at any time.
      	In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file.
      	If omitted, the value will be set to false.
      </description>
    </param>

    <param name="systemFile" type="Boolean" defvalue="false" mandatory="false" >
      <description>
      	Indicates if the file is meant to be passed thru core to elsewhere on the system.
      	If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core.
      	If omitted, the value will be set to false.
      </description>
    </param>

    <param name="offset" type="Float" minvalue="0" maxvalue="100000000000" mandatory="false">
      <description>Optional offset in bytes for resuming partial data chunks</description>
    </param>
    <param name="length" type="Float" minvalue="0" maxvalue="100000000000" mandatory="false">
      <description>
      	Optional length in bytes for resuming partial data chunks
      	If offset is set to 0, then length is the total length of the file to be downloaded
      </description>
    </param>

  </function>

<function name="PutFile" functionID="PutFileID" messagetype="response">
    <description>Response is sent, when the file data was copied (success case). Or when an error occured.</description>
    <description>Not supported on First generation SYNC vehicles. </description>
  	<param name="success" type="Boolean" platform="documentation">
		<description> true, if successful; false, if failed </description>
	</param>

    <param name="resultCode" type="Result" platform="documentation">
      <description>See Result</description>
      <element name="SUCCESS"/>
      <element name="INVALID_DATA"/>
      <element name="OUT_OF_MEMORY"/>
      <element name="TOO_MANY_PENDING_REQUESTS"/>
      <element name="APPLICATION_NOT_REGISTERED"/>
      <element name="GENERIC_ERROR"/>
      <element name="REJECTED"/>
      <element name="UNSUPPORTED_REQUEST"/>
    </param>

    <param name="spaceAvailable" type="Integer" minvalue="0" maxvalue="2000000000">
          <description>
          	Provides the total local space available in SDL Core for the registered app.
          	If the transfer has systemFile enabled, then the value will be set to 0 automatically.
          </description>
    </param>

    <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
      <description>Provides additional human readable info regarding the result.</description>
    </param>
  </function>

Goals:
- [x] Create a public API that allows developers to provide a path to a particular file on the devices file system, as well as other optional and mandatory putfile parameters (see above).  An automatically calculated stream of putfile requests will then be created utilizing the provided file contents.
Public facing API used to initiate a putfile stream request:
/**
	 * Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
	 * Responses are captured through callback on IProxyListener.
	 *
	 * @param sPath - The physical file path on the mobile device.
	 * @param sdlFileName - The file reference name used by the putFile RPC.
	 * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
	 * A value greater than zero is used for resuming partial data chunks.
	 * @param fileType - The selected file type -- see the FileType enumeration for details
	 * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
	 * @param  bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
	 * @param correlationID - A unique ID that correlates each RPCRequest and RPCResponse.
	 * @return boolean - True if the putfile stream was started successfully, false if an exception occurred during stream creation.
	 * @throws SdlException
	*/
	public boolean PutFileStream(String sPath, String sdlFileName, Integer iOffset, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) throws SdlException

[x] Notify the developer if the PutFileStream was started successfully, on failure log an error to the devices logcat. (accomplished using the api call displayed above available within sdlproxybase.)

[x] After the stream has started, notify the developer the status of the putfile stream utilizing the OnStreamRPC notification (new).  The notification will include the file name, the bytes completed and the total file size.

[x] After the stream has finished, notify the developer of the status of the completion (success or failure) using the StreamRPCResponse (new) with a matching correlation id from the initial putfile stream request.

Future enhancements:

[x] Provide handlers in the new proxy framework to send notifications for each event (start of stream, notification for progress, overall result of stream) via listener interfaces. (To be covered in feature/Framework branch)

PutFileStream Flow
App requests a new PutFileStream
proxy.PutFileStream(params)----------->
App receives a status of stream creation
<-----------------PutFileStream success
App receives OnStreamRPC Notifications indicating the current transfer progress
<-----------------OnStreamRPC notification
<-----------------OnStreamRPC notification
<-----------------OnStreamRPC notification
App receives StreamRPCResponse indicating the overall result of the transfer request.
<-----------------StreamRPCResponse response

Other TODO items:

[X] The PutFile RPC needs to be updated to accept Longs for setLength and setOffsetValues as we might run into overflows since a Long can store a wider range than an Integer.  A Long is returned for the size of the file from the Android OS, however we have to truncate to an Integer to accommodate the existing PutFile definition.  To be covered in #150

We can talk about this in the meeting, but I need some time to review further.

Is there some way we can test this code?  Is this supported in the SyncProxyTester application?
Could you prepare a design review document that we can discuss on the next call?  This PR is making a lot of changes on pretty much every layer of the project, so I would like to get a better understanding of how everything works.  I'm particularly curious about why so much connection code had to change when this seems like a feature that could be handled as part of the SdlProxyBase class.
Here are my comments after review:

Missing documentation for new APIs (is this being worked on as part of the JavaDoc PR?)
Do the streaming RPC methods belong in the ISdlConnectionListener interface or should they be added to a new interface?  Streaming RPCs doesn't have anything to do with connection, so I'm not sure this is the appropriate place to define these methods.
JavaDoc for FileInputStream.available() states Note that this method provides such a weak guarantee that it is not very useful in practice.  Therefore, relying on this value to determine size of RPC "chunks" (I think that's what it's doing???) is probably not very reliable.
I think you mentioned on the last call that new "RPCs" were introduced, but they aren't actually received or sent to the head-unit?  So, the notifications and responses are just faked in this case?  If so, what's the point of defining them as "RPCs"?  I have the same question in regards to OnLockScreenStatus notification, which also does not come from the head-unit and is faked in the mobile libraries.  I am concerned about sending fake data through the proxy as if it came from the head-unit, as it's very deceiving to developers.

AbstractPacketizer buffer size increased from 1,488 bytes to 150,000 bytes.  What is the reason for such a drastic increase to the buffer size?  Since this is an abstract class, will there be side-effects to other subclasses (other than requiring 100x more memory for the buffer)?
Commented out code should be deleted from the codebase prior to merge.

Yes, the functionality is available within the SyncProxyTester application for testing.  To test with the app: select the putFile RPC and select a file from the sd card on the device, next check the transfer using stream checkbox and click ok.
I will prepare a design document, however I'm not sure if it will be ready for the next call as I was out of the office all of last week and I am currently in the process of catching up.
I agree the JavaDocs need to be updated with the new API.
Some of my intent was to avoid placing a dependency on SdlProxyBase as the streaming packetizer classes work independently of the base proxy, however I will investigate how this could be simplified and cleaned up more.
Currently the FileInputStream.available() method is  used to calculate the size of the file, the call has been reliable but since the javadocs mention the weak guarantee I will replace the call.
We probably should discuss other details and concerns further during our next call, especially in regards to the increased buffer size.

Hey Markos,
I'm in attempts to look over this pull request. I might be late to the party on this, but why don't we use something like a PutFile UpdateListener interface rather than introducing a new internal RPC/"global" callback?
So in the PutFile.java we just add an interface such as
    public interface UpdateListener{
    	public void onStarted();
    	public void onProgressUpdate();
    	public void onFinished();
    }

Then each putfile request would have their own listener attached and preventing the developers from having to keep track of each request. I do realize this would require a good deal of overhaul.

I like the suggestion, it may take some overhaul... I'll investigate and keep you posted about feasibility.

Hey Joey,
I looked further into your idea this morning, but I'm not sure that it would make sense for the problem that putfile streaming is targeting.  In the case of putfile streaming, the app never actually creates or builds any putfile requests (the proxy creates all of these requests).  The app simply kicks off the process by requesting a putfile stream with provided parameters (location of file in memory, offset,  filetype, etc) and waits for notifications on progress and a final response.
Thanks

Alright, I thought about this some more and I think it can still be done pretty well. I'm going to work through my thoughts and commit something to get your thoughts on it.


Use a proper logger

This is a first pass at #297. It does not attempt to hide trace logging code with decorators, etc. yet, I'm punting on the question of adding a dependency or rolling our own for now.
This uses the standard library logging module to get rid of the hacky inefficiency of our own homegrown log function that re-opens a file handle on every single call. It also adds sensible leveled logging, putting our trace-level logging statements at DEBUG level and logging more quietly than that by default.
For now I've just used an environment variable, ENSIME_VIM_DEBUG, as a binary toggle between INFO and DEBUG logging levels. I could add a g:ensime_debug Vim variable, we could make it possible to specify where logging goes instead of being hardcoded to .ensime_cache/ensime-vim.log, etc., but initially I wanted to add minimal features, just leveled logging with an as-simple-as-possible toggle for the level. Open to feedback.
I'm already finding it helpful to have file and line number of log statements in the output, and the logging module's native ability to show exception backtraces in the log. Here's an example of some debug output:
DEBUG    <2016-07-28 17:04:03,109> (ensime.py:272) - send: in
DEBUG    <2016-07-28 17:04:03,109> (ensime.py:275) - send: {"callId": 0, "req": {"typehint": "ConnectionInfoReq"}}
DEBUG    <2016-07-28 17:04:04,126> (ensime.py:750) - unqueue: result received
{
  "callId": 0,
  "payload": {
    "typehint": "ConnectionInfo",
    "implementation": {
      "name": "ENSIME"
    },
    "version": "1.0"
  }
}
DEBUG    <2016-07-28 17:04:04,126> (protocol.py:48) - handle_incoming_response: in {u'implementation': {u'name': u'ENSIME'}, u'typehint': u'ConnectionInfo', u'version': u'1.0'}
WARNING  <2016-07-28 17:04:04,126> (protocol.py:61) - Response has not been handled: {u'implementation': {u'name': u'ENSIME'}, u'typehint': u'ConnectionInfo', u'version': u'1.0'}
DEBUG    <2016-07-28 17:04:05,145> (ensime.py:750) - unqueue: result received
{
  "payload": {
    "typehint": "IndexerReadyEvent"
  }
}
DEBUG    <2016-07-28 17:04:05,145> (protocol.py:48) - handle_incoming_response: in {u'typehint': u'IndexerReadyEvent'}
DEBUG    <2016-07-28 17:04:05,145> (ensime.py:386) - message: in
DEBUG    <2016-07-28 17:04:05,145> (ensime.py:387) - [ensime] Indexer is ready
DEBUG    <2016-07-28 17:04:07,177> (ensime.py:750) - unqueue: result received
{
  "payload": {
    "typehint": "SendBackgroundMessageEvent",
    "detail": "Initializing Analyzer. Please wait...",
    "code": 105
  }
}
DEBUG    <2016-07-28 17:04:07,177> (protocol.py:48) - handle_incoming_response: in {u'code': 105, u'typehint': u'SendBackgroundMessageEvent', u'detail': u'Initializing Analyzer. Please wait...'}
WARNING  <2016-07-28 17:04:07,177> (protocol.py:61) - Response has not been handled: {u'code': 105, u'typehint': u'SendBackgroundMessageEvent', u'detail': u'Initializing Analyzer. Please wait...'}
DEBUG    <2016-07-28 17:04:08,187> (ensime.py:750) - unqueue: result received
{
  "payload": {
    "typehint": "AnalyzerReadyEvent"
  }
}
DEBUG    <2016-07-28 17:04:08,187> (protocol.py:48) - handle_incoming_response: in {u'typehint': u'AnalyzerReadyEvent'}
DEBUG    <2016-07-28 17:04:08,187> (ensime.py:386) - message: in
DEBUG    <2016-07-28 17:04:08,187> (ensime.py:387) - [ensime] Analyzer is ready
DEBUG    <2016-07-28 17:04:08,187> (ensime.py:750) - unqueue: result received
{
  "payload": {
    "typehint": "FullTypeCheckCompleteEvent"
  }
}
DEBUG    <2016-07-28 17:04:08,187> (protocol.py:48) - handle_incoming_response: in {u'typehint': u'FullTypeCheckCompleteEvent'}

Love it, logs are actually a big PITA when I have to hack on the plugin. This will improve the contributing experience tremendously.

This one's next in the queue for me whenever you have time to look it over @ChrisCoffey.
Does anyone see other cases that would benefit from pretty-printing? If it's just the completions @ktonga pointed out above I'll just put the pprint under a simple if statement for now, if there are more I can try the wrapper class idea to minimize the distraction.

Okay, I hadn't initially thought of pretty-print all dicts but I guess it makes sense in DEBUG, otherwise how do you really know when one is going to be "small" or not…
I'll make these updates later today, thanks for pointing them out.

I've added pretty-printing of the dicts suggested as well as for send_request. Also inlined the log messages that were in the feedback dictionary that we agreed was annoying.

The log file isn't truncated anymore, I like it. But does it has any rolling/cleanup policy? Or it should be done manually?

It should be truncated on each restart as it was before, the write mode on the line
handler = logging.FileHandler(logfile, mode='w')

does this. Seems to be working that way for me?
There are time- and size-based rotation handlers in the standard lib that could be used, but I'd rather that decision be addressed separately, I was aiming to preserve the existing behavior.

I was aiming to preserve the existing behavior.

That's why I'm asking, it's not behaving the same for me. I exit Vim (the only instance) and enter again, and all the previous log lines are still there. It's not too important if we do something about it later.

That's weird, I can't reproduce. head -n 1 .ensime_cache/ensime-vim.log shows me a different timestamp after each restart when I'm running this branch.

For me the log file is accumulating the lines from multiple Vim sessions. I'll delete it to start fresh and try again.

Maybe lsof | grep 'ensime-vim.log' just as another insurance check something unexpected isn't going on?

Also make clean to clear pyc files just as another sanity check…

Working now after deleting the file. Maybe related to the old file not being created by the logging framework. Weird.

LGTM

Thanks for the review and testing @ktonga!

 That's nothing compared to the excellent work you're doing to improve the codebase!!


Feat/migrate pages to content hub

Motivation
Continuation of #260 , #278

@tkrch While this is working good, there is one extra bit of info that is still coming in.  The content types are still getting assigned to the channel via the table [CMS_ContentTypeChannel].  This allows them to still be added as web page items on the imported channel.

Hi @tkrch & @farmergeek94 -- @twozero6, @bluemodus-gfuller , and I are working on a migration right now, and would like to use this feature. Is it safe for us to work off this branch, or should we wait? Does the time it's taking on review mean there are known issues or changes are coming?

Thank you @tkrch !

Ok that makes sense.  We can always fork that feature branch if we have to as well.

@akfakmot I've been working in this branch and I ran into a bit of an issue.

When I hit line 227, f is null and throws an exception. Even if I swap the fields around, it's always the last field that has the issue. I did a bit of digging and found that the form definition on line 139 in MigratePageTypesCommandHandler.cs is always missing the last field. It also has some unexpected things as if the form definition from the source was merged with the new one. I did make sure that my field names were unique. Is this something you could look into?
Also, I can start a new issue for this if you think it's appropriate. Is it possible to get the Node context in the ConvertFrom method? For example, I would like to get the node's NodeGUID so that I can do additional lookups (get children) before setting the value.


docs: update README.md

✨ Description
perfermance -> performance
✅ Checklist

[ ]  Code has been reviewed
[ ]  Code complies with the project's code standards and best practices
[ ]  Code has passed all tests
[ ]  Code does not affect the normal use of existing features
[ ]  Code has been commented properly
[ ]  Documentation has been updated (if applicable)
[ ]  Demo/checkpoint has been attached (if applicable)

Hi @eltociear, thank you for pointing out that! We've fixed it at https://github.com/open-mmlab/Amphion/pull/319. Thanks!


Allow id to have a foreign key reference

This only requires to NOT create a duplicate field, because there already is an id column.
I think this is very usable when having a 1:1 relationship between different document types.

If someone already did use a foreign key on a non-default Id property (like e.g. in this test: https://github.com/JasperFx/marten/blob/a2ac808fa690caa7005b8720417fe2756d4c5456/src/DocumentDbTests/ForeignKeys/configuring_foreign_key_fields.cs#L50 ) then now the non-default-id property is not duplicated anymore, but the id column is used instead. Should be no difference, but this might be considered a breaking change?


WIP: Add clipping example

Working on translating https://github.com/mrdoob/three.js/blob/dev/examples/webgl_clipping.html?ts=2

Closing because it's really old. We can reopen later or make a fresh PR.


[Template Parameter Constraints] Tooling support

#377
Support autocompletion/intelisense for template parameter constraints.

@timotheeguerin Is this an implementation issue, or is there somethign about tooling support that needs to be discussed ina  design issue?

I guess that one is probably just the implementation

Adding some detail here. I think the feature is that you can write like
model Foo {
   x: string;
    y: string;
}

model Something<T extends M> {
   prop: T.x;
}

And the remaining tooling feature would be to make sure you see all the available properties coming from the constraint when you type T..
As I wrote this, I realize that this might have some potential to break renaming property x or goto definition on T.x so we should check that too.

So, I thought this had to do with intellisense for instantiating templates with parameter constraints, so
model Something<T is string> {
}

MyInstantiation is Someting<|

where '|' is the cursor

That should more or less work for free. I'm assuming that there is a TypeReference node after the is, we should complete it just like after is and : everywhere else.

Nevermind, I read that wrong.

C# doesn't do this either:


[Hub Generated] Publish private branch 'cmk22'

This is a PR generated at OpenAPI Hub. You can view your work branch via this link.
ARM API Information (Control Plane)
Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[ ] new service onboarding
[ ] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
By default, Azure SDKs of all languages (.NET/Python/Java/JavaScript for both management-plane SDK and data-plane SDK, Go for management-plane SDK only ) MUST be refreshed with/after swagger of new version is published. If you prefer NOT to refresh any specific SDK language upon swagger updates in the current PR, please leave details with justification here.

Contribution checklist (MS Employees Only):

[ ] I commit to follow the Breaking Change Policy of "no breaking changes"
[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

Applicability: :warning:
If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

Change to data plane APIs
Adding new properties
All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

[ ] Check this box if any of the following apply to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review.  Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

Adding a new service
Adding new API(s)
Adding a new API version
-[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Note that this doesn't apply if you are trying to merge a PR that was previously in the private repository.

[ ] Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If you have any breaking changes as defined in the Breaking Change Policy, request approval from the Breaking Change Review Board.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Additional details on the process and office hours are on the Breaking Change Wiki.
NOTE: To update API(s) in public preview for over 1 year (refer to Retirement of Previews)
Please follow the link to find more details on PR review process.

The PR is created based on the updates in the private branch. The updates in the PR has already been reviewed and approved with this PR Azure/azure-rest-api-specs-pr/9521

Issue for management client library name :
https://github.com/Azure/azure-sdk-pr/issues/1187

Hi @RBANSALMS This PR was flagged for introducing a new RP namespace that is not being onboarded with RPaaS. Merging this PR to the main branch will be blocked as RPaaS is required for new RPs. To resolve this and allow the PR to be merged into the main branch, please use RPaaS to onboard the new RP.

Please follow this guide, to resolve this and continue the review. Thanks

Hi @RBANSALMS This PR was flagged for introducing a new RP namespace that is not being onboarded with RPaaS. Merging this PR to the main branch will be blocked as RPaaS is required for new RPs. To resolve this and allow the PR to be merged into the main branch, please use RPaaS to onboard the new RP.

Please follow this guide, to resolve this and continue the review. Thanks

@zizw123,
We are already onboarded with RPaaS.

We can close this, I have opened new PR for this:
https://github.com/Azure/azure-rest-api-specs/pull/24608


New secondary and main svg

So changed svg-container to main svg as it has the code for the big fancy interactive SVG.  The secondary was needed to avoid them inheriting the main-svg width CSS on Desktop.
I think this works for now, but maybe some more thought needs to go into this for fixing IE and having the ability to do as many fancy SVG's as we want as easily as we can.

On a CSS change?  What did I do!?

Error: package ‘devtools’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
The command "Rscript -e 'devtools::install_github(c("jimhester/covr", "richfitz/remake", "USGS-R/grithub"), build_vignettes = FALSE)'" failed and exited with 1 during .

Got ya.  I couldn't imagine it had a problem with the changes. lol

Yeah, same error twice =(. It's clearly not getting to the point of testing any of your changes, and I've been bitten by overconfidence that changes won't affect the build before...but in the interest of keeping on keeping on with water use, I'm going to merge. :crossed_fingers:

Oh, crud, I forgot to ask you to increment the package version and require the new version in water-use-15 within these PRs i just closed =(.

  I'm trying to help not inhibit. :(


beer-song: Improve error-handling behavior

As part of #275, we'd like to more closely follow idiomatic Go behavior in the face of errors.
If the beer-song exercise does not have error handling, then this ticket can be closed immediately.
If it does, then follow the below steps:
Ensure err return value is of type error
It's idiomatic for the error return value to be of type error.
Most tests simply check whether err == nil or not. If we don't verify the type of err, it could be any type that has nils.
To lean on the type system, add the following line after assigning err:
var _ error = err

See the hamming tests for an example.
Ignore the normal return value when an error expected
The contract in Go is "if there's an error, assume nothing about the normal return value". Thus, we should only check the non-error return value when there is no error.
In some exercises we found that we were checking the normal return value, even when there was an error.
See the binary tests for an example of the behavior that we want.
Increment the test version
These changes break backwards compatibility. Bump the test version to let reviewers know that the exercise has changed.
This requires changing two constants:

targetTestVersion in the test file (*_test.go)
testVersion in the reference solution (example.go)

If the exercise does not have a test version, then add one, setting the value to 1.
See the version test in leap for an example.

https://github.com/exercism/xgo/pull/368

#368 handled "Ensure err return value is of type error" but not "Ignore the normal return value when an error expected"

@petertseng We ran into the var _ error = err when doing some updates to the tests for largest-series-product and are a bit confused by this bit of code and what is doing. From #381 looks like this was introduced as a compile-time check for the type of err, but I'd argue this is not needed. Since err is assigned as the second return of functions that return an error as the second return value, so even the function returns nil as the second value, it'll be a nil of type error, e.g this program fails to compile.

If we don't verify the type of err, it could be any type that has nils.

Can you provide an example of this?
(Sorry to post on an very old closed issue, but I don't know a better place to talk about this)

Here is an example of the code we had in mind.
package main

import "fmt"

func decrementIfPossible(a int) (int, *struct{}) {
	if a == 0 {
		return 0, &struct{}{}
	}
	return a - 1, nil
}

func main() {
	a, err := decrementIfPossible(0)
	if err == nil {
		fmt.Printf("successfully subtracted 1 from 0 to get %d\n", a)
	} else {
		fmt.Println("you can't decrement 0")
	}
}

They returned a *struct{} from decrementIfPossible when they should be returning an error.


Wallet import issue

Generate new wallet via sui client new-address <schema> it will provide Secret Recovery Phrase
If address was created via secp256r1 or secp256k1 schema and Import as new address into wallet it will be differently address
than was showing on cli.

Only ED25519 keypairs are supported by the Sui Wallet, therefore while you can import a key generated with the two schemas via its recovery phrase, it will be converted into a ED25519 keypair, and thus resulting in a different address.


Doesn't distinguish "Nothing" and "Not set" slots

The plugin doesn't seem to have a way of persisting "Nothing" and "Not set" slots correctly.
When restarting the client, any "Nothing" slots are changed into "Not set" slots.
When loading an outfit from an outfit file, "Not set" slots are changed into "Nothing" slots.
Observed in 1.1.12

Bumping this comment. I would like to be able to build outfits that change my character's clothes but leave their weapons/shields intact. When I save an outfit with a "not set" field it will load with "nothing" which is not the desired behavior.


Adds release note to issue template

Fix https://github.com/dapr/dapr/issues/2171

@AaronCrawfis  Can you merge this? I don't have permission.


Add new operators

Add new operators for IN, BETWEEN and LIKE.
Also added a .gitignore file.

@bastos Really sorry, this pull request slipped off my radar. These changes have made it into QueryKit master manually since this pull-request has conflicts.
Thanks for your contributions @bastos.


Create a GUI for the landing page of this resume extractor

Create a basic landing page for this app in a folder named webpage and use a dark-blue color scheme.

I would like to contribute to this repo can you please recruit me for it

Some improvements are required in this try to connect the html css js script for different models,


All Address 3 lines on templates need to be optional.

Please change the templates' address 3 line to optional. For both the Apache style and ASWF templates, the address line 3 should be document_tab_type =  text_optional

We have address field 3 defined in 4 places in this file: https://github.com/communitybridge/easycla/blob/main/cla-backend-go/template/repository.go#L527  Will update the type to be text_optional.

Created PR: https://github.com/communitybridge/easycla/pull/3305

@thakurveerendras this change allows DocuSign signers to skip the third address line (address line 3), if desired.
To test:

Create a new CLA CLA Group - choose Template (either Apache Style or ASWF template)
Connect one or more repositories to the CLA Group
Create PR and observe user is blocked
Execute ICLA CLA workflow for the user who does not have a CLA on file
Observe the user is directed to the DocuSign website to sign a CLA
In the DocuSign template, observe that address line 3 is not required.
Pass = address 3 is not required to fill out, Fail is when the user is required to fill out address line 3.

Hi @dealako ,
Issue is tested on Dev with CCLAs & ICLAs on Apache Style & ASWF 2020 v2.1 templet and found that 3rd address line is optional at DocuSign template
ICLAs :
https://images.zenhubusercontent.com/194341141/e5775b6c-f2ff-4691-8aee-25303c8c57fb/3304_icla.mp4

CCLAs:
https://images.zenhubusercontent.com/194341141/f6c960f1-b886-42ec-9e8a-1fda92a03646/cclas_newproject.mp4

Confirmed - issue reviewed and resolve. Closing ticket.


TST: Test RSI edge behavior

Technical factors are tested in test_technical.py. This pr moves the RSI tests into that file.
Test that RSI is equal if the returns series is the same, though prices may differ.
Test that RSI is 100 when close prices increases for 14 days.
Test that RSI is 0 when close prices decrease for 14 days.

Coverage remained the same at 87.682% when pulling 7f4687a0873d532067793bf7a2c9fa9aa62d0d3b on test-rsi into 6a20636fcf70cfce15542ed14db4d1980cdbd385 on master.

Coverage remained the same at 87.68% when pulling 77409d3a31d3d5b086700eab0c498b3a7d7fdca8 on test-rsi into 085e0863508a01460d7a2090ecbb576a8f0f3670 on master.

Coverage remained the same at 87.68% when pulling 77409d3a31d3d5b086700eab0c498b3a7d7fdca8 on test-rsi into 085e0863508a01460d7a2090ecbb576a8f0f3670 on master.

Coverage remained the same at 87.68% when pulling 77409d3a31d3d5b086700eab0c498b3a7d7fdca8 on test-rsi into 085e0863508a01460d7a2090ecbb576a8f0f3670 on master.


Updated PPP, user guide, developer guide, list tests and add and edit parser.

Pull Request Test Coverage Report for Build 339

11 of 11 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.03%) to 87.5%

Totals

Change from base Build 336:
0.03%

Covered Lines:
2765

Relevant Lines:
3160

💛  - Coveralls


Cannot stringify arbitrary non-POJOs TRPCClientError

I always get this error: Cannot stringify arbitrary non-POJOs TRPCClientError
Here are my files:
~/server/api/trpc/index.ts
import type { inferAsyncReturnType } from '@trpc/server'
import * as trpc from '@trpc/server'
import * as  z  from 'zod'
import type { OnErrorPayload } from 'trpc-nuxt/api'

import * as PrismaPkg from '@prisma/client'
const {PrismaClient} = PrismaPkg
const client = new PrismaClient()

export const router = trpc.router()
    // queries and mutations...
    .query('hello',{
    // validate input with Zod
        async resolve(req) {
        console.log(req)
        // use your ORM of choice
        return {
            message: `Hello`
        }
    },
})

~/pages/index.vue

<template>
  <NuxtLayout name="home">

{{data}}

      [...]

  <NuxtLayout name="home">
</template>

Looking at the error message, seems to be that my trpc endpoint is refusing connections.
TRPCClientError: request to http://localhost:3000/trpc/hello?batch=1&input=%7B%7D failed, reason: connect ECONNREFUSED ::1:3000
    at Function.from (file:///Users/jean-emrickrioux/Dev/stakeFrites/_tools/trakmos-project/trakmos-nuxt/.nuxt/dist/server/server.mjs:33400:14)
    at file:///Users/jean-emrickrioux/Dev/stakeFrites/_tools/trakmos-project/trakmos-nuxt/.nuxt/dist/server/server.mjs:34021:42
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  originalError: FetchError: request to http://localhost:3000/trpc/hello?batch=1&input=%7B%7D failed, reason: connect ECONNREFUSED ::1:3000
      at ClientRequest.<anonymous> (file:///Users/jean-emrickrioux/Dev/stakeFrites/_tools/trakmos-project/trakmos-nuxt/node_modules/node-fetch/src/index.js:108:11)
      at ClientRequest.emit (node:events:527:28)
      at Socket.socketErrorListener (node:_http_client:454:9)
      at Socket.emit (node:events:527:28)
      at emitErrorNT (node:internal/streams/destroy:164:8)
      at emitErrorCloseNT (node:internal/streams/destroy:129:3)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

Second try:
Changed the trpc directory to ~/server/api/trpc
   [nuxt] [request error] Invalid lazy handler result. It should be a function:
  at ./node_modules/h3/dist/index.mjs:299:17
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async ./node_modules/h3/dist/index.mjs:420:19
  at async Server.nodeHandler (./node_modules/h3/dist/index.mjs:370:7)

My changed nuxt.config.ts looks like this:
export default defineNuxtConfig({
trpc: {
    baseURL: 'http://localhost:3000/api', // defaults to http://localhost:3000
    endpoint: '/trpc', // defaults to /trpc
  },
}

Looking at the error message, seems to be that my trpc endpoint is refusing connections.
if that can help.

I'll take a look at this asap. Thanks for reporting!

No worries, I wouldn't mind being of help, I think that it has to do with the server not properly serving the trpc endpoint, is there anything that comes to mind?
I could investigate in the direction you point me to.
Thanks

Which node version are you using?

Okay, I'm using Node v16 and it works well on that version. I tried v18 and I'm getting your error now

https://github.com/wobsoriano/trpc-nuxt/issues/15

I removed my node_modules, .nuxt and yarn.lock files/directories.
I switched to node 16.15.1
I then ran yarn install.
I still get the same error.

I tried the same using your trpc-nuxt repo and I still get that infamous error: Cannot stringify arbitrary non-POJOs TRPCClientError

I tried playing around in the module files and if I  console.log($client.query) it outputs a promise in my browser console, that gets fulfilled with the right data. The error seems to be happening on the server call which messes up the useAsyncData composable.

If it can make it easier for you here are some steps to reproduce:

git clone https://github.com/stakefrites/trakmos-nuxt
cd trakmos-nuxt
git checkout trpc
yarn install
yarn dev

You will find the trpc folder in ~/server/trpc/index.ts
You will find my client call in ~/pages/index.vue
Appreciate the help a lot, I'd love to give you a hand on some other things to repay my dues 😄

Can you try Node v16.14.2?

It gives me the same error, unfortunately.

Nuxt CLI v3.0.0-rc.4                                                                                12:19:47
RootDir: /Users/jean-emrickrioux/Dev/stakeFrites/_tools/trakmos-project/trakmos-nuxt                                                                                12:19:48
Nuxt project info:                                                                                12:19:48

Operating System: Darwin
Node Version:     v16.15.1
Nuxt Version:     3.0.0-rc.2
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      css, typescript, meta, modules, build, windicss, vite
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

If you upgrade to 3.0.0-rc.4, what happens?

To summarize:
Node must be at version 16 and we must use nuxt : ^3.0.0-rc.4


build as prepublish

If we use an npm prepublish script, there's no reason I can think of to commit these files to git. Instead they can just be generated when doing npm publish.
The only case I can think where this may be important is for the GitHub Pages (gh-pages) branch, but even in that case you can just build, force commit, and push that branch to gh-pages.

Ah wait, I see you're supporting Bower. Yes in that case you would need to check the files in. But even then, you can force commit and push a git tag and Bower will understand it. Or you could just stop supporting Bower as it's more or less deprecated. :wink:

Hey @nolanlawson, I am helping out with getting react-hotkeys up to speed.
I like the idea of this PR and I was hoping to get rid of most (if not all) of the build scripts in scripts/ - but I am still working through all the implications of doing so.
I'd like to keep Bower support for now - do you know any way of establishing how many projects are currently relying on react-hotkeys through Bower?
If I understand you correctly, you are proposing ignoring the build files and creating them using the npm prepublish hook. These files will no longer be checked into the git repo, unless a force push is done (at important commits like tagged releases) so Bower and github pages can still function correctly. Is that right?
What would the workflow look like for staging and committing these ignored files, in the future?


Fix typo in README.md

Fixed a typo in README.md (Secrurity -> Security)

Codecov Report

Merging #208 (a9937de) into main (0157e1d) will increase coverage by 4.12%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #208      +/-   ##
==========================================
+ Coverage   40.46%   44.59%   +4.12%
==========================================
  Files         116      116
  Lines        7777     7784       +7
==========================================
+ Hits         3147     3471     +324
+ Misses       4630     4313     -317

Flag
Coverage Δ

unittests
44.59% <ø> (+4.12%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...urces/PostgresNIO/New/Data/Array+PSQLCodable.swift
94.68% <0.00%> (+1.06%)
:arrow_up:

...rces/PostgresNIO/New/Extensions/Logging+PSQL.swift
19.60% <0.00%> (+1.42%)
:arrow_up:

Sources/PostgresNIO/New/PSQLConnection.swift
31.55% <0.00%> (+1.94%)
:arrow_up:

...s/PostgresNIO/Message/PostgresMessageDecoder.swift
95.45% <0.00%> (+2.27%)
:arrow_up:

Sources/PostgresNIO/New/Data/Int+PSQLCodable.swift
20.26% <0.00%> (+2.61%)
:arrow_up:

...es/PostgresNIO/New/PSQLBackendMessageDecoder.swift
93.28% <0.00%> (+2.98%)
:arrow_up:

Sources/PostgresNIO/New/PSQLRow.swift
66.66% <0.00%> (+3.03%)
:arrow_up:

...urces/PostgresNIO/New/Messages/ErrorResponse.swift
32.30% <0.00%> (+3.07%)
:arrow_up:

...urces/PostgresNIO/New/Data/Float+PSQLCodable.swift
76.66% <0.00%> (+3.33%)
:arrow_up:

Sources/PostgresNIO/New/PSQLBackendMessage.swift
96.63% <0.00%> (+3.36%)
:arrow_up:

... and 18 more


Issue 1803

Title and Issue number
FlipCard Game
Close #1803

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md

@MohitGupta121 Done!
https://github.com/pranjay-poddar/Dev-Geeks/assets/93720428/f8129398-f15d-4053-9f29-3eb51a11224f


[WIP]factory: Serialize callbacks for k8s events.

For integration with OVSDB golang bindings, it
makes sense to not have parallel threads trying
to access the database at the same time.
This is an attempt to serialize all events coming
from kubernetes.  This also lets us get rid of
locks and any other race conditions that we
may have in code.
Signed-off-by: Gurucharan Shetty<EMAIL_ADDRESS>

This still needs work in the sense that, we can start getting rid of locks in the code. But I wanted to get it out there before making a lot of changes about the path I am thinking about.
Any comments @rajatchopra @dcbw ?

@shettyg This lock is fine to prevent callbacks for different resources. But it is a global hammer that will slow things down.
Just FYI, the informers are already serialized for a particular resourceType anyway. e.g. all pod events are serialized, all namespace events are serialized etc.

This lock is fine to prevent callbacks for different resources. But it is a global hammer that will slow things down.

If goal is to serialize, I guess, this is the only place to do this? Right now different threads are trying access OVN database at the same time and it gets prevented by ovn-nbctl serializing things.  And we want to avoid that with OVSDB bindings to make  that part of code simpler.

If goal is to serialize, I guess, this is the only place to do this? Right now different threads are trying access OVN database at the same time and it gets prevented by ovn-nbctl serializing things. And we want to avoid that with OVSDB bindings to make that part of code simpler.

Agreed.

I kinda feel like the bindings should do the serialization, if they can't ensure safe parallel access to the database?

I kinda feel like the bindings should do the serialization, if they can't ensure safe parallel access to the database?

We will see. We are still working through the bindings library. Currently, a simple modification on top of this series looks like this commit:
https://github.com/TomCodeLV/ovn-kubernetes/commit/3c3380d726b736da638cc2399550a6e6035ef609
We will work through a few conversions and then decide.  We don't want to overcomplicate bindings code right away. We can always move serialization further down if that makes sense.

And write to database (via logical port delete) looks like this:
https://github.com/TomCodeLV/ovn-kubernetes/commit/89aefd8101a037860df137cf3749c5b7eb2ee0e6


Improvement: clear selected records on Tab (filter) change

[X] Changes have been thoroughly tested to not break existing functionality.
[n/a] New functionality has been documented or existing documentation has been updated to reflect changes.
[n/a] Visual changes are explained in the PR description using a screenshot/recording of before and after.

"Tab" refers to these tabs, not the the Form tabs.
Issue: when records are selected and a Tab filter is clicked, the selection is not cleared, leading to inconsistent UI states and/or confusion to which records are selected or not.
This PR deselects all table records when a Tab filter is clicked.

Duplicate of #8123


KeePassX support

KeePassX is open source so easier to integrate :)

@zedtux that's not a bad idea. I may look into this :smile:

Take my vote as well.


debouncing componentWillRecieveprops causing props and nextprops to r…

Hi,
I am sure you would have debounced componentWillReceivePRops for some purpose in the past. Look like something along the line got fixed, which is breaking your project now. I have removed the debouncing step and it works. You know the best ... Thanks for this project

@sanjay1909  This library is pretty much abandoned. Have you've glimpsed at the plethora of issues? I wrote react-codemirror2 and have been actively maintaining it because of the frustrations I've encountered here. Not to mention the lack of tests, heavy dependencies, ancient documentation, etc. I am shocked people are still grasping on to this library...


bug: Collaboration information not displayed

Describe the bug
The collaborators information are not well displayed in the list. There is also an error with the icons (see screen shots).
To Reproduce
Steps to reproduce the behavior:

Go to https://app2.test.dasch.swiss/project/0807/collaboration
See error

Expected behavior
Information well displayed.
Screenshots

Desktop (please complete the following information):

OS: MacOS High Sierra
Browser: Chrome + Safari
Version N.A.

Additional context
N.A.

Probably it's an issue because of the breaking change in Knora: dhlab-basel/Knora#1411
We should test the groups service in @knora/core module with the latest release of Knora and fix it asap.

@kilchenmann I cannot reproduce the error in KUIRL locally... can you?

@subotic It seems that the issue may come from the test data on the test server.. In the project, users are set as collaborators (the view is truncated) but in the user's profile, the user is not a member of the related project (manage project membership).
We resolve temporarily the issue by adding manually users to projects.


Fixed the Array_type_property_fix_in_attestation_flow

https://github.com/Sunbird-RC/sunbird-rc-core/pull/337 - This issue is fixed here.


errors when having no search provider

Test #59922

have an extension that contributes a file system but not a search provider (like the memfs sample)
open file search (cmd+p)
:bug: you see an error message pop up, the console also has errors

ERR No search provider registered for scheme: mem: Error: No search provider registered for scheme: mem
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4720:335
    at Array.forEach (<anonymous>)
    at t.searchWithProviders (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4720:170)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4719:412
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

https://github.com/Microsoft/vscode/issues/58370
We need some warning or message but maybe we leave it in devtools but don't show a notification.


Add Pill to Storybook

Feature Description
Adds a light and dark variant of a pill to storybook that can be imported to editor and dashboard.
https://www.figma.com/file/bMhG3KyrJF8vIAODgmbeqT/Design-System?node-id=3447%3A64541
Alternatives Considered

Additional Context

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
Light and Dark mode.
Accessible.
Complies to best practices for forms.
Should include example in storybook.
Implementation Brief

Pill is already in design system: https://google.github.io/web-stories-wp/storybook/?path=/story/designsystem-components-pill--default


fix: add displayName to anonymous components

Closes: https://github.com/tremorlabs/tremor/issues/445#issue-1706952817

Added displayName to all anonymous components
Enabled the eslint rule that forces specifying displayName for anonymous components. Previously, this was manually disabled

@amirhhashemi thanks for submitting all these issues / PRs :) We will review as soon as we can.

LGTM, great work 🚀


Add XnViewMP v0.93.1

XnViewMP (https://www.xnview.com/en/xnviewmp/) is a multi-platform image viewer, editor and manager.

Duplicate of https://github.com/lukesampson/scoop-extras/pull/2812


Compilation on c++

Sorry to border you here, while you lib works amazingly well, it has a small compilation problem if you compile on a c++ code/compiler. May a suggest to warp the function signatures around a:
#ifdef __cplusplus
extern "C" {
#endif
.
.
.
#ifdef __cplusplus
}
#endif
Except for that, your library is perfect and really solved my serial communication problems with Arduino, so thank you for that.
PS: without the extern "C", the code will not compile/link, but the proposed solution removes all the problems

I don't think it is necessary. Just include the headers in your main.hpp like that:
extern "C" {
	#include "arduino-serial-lib.h"
}


Melee bot no longer zaps structures because of smart melee

Is canceling the call to zap.

It's also not chasing enemy bots when near a chip.


Visually highlight WebView2s in apps

A feature to see visually where a WebView2 is located within an application.
A rectangular border or a light semi-transparent overlay on top of the WebView2 so that users can see where the WebView2 is.

I've been trying this out a bunch and it seems like Windows just gives me the wrong coordinates for an HWND initially. Probably put this feature on hold.

Here's a screenshot of how it was working previously:

It had a problem where before moving or resizing the window with the webview2, Windows would give the wrong position for the WebView2 and the overlay is in the wrong place.
The work for this was in the branch webview2-overlay


update workflow with improvements from v3

vizualization, options, etc.
fix branch name
change retention days to 1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 76.82%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
633

Relevant Lines:
824

💛  - Coveralls


Added a cpjobqueue deployment and redis deployment

WIP. Untested. Depends on https://github.com/wikimedia/change-propagation/pull/221

@d00rman updated. All the unnecessary pieces were due to a lack of a rebase.

@Pchelolo mwctl stuff is still there?

@Pchelolo mwctl stuff is still there?

Rebasing magic. Fixed.


copy-paste with ctrl+C is broken on Firefox with Windows+Linux (sender names are missing)

Here's what happens when you copy-paste with ctrl+C on Windows:
So, just to explain what's going on there are 2 copy-paste implementations.
  12:27 PM

One is the ctrl+C / ctrl+V implementation, which is in static/js/copy_and_paste.js and has pretty extensive tests.
  12:28 PM

The second is what happens if, (at least on Linux), you select text and then just paste it with e.g. the middle mouse button, which does not trigger our copy-paste handler and instead is determined by the ordering of elements and the no-select tags.
  12:28 PM

For me, at least, in Chrome the ctrl+C one works great, and the other one is somewhat messy.
12:30 PM

On chrome everything seems to work fine, the problem exists on Firefox...
1:07 PM

one way to handle this would be to have a popover menu when you select more than 1 message of text, that allows you to select one of a few copy options (e.g. copy selection, copy selected messages, copy message content with full info like sender and timestamps)
  1:08 PM

(or V1 can just be the middle one: copy messages, which is the one I want 90% of the time)

The code for this copy-paste implementation is in static/js/copy_and_paste.js -- we'll likely need to print-debug or something to figure out what's going on.

Also on Mac (This is purely a browser specific issue)


I just got to the point where

I just got to the point where I was going to go to the

I just got to the point where I was going to go to the


Add a new node type DataLeaf

Is your feature request related to a problem? Please describe.
I have the following:

However I would much prefer:
BeeHaveTree
└── GoToOwnRoomAction
    └── SequenceStarComposite
        ├── HasOwnership
        │   └── DataLeaf (OwnBedroom)
        └── GoTo
            └── DataLeaf (OwnBedroom)

Describe the solution you'd like
I want the character to GoTo some place, but I don't want to have to specify that place in code every time.
I want to describe a list of places:
OwnBedroom
OwnLivingRoom
OwnBathroom

And then apply these as a child of the GoTo action to modify it's behaviour.
Describe alternatives you've considered
I will just write these nodes myself.

DataLeaf.gd
extends Node2D

@export var name: String = "NO_NAME"
@export var value: Variant = null

func _init(new_name: String, new_value: Variant) -> void:
	self.name = new_name
	self.value = new_value

	var path = str(get_script().get_path())

	if len(name) < 1:
		push_warning("%s has no name")

	if value == null:
		push_warning("%s has no value")

DataLeaf.gd
class_name DataLeaf
extends Node2D

func get() -> Variant:
	var path = str(get_script().get_path())
	push_warning("%s has no getter, please override this")

	return null

OwnRoom.gd
class_name OwnBedroom
extends DataLeaf

func get(_actor, _blackboard: BlackBoard) -> void:
	return Ownership.find_first_of_type(actor, "bedroom")

Which has allowed me to simplify my logic as follows:

has_own.gd
extends ConditionLeaf

func tick(actor: Node, blackboard: Blackboard) -> int:
	var has_ownership = get_child(0).get_value(actor, blackboard)

	if has_ownership:
		return SUCCESS

	return FAILURE

own_bedroom.gd
class_name OwnBedroom
extends DataLeaf

func get_value(actor, _blackboard: Blackboard) -> Variant:
	return Ownership.find_first_of_type(actor, "bedroom")

go_to.gd
class_name GoTo
extends ActionLeaf

func tick(actor: Node, blackboard: Blackboard) -> int:
	var target_node = get_child(0).get_value(actor, blackboard)

	if target_node == null:
		return FAILURE

	if not actor.has_target():
		actor.move_to(target_node.get_owned_position())

	if not actor.navigation.is_navigation_finished():
		return RUNNING

	return SUCCESS

func interrupt(actor: Node, _blackboard: Blackboard) -> void:
	actor.stop()

This is exactly what blackboards are for: https://bitbra.in/beehave/#/manual/blackboard
The idea is that you can store information per node in the blackboard, like this:
extends ConditionLeaf

@export var identifier = ""

func tick(actor: Node, blackboard: Blackboard) -> int:
	var has_ownership = blackboard.get_value("ownership", false, identifier)

	if has_ownership:
		return SUCCESS

	return FAILURE

Then inside the tree (within the action + condition leaf) you can give it a custom identifier (e.g. "Captain") so the blackboard values you are setting/getting are local to that identifier. You can alternatively, also use get_instance_id() in case you want to track values unique to that very instance. The advantage of a blackboard is that you can keep your entire tree stateless.
Obviously, you need to set the value also somewhere: this can be done inside the ActionLeaf for example.

@bitbrain yes I found that way through Blackboard, however I will continue to use this DataLeaf idea as I find it more visual and easier to debug.
When I first watched your woodcutter video on youtube as an introduction to this plugin, my thought was:
"Oh that's a shame you have to inject values in that way"
And so I'm guessing newcomers to Godot will also find that a sticking point.

I prefer this way in general because when I'm working with AI I can very easily modify the location or item that the subtree is referring to.

I don't need to code anything, just write out the name of what it is they should look for

It also becomes very easy visually to determine where the AI is going, without requiring a new complex type for each action

An interesting idea here is that we could also separate Own and Bedroom, into a CombinationDataLeaf and a DataLeaf
Which could create a tree possibility like:
Find
└── Own
    └── Bedroom

Find -> ConditionalLeaf
Own -> CombinerDataLeaf -> get_child(0).get_value().find_owned()
Bedroom -> find_all_bedrooms()

Or even
Find
└── Enemy
    └── Bedroom

Another example use case for the DataLeaf, stateless:

AvailableWorkstation.gd
class_name AvailableWorkstation
extends DataLeaf

func sort_by_distance(a: Node, b: Node, actor: CharacterBody2D) -> bool:
	return (\
		actor.position.distance_squared_to(a.position)\
		<\
		actor.position.distance_squared_to(b.position)\
	)

func is_available(workstation: Node, actor: CharacterBody2D) -> bool:
	return workstation.is_available(actor)

func get_value(actor: CharacterBody2D, _blackboard: Blackboard) -> Variant:
	var workstations = get_tree()\
		.get_nodes_in_group("workstation")\
		.filter(is_available.bind(actor))

	workstations\
		.sort_custom(sort_by_distance.bind(actor))

	if not len(workstations):
		return null

	return workstations[0]

SetUsed.gd
@tool
class_name SetUsed
extends DataActionLeaf

func tick(actor: Node, blackboard: Blackboard) -> int:
	var target = target_node.get_value(actor, blackboard)
	if not target:
		return FAILURE

	target.set_used_by(actor)
	return SUCCESS

The purpose of a leaf in the context of behavior trees is either a condition or an action (as any node needs to handle the tick correctly). I'd argue that while a DataLeaf works, it is an anti-pattern in the context of behavior trees:

any state that is local to one particular node should be part of that node
any state that is shared between multiple nodes should be stored in the blackboard
any node in the behavior tree needs to indicate its status through the SUCCESS, RUNNING or FAILURE status
Conditions & Actions are not allowed to have children. This is because they are leafs and the idea is that a leaf is in fact the lowest element in a tree

Feel free to use this concept within your game itself, though. It is a valid concept to utilize (e.g. implement your own action node with child nodes that have state).


Include original name in the Plugin API query result

Is your feature request related to a problem? Please describe.
As a plugin author using the Dataview API, I want to know the original field names in a query so that my plugin can edit the property inside the note.
For example, the following query creates aliases for the original properties.
TABLE status AS "priority", priority AS "status" FROM "Work"

If my plugin used the field names in the query result, it would update the wrong field.
In the case of aggregation functions, there's not even a field to update.
Describe the solution you'd like

I'd like a way to map the alias back to its original name, e.g. aliases.
I'd like a way to know what fields are computed/derived so that I can make them read-only in the UI.

export declare type TableResult = {
    type: "table";
    headers: string[];
    values: Literal[][];
    idMeaning: IdentifierMeaning;

    // Proposal:
    aliases: Record<string, string>;
    derivedHeaders: string[];
};

Describe alternatives you've considered
I don't really need the query result itself. I could probably parse the Dataview query itself to create the mapping, but I don't want to reimplement the Dataview parser.
Additional context
Links to my plugin:

Querying Dataview
Parsing TableResult.

Just to check, if you don't need the query output at all you can instead use the parseQuery function which was recently added to the obsidian-dataview library on npm (https://github.com/blacksmithgu/obsidian-dataview/blob/829b01364f1cfd3ba3f66bb02e46b490292da06a/src/query/parse.ts#L191).
It offers a full raw AST, including the original field names and their aliases.

That sounds promising indeed! I tried using it, but it doesn't seem to be exported in the public API?

Any news on this?


Add e2e test coverage of ilab data generate --pipeline full

The latest code in the instructlab/sdg repo has support for a more extensive data generation pipeline. This pipeline is not the default because it requires Mixtral-8x7b-Instruct, which is larger than our default model. We need another e2e variant on AWS that uses a larger instance type capable of exercising this functionality.
I am actively working on this.

I have everything running manually using this AWS instance type

g4dn.12xlarge -- 4 x NVIDIA T4 GPUs (64 GB total GPU Memory)

and this quantized version of Mixtral

https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/blob/main/mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf


[Bug]: iOS - The SORA Card issuance process breaks down if you enter a new phone number

Preconditions

Start KYC flow
Email is not confirmed yet

Steps to reproduce

Go to the confirm email screen
Go back and enter another phone number

Actual behavior
The SORA Card issuance process breaks down if you enter a new phone number.
There is also a problem that if you start going back from this screen and enter a new phone, then everything breaks, because... in the new SDK we do not store an authorization token, and we need to explicitly log out before trying to log in with a new phone.
Expected behavior
We need to figure out what the problem is and how to solve it maybe through the UI.
Environment
{"label"=>"Stage"}
OS version
17.2.1
Additional context
Soralution 3.8.3(3) version

Verified on 3.8.3 (7) version.
Added to next release scope.

Verified on 3.8.4(7) Soralution version.


App groups and dependencies doc fixes and improvements

In https://mesosphere.github.io/marathon/docs/application-groups.html

fix paths in example, such as /product/mongo -> /product/database/mongo
explain paths semantics + best practice: relative rather than absolute
different example (not MySQL)
add concrete example (such as Redis + Python)

Also: where are the original (OmniGraffle?) docs?

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2897. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Change priority of AWS credential providers to accept AWS_SESSION_TOKEN

What is the purpose of this change? What does it change?
It is currently not possible to use the restic S3 backend with IAM credentials that are temporary and scoped to a subdirectory. The first one requires restic to accept AWS_SESSION_TOKEN credentials.
The current priority of AWS credential providers ignore AWS_SESSION_TOKEN env variable.
Was the change discussed in an issue or in the forum before?
This pull request aims to solve the issue as described here #1477
https://github.com/restic/restic/pull/1479
Checklist

[x] I have read the Contribution Guidelines
[ ] I have added tests for all changes in this PR
[ ] I have added documentation for the changes (in the manual)
[x] There's a new file in a subdir of changelog/x.y.z that describe the changes for our users (template here)
[x] I have run gofmt on the code in all commits
[x] All commit messages are formatted in the same style as the other commits in the repo
[x] I'm done, this Pull Request is ready for review

According to the discussion at https://github.com/restic/restic/pull/1479  there is no need for a separate test.

Codecov Report

Merging #1647 into master will decrease coverage by 5.22%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #1647      +/-   ##
==========================================
- Coverage    51.7%   46.47%   -5.23%
==========================================
  Files         142      142
  Lines       11396    11399       +3
==========================================
- Hits         5892     5298     -594
- Misses       4586     5240     +654
+ Partials      918      861      -57

Impacted Files
Coverage Δ

internal/backend/s3/config.go
77.14% <ø> (ø)
:arrow_up:

cmd/restic/global.go
24.85% <0%> (-0.15%)
:arrow_down:

internal/backend/s3/s3.go
65.26% <100%> (+0.13%)
:arrow_up:

internal/backend/azure/azure.go
0% <0%> (-79.55%)
:arrow_down:

internal/backend/swift/swift.go
0% <0%> (-78.45%)
:arrow_down:

internal/backend/b2/b2.go
0% <0%> (-77.73%)
:arrow_down:

internal/backend/gs/gs.go
0% <0%> (-73.4%)
:arrow_down:

internal/backend/swift/config.go
36.95% <0%> (-54.35%)
:arrow_down:

Continue to review full report at Codecov.

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

hey, thanks for giving this a try. I'm pretty sure it is already supported in the current code, we're calling credentials.EnvAWS in minio-go, which will try to load a token from the environment. Can you please confirm that it does not work right now? Thanks!

I've tested and you are right, credentials.EnvAWS can solve a problem with AWS_SESSION_TOKEN
But with the current priority of available credentials in credentials.NewChainCredentials,  there is no chance to pass AWS_SESSION_TOKEN

// The Chain provides a way of chaining multiple providers together
// which will pick the first available using priority order of the
// Providers in the list.

When I set env variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
The first available providers credentials.Static is used(which ignore AWS_SESSION_TOKEN).
What you think about removing credentials.Static from credentials.NewChainCredentials?
credentials.Static   - use  env variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
credentials.EnvAWS   - use  env variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN

@harshavardhana would you mind taking a look? I'd like your opinion on the issue :)

@fd0 @duzvik we could move the env to have higher priority than static and then fallback to I AM when all else fails ?

Sounds good to me

Can you please squash the commits? And there's a typo in the title of the commit which adds the changelog issue ("changlelog").

Otherwise this change looks good. Thanks!

Done

Thanks, that was fast!
Just one final question: Did you try it? Does it work?

Yes. I'm confirming. It's work.
Restic successfully accept AWS_SESSION_TOKEN

Thanks!


[Suggestion] Restrict Movement and Claim Level Up Rewards

Expected Behavior

Set a perimeter for how far you want your trainer to walk, this is to limit the area that the trainer wanders.

Each time Trainer levels up, allow bot to collect the level up reward items or, if necessary, have the bot restart each time trainer levels in order to collect reward items.

Actual Behavior

Wanders aimlessly wherever the closest available pokestop is

Bot does not collect level up reward items at all. Only way to currently do this is by logging in yourself, which will cause a softban.

Steps to Reproduce

Use the bot

Use the bot

Other Information
OS: Windows 10 and MacOS

I think the egg rewards are also not colleted.

the egg rewards are collected, they are just not reported

Level up rewards are causing the inventory bag to have more items than allowed


Strange behaviour with quality settings

Hi,
I am trying to compress a PNG file and experience very strange behaviour.
my original file is 2.4MB png image . when running it through Sharp with those settings
var img = Sharp(data.Body)
.jpeg({ quality: 75, force: false })
.png({ compressionLevel: 8, force: false});
i am getting back 2Mb file size .
When sending
var img = Sharp(data.Body)
.jpeg({ quality: 75, force: false })
.png({ compressionLevel: 5, force: false});
I am getting back 2.5MB
While other online tools were able to reduce the file to 500kb.
Anything to do here ?
Thanks !

Hello, please see #478, #600, #1017, #1110 and #1158, which all relate to the same question as to why a PNG file might be larger after processing.

Hey, I looked at all the issues you have suggested, I cant find a answer on what to do so that the file will be smaller,  All theses links are pointing to other links and finally, there is something vague about libvips, All I want to know is that, is it even possible to fix it? If so please point me in the right direction, btw I am using this github.com/jimmynicol/image-resizer. @lovell

@typedefstructer http://sharp.pixelplumbing.com/en/stable/api-output/#png

"PNG output is always full colour at 8 or 16 bits per pixel. Indexed PNG input at 1, 2 or 4 bits per pixel is converted to 8 bits per pixel."

got it posterize options helped us, thank you @lovell

posterize options? Can you please explain ?


Enable grinder tests with different jdk|impl|platform.

Add testpipeline.groovy to create and launch personal builds
Add general JobTemplate.groovy to define test jobs.

Signed-off-by: Sophia Guo<EMAIL_ADDRESS>

Will merge this now, so we can continue to refine it after seeing it in 'action' in WIP tab in Jenkins.
Adding a reminder note here, on upcoming revisions of this, there is an opportunity to take advantage of what @llxia did for the Deepsmith work, to choose to run on same machine or not, and to diff the differences in the run.  This will allow a triager to run same test for openj9 and hotspot impls on same machine and directly compare differences in output (using Test Compare in trss, or downloading the diff file which is archived as an artifact).


Difference between this and ERC-1155?

Personally, I think they are similar. Can you elaborate on the differences？

For NFTs, you would want to use ERC721, which has a ownerOf(id) function.
ERC1155 doesn't have ownerOf(id).
In order to find out whether a certain account owns a certain id,
you will need to listen to the TransferFrom events and record it to your own database.
From recent twitch stream https://www.twitch.tv/videos/1299266697 by @fulldecent (36 minute mark)

Recommending to close issue and move discussion to StackOverflow or other forums.


BAEL-5267: Initial demo server and client commit

Creates a demo server and client application for the new Spring Cloud Load Balancer article.

Retest this please

Problem building spring-cloud-loadbalancer-server. Kicking off another jenkins build. The console output didn't indicate a failure.

@eric-martin Is still still failing? It's working for me locally:
mvn install
...
[INFO] Reactor Summary:
[INFO]
[INFO] spring-cloud-loadbalancer-server 0.0.1-SNAPSHOT .... SUCCESS [  1.449 s]
[INFO] spring-cloud-loadbalancer-client 0.0.1-SNAPSHOT .... SUCCESS [  1.535 s]
[INFO] parent 1.0.0 ....................................... SUCCESS [  0.072 s]

When I try to build the entire spring-cloud module I do see this failure:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project spring-cloud-eureka-server: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/mike/github/tutorials/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

@KevinGilmore All curly brace and tab issues should be resolved now


new project x6-app-dag-vue

Expected Behavior
Add a project x6-app-dag-vue
Possible Solution

Additional Context

https://gitee.com/worthworld/dag


How can I report security problem to you?

Hi, there.
I found a severe vulnerability of Winery. This issue may be not suitable for disclosing.
So please give me a contact info and I can privately report to you.

Please see my github profile https://github.com/koppor/ for my email address. Thank you for informing us in advance!


Added book recommendation.

I added a kids' book on Python, for beginners and people who are teaching or working with kids (I'm a librarian, and most of our coding programs at the library are kid-friendly).

[x ] I have read freeCodeCamp's contribution guidelines.
[x ] My pull request has a descriptive title (not a vague title like Update index.md)
[x ] My pull request targets the master branch of freeCodeCamp.
[x ] None of my changes are plagiarized from another source without proper attribution.
[ x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you for opening this pull request.
Book recommendations are beyond the scope of the freeCodeCamp Guide, so we've decided to go ahead and remove these book recommendation articles.
I encourage you to review this book in the ratings category of the freeCodeCamp forum. Your recommendation will reach way more people there.
Thanks again recommending this book, and for contributing to the freeCodeCamp Guide.


How do I configure a Custom weapon

How do I configure a Custom weapon i added with the custom items section

It's quite simple just use one of the events of Synapse and check if the used weapon is your custom weapon and apply all the changes like this
private void Player_PlayerDamageEvent(SynapseEventArguments.PlayerDamageEventArgs ev)
{
   if (ev.Killer?.ItemInHand?.ID == 257) //Instead of 257 use the ID of your Custom Item
       ev.Damage = 99999;
}

also don't forget to hook the method to the event


proposal: runtime: optionally dump PGO profile at the program exit

According to the official Go documentation about PGO, the only described way to collect a PGO profile is via https://pkg.go.dev/net/http/pprof and collect the profile from a dedicated HTTP handler.
This way has a major drawback - it's not convenient to collect profiles from non-service-like workloads. E.g. if I have a one-shot system - it is almost not possible to collect a good profile from the application.
As far as I understand, in such cases could be applied tricks from https://pkg.go.dev/runtime/pprof documentation with
manual CPU dumping. This way also has some drawbacks:

Right now it's not clear - what kind of profile should be collected for the PGO build. CpuProfile, Memprofile? I guess CpuProfile should be used
A user needs to manually integrate profile collection at exit - it could be an error-prone activity

I suggest an additional way to collect PGO profiles - add a specific "Instrumentation" build for the Go application. This would be very similar to Instrumentation PGO in other languages/compilers like Clang, GCC, Rustc. In the Go application, this specific kind of build will simply insert a code by dumping a PGO profile to a disk at the program exit (like it's done in Clang). This makes it much easier to collect PGO profiles for programs like https://github.com/dominikh/go-tools .
Also, an additional way with auto-dumping makes using PGO in Go easier for people who have PGO experience from other languages like C++ and Rust.

CC @golang/runtime

Yes, for now, CPUProfile should be used.
In the proposal https://github.com/golang/go/issues/55022, specifically the "future work" part of the design https://go.googlesource.com/proposal/+/master/design/55022-pgo.md?pli=1#profile-collection
If in the future we support more than CPU profiles, "As PGO profiles may be beyond just CPU profiles, we could also have a “collect a PGO profile” API, which enables a (possibly configurable) set of profiles to collect specifically for PGO." But we're not there for the now.

Thanks for the link! It also answers my question regarding the configurable profile rate :) Could we add the information regarding "If you decided to create PGO profiles manually with pprof, you need to use CPU profiles" somewhere to the official PGO documentation? Also, having a note about the temporal inability to configure rate limit is also neat information to know since tweaking the profile rate is a default technique to increase/decrease PGO overhead in the production (completely in the same way as it's done for Linux perf and its sample rate for AutoFDO case).

Are you proposing to just automatically stop the profiling (and close the file), or also automatically start the profiling?

I am proposing automatically start and stop profiling (like it's done in Clang, GCC and Rustc). Start at the beginning of the program, stop at the end.

For starting the profile, one would need to choose the file name and path. There doesn't seem to have an obvious default, so runtime would not be able to choose one automatically.

We can take a look at how it's implemented in other compilers like Clang - link. Clang uses default.profraw as a default filename for profiles. This filename is easily configurable via command-line options (-fprofile-instr-generate=code-%m.profraw) or in runtime via env var (LLVM_PROFILE_FILE="code-%m.profraw"). GCC and Rustc behave in a similar way. From my experience with applying PGO to multiple projects - at least on these projects I didn't have any name crossing with existing files in the project. But anyway - in Go we can choose other defaults.

This is an inherently difficult question. To collect a good profile, one needs to run the program with a set of representative workloads. For example, for the compiler, we collect profiles for all packages in the standard library and toolchain then merge it into a single file https://cs.opensource.google/go/go/+/master:src/cmd/compile/profile.sh The Go toolchain would not be able to decide what workloads are representative and helpful for profile collection in an automatic way.

Choosing the proper workload is another topic for discussion, yep - it's up to a project to find a good near real-life workload. Regarding one-shot systems, it's not a problem since Go tooling already has the ability to merge multiple profiles into one. So for the one-shot systems, we just run the program N times, collect N profiles, merge them into one, and use it during the PGO optimization. I did this multiple times, e.g. during optimizing clang-format, clang-tidy, and other similar projects.

Instrumentation-based profile is discussed in the proposal https://github.com/golang/go/issues/55022, specifically the design doc https://go.googlesource.com/proposal/+/master/design/55022-pgo.md?pli=1#autofdo-vs_instrumentation_based-fdo
We chose not to add instrumentation-based profiles for now. If you want to add this support, it would be a separate proposal with more complete design and discussion. Thanks.

Once again - thanks for the link! I see I need to clarify my current proposal - I don't mean to implement the Instrumentation-based PGO. I believe the current AutoFDO approach is fine. I just want to have the ability to automatically start and stop profiling for programs without HTTP interfaces. So my ideal PGO workload for non-service systems looks like this:

Compile a Go program with auto-enabled PGO at the start (maybe like go build -pgo=autostart or smth like that)
Run my program N times on different workloads, get N PGO profiles
Merge N PGO profiles into one
Compile the program once again with the collected profiles

Right now to implement this scenario I need to manually tweak the program with pprof stuff like importing required packages, and writing a code for start and stop profiling. But I don't want to do it since the compiler can wonderfully implement it "automatically" via an additional build option. I hope my scenario and desire are clear enough ;)

Hi, thanks for filing this issue. It seems to me that there are two different parts here, feedback on the documentation, and a specific technical proposal. I will respond to both below:

According to the official Go documentation about PGO, the only described way to collect a PGO profile is via https://pkg.go.dev/net/http/pprof and collect the profile from a dedicated HTTP handler.

The main documentation for PGO profile collection is https://go.dev/doc/pgo#collecting-profiles. The first two sentences of this section are:

The Go compiler expects a CPU pprof profile as the input to PGO. Profiles generated by the Go runtime (such as from runtime/pprof and net/http/pprof) can be used directly as the compiler input.

I think that should be pretty clear that net/http/pprof is not the only way to collect profiles? I suspect your comment came out of the later note section about collecting profiles from a production system, which does focus only on net/http/pprof. Perhaps it would be worth adding a mention there about collection for batch systems. As you mention, this varies from application to application, but probably consists of running the system with a representative input N times, with profiling enabled for the entire run.

Right now it's not clear - what kind of profile should be collected for the PGO build. CpuProfile, Memprofile? I guess CpuProfile should be used

Per above, the documentation does specify "CPU pprof profile" in the first sentence of the collection section. Perhaps we should make this more clear by specifically citing pprof.StartCPUProfile.
Regarding the automatic profile collection proposal, if I understand correctly, what you are proposing is essentially a build flag that inserts the example at https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program to the start of the program (except for the memprofile part, and perhaps name selection is automatic)?
Personally, I'm a bit skeptical of the usefulness as a dedicated build option. Profiling in Go is meant to be easy to integrate into applications. e.g., the CPU profiling portion of https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program is only 9 lines of code. Given this ease, I'm not convinced we need an entire build mode to do this for folks. I think it may be better to invest energy in improving documentation to make sure it is clear how to do this.
I can see some minor advantages. e.g., applications that add CPU profiling support often end up with slightly different flags/environment variables/etc to enable profiling, and more consistency would be nice. But in that vain, rather than a PGO-specific option, I am tempted to consider a more universal approach. e.g., every Go binary will automatically enable profiling if GOCPUPROFILE=filename is set.

Per above, the documentation does specify "CPU pprof profile" in the first sentence of the collection section. Perhaps we should make this more clear by specifically citing pprof.StartCPUProfile

Yes, it would be great. However, I recommend you insert an example (probably a bit reworked) from the article into the official documentation. In this case, users who want to dump the CPU profiles manually will know how to do it from the official documentation (and all PGO-related information will be written in one place).

Regarding the automatic profile collection proposal, if I understand correctly, what you are proposing is essentially a build flag that inserts the example at https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program to the start of the program (except for the memprofile part, and perhaps name selection is automatic)?

Right. And inserts autodumping the profile information into the disk at the end of the program. Name selection could be automatic or controlled via environment variables.

Personally, I'm a bit skeptical of the usefulness as a dedicated build option. Profiling in Go is meant to be easy to integrate into applications. e.g., the CPU profiling portion of https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program is only 9 lines of code. Given this ease, I'm not convinced we need an entire build mode to do this for folks. I think it may be better to invest energy in improving documentation to make sure it is clear how to do this.

Well, placing these 9 lines properly is not an easy task, if you are trying to optimize many different Go projects :) But even so, let's imagine I want to prepare a PGO profile for a program. I place these lines into the code, collect profiles, and recompile the project. And I need to remove these lines (or disable them somehow), because:

I do not plan to release my binaries with enabled instrumentation
I do not need unused dependencies in my production builds
So every time I want to collect (collect initially and regular updates for them later) I need to add and remove this profiling-specific code. Compare this to a compiler option, where I need just recompile the same sources, collect profiles, and perform PGO optimization without changing my sources.

Also, there is an interesting case for PGO - when PGO is enabled not by direct developers of the program but by the maintainers (here I mean Linux distros maintainers). For them is much easier to enable an additional compiler option compared to tweaking sources, collecting profiles, and then reverting the PGO-oriented changes. This problem cannot be easily mitigated by committing profiles directly into the repo in the upstream since not all maintainers "trust" the profiles provided by an upstream (due to different concerns, including security concerns).

I can see some minor advantages. e.g., applications that add CPU profiling support often end up with slightly different flags/environment variables/etc to enable profiling, and more consistency would be nice. But in that vain, rather than a PGO-specific option, I am tempted to consider a more universal approach. e.g., every Go binary will automatically enable profiling if GOCPUPROFILE=filename is set.

I do not like the idea that every binary by default includes profiling-related code inside (it can lead to a slight binary size increase, etc.) but probably I am too strict in this area since my main domain is C++/Rust. If I am able to simply enable PGO profile creation with GOCPUPROFILE=filename and I will get the profile in this filename automatically after the program is closed - my use-case will be fully covered.

Would go test suit your use case?
go test -cpuprofile default.pgo -bench BenchmarkMain

// main_pgo_test.go
package main

import "testing"

func BenchmarkMain(b *testing.B) {
	for i := 0; i < b.N; i++ {
		main()
	}
}

Would go test suit your use case?

Not sure.  Your way means that I need to implement the benchmark manually. If we want to change Go program sources, adding pprof support would be a better idea, I guess.
If a program already has some benchmarks and we want to collect PGO profiles from running the benchmarks (that's not always the best idea but anyway) - yes, it will work.


if a QueryFunction is typed, it won't accept undefined as data when passing an error

but this should be possible since we never want to send both an error and data

is expected use error() instead can hide this api from the types


I got a loss of nan when training the model

I'll nee some more info. Are you using the exact same code, data and loss function ?

yes but different dataset

Everything is the same except for different dataset

My accuracy shoot up to 100% after just one epoch

Check your X.npy and Y.npy files. Make sure the data inside are clean (No '\n' or extra characters etc.) .

I have the same error with the same dataset and code with loss of nan

I have also face the same ERROR i.e., "val_loss did not improve from inf" and find accuracy and validation loss as "nan". Kindly suggest the proper solution for it. I have used the same code with the same dataset provided in your repository.

I think that the code has been written for another version of python that you use (python 3)? I got the same problem. I took a look at the code, and a bit of work have to be done to make it compatible with python 2/3 (some division operators need to be fixed). Can you confirm @Neerajj9 ?

I've got the same issue

The problem was in inactivation function 'relu' . It can be fix as: 'activation=tf.nn.leaky_relu' or 'activation=tf.nn.elu'.

can you explain more @goldengrisha ? I go both loss and val_loss nan and val_acc at 1. Seems incorrect for training data.

@mahirahzainipderas it looks like you're facing the problem of exploding gradients with ReLu activation function (that what NaN means -- very big activations). If you use model.compile(loss=yolo_loss_func , optimizer=opt , metrics = ['accuracy']) the metric isn't correct in this context instead just orient your focus for decreasing loss.
inp = Input(input_shape)

    model = MobileNetV2(
        input_tensor=inp, include_top=False, weights='imagenet')
    last_layer = model.output

    conv = Conv2D(512, (3, 3), activation=tf.nn.leaky_relu,
                  padding='same')(last_layer)
    conv = Dropout(0.4)(conv)
    bn = BatchNormalization()(conv)
    lr = LeakyReLU(alpha=0.1)(bn)

    conv = Conv2D(128, (3, 3), activation=tf.nn.leaky_relu, padding='same')(lr)
    conv = Dropout(0.4)(conv)
    bn = BatchNormalization()(conv)
    lr = LeakyReLU(alpha=0.1)(bn)

    conv = Conv2D(5, (3, 3), activation=tf.nn.leaky_relu, padding='same')(lr)

    final = Reshape((grid_h, grid_w, classes, info))(conv)

    model = Model(inp, final)

Hi,
I am facing this problem now. I tried @goldengrisha tip but still got nan after the first step.
Any updates?

Hello, @noarotman what version of TF do you use?

@goldengrisha  I use the version that was written in "readme" file: Tensorflow : 1.9.0

@noarotman try switching to TF 2.1 and check the code above, it should work.

@goldengrisha thanks I will try.
another issue is that when I try to run the yolo model I get this error:

@noarotman, please check the last URL, it can be wrong.

Hello everyone, the code was written in python3 and the exact versions mentioned in the README.md file. There might be some compatibility issues as @goldengrisha pointed out which might be because of a different version of tensorflow or keras. Also yes concentrate on the decreasing loss as against the 'accuracy' metric.

@mahirahzainipderas it looks like you're facing the problem of daying gradients with ReLu activation function (that what NaN means -- very small activations). If you use model.compile(loss=yolo_loss_func , optimizer=opt , metrics = ['accuracy']) the metric isn't correct in this context instead just orient your focus for decreasing loss.
    inp = Input(input_shape)

    model = MobileNetV2(
        input_tensor=inp, include_top=False, weights='imagenet')
    last_layer = model.output
    conv = Conv2D(512, (3, 3), activation=tf.nn.leaky_relu,
                  padding='same')(last_layer)
    conv = Dropout(0.4)(conv)
    bn = BatchNormalization()(conv)
    lr = LeakyReLU(alpha=0.1)(bn)
    conv = Conv2D(128, (3, 3), activation=tf.nn.leaky_relu, padding='same')(lr)
    conv = Dropout(0.4)(conv)
    bn = BatchNormalization()(conv)
    lr = LeakyReLU(alpha=0.1)(bn)
    conv = Conv2D(5, (3, 3), activation=tf.nn.leaky_relu, padding='same')(lr)
    final = Reshape((grid_h, grid_w, classes, info))(conv)

    model = Model(inp, final)

Updating the activation functions worked for me. Thanks!


Refactor nightly workflows

Codecov Report
Patch and project coverage have no change.

Comparison is base (b02b74f) 100.00% compared to head (64bf614) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #61   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            5         5
  Lines          130       130
  Branches         9         9
=========================================
  Hits           130       130

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


About the RPC apis

Why is there no query for account balance in API list

It would be a POST request to abci_query with the path of /cosmos.bank.v1beta1.Query/AllBalances (I think, I will have to double check later)

You'll probably have a better time using the REST or GRPC endpoints

It would be a POST request to abci_query with the path of /cosmos.bank.v1beta1.Query/AllBalances (I think, I will have to double check later)

Thanks

You'll probably have a better time using the REST or GRPC endpoints
I don't see any arguments to start rest

@leezijie if you are running a caught up node it defaults to port 1317. If you want a UI for it go into the app.toml (or might be config.toml) and enable swagger. Then you would go to localhost:1317/swagger/

But if you are looking to just query balanced easily without catching up a node, run a CLI query with the flag --node and put in the address uf a public RPC node like "http://osmo-sync.blockpane.com:26657". Lmk if you need further instructions

But if you are looking to just query balances easily without catching up a node, run a CLI query with the flag --node and put in the address uf a public RPC node like "http://osmo-sync.blockpane.com:26657". Lmk if you need further instructions

Thanks a lot

Why do I still get an error when I open it

Just and a "/" at the end of swagger
Ex:
IP:9885/swagger/

Just and a "/" at the end of swagger

Thank you, brother. It finally worked😂


add semantic event to request focus

Fixes https://github.com/flutter/flutter/issues/18641
Sometimes we may need to imperatively move the semantic focus, this is the framework implementation.  There is no engine impl yet, but in theory we can submit this first since it is non breaking

cc @DaveShuckerow

Actually this is probably not the correct approach.

cc @goderbauer , for imperatively requesting a11y focus it seems like I could just dispatch a SemanticsAction.didGainAccessibilityFocus from the semantics owner provided that I had the semantic node's id in question.  Do you think this is a reasonable approach?


Motivation for the CloudProvider field?

I'm trying to understand the use case for the CloudProvider field.
What is the cloud provider in a multi-repo, multi-cloudprovider-implementation world?  If there are two AWS cloudprovider implementations, should they have the same name or a different name?  How are the CloudProvider names registered?
What if a single cluster spans multiple clouds?  Should this be of []CloudProvider?

I've thought about this a bit over the past few days and I'm not sure that I have good answers for you. We hadn't thought too deeply about the semantics of this field, and it may be better in the short term to remove it. The API is still in an alpha state, so we have quite a bit of flexibility at this point.
What do you mean by a "multi-repo, multi-cloudprovider-implementation world"? Is this the same as a cluster spanning multiple clouds? If so, then having this field be a list seems reasonable as a start, but I think that we'd have to do more thinking in order to come up with information that is useful. I'm not sure that knowing that a cluster is spanning multiple clouds without having any information about what parts of the cluster are on which cloud is necessarily that interesting.
CloudProvider names aren't currently meant to be registered, but to be provided by users. This does seem problematic, given the potential for people attempting to encode semantically-meaningful information into a string, but I don't think that we want to provide more than that, or else we risk having a maintenance burden as we add new cloud providers to the list.
What do you mean by two AWS cloudprovider implementations? Do you mean something like GKE vs Kubernetes on GCE?
@madhusudancs do you have more context behind this field?


batched undelegations - move st token burn calculation callback

Context
Counterpart to #1203
Brief Changelog

Used the total native and total st amounts on the HZU record to get an implied redemption rate
Uses the implied redemption rate to figure out how many tokens to burn for each batch
Once the HZU has 0 native remaining, stToken amount is also dropped to 0 (to handle any precision error from the RR equation)
Updated unit tests

@riley-stride can you say more on that?

@riley-stride can you say more on that?

Please disregard. I misunderstood the callback logic. Just re-read and it makes sense. I'm signed off!