text:
Added environment variables for published ports

Hello!
We use Docker a lot at my company and I would like to contribute something back to the community. This is my first pull request, so I am happy about every feedback :)
I would like to solve docker#3778 and docker#1270 which is a feature that we would like to have, too. It improves service discovery by allowing services that are running inside a container to register itself with their external port where they can be reached.
What is a good place to document this behavior? The docker run command reference?
For our use-case it is sufficient to only set the port. Is there a use-case where the host-IP also needs to be set? Can it be something other than 0.0.0.0?
Thank you a lot!

Thanks for contributing! I'm not sure this is the right solution for this; are the environment vars updated if the container is restarted? Random port numbers will change each time the container is restarted, and if the environment-variables don't reflect this, that'll be problematic;
$ docker run -d -p 80 --name web nginx

$ docker inspect -f "{{ .NetworkSettings.Ports }}" web
map[443/tcp:[] 80/tcp:[{0.0.0.0 32770}]]

$ docker restart web

$ docker inspect -f "{{ .NetworkSettings.Ports }}" web
map[443/tcp:[] 80/tcp:[{0.0.0.0 32771}]]

Hello Sebastiaan, thanks for your reply!
I tried it out and the environment variables will reflect the new ports after the container is restarted. I think it makes sense because the containerRestart() method will just call the containerStart() method where the new ports are allocated and the environment variables are set.
Or did you mean that using environment variables is a bad solution to inform the container of its public ports?

Hm, there's still an open discussion on "introspection" in general; https://github.com/docker/docker/issues/8427. I'll ask what the current opinion is on that.

Also wondering if this might become more complicated with the new networking, where a container can be attached to multiple networks (thinking out loud here)

ping @mavenugo @sanimej could you have a look at this, in light of the upcoming changes of DNS based discovery, and dynamically joining/leaving networks?

Ping @mavenugo @sanimej @mrjana @aboch (can you PLEASE PLEASE PLEASE go through docker/docker from time to time? seriously pinging you is becoming a full time job).

@ChristianBoehlke thanks for the contribution. as @thaJeztah pointed out https://github.com/docker/docker/issues/8427 is being used for introspection. While ENV variables are very useful way to pass such information to the Container, they have the fundamental issue of lack of dynamism.
Though a container restart, repopulates the ENV, it will fail when a user performs docker network disconnect, followed by docker network connect on the same network.
Since the network disconnect and network connect operates on a live container, the ENV update will not work as expected.

Thanks for looking @mavenugo.
@ChristianBoehlke I'm gonna close this PR, because (as discussed above), this is not the right solution. Note that container "introspection" (in general) is still something we'd like to implement in one form or another in the future, so this may be possible one day.
Thanks so much for contributing, it's really appreciated! :+1:

@thaJeztah Do you think a procfs-like approach to exposing networking or other introspection information work better than the environment variables. For instance, a new file like /proc/docker-info could be added into the mapped file system of the container. This file would contain JSON-encoded introspection information, including current network settings, etc.
If you find this comment relevant, I can move it into the discussion thread of #8427.

@evolvah you may want to follow the discussion on https://github.com/docker/docker/pull/24893, and linked issue

authors: ChristianBoehlke evolvah icecrime mavenugo thaJeztah


text:
Remove static errors from errors package.

Moving all strings to the errors package wasn't a good idea after all.
Our custom implementation of Go errors predates everything that's nice
and good about working with errors in Go. Take as an example what we
have to do to get an error message:
func GetErrorMessage(err error) string {
	switch err.(type) {
	case errcode.Error:
		e, _ := err.(errcode.Error)
		return e.Message

	case errcode.ErrorCode:
		ec, _ := err.(errcode.ErrorCode)
		return ec.Message()

	default:
		return err.Error()
	}
}

This goes against every good practice for Go development. The language already provides a simple, intuitive and standard way to get error messages, that is calling the Error() method from an error. Reinventing the error interface is a mistake.
Our custom implementation also makes very hard to reason about errors, another nice thing about Go. I found several (>10) error declarations that we don't use anywhere. This is a clear sign about how little we know about the errors we return. I also found several error usages where the number of arguments was different than the parameters declared in the error, another clear example of how difficult is to reason about errors.
Moreover, our custom implementation didn't really make easier for people to return custom HTTP status code depending on the errors. Again, it's hard to reason about when to set custom codes and how. Take an example what we have to do to extract the message and status code from an error before returning a response from the API:
	switch err.(type) {
	case errcode.ErrorCode:
		daError, _ := err.(errcode.ErrorCode)
		statusCode = daError.Descriptor().HTTPStatusCode
		errMsg = daError.Message()

	case errcode.Error:
		// For reference, if you're looking for a particular error
		// then you can do something like :
		//   import ( derr "github.com/docker/docker/errors" )
		//   if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }

		daError, _ := err.(errcode.Error)
		statusCode = daError.ErrorCode().Descriptor().HTTPStatusCode
		errMsg = daError.Message

	default:
		// This part of will be removed once we've
		// converted everything over to use the errcode package

		// FIXME: this is brittle and should not be necessary.
		// If we need to differentiate between different possible error types,
		// we should create appropriate error types with clearly defined meaning
		errStr := strings.ToLower(err.Error())
		for keyword, status := range map[string]int{
			"not found":             http.StatusNotFound,
			"no such":               http.StatusNotFound,
			"bad parameter":         http.StatusBadRequest,
			"conflict":              http.StatusConflict,
			"impossible":            http.StatusNotAcceptable,
			"wrong login/password":  http.StatusUnauthorized,
			"hasn't been activated": http.StatusForbidden,
		} {
			if strings.Contains(errStr, keyword) {
				statusCode = status
				break
			}
		}
	}

You can notice two things in that code:

We have to explain how errors work, because our implementation goes against how easy to use Go errors are.
At no moment we arrived to remove that switch statement that was the original reason to use our custom implementation.

This change removes all our status errors from the errors package and puts them back in their specific contexts.
IT puts the messages back with their contexts. That way, we know right away when errors used and how to generate their messages.
It uses custom interfaces to reason about errors. Errors that need to response with a custom status code MUST implementent this simple interface:
type errorWithStatus interface {
	HTTPErrorStatusCode() int
}

This interface is very straightforward to implement. It also preserves Go errors real behavior, getting the message is as simple as using the Error() method.
I included helper functions to generate errors that use custom status code in errors/errors.go.
By doing this, we remove the hard dependency we have eeverywhere to our custom errors package. Yes, you can use it as a helper to generate error, but it's still very easy to generate errors without it.
Please, read this fantastic blog post about errors in Go: http://dave.cheney.net/2014/12/24/inspecting-errors
Signed-off-by: David Calavera david.calavera@gmail.com

:+1: in general, but I'd like to make sure we confine api related errors to higher up in the stack and not in subsystems.

@cpuguy83 is this good enough? :grin:
➜  docker git:(remove_static_error_declarations) ag 'docker/errors' -l
daemon/exec.go
daemon/errors.go
daemon/stop.go
daemon/attach.go
daemon/daemon.go
daemon/container_operations_unix.go
daemon/delete.go
daemon/image_delete.go

LGTM

2 minor-ish things. Really want to make sure we clean up the (now) outdated comment otherwise I'd merge.

@cpuguy83 fixed

LGTM

source: gharchive/pull-request

authors: calavera cpuguy83 tiborvass

repo: docker/docker

license_type: permissive

license_source: github-api


text:
Windows: Added stateinfo to WaitExit info to aid debugging daemon hangs

When debugging daemon hangs due to a container lock being held, correlating the WaitExit StateChanged log line to the Completed OK line would help immensely. This prints the stateinfo (new state, pid, exitcode, and process ID) when WaitExit completes.

Minor nit, %+v might be cleaner, but otherwise LGTM. Yes, been there a few times now....

Fixed. I agree it is easier to read this way, so I also added it to the other debug line.

Still LGTM

LGTM

authors: LK4D4 darrenstahlmsft jhowardmsft


text:
When handling plugin exit, lookup plugins only during daemon shutdown.

- What I did
The main intent of handling plugin exit is for graceful shutdown
of plugins during daemon shutdown. So avoid plugin lookup during
plugin exits caused by other reasons (eg. force remove)
- How I did it
By avoiding plugin lookup for cases other than daemon shutdown.
- How to verify it
Before this change, docker plugin remove --force caused errors in daemon logs.
DEBU[0450] plugin state changed 3a510f2a39b3805bebb55f20f3bbd92971a9405b0a4bc94b45050a213324bd40 libcontainerd.StateInfo{CommonStateInfo:libcontainerd.CommonStateInfo{State:"exit", Pid:0x0, ExitCode:0x89, ProcessID:""}, OOMKilled:false}
ERRO[0450] libcontainerd: backend.StateChanged(): plugin "3a510f2a39b3805bebb55f20f3bbd92971a9405b0a4bc94b45050a213324bd40" not found
After this change, there are no errors.
Signed-off-by: Anusha Ragunathan anusha@docker.com

LGTM

LGTM


text:
Change the plural form of the verb to the singular form

Signed-off-by: wxb xihuanbo_0521@zju.edu.cn

- What I did
Neither...nor... has the principle of proximity. Therefore, in this sentence, the verb should be in the singular form.
- How I did it
change 'support' to 'supports'
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Please consider squashing with https://github.com/docker/docker/pull/29572

Thank you for your suggestion!


text:
Convert app to use Compose file 2

If looks good I will merge on release of Compose 1.6.
/cc @aanand @mgoelzer

Nice!
The next Compose RC will refuse to run this because the myvolume volume isn't explicitly declared. Add this to the file:
volumes:
  myvolume:

@aanand thanks! how come that is required?

For one thing, mistyped volume names would otherwise result in the silent creation of a volume with the wrong name, which would lead to some pretty unpleasant behaviour in apps where named volumes are shared.

authors: aanand bfirsh

repo: docker/example-voting-app


text:
Added in compatibility with dockers handling of build args

Adjusts the handling of build args per https://github.com/docker/libcompose/issues/312

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "build_arg_key_only" git@github.com:dansteen/libcompose.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "build_arg_key_only" git@github.com:dansteen/libcompose.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

@dansteen you need to sign-off your commit (git commit --sign-off --amend …)

@dansteen could you squash the commits too :angel: :stuck_out_tongue_closed_eyes:

@dansteen build errors
08:55:06 + go test -race -cover -coverprofile=cover.out github.com/docker/libcompose/yaml
08:55:10 --- FAIL: TestUnmarshalBuild (0.00s)
08:55:10 panic: interface conversion: interface is map[interface {}]interface {}, not string [recovered]
08:55:10 	panic: interface conversion: interface is map[interface {}]interface {}, not string [recovered]
08:55:10 	panic: interface conversion: interface is map[interface {}]interface {}, not string
08:55:10
08:55:10 goroutine 6 [running]:
08:55:10 panic(0x9409e0, 0xc82000b140)
08:55:10 	/usr/local/go/src/runtime/panic.go:481 +0x3ff
08:55:10 testing.tRunner.func1(0xc8200142d0)
08:55:10 	/usr/local/go/src/testing/testing.go:467 +0x22a
08:55:10 panic(0x9409e0, 0xc82000b140)
08:55:10 	/usr/local/go/src/runtime/panic.go:443 +0x521
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.recovery(0xc82008dcf8)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:83 +0xce
08:55:10 panic(0x9409e0, 0xc82000b140)
08:55:10 	/usr/local/go/src/runtime/panic.go:443 +0x521
08:55:10 github.com/docker/libcompose/yaml.handleBuildArgSlice(0xc8200d5600, 0x2, 0x2, 0xc82008d618, 0x0, 0x0)
08:55:10 	github.com/docker/libcompose/yaml/_test/_obj_test/build.go:105 +0x183
08:55:10 github.com/docker/libcompose/yaml.handleBuildArgs(0x88c180, 0xc8200d5620, 0x2, 0x0, 0x0)
08:55:10 	github.com/docker/libcompose/yaml/_test/_obj_test/build.go:92 +0x161
08:55:10 github.com/docker/libcompose/yaml.(*Build).UnmarshalYAML(0xc82010e2a0, 0xa0d430, 0x15, 0x89d100, 0xc82010e360, 0x0, 0x0)
08:55:10 	github.com/docker/libcompose/yaml/_test/_obj_test/build.go:62 +0x630
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.(*Decoder).mapping.func1(0x7f3aec246b08, 0xc82010e2a0, 0xc82008d948, 0xc820106e00)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:385 +0xa6
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.(*Decoder).mapping(0xc820106e00, 0x89b240, 0xc8200dd110, 0x194)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:396 +0x2a1
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.(*Decoder).parse(0xc820106e00, 0x93e1a0, 0xc82010e2a0, 0x16)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:206 +0xc20
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.(*Decoder).document(0xc820106e00, 0x93e1a0, 0xc82010e2a0, 0x16)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:182 +0x1e2
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.(*Decoder).Decode(0xc820106e00, 0x93e1a0, 0xc82010e2a0, 0x0, 0x0)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:133 +0x2d4
08:55:10 github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml.Unmarshal(0xc82000b0c0, 0x31, 0x40, 0x93e1a0, 0xc82010e2a0, 0x0, 0x0)
08:55:10 	/go/src/github.com/docker/libcompose/vendor/github.com/cloudfoundry-incubator/candiedyaml/decode.go:102 +0x134
08:55:10 github.com/docker/libcompose/yaml.TestUnmarshalBuild(0xc8200142d0)
08:55:10 	/go/src/github.com/docker/libcompose/yaml/build_test.go:116 +0x714
08:55:10 testing.tRunner(0xc8200142d0, 0xc15578)
08:55:10 	/usr/local/go/src/testing/testing.go:473 +0xdd
08:55:10 created by testing.RunTests
08:55:10 	/usr/local/go/src/testing/testing.go:582 +0xae3
08:55:10 FAIL	github.com/docker/libcompose/yaml	0.017s
08:55:10
08:55:10 Tests failed: github.com/docker/libcompose

In the test failure above, the following lines are failing in yaml/build_test.go:
    {
      yaml: `context: .
args:
  - buildno: 1
  - user: vincent`,
      expected: &Build{
        Context: ".",
        Args: map[string]string{
          "buildno": "1",
          "user":    "vincent",
        },
      },
    },
  }

Those lines test a config with the syntax
build:
      context: .
      args:
        - buildno: 1
        - user: vincent

but this is not a valid docker-compose file syntax and docker-compose itself fails on this.  You can either do this:
build:
      context: .
      args:
        buildno: 1
        user: vincent

or this:
build:
      context: .
      args:
        - buildno=1
        - user=vincent

or the syntax we are adding, but not the one this test is looking for.  With your permission, I have removed that test, and added in tests for the new syntax options.

@dansteen ah you're right about the test :sweat_smile:
Overall LGTM 👼
/cc @joshwget

The method of using \x00 as a temporary is clever, but I think it would be better to refactor build arguments to be a []string. It's done that way for environment variables and the logic seems a bit more straightforward there (plus we might be able to reuse some existing code).

do you mean you want Build.Args to be a []string of "ARG=VALUE" format (similar to environment variables) or do you mean that you want Build.Args to be a map[string][]string, and then []string can either contain a single value or be empty?

The former (Build.Args should be a []string)

So, there are three possible value types here:
ARG="VALUE" - set's the arg to "VALUE"
ARG="" - sets the arg to blank (this effectively clears the arg from the default that is in the dockerfile)
ARG - pulls the value of arg from the environment
Using a []string how would you want to represent this?
We could do something like the following:
"ARG=VALUE"
"ARG="
"ARG"
Where the presence of the equals sign at the end of the value indicates that it has been set and is empty, whereas the lack of an equals sign at the end means that we pull the value from the environment.  But this is really just another form of using a "magic" value.   And I think it's actually worse since it's much more subtle, whereas \x00 is pretty explicit.   We also lose the expressiveness that a map gives us.
One alternative is to use a struct:
{
  Value string
  SetFromEnv bool
}

but that seems to add a lot of overhead for this...

Actually, you're right. I figured engine-api would accept build arguments as a []string similar to how they accept environment. It looks like it's actually passed as a map[string]string, so your method would save us from having to perform that conversion. LGTM!

authors: GordonTheTurtle dansteen joshwget vdemeester

repo: docker/libcompose

license_source: bigquery


text:
Rackspace driver is missing --rackspace-net-id/name like OpenStack driver

The Rackspace driver PR #73 mentions support for adding networks by name and adds that functionality to the underlying openstack driver, but the rackspace driver doesn't report or recongnize such a switch
docker-machine create -d rackspace --rackspace-net-name mynet ...

cc @ggiamarchi

source: gharchive/issue

authors: nathanleclaire robertjustjones

repo: docker/machine


text:
Why 'docker-machine create' uses latest-edge version?

I'm using stable version of docker in windows 10 with hyper-v. It's officially 17.03.1-ce.
When I create new docker machine, it uses 17.05.0-ce for the new machine which is the latest edge version at the moment.
Is this bug? or intended?
I searched for using specific version when docker machine creates, but it seems there is no such feature.
https://github.com/docker/machine/issues/1702

+1 to this, it would be really nice to be able to provision a specific docker version

Rancher uses the scripts in https://github.com/rancher/install-docker and the --engine-install-url docker-machine create parameter to do this now.

@SvenDowideit Wow, great job, didn't know about it at all. Gonna give it a try asap.

@SvenDowideit such a nice job, thanks for that. http://get.docker.com should support something like that.

Hi All,
https://get.docker.com/ installs from edge repository, not from stable.

nvidia-docker supports the stable channel only. As a result, it's not possible to use docker machine to instantiate a node with docker + nvidia-docker without resorting to downgrading docker to the stable version manually.
Instead, it would be nice to have some sort of flag to leave the choice between deploying Docker from the edge (default) or a stable channel.

Why is it still not supported to install the specified version feature?

authors: JYKeith123 SvenDowideit andrestc danielesk ghisvail klud1 mahnunchik


text:
doc: fix sample output in DOCKER_TLS_VERIFY

Followup to #738.
Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com

LGTM

LGTM

authors: ahmetalpbalkan ehazlett nathanleclaire


text:
Docker scan is now packaged with Docker Linux, no need for manual install by default

Signed-off-by: Guillaume Tardif guillaume.tardif@gmail.com

- What I did

Update README to mention scan is installed by default with Linux standard install

- How I did it
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory)

Arrg, need to push to origin for the CI... can't merge :)

replaced by #157

repo: docker/scan-cli-plugin


text:
Wrong name binpacking

There's no strategy named binpacking, if there was, it should be error
Signed-off-by: harry harryz@hyper.sh

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "binpack" git@github.com:resouer/swarm.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

@resouer
The same as https://github.com/docker/swarm/pull/2061, we can have more discussions there.

I choose close this and just leave it there

authors: GordonTheTurtle allencloud resouer

repo: docker/swarm


text:
Revert "raftproxy: use raft connections instead of creating new"

This reverts commit 1b4f8095d3224b8da5079c530b4d9a33fe14ca89.
ping @aaronlehmann @mrjana

LGTM

Current coverage is 55.39% (diff: 30.15%)

Merging #1496 into master will decrease coverage by 0.01%

@@             master      #1496   diff @@
==========================================
  Files            82         82
  Lines         12872      12891    +19
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           7133       7141     +8
- Misses         4763       4764     +1
- Partials        976        986    +10

Powered by Codecov. Last update d824e72...5e857c3

LGTM

authors: LK4D4 aaronlehmann codecov-io mrjana

repo: docker/swarmkit


text:
Dockstore tokens endpoint returning wrong tokens.

Didn't create an issue for this, but can if preferred. Just stumbled across it looking at code.

Can we also delete getQuayUserTokens, getGitlabUserTokens, getGithubUserTokens in favour of getUserTokens which is what it looks like the accounts page is actually using?

That works for me.... I didn't even realize we had these additional endpoints until I stumbled across this one.

This PR points to the fact that the tokens endpoints needs more testing. Denis' idea to consolidate the endpoints is a good one and a separate ticket.

@coverbeck odd that the swagger/openapi is not changing, may need to check that in to ensure tests are properly running

D'oh, I must not have built.

repo: dockstore/dockstore


text:
SEAB-5195: Automatically set default version if appropriate

Description
This PR modifies the webservice to automatically set the default version for a .dockstore.yml-based entry to the version being processed in the release webhook, if the following are true:

the entry's default version is not set
.dockstore.yml does not specify that the latest tag should be the default
the version being processed corresponds to a branch
the version's name matches the GitHub default branch name

This will set the default branch for most users, with a minimum of code and overhead.
This PR also includes some light refactoring.
Review Instructions
On qa, create a new repo containing a workflow and register it on Dockstore.  After the Dockstore entry appears, confirm that the default version is set to the GitHub default branch.
Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-5195
Security and Privacy
No concerns.

[x] Security and Privacy assessed

Please make sure that you've checked the following before submitting your pull request. Thanks!

[x] Check that you pass the basic style checks and unit tests by running mvn clean install
[x] Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
[x] Follow the existing JPA patterns for queries, using named parameters, to avoid SQL injection
[x] If you are changing dependencies, check the Snyk status check or the dashboard to ensure you are not introducing new high/critical vulnerabilities
[x] Assume that inputs to the API can be malicious, and sanitize and/or check for Denial of Service type values, e.g., massive sizes
[x] Do not serve user-uploaded binary images through the Dockstore API
[x] Ensure that endpoints that only allow privileged access enforce that with the @RolesAllowed annotation
[x] Do not create cookies, although this may change in the future
[x] If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

FYI @juklucas if interested since it came up in your presentation IIRC

authors: denis-yuen svonworl


text:
Hombrew cask installation

I submit your software to the official Homebrew cask repository: https://github.com/Homebrew/homebrew-cask/pull/58430
In the meantime, you can install it thanks to my personal tap.

(great software by the way)

Cool thanks!

authors: MartinDelille docterd

repo: docterd/MusaicFM

license: MIT


text:
doctrine:schema:update not working with dynamic schema names

I use a Events::loadClassMetadata listener in order to dynamically add the schema name to my entities. I need this to do cross-db joins.
class MetadataListener
{
    public function loadClassMetadata(LoadClassMetadataEventArgs $event)
    {
        /** @var ClassMetadata $metadata */
        $metadata = $event->getClassMetadata();
        $namespace = explode('\\', $metadata->getName());
        switch ($namespace[0]) {
            case 'FooBundle':
                $metadata->setPrimaryTable(['schema' => 'foo']);
                break;
            default:
                $metadata->setPrimaryTable(['schema' => 'bar']);
                break;
        }
    }
}

However, the schema tool is now unable to detect any change. The output of the following command is always the same...
$ app/console doctrine:schema:update --dump-sql
> Nothing to update - your database is already in sync with the current entity metadata.

To be a bit more precise, when running
$ app/console doctrine:schema:update --dump-sql -vvv

The output contains queries concerning only the bar schema, nothing about foo.
SELECT
  TABLE_NAME AS `Table`,
  NON_UNIQUE AS Non_Unique,
  INDEX_NAME AS Key_name,
  SEQ_IN_INDEX AS Seq_in_index,
  COLUMN_NAME AS Column_Name,
  COLLATION AS Collation,
  CARDINALITY AS Cardinality,
  SUB_PART AS Sub_Part,
  PACKED AS Packed,
  NULLABLE AS `Null`,
  INDEX_TYPE AS Index_Type,
  COMMENT AS Comment
FROM information_schema.STATISTICS
WHERE
  TABLE_NAME = 'user'
  AND TABLE_SCHEMA = 'bar'

And if I set the schema_filter option to /^foo\..*$/, then it wants to create all the bar.* tables, although they already exists... :confused:

$sm = $doctrine->getConnection()->getSchemaManager();
$sm->listDatabases(); // => ['foo', 'bar'];
foreach ($sm->listTables() as $table) {
    echo $table->getName() . "\n";
}
// => outputs only tables from 'bar' database...

I can confirm this issue when using something like this:
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
use Doctrine\ORM\Events;
use Doctrine\ORM\Mapping\ClassMetadataInfo;

final class LifecycleDateListener implements EventSubscriber
{
    public function getSubscribedEvents()
    {
        return array(
            Events::loadClassMetadata,
        );
    }

    public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) : void
    {
        $classMetadata = $eventArgs->getClassMetadata();
        $traits = $classMetadata->getReflectionClass()->getTraitNames();

        if (!in_array(LifecycleDateTimeInterface::class, $traits)) {
            return;
        }

        $classMetadata->mapField(
            array(
                'type'      => 'datetime',
                'fieldName' => 'createdAt',
            )
        );
        $classMetadata->mapField(
            array(
                'type'      => 'datetime',
                'fieldName' => 'updatedAt',
            )
        );
    }
}

Think I got it. You have to import the Trait in the real Entity class.
If you use something like this, it won't work:
namespace Foo\Entity;

class FooEntity extends Foo\Model\FooModel { }

namespace Foo\Model

class FooModel
{
   use LifecycleDateTimeTrait;
}

@ju1ius have you tried to use the schema property of @Table?
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-table

license: mit


text:
Any way to detect entity was removed?

$model = $em->find($class, $id);
$em->remove($model);
$em->flush();
//...
$em->refresh($model);
// how to detect deletion fact here?

As far as I can to understand, refresh does renew for retrieved data only, so $model entity is not changed at all.
I also tried:
$model = $em->find($class, $id);

And $model still contains all data.

Hm, I'm sorry, this issue relates to transactions flow, not to Doctrine directly.


text:
Set isDirty back to true after call to takeSnapshot()

This commit removed a line of code setting isDirty to true:
https://github.com/doctrine/mongodb-odm/commit/bd573cb7def6ab22df8c465b0d79003d26e28046
I think this line was necessary because takeSnapshot() always sets isDirty to false.  Therefore, if there have been objects added, it needs to be set to its original value.

@deedpolloffice can you rebase?

https://github.com/doctrine/mongodb-odm/commit/f3f289866293c8173b7e3429c7cacd3fed3ab0be reintroduced missing $this->isDirty = true; so I'm closing the PR

authors: deedpolloffice jwage malarzm

repo: doctrine/mongodb-odm


text:
Patch stig spider

Description
The stig_pubs spider is reported as stale by our monitoring system.
![WARNING] - MONITORING: CRAWLERS OVERDUE
nato_stanag was last run May 27 2022
dha_pubs was last run Apr 20 2024
ic_policies was last run Apr 06 2024
jcs_pubs was last run Apr 19 2024
test_crawler was last run Apr 20 2022
stig_pubs was last run Mar 12 2024

When running locally I was getting the error below:
2024-04-30 13:10:06 [scrapy.downloadermiddlewares.retry] ERROR: Gave up retrying <GET https://public.cyber.mil/stigs/downloads/> (failed 3 times): User timeout caused connection failure: Getting https://public.cyber.mil/stigs/downloads/ took longer than 3.5 seconds.
I updated the download timeout and confirmed that all pdfs are scraped both locally and on dev.
Result of Crawler Run on Dev
[STATS] Crawlers run:
 stig_pubs
        Required CAC: 0
        In Previous Hashes: 45
        Item Scraped Count: 47
        Elapsed Time (sec): 6.293812
        Close Reason: finished

Example Metadata
{
    "doc_name": "STIG V0R0 2016-04-21 DoD CIO Memo - Use of Wearable Devices DoD Accredited Spaces with FAQ",
    "doc_title": "2016-04-21 DoD CIO Memo - Use of Wearable Devices DoD Accredited Spaces with FAQ",
    "doc_num": "V0R0",
    "doc_type": "STIG",
    "display_doc_type": "Memo",
    "publication_date": "2018-11-30T00:00:00",
    "cac_login_required": false,
    "crawler_used": "stig_pubs",
    "downloadable_items": [
        {
            "doc_type": "pdf",
            "download_url": "https://dl.dod.cyber.mil/wp-content/uploads/stigs/pdf/2016-04-21_DoD_CIO_Memo-Use_of_Wearable_Devices_DoD_Accredited_Spaces_with_FAQ.pdf",
            "compression_type": null
        }
    ],
    "source_page_url": "https://public.cyber.mil/stigs/downloads/",
    "source_fqdn": "public.cyber.mil",
    "download_url": "https://dl.dod.cyber.mil/wp-content/uploads/stigs/pdf/2016-04-21_DoD_CIO_Memo-Use_of_Wearable_Devices_DoD_Accredited_Spaces_with_FAQ.pdf",
    "version_hash_raw_data": {
        "doc_name": "STIG V0R0 2016-04-21 DoD CIO Memo - Use of Wearable Devices DoD Accredited Spaces with FAQ",
        "doc_num": "V0R0",
        "publication_date": "2018-11-30T00:00:00",
        "download_url": "https://dl.dod.cyber.mil/wp-content/uploads/stigs/pdf/2016-04-21_DoD_CIO_Memo-Use_of_Wearable_Devices_DoD_Accredited_Spaces_with_FAQ.pdf",
        "display_title": "STIG V0R0: 2016-04-21 DoD CIO Memo - Use of Wearable Devices DoD Accredited Spaces with FAQ"
    },
    "version_hash": "5096feacc4b9c77fbe91a08b3de0506490edb0d1e6744c3aa30a807e655d39f6",
    "display_org": "Security Technical Implementation Guides",
    "data_source": "Security Technical Implementation Guides",
    "source_title": "Unlisted Source",
    "display_source": "Security Technical Implementation Guides - Unlisted Source",
    "display_title": "STIG V0R0: 2016-04-21 DoD CIO Memo - Use of Wearable Devices DoD Accredited Spaces with FAQ",
    "file_ext": "pdf",
    "is_revoked": false,
    "access_timestamp": "2024-04-30T13:28:56"
}

Wanted to confirm that the metadata is the same before and after refactoring. On these two examples you can see that the only difference is the accessed timestamp

repo: dod-advana/gamechanger-crawlers


text:
How Many Affected Versions?

Hi, just looking for some extra clarification.
I think it'd be good to add a list of Minecraft versions affected. It's kind of unclear what versions are affected, with the "1.7.x - present" followed by "we haven't found any in 1.20,"because wouldn't that be present?. Are newer mods/packs like 1.18.x, 1.19.x versions affected? What about 1.16.x?
Additionally, is it Java itself that is affected? If so, which versions of Java are impacted?

The thing is, we do not know. We know what we found, which is that most exploits are present in 1.7 and 1.12 and we know that the earliest affected mod we could find so far was for Version 1.4.7 but that doesn't mean that all other versions are save. Maybe one exploitable mod is just in the process to be written and will be released tomorrow. The best we can hope for is that we find the exploit faster than the people who want to abuse it.

Additionally, is it Java itself that is affected? If so, which versions of Java are impacted?
No, Java itself and Vanilla Minecraft are fine, it's just a bunch of mods that are affected.


text:
Discussion of Redundant Discussions

Is there a way someone smart can pull all discussions and use some NLP to track them against issues? I’ll give you a 🍪

Most discussions start as an issue, just like this one 😂

authors: georgeartem patricklodder

repo: dogecoin/dogecoin


text:
Standardisation of READMEs following update of the main README (doc/intl)

This modification follows the update of the main README.md via this PR (#3643)

fr/README.md : Removal of external links and harmonisation of text blocks according to README.md (on lines 2;7-14;20;26;49;77-87 and 98-99)
de_GER/README.md : Removal of external links and harmonisation + correction of Markdown syntax (on lines 2;7-12;25;31;58;83-94;98 and 103-104)
fa_IR/README.md : Removal of external links (on lines 2;4;7-12;15;22;35-38;57;88-100 and 113-116)
pt_BR/README.md : Removal of external links (on lines 2;4;7-12;19;25;44;69-81 and 91-92)
pt_PT/README.md : Removal of external links (on lines 2;4;7-14;20;26;49;74-85 and 96-97)
vi_VN/README.md : Removal of external links (on lines 2;7-13;19-20;25;51-52;79-90 and 101-102)
zh_CN/README.md : Removal of external links (on lines 2-4;7-12;18;24;41-42;64-73 and 80)

Change of initial PR branch (#3714)
-> The code of the German version will have to be modified according to this PR (#3659)

I'll do a commits squash as soon as it's been reviewed.

Good Job! Wen't over it a couple of times and it looks pretty good to me. Please consider changing some bits about the layout as mentioned but elsehow it'd been done well!

Okay thanks a lot for the review I'll fix the layout!

I corrected everything from @FierceSkit review normally. If it's ok with you I'll squash the commits? Thanks again ❤ for this comprehensive review!


text:
backports depends build system

This PR is a fix for #39 from libbtc #91

this pr is obviously without net but i built 0.1-dev-transaction (with net) early this morning and file output resulted in the following: https://gist.github.com/xanimo/14ee6782e9cbe5f9451f7208f9e7fb0b
this pr also introduces pre release artifacts so to speak on every ci run. not sure about viability but for anyone who does attempt to use them please be advised they are highly experimental and untested because the binaries are being cross compiled on everything except native linux/amd64.
we'll likely need to reevaluate how we're going to do python wrapped unit tests since we're not building shared objects with exception to linux/amd64 @jackie-mcaninch
upon searching to see how we could potentially test binaries in their native environment i happened upon #2888 which suggests using qemu as a viable solution so if i'm able to implement i'll be opening a modified version for dogecoin core as well since they're (.github/workflows/ci.yml) almost verbatim.

repo: dogecoinfoundation/libdogecoin


text:
Put current story ID in URL, skip translated stories

Hi!
We're thinking about using this code for some of our own storybook translations.
This fixes two open issues in the repo, with minimal additions to the code

Thanks for the PR -- this looks great! Skipping translated stories has been a much-requested feature for a long time. Looking forward to testing this out!

ok I think this latest commit should work with the old URL and a plain # url (no #story-)

Perfect! :+1: I'll merge this right away. This should make a lot of translators very happy :smiley:

authors: dohliam mapmeld

repo: dohliam/gasp-translator


text:
[mongodb] tuning logs

analyze if there is anything better to be done regarding the logs due to performance, such as log to file.

Ticket analysis (9th, October 2020): It will be analysed in a general context.

authors: bizetti mprevide

repo: dojot/dojot


text:
Focus moving to first chip after adding chip to rememberChipTextFieldState

I'm using this library for an autocomplete text field functionality in my application. All I'm doing is when the user chooses an item from the dropdown I'm adding that item to rememberChipTextFieldState(chips = selectedValues.map(::Chip)).
It's working fine upto this, but after this when I type text in the text field, focus is moving to first chip. It's moving constantly to first chip.
I've tried few options but not working. Any help will be appreciated.
Here's my code:
@Composable
fun ChipTextFieldComposableNew(
    options: List<String>?,
    selectedValues: List<String>,
    label: String,
    editable: Boolean,
    onValueChangedEvent: (String) -> Unit,
    onChipClick: (Int) -> Unit
) {
    val keyboardController = LocalSoftwareKeyboardController.current
    val context = LocalContext.current
    val state = rememberChipTextFieldState(chips = selectedValues.map(::Chip))
    var searchQuery by remember {
        mutableStateOf("")
    }
    var expanded by remember { mutableStateOf(false) }
    ExposedDropdownMenuBox(
        expanded = expanded,
        onExpandedChange = { expanded = !expanded }
    ) {
        OutlinedChipTextField(
            state = state,
            label = { Text(text = label) },
            value = searchQuery,
            onValueChange = {
                searchQuery = it
                expanded = true
                onValueChangedEvent(it)
            },
            modifier = Modifier
                .menuAnchor()
                .fillMaxWidth(),
            onSubmit = { null },
            keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next)
        )
        ExposedDropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
            options?.forEach { option: String ->
                DropdownMenuItem(
                    text = { Text(text = option) },
                    onClick = {
                        expanded = false
                        state.addChip(Chip(option))
                        searchQuery = option
                        simulateKeyPress(context = context, KeyEvent.ACTION_DOWN)
                    }
                )
            }
        }
    }
}

Not using this library, figured out a similar solution using flow row and it's much better.


text:
Missing file: checkerboard_gray_256.png

Running train.py throws the error: FileNotFoundError: [Errno 2] No such file or directory: 'data/checkerboard_gray_256.png'.
It seems like this missing file is required by propagate_edit.py and logger.py.

Hi @morrisalp,
Is your folder hierarchy the same as shown in the README.md?
Also, it looks like a similar problem as your other issue, so try adding the project to PYTHONPATH (see README.md).
Regardless, you don't have to use this image, you can instead create a checkerboard directly in the code -- so you can replace this line
https://github.com/dolev104/neural_congealing/blob/main/utils_atlas/logger.py#L256
(also appears here)
with the following code:
import torch
from torchvision import transforms

squares_per_side = 32
checkerboard_lowres = torch.eye(2).unsqueeze(0).repeat(3, squares_per_side // 2, squares_per_side // 2) * 0.2 + 0.6
checkerboard = transforms.Resize((256, 256), interpolation=transforms.InterpolationMode.NEAREST)(checkerboard_lowres)
checkerboard = checkerboard[None, ...].to(self.device)

Let me know if you're still having problems with anything.

I see, I didn't realize downloading the sample image sets (containing this file) was required for this.
Thanks!


text:
[auto-bump] dependency by fulghum

:coffee: An Automated Dependency Version Bump PR :crown:
Initial Changes
The initial changes contained in this PR were produced by `go get`ing the dependency.
```
$ cd ./go
$ go get github.com/dolthub//go@
$ go mod tidy
```
Before Merging
This PR must have passing CI and a review before merging.
After Merging
An automatic PR will be opened against the LD repo that bumps the bounties version there.

This PR has been superseded by https://github.com/dolthub/bounties/pull/1693

repo: dolthub/bounties


text:
[auto-bump] dependency by nicktobey

:coffee: An Automated Dependency Version Bump PR :crown:
Initial Changes
The initial changes contained in this PR were produced by `go get`ing the dependency.
```
$ cd ./go
$ go get github.com/dolthub//go@
$ go mod tidy
```
Before Merging
This PR must have passing CI and a review before merging.
After Merging
An automatic PR will be opened against the LD repo that bumps the bounties version there.

This PR has been superseded by https://github.com/dolthub/bounties/pull/1988


text:
Error

I use it but when project running show this error
Errors
Parser error on line 15
end of the stream or a document separator is expected

What's wrong?

Please provide and exact set of repro steps.

I was able to reproduce it somehow (rc3 with netcore preview 3)

This problem began to occur after publishing app to Azure App Service or runnig it locally with IIS instead of Kestrel (which is working ok).
Locally with IIS when I try to access swagger.json I recieve
GET https://localhost:44314/swagger/v1/swagger.json net::ERR_SPDY_PROTOCOL_ERROR 200
and when I try to get swagger.json from app published to Azure i recieve full swagger json with no opening bracket:
  "openapi": "3.0.1",   "info": {     "title": "My API - V1",     "version": "v1"   }}
One of the options to get it running on published app is to remove these publishing params from project file:
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>     <AspNetCoreModuleName>AspNetCoreModuleV2</AspNetCoreModuleName>
Honestly, that's really strange.

Looks like a dup of #1121.

authors: Adskoy daliri72 domaindrivendev


text:
GeneratePolymorphicSchemas to exclude abstract types

I'm not all to familiar with using this plugin, but as of what I discovered, the "GeneratePolymorphicSchemas" feature includes abstract classes, which IMO should not be in a oneOf list in my generated swagger file.
E.g. when I have the following classes:
abstract class IDocument {}
abstract class IDocumentWithYear : IDocument {}
class Album : IDocument {}
class Track : IDocumentWithYear {}

When generating a swagger, it will include IDocumentWithYear in the list of oneOf for a type IDocument even though its abstract and can never directly be a type.
Hope this was short enough but understandable 😅

Fixed it now for my project by adding  && !type.IsAbstract to the default subtype selector found here: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/8f363f7359cb1cb8fa5de5195ec6d97aefaa16b3/src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGenerator/SchemaGeneratorOptions.cs#L55-L58
My code:
c.SelectSubTypesUsing(baseType =>
{
    return baseType.Assembly.GetTypes().Where(type => type.IsSubclassOf(baseType) && !type.IsAbstract);
});

Would be nice to have a re-evaluation if abstract types should be allowed by default.

Can you explain why this is an issue? Those JSON schemas are not meant to be used as is, but as reference to build concrete schema for a given path

authors: Havunen SimonSimCity


text:
Adding support for the MetdataTypeAttribute (with a unit-test)

This is in reference to issue #729.

I have no problem with that approach.

Sorry. Didn't mean to close the pull request.

Wondering if you could make an additional commit with the suggested change?

See ebeddcae9b3cabc1a9f6a04aa558a74dc63f52a0 for the resolution based on this PR

repo: domaindrivendev/Swashbuckle


text:
SkyDemo.apk crashes on the Moto E

The Crash is inside Skia when clicking on the "Cards" example in SkyDemo.apk.
http://pastebin.com/Z5JqVZ6L

.sky.demo/org.domokit.sky.demo.SkyDemoActivity: 18:61)* (SurfaceView: 18:360) (SurfaceView: 1:2)* (org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActivity: 1:5)*
D/dalvikvm( 8584): GC_CONCURRENT freed 3030K, 71% free 3231K/11024K, paused 1ms+1ms, total 31ms
I/chromium( 8584): [INFO:GrGLProgramBuilder.cpp(460)] --From Vertex Shader:
I/chromium( 8584): --From Fragment Shader:
I/chromium( 8584):
I/chromium( 8584): [INFO:GrGLProgramBuilder.cpp(462)] ../../third_party/skia/src/gpu/gl/builders/GrGLProgramBuilder.cpp:462: failed assertion "false && "Error linking program""
I/chromium( 8584):
F/chromium( 8584): [FATAL:GrGLProgramBuilder.cpp(462)] SK_CRASH

Here is the full adb logcat with g_printShaders enabled:
http://pastebin.com/WKWtXcXr

I'll be sure to test this again next week.

We fixed this when we switched to having Skia build the GL table.

authors: abarth eseidel eseidelGoogle


text:
Workaround for Drawer.initState() fails

This is a hack to avoid #715
In theory, the navigator's state should be updated in the event handler that triggers opening the drawer. It's not obvious how to do this, since we only build the Drawer when it's supposed to be visible (and once we're building it's too late). Perhaps responsibility needs to be borne by the StockHome class?

As far as Drawer ignoring the showing flag, Drawer should probably follow the way PopupMenu handles this. But we still might need the scheduleMicrotask either way, so LGTM.

IMHO we should fix this correctly now, not check in workarounds. Otherwise we're just digging ourselves into technical debt.

I will make a proposal for a better fix.

I just tripped over this technical debt. I think it may be implicated in the weird assertions we've been getting. This is why I didn't want us to check in a workaround.

authors: HansMuller Hixie mpcomplete


text:
{lat} {long}

I have the following:
            var distance, unit, lt;
            if (this.options.metric) {
                distance = radius.toFixed(0);
                unit = "meters";
                lat = this._event.latitude;
                long = this._event.longitude;
            } else {
                distance = (radius * 3.2808399).toFixed(0);
                unit = "feet";
                lat = this._event.latitude;
                long = this._event.longitude;
            }

in or around line 207. I use these values in the map for filling out a form with gps coordinates. Were these ever in your code? Not sure at this point if I added it or they were removed from your code at some point.

We now use this._event.latlng. If you want the location, subscribe to the locationfound event on the map.

authors: domoritz reyemtm

repo: domoritz/leaflet-locatecontrol


text:
Nested resources in import/export .csv

Hello !
I have a suggestion/question. In fact, I'm not sure if what I'm looking for is just not a feature or it's me that didn't manage to do it with the plugin.
The resources that I'm working with are card that have a number of classical attributes (name, id, etc.) . But it has an options attribute that is a options: Array[Option]. Option is itself a resource, with some classical attributes. I would like to manage these resources by using an external spreadsheet to (1) avoid and the godot problem of resetting exported var when variable names are changed and (2) have easier nested modifications that in the editor which can be heavy with my nesting.
I tried to:

create manually in the editor a first version of nested option resources in the card resource. Then, export to change them in spreadsheet. Finally, reimport the .csv. But, the nested resources are not exportable.
in an external spreadsheet, create two sheets: one for cards, one for options. There is a column in the card sheet to reference all the attributes (separated by a comma in one cell) of the corresponding options in the option sheets, by filtering by card id. However, when imported, a new resource type is created for all the rows of the cards .csv and I cannot choose the card resource script at the import. I know that I can do it manually, but when i change the resource script it won't by itself create the nested option resource (which is logic because the code doesn't know how to parse the options column to turn it into option resources).

I think the second option would be more powerful, given that the .csv could be entirely created in an external spreadsheet (and dodge the two previously said problems).
From my understanding, for this second option to work, we would need:

To be able to import .csv with the desired custom resource script.
To create a specific parser that reads a given column and that creates a number of nested resources corresponding to the number of attributes separated by a comma in one cell of the column.

Sorry if my current problem is manageable with the actual version of the plugin. If you think that it is not supported for now, I could work on a way to created nested resources at import, based on your code.
Ps: Your plugin is awesome, it allows some awesome database management for games that is absolutely required for middle to large sized projects with resources.
Thanks a lot by advance !!

Here are some simplified lines of the card sheet:
`

Name
Card_ID
Icon_path
Location
Options

boar1
1
res://assets/cardArt/boar.png
danger
("wood", 1),("wood", 2)

boar2
2
res://assets/cardArt/boar.png
forest
("rock", 3),("wood", 4),("wood", 5)

tree1
3
res://assets/cardArt/tree.png
forest
("food", 1)

`
(The command line in Options column is here =JOIN(",", FILTER(Options!C:C, Options!A:A = B2)) )
And here are the corresponding lines of the Options sheet:

card_id
option_id
prerequisite
is_destroyed

1
1
("wood", 1)
FALSE

1
2
("wood", 2)
TRUE

2
1
("rock", 3)
FALSE

2
2
("wood", 4)
FALSE

2
3
("wood", 5)
TRUE

3
1
("food", 1)
TRUE

In the card sheet, I've put only one attribute of option: prerequisite. The is_destroyed bool would be another attribute to add in the card sheet, the way to add it in the Options column would depend on how we would make the get method in Godot.
The workaround that you are suggesting would be made directly in the card.gd resource script ? I think that if we manage to import nested resources, there could be a workaround for the fact that re-importing the data will erase the resource script. I could find a way to have a working workflow, by maybe only importing and not exporting.
Thanks a lot for your detailed answer !!

So it does look like they are nested, local and unique - then yes, a property with a custom getter inside the card resource's script could create objects inside.

if we manage to import nested resources, there could be a workaround for the fact that re-importing the data will erase the resource script

The problem in re-importing is how CSV import is currently implemented - it can't "update existing resources from CSV table", but only "create new collection of resources from CSV table", which makes it override the already imported resources. If you are fine with only editing through the plugin's in-engine editor after importing, and never touching the original CSV again, then no data overwrites will happen. There's a "process rows with custom function" feature in the editor, which could make editing of nested resources more bearable.
If you have more questions or I misunderstood something, feel free to write back!

authors: VictorLevrague don-tnowe


text:
Deploy to Vercel

Add the pipeline to deploy to Vercel with preview mode on each PR.

https://nextpresso.vercel.app/

repo: donaminos/NextPresso


text:
new game mechanics

Not sure if you'll like this one...
It saves 1 byte and imho makes the game more fun by introducing new mechanics.
Digested food turns into O, which doesn't grow the snake and turns into poison Å when consumed.
A tombstone └ which kills you appears in the last position you died.
This is kind of a glitch that could be fixed with push ds before mov si, sp.

I don't like the idea of changing the mechanics in such a dramatic fashion just for the sake of reducing one byte, thanks for the effort though!

I don't like the idea of changing the mechanics in such a dramatic fashion just for the sake of reducing one byte, thanks for the effort though!

I look at it the the way, it makes the game more interesting and happens to also make it smaller ;)
Didn't really expect you to merge this but thought it was interesting nonetheless.

It is an interesting take but I think it can't really be called snake

@hen-ter is there a way I can contact you?
I tried writing an email but I don't know if you still use it


text:
let user choose storage directory of books in config file

I hope the title explains it well, would be a nice to have!

Yes, it is :)
It is possible to code this :)

authors: donpiekarz evertvr

repo: donpiekarz/spellbook


text:
How to detect subscription renewal?

Is purchaseUpdatedListener called again, when a subscription is renewed? If not, what is the best way to detect this event, when not using server notifications?

@henrik-d did you figure this out already? I am asking myself the same question

My observation was that purchaseUpdatedListener as called on the next app-start after a renewal, but only on iOS! So that was not a solution for us. Instead we check the status of the subscription on every app start manually, by validating the receipt again with our server. That way we get the latest information about expiryDate etc.
Hope this helps!

@henrik-d That definitely helps! Thank you!

I have done some more research and it seems that the official way to achieve this is to use server-notifications: https://developer.apple.com/documentation/appstoreservernotifications
have you had experiences with this? @henrik-d

I have done some more research and it seems that the official way to achieve this is to use server-notifications: https://developer.apple.com/documentation/appstoreservernotifications
have you had experiences with this? @henrik-d

Using server notifications is definitely the more robust way to implement this. We decided against it, because it seems very complicated, especially when you need support for iOS and Android. It might be worth to check out https://www.iaphub.com/ or https://www.revenuecat.com/ which take the heavy lifting for you.

Using server notifications is definitely the more robust way to implement this. We decided against it, because it seems very complicated, especially when you need support for iOS and Android. It might be worth to check out https://www.iaphub.com/ or https://www.revenuecat.com/ which take the heavy lifting for you.

Thanks for confirming!

Thanks for confirming!

If anyone is using Laravel, this seems to be the best package that handles all of the server notifications and receipt validation stuff: https://github.com/imdhemy/laravel-in-app-purchases

If anyone is using Laravel, this seems to be the best package that handles all of the server notifications and receipt validation stuff: https://github.com/imdhemy/laravel-in-app-purchases

@kayamy Yes, here is the basic function:
private async checkForSubscriptionUpdates() {
    // check if user was subscribed (information is stored in redux store)
    if (!this.isUserSubscribed()) return;

    if (Platform.OS === 'ios') {
      const receipt = await IAP.getReceiptIOS();
      await this.processReceipt(receipt);
    }
    if (Platform.OS === 'android') {
      const subscriptionPurchase = await this.getMostRecentSubscriptionPurchase(); // uses IAP.getAvailablePurchases()
      if (subscriptionPurchase) {
        await this.processReceipt(subscriptionPurchase.transactionReceipt);
      } else {
        await this.store.dispatch(user.actions.revokeProSubscription());
      }
    }
  }

processReceipt() sends the receipt to the server to check if the subscription is still active.

@henrik-d thanks! I'm guessing you keep track of the subscription status serverside?

@kayamy As stated early, keeping track on the server using server notifications is the more robust solutions, but also way more complicated to implement. We only check the subscription status on the client side.

You need to validate receipt in order to do this progress which is recommended to handle in the server-side.

@henrik-d do you know if it's possible to rely on the initial receipt that you get when calling requestSubscription ?
in your approach you're not relying at all on the purchaseUpdatedListener for renewals right?
i found that the second, 3rd etc. time that purchaseUpdatedListener gets called it returns a different receipt (on iOS)
i'm wondering if i can just stop using purchaseUpdatedListener after the initial purchase and use an api call to my server to keep the subscription active.
and as a side-note, have you tested re-enabling the subscription outside of the app? (under the appstore settings)
if you're not using purchaseUpdatedListener the app will never know that the user re-enabled the subscription via the settings.
thanks so much for your help so far @henrik-d @hyochan  :)

@kayamy

do you know if it's possible to rely on the initial receipt that you get when calling requestSubscription ?

As far as I know you can use the original receipt on iOS, not sure about Android. Nevertheless we always use the latest receipt.

in your approach you're not relying at all on the purchaseUpdatedListener for renewals right?
i found that the second, 3rd etc. time that purchaseUpdatedListener gets called it returns a different receipt (on iOS)

Yes, we do not rely on purchaseUpdatedListener for renewals, but calling IAP.getReceiptIOS() will give the latest receipt.

and as a side-note, have you tested re-enabling the subscription outside of the app? (under the appstore settings)
if you're not using purchaseUpdatedListener the app will never know that the user re-enabled the subscription via the settings.

We don't use purchaseUpdatedListener for renewals, but for subscriptions made outside the app. So you should register the callback on every app start anyway.

The original receipt should work, at least in my experience. Did anyone experience something else?

Now i wonder if there is a risk in updating the receipt. Or is it going to be validated the same as the original token..didn't find any documentation on what is the healthiest approach.

I was also wondering if the transactionDate is updated on each renewal, or if its stored the same regardless of the renewal cycle. If the package gives new transaction date on each successful renewal, then it's pretty simple... Save in the server and handle by date, however the documentation doesn't state a lot of things.
Any info?

@henrik-d Hi you, I am also planning to use IAPHUB as you suggested. Can you tell me more when renew subscription is activated, how can IAPHUB call the API on my server to update a specific field, specifically isPremium true? in my database?

@henrik-d

const subscriptionPurchase = await this.getMostRecentSubscriptionPurchase(); // uses IAP.getAvailablePurchases()

does getMostRecentSubscriptionPurchase function gets the 0th element from IAP.getAvailablePurchases() ?

I was also wondering if the transactionDate is updated on each renewal, or if its stored the same regardless of the renewal cycle. If the package gives new transaction date on each successful renewal, then it's pretty simple... Save in the server and handle by date, however the documentation doesn't state a lot of things. Any info?

No, i tried and nothing updates after renewal happens.

We might need to implement web hooks , we. did but still the hook which is responsible for tracking renewal doesn’t get triggered when a renewal happens. Any one else who tried?

authors: darimuhittinhey henrik-d hyochan kayamy lahivee lunatolun nes123 umerdogar yenpn

repo: dooboolab-community/react-native-iap


text:
flutter IAP how to “Restore Purchases”

Version of flutter_inapp_purchase
Flutter 1.0.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (2 weeks ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
Platforms you faced the error (IOS or Android or both?)
Both
Expected behavior
Actual behavior
Tested environment (Emulator? Real Device?)
Real Device
Steps to reproduce the behavior
I am using flutter_inapp_purchase for my flutter app's IAP of non-Consumable product. For IOS, it does need to include a "Restore Purchases" feature to allow users to restore the previously purchased in-app purchases. May I know how to create "Restore" button and initiate the restore process when the "Restore" button is tapped by the user?
https://stackoverflow.com/questions/53776179/flutter-iap-how-to-restore-purchases

@z2228391 You can put restore button anywhere you want based on my knowledge (correct me if I am wrong). You can then use getAvailablePurchases to proceed this.

Since I feel this isn't a issue, I will close this for now.


text:
Expokit installation instructions?

Version of react-native-iap
"react-native-iap": "^3.3.9",

Version of react-native
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",

Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
I should see a Libraries folder in Xcode
Actual behavior
I can't find the "Libraries" folder. Same problem as this guy: https://github.com/dooboolab/react-native-iap/issues/174#issuecomment-450506090
Would you happen to have steps on how to install this on iOS? I just ejected my expo app, and chose Expokit. I ran npm install, react-native link react-native-iap, and now I'm stuck on the manual installation part because I can't find the Libraries folder.

Can you try [my suggestion[(https://github.com/dooboolab/react-native-iap/issues/14#issuecomment-360330732) in linking?

After updating from 3.3.7 to 3.3.9 with sdk34, I have the same problem rn-iap disappear from Podfile

authors: EdmundMai hyochan lc3t35

repo: dooboolab/react-native-iap


text:
BadgeURL as the output

Hello, I would like to request to have the shields.io corresponding to the badge url as the output.

A pull request is welcome.

repo: dorny/test-reporter


text:
Storage: add check for ceph crush map's mixed items buckets

This patch will make hotsos able to report those crush buckets that contains mixed items.
mixed items bucket is always a problem which would cause ceph unable to recover

Ah, forgot to add one test file

Now done

repo: dosaboy/hotsos


text:
Fixed #1453

Generated inline-style from jQuery are now plain CSS classes - which is better for future changes. Also replaced some old vanilla JS with build-in jQuery functions - since they are more robust and easier written.

Seems to work well enough.

authors: hernil niklasmh


text:
Limit ParentType to only contain fields from the @key and @requires directives

This PR seeks to address #4089. It modifies the ParentType for resolvers of federated types to only contain fields from the @key and @requires directives, since these fields are the only ones guaranteed to be available by federation.
This is my first PR with this project, so it's a little rough. My goal was to lay a foundation to solve this issue, but certain edge cases may not be fully addressed (such as unwrapped types and type mappings) and may break backwards compatibility. I furthermore only focused on adding this feature to Typescript, so it remains unimplemented in Flow for now. I think it would be best if we make this an experimental feature, but I'm unsure of the best way to do so. Please feel free to make any recommendations/modifications you see necessary. Thanks!

I don't intend for this PR to be merged yet, but I do want to open it up for discussion. Since this has a high risk of breaking backward compatibility, I think it'd be best to offer it as an experimental feature for now. What would be the best way to do this? Should I add it as a config option or maybe move this feature to its own plugin altogether?

This sounds like a very nice solution for that. @jakeblaxon can you please fix @kamilkisiela 's suggestions? And do you think we need more test cases for this change? maybe add tests with GraphQL interface and type to make sure it's compatible with that?

@jakeblaxon looks like a great progress :) What are the remaining tasks for this PR?
@kamilkisiela can you please take a look again?

I apologize for the delay on this. I've updated the types to pascal case. The last few remaining tasks I want to add are tests for interface and union types (and any other cases that you suggest) and documentation for how to use the GraphQLRecursivePick type (in case you want to use it as a param or return type in a custom method). The only other thing I would want to consider is adding a flag to enable/disable this specific feature as experimental. I'm fine with not including that, though, if you don't think it's necessary. @dotansimha what are your thoughts?

Sounds good, thanks @jakeblaxon !
Not sure about the need for a feature flag, because this is actually a bug fix and anyway it's better than what we have now. @kamilkisiela what do you think?

@dotansimha I think this PR is in a good state so I've opened it up. I added an interface test, but I'm skipping it for now since this PR doesn't support them. However, I think it's better to just get this in now since it works for types and is non-breaking for interfaces. I ended up not adding a test for unions since they don't really make sense in this context. I also didn't add documentation for the GraphQLRecursivePick type, but I think it's easy enough to figure out by looking at the generated types that use it. I wasn't sure where the best place was to put it. If you think there's a good spot where I can add it though, please let me know and I can get that in too!

@dotansimha is there anything preventing us from merging this PR? I noticed this has been open for a while.

I could really use this fix, too. Would love to see this merged 👍

@jakeblaxon No reason. You got @kamilkisiela 's approval so we good :)
Thank you so much!

@jakeblaxon  @eurostar-fennec-cooper can you please try the latest alpha? 1.17.4-alpha-48e09323.0

@dotansimha 1.17.4-alpha-48e09323.0 works perfectly/resolves the issue for me.

Great! Thank you for the feedback, @eurostar-fennec-cooper !
We will have a stable release soon :)

repo: dotansimha/graphql-code-generator


text:
Implement after hook or error handling?

Right now I generate and start a transaction in the context function and if the graphql request fails due to an error I would like inspect the result if it has any errors and based on that to rollback/commit the transaction. It would be nice if we could have a function similar to context but gets called after the graphql function to clean up connections/log stuff etc.
It seems apollo-server-express already exposes this in the options
If there could be some way we can pass the apollo server options directly to it using yoga for customizing the apollo server used underneath.

Also it seems if an error occurs in the context function. It crashes the server. Currently my context function is async and checks the token. It would be great if could try to catch an error happening here and return it as a graphql error.

+1 same issue

I've removed the debug option. I've put these new params in the props will/should it be in the options or should it be in a new field called apollo which will expose all low level apollo server options.
export interface Props {
  typeDefs?: string
  resolvers?: IResolvers
  schema?: GraphQLSchema
  context?: Context | ContextCallback
  options?: Options
  formatError?: Function
  formatParams?: Function
  formatResponse?: Function
  logFunction?: LogFunction
}

Why is this closed? It seems that the Props type passed to GraphQLServer constructor still does not accept options like formatError and formatResponse. How can I implement such behavior without those options? Can't find that anywhere in docs

Hey, @Urigo from The Guild here!
You might know us from projects such as graphql-code-generator, envelop or graphql-tools.
For a long time we thought that the Javascript ecosystem is still missing a lightweight cross-platform, but still highly customizable GraphQL Server.
In the past the awesome Prisma team took on that great challenge and now we are happy to announce that we are continuing them and just released GraphQL Yoga 2.0 - Build fast, extensible, and batteries-included (Subscriptions, Serverless, File uploads support) GraphQL APIs in Node.js 🚀
And regarding the issue here, Yoga uses the Envelop plugin system under the hood which has a very powerful hooks system and a whole ecosystem of plugins, including error handling plugins:
https://www.envelop.dev/plugins
https://www.the-guild.dev/blog/graphql-error-handling-with-fp
We have been working a long time on version 2.0 and have been using it in our clients projects for a few months now and shared a couple of alpha cycles here.
Thank you all for your feedback and suggestions, you made this release possible!
Please try Yoga out again, give us feedback and help us spread the word on the new release!

Announcement and blog post
https://github.com/dotansimha/graphql-yoga/issues/704
https://www.graphql-yoga.com/

authors: Urigo lucasmafra orefalo pyros2097

repo: dotansimha/graphql-yoga


text:
An unexpected error occurred invoking 'Init' on the server. HttpRequestException: Response status code does not indicate success: 404 (Not Found)

I need some help because didn't find any information about the error except this.
I have a simple Hub in my ASP.NET Core 3.1 application + Azure SugnalR Service
public class MessageHub : Hub<IHubClient>
{
    public async Task<int> Init(Guid callId)
    {
        if (callId == Guid.Empty)
        {
            throw new ArgumentNullException(nameof(callId));
        }

        _logger.LogInformation("Init call with callId {CallId}", callId);

        //
        return 10;
    }
}

In Startup:
services.AddSignalR(options => options.EnableDetailedErrors = true)
services.AddAzureSignalR(_configuration.GetSection("SignalR:ConnectionString").Value);
...
app.UseEndpoints(endpoints =>
 {
      endpoints.MapHub<MessageHub>("/messages");
 });

Sometimes, when I call Init method from C# client I get

An unexpected error occurred invoking 'Init' on the server. HttpRequestException: Response status code does not indicate success: 404 (Not Found).

Microsoft.AspNetCore.SignalR.HubException: An unexpected error occurred invoking 'Init' on the server. HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.InvokeCoreAsyncCore(String methodName, Type returnType, Object[] args, CancellationToken cancellationToken)
   at System.Threading.Tasks.ForceAsyncAwaiter`1.GetResult()
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.InvokeCoreAsync(String methodName, Type returnType, Object[] args, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.SignalR.Client.HubConnectionExtensions.InvokeCoreAsync[TResult](HubConnection hubConnection, String methodName, Object[] args, CancellationToken cancellationToken)
   at Mobile.SignalR.Controllers.CallController.Get(Guid floorId) in D:\iot\AzureIoT\Mobile.SignalR\Controllers\CallController.cs:line 22
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker

What 404 (Not Found) mean? When the Init really doesn't exist it returns

Microsoft.AspNetCore.SignalR.HubException: Failed to invoke 'Init' due to an error on the server. HubException: Method does not exist.

but what is 404 (Not Found)?
Found this page for old SignalR with reasons for 404. But none of them aren't valid: my proxy is not dynamically generated, no other routes in app, it runs in Linux Docker container, so no IIS.
Could you please suggest what could be the cause of the error?
My SignalR client code:
HubConnection connection = new HubConnectionBuilder()
   .WithUrl("https://xxxxx:5011/messages")
   .Build();

connection.On<string>("Receive", message =>
{
	// TODO: message processing here
	Console.WriteLine(message.ToString());
});

connection.StartAsync();
services.AddSingleton<HubConnection>(connection);

and used it in the controller like:
public class CallController : ControllerBase
{
	private readonly HubConnection _hubConnection;

	public CallController(HubConnection hubConnection)
	{
		_hubConnection = hubConnection;
	}

	[HttpGet("{id}")]
	public async Task<IActionResult> Get(Guid id)
	{
		var call = await _hubConnection.InvokeAsync<int>("Init", id);
		return Ok(call);
	}
}

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

ID: c9bc1072-be2c-94f6-49bf-daa9e97dff2d
Version Independent ID: 36052173-7061-6d01-8aed-915685cd7cf6
Content: ASP.NET Core SignalR .NET Client
Content Source: aspnetcore/signalr/dotnet-client.md
Product: aspnet-core
Technology: aspnetcore-signalr
GitHub Login: @bradygaster
Microsoft Alias: bradyg

Hello! Thanks for contacting us. This sounds like a general question about using ASP.NET Core. While we try to look at and respond to all issues, for questions like this we recommend posting to a community support group like Stack Overflow with the asp.net-core tag.

Stack Overflow
ASP.NET Core Slack
ASP.NET Gitter

Potential bugs in the ASP.NET Core framework and product feedback can be reported at dotnet/aspnetcore issues (include full repro steps and cross-link to a repro project in GH when appropriate). For Visual Studio, use the Report a Problem gesture or Suggest a Feature gesture within VS, which open internal issues for the VS team. For Visual Studio Code, you can open an issue at microsoft/vscode issues.

authors: Marusyk Rick-Anderson


text:
Add startup dropped to Migrate from ASP.NET Core 5.0 to 6.0

[Enter feedback here]

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

ID: 5bec61f9-7298-170d-5e12-abb27cde584e
Version Independent ID: 27a43e3f-149d-9058-f937-0eda1d6dd4f2
Content: Migrate from ASP.NET Core 5.0 to 6.0
Content Source: aspnetcore/migration/50-to-60.md
Product: aspnet-core
Technology: aspnetcore-migration
GitHub Login: @Rick-Anderson
Microsoft Alias: scaddie

I wrote a thing https://gist.github.com/davidfowl/0e0372c3c1d895c3ce195ba983b1e03d

@Rick-Anderson  I suggest we put this under a section labeled "Migrating to the new hosting model". We want to make sure people see that migrating existing projects is minimal effort then show them the new hosting model and show them how to adopt it (that's my gist).

authors: Rick-Anderson davidfowl


text:
"Layout in ASP.NET Core" page missing @namespace in list of directives supported by _

On the page: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/layout?view=aspnetcore-6.0#importing-shared-directives
@namespace directive is not on the list of _ViewImports file supported directives.

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

ID: b29734d0-2d2b-3b82-0456-785cc7f361fd
Version Independent ID: ab07129c-a4dd-44de-45f9-4b49eff0b54c
Content: Layout in ASP.NET Core
Content Source: aspnetcore/mvc/views/layout.md
Product: aspnet-core
Technology: aspnetcore-mvc
GitHub Login: @ardalis
Microsoft Alias: riande

What's the use case for @namespace in the layout file?

authors: Rick-Anderson milostns


text:
Highlight .NET multitenant example for Azure Service Bus

We have a new .NET with Azure Service Bus multitenant app sample that the development teams needs to be discoverable in the docs.
https://github.com/Azure-Samples/Cross-Tenant-Communication-Using-Azure-Service-Bus
Highlight it in articles/dotnet-develop-multitenant-applications.md
Not a task on this repo, but mentioning anyway related to bits of .NET content work to track.

Associated WorkItem - 36466

opening and closing to auto-create Quest tracking.

opening and closing to autocreate Quest tracking.


text:
issue on recognizing Javascript method - await JS.InvokeVoidAsync

[EDIT by guardrex to add code-fencing]
Description
Hi,
i am trying to invoke javascript method using await JS.InvokeVoidAsync as per described in the article. but it gives error has
Could not find method or method was undefined. PFB test sample used in .NET MAUI Blazor page(.razor)
@inject IJSRuntime JSRuntime;

<script>
  function displayTickerAlert1{
    console.log("displayTickerAlert1");
  };
</script>

in C#
@code {
    await JSRuntime.InvokeVoidAsync("displayTickerAlert1");
}

error as displayTickerAlert1 is not recognized(displayTickerAlert1  was undefined);
i have also tried defining method as below:
<script>
  window.displayTickerAlert1 = (symbol, price) => {
    alert(`${symbol}: $${price}!`);
  };
</script>

invoking in c#
await JS.InvokeVoidAsync("displayTickerAlert1", stockSymbol, price);

even this gives same error. Please help
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md
Document ID
9e197a8b-2616-8363-0a15-38cac802e82e
Article author
@guardrex

I can't reproduce a problem with the example ...

Make sure you're placing the JS (<script>...</script>) in the wwwroot/index.html file or colocate a JS file SxS with the component per the guidance. Don't place scripts into Razor components (as the guidance states). The guidance is at ...
https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/?view=aspnetcore-8.0#javascript-location
Otherwise, seek assistance from the community if you're still having trouble. We recommend the usual chats/forums ...

Stack Overflow (tag: blazor)
ASP.NET Core Slack Team
Blazor Gitter

authors: guardrex shilpaCM


text:
WIP new single project template

removed the old template too. Need to work out build dependencies.

Current errors I'm getting when trying to build.
Android
dotnet build -t:Run -f net6.0-android

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/30.0.100-preview.5.19/tools/Xamarin.Android.Common.targets(504,3): error XA1018: Specified AndroidManifest file does not exist: /Users/dmo/work/demos/App4/App4/AndroidManifest.xml. [/Users/dmo/work/demos/App4/App4/App4.csproj]

Mac Catalyst
dotnet build -t:Run -f net6.0-maccatalyst

/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/14.5.100-preview.5.884/tools/msbuild/iOS/Xamarin.Shared.targets(759,3): error : Info.plist not found. [/Users/dmo/work/demos/App4/App4/App4.csproj]

@redth or @jonathanpeppers - advice on those errors and what to do with Directory.Build.targets? I brought in the maui template to start, but it's quite different from what @Clancey is doing here.

How this works would also change when we merge: https://github.com/dotnet/maui/pull/603
You would put <UseMauiCore>true</UseMauiCore> and <UseMauiAssets>true</UseMauiAssets>. Which, perhaps, Comet could implicitly set somehow from MSBuild targets inside the NuGet package.

Please make it very easy for getting started

Microsoft.Maui.Controls.Build.Tasks

This seems like it's the wrong namespace. Or we need 2 build tasks. But Comet shouldn't require anything from Controls.

authors: Clancey davidortinau jonathanpeppers saint4eva

repo: dotnet/Comet


text:
When Aspire.Dashboard added to a Web project it's appsettings and launcConfiguration takes over the "host" project.

I tried to use the Aspire.Dashboard in a project outside of Aspire and while everything worked, I found out (the hard way) that it's NuGet package contains the launchConfiguration.json and appSettings*.json files.
It seems that the default SDK behavior is that it is copied over when the project is running so any custom configuration I've in my own web project's appSettings will not be read.
Are those files have to be packaged with the dashboard or is it just an oversight?
I think (haven't tried) that if you add an appSettings to the Hosting project where it's referenced within an Aspire solution, the same problem will arise.

The Aspire.Dashboard package isn't currently in a state that it can be easily consumed from other projects but that's something we're currently working towards
Dupe of #846

authors: DamianEdwards attilah

repo: dotnet/aspire


text:
Custom Domain Name for Container app

Is there a way to set custom domain name for Container App?
Maybe you have some examples?

Transferring this over to azure/azure-dev as this is probably more of a deployment time concern.

Closing here, but created a new issue over here: https://github.com/Azure/azure-dev/issues/3102

authors: KSemenenko mitchdenny


text:
Show container volumes in the dashboard

Description
Fixes #3969
This plumbs through information about volumes mounted to containers, for display in the dashboard alongside other container details.

Checklist

Is this feature complete?

[x] Yes. Ready to ship.
[ ] No. Follow-up changes expected.

Are you including unit tests for the changes and scenario tests if relevant?

[ ] Yes
[x] No

Did you add public API?

[x] Yes

If yes, did you have an API Review for it?

[ ] Yes
[x] No

Did you add <remarks /> and <code /> elements on your triple slash comments?

[x] Yes
[ ] No

[ ] No

Does the change make any security assumptions or guarantees?

[ ] Yes

If yes, have you done a threat model and had a security review?

[ ] Yes
[ ] No

[x] No

Does the change require an update in our Aspire docs?

[ ] Yes

Link to aspire-docs issue:

[x] No

Microsoft Reviewers: Open in CodeFlow

@drewnoakes Seems like there's a conflict with @mitchdenny's PR.
Can you show an example of a bind mount?
This change looks good! Thanks!

Conflicts fixed.
Found a way to visualize mount type and read only state:

The visualizer/copy button works with the raw value only (/var/lib/rabbitmq), which I think makes the most sense.
This shows both the mount type, and whether the mount is read only or not. In this case I hard-coded the value to true, as I didn't see an example in the playground.

Bind mounts have a physical path for the source

authors: davidfowl drewnoakes


text:
Fix Malformed FQN Component Code Action

Summary of the changes

Malformed FQN component was due to two separate workspace edits overwriting values. Updated to use a single workspace edit, with multiple text edits. Not sure why this issue wasn't materializing in earlier testing 🤔.
Unit tests: Wouldn't have caught this issue as the difference occurs in how LSP platform interprets the order of edits.

Fixes: https://github.com/dotnet/aspnetcore/issues/25969

@NTaylorMullen I am not sure what the term edit plane means. Can you explain that before I try to answer.

@NTaylorMullen I am not sure what the term edit plane means. Can you explain that before I try to answer.

So when I'm referring to "edit plane" i'm referring to applying edits on the current snapshot of the world vs. each subsequent edit operating on an updated state of the world. In the case of this PR we went from multiple document changes with single edits all pointing to the same document to a single document change with multiple edits.
For extra clarity, lets say we have the document:

And you want to rename p => Hello with the expected output of <Hello></Hello>. To accomplish that in a single edit plane you can make two edits:
[
    {
        range: {
            start: {
                line: 1
                character: 1
            },
            end: {
                line: 1
                character: 2
            }
        },
        newText: "Hello"
    },
    {
        range: {
            start: {
                line: 1
                character: 5
            },
            end: {
                line: 1
                character: 6
            }
        },
        newText: "Hello"
    }
]

If the edits were to be applied in different edit planes then each edit wouldn't have knowledge of the next and the platform would treat them independently. So lets say the platform treated each edit independently above you'd end up with: <HellHello>

OK. Understood. LSP defines that edits move a document from state Sn to S(n + 1). That for me means that your changes brings it in line with LSP.

authors: NTaylorMullen TanayParikh dbaeumer

repo: dotnet/aspnetcore-tooling


text:
Fixed broken links

Linking to MSDN as a workaround

Open Publishing Build Service: The pull request content has been published and here are some changed files links of this time:

Docset 1 - core-docs
https://review.docs.microsoft.com/en-us/dotnet/articles/standard/garbagecollection/implementing-dispose?branch=pr-en-us-1087

Status: Succeeded.
Open Publishing Report.

LGTM. I checked the links and they are correct.
:shipit:

Thanks Bill 😃

authors: BillWagner qinezh stevehoag

repo: dotnet/core-docs


text:
Error response from daemon: Cannot locate specified Dockerfile: Dockerfile

Problem encountered on https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-file
Operating System: macos
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

File Structure:
Controllers			Properties			appsettings.Development.json	myMicroservice.csproj
DockerFile			Startup.cs			appsettings.json		myMicroservice.sln
Program.cs			WeatherForecast.cs		bin				obj
Dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY myMicroservice.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c release -o /app
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "myMicroservice.dll"]

@shirhatti can you please help?

@nishanil

authors: carlossanlop petepolyak

repo: dotnet/core


text:
.NET Core on macOS High Sierra

We are currently testing .NET Core 1.x and 2.0 on High Sierra. Please post issues here.

When using IdentityServer4 and developing in macOS High Sierra with .NetCore Version 2.0.0 preview 1, It just randomly Stops the "MVC" (Web Application with Membership and Authorization)project. However the Web API project  works fine and has no problem. MVC is on port 5000 the API is on 49996 as some additional Information.Also when running the Identity Server Locally It will allow me to at least get to the Login Page but then this pops up after typing in credentials.

Before I updated to .NetCore 2.0 I was getting other errors which upgrading my .NetCore got rid of.

@jobrien721 Does it happen right away, or is it after the process has been running for several minutes?

it happens right away, and thank you for the response

@jobrien721 Hmm.  Maybe they decreased the auto-lock timeout.  I think this is fixed for preview2 by https://github.com/dotnet/corefx/pull/20577.  I think the links from https://github.com/dotnet/cli/blob/release/2.0.0/README.md will let you get a current/almost-preview2 build.

OK, thank you! I will check it out and let you know!

@bartonjs I just wanted to let you know, That updating to .NetCore 2.0.0-preview2 Did the fix for the Identity server issue! Im now facing another issue with the API, but with that said im gonna try to figure It out! If it becomes a huge problem I will post it here and if I solve it I will post it here if its not something small that I may have missed! Thank you again for your help!

Going to close this issue because it looks like this one was resolved.

@Petermarcu  Yes it is solved thank you but I believe I found another bug when running it locally it works perfectly fine(IdentityServer4,MVC, and API) however if I have the MVC or API try to hit the https Identity Server it Crashes and If I have the MVC try to point to the https API url it crashes as well. So my assumption at this point without further testing would be it may have something to do with the routing to a https.  Im not sure if it is just https or http as well but I thought I would mention it.
Thank you in advance for your time!

@jobrien721 , can you share a callstack of the crash?

First off the Image above is the box its in but this is whats inside..
Process:               dotnet [2651]
Path:                  /usr/local/share/dotnet/dotnet
Identifier:            dotnet
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        dotnet [2645]
Responsible:           dotnet [2651]
There is more info but some is private info about my Max and what not..Thats the gist of the top part tho then theres a full CallStack with .dylib info etc. . .

The full callstack with Dylibs would be really helpful. Is there an easy way for you to sanitize it?

yes I will try to sanitize it and and get it to you this evening or tomorrow morning!

Thanks! @wfurt and @bartonjs as FYI when to take a look when we you share more data.

Hi:
Attached is a crash log that I'm seeing in High Sierra.  It appears to occur when Crypto is attempted in High Sierra.
dotnet_2017-06-19-182626_Gu3sts.crash.txt

core 1.1. has known problem @gu3st .  Can you  reproduce it with 2.0 preview? @bartonjs submitted fix for 1.0 and 1.1 and it is in testing right now. There is no pre-built binary yet AFAIK.

I tried with 2.0, but my project doesn't seem to compile in 2.0. I haven't spent a lot of time to investigate into running it in 2.0 quite yet.

We've found an issue using SqlClient with High Sierra. See https://github.com/dotnet/corefx/issues/22453 for the bug report. It's a simple repro and seems like it may be related to the SSL issues you reported to Apple?

At this point we've shipped updates to 1.X and fixed many issues before RTM of 2.0. I'm going to close this now and if anyone finds specific issues on 10.13, please open an issue about it.

authors: Petermarcu bartonjs gu3st jobrien721 kevcunnane richlander wfurt