Updating .NET Core libraries from 1.0 RC2 to 1.0 RTM

Changes from RC2 to RTM are minimal, so there shouldn't be that many problems

Nice, thanks! I'll wait and see if the AppVeyor build succeeds. AppVeyor may need to update something at their end, but I just want to see if the CI build succeeds before merging :)

Success! :smile:

So awesome! When will we see a new Nuget package release?

You can install version  React.AspNet 2.4.1-dev-20160628-1635 or above from the development/build server to install the new build. I'll do a proper release soon :)

That's amazing. Thank you so much.
On June 28, 2016 at 1:04:47 PM, Daniel Lo Nigro<EMAIL_ADDRESS>wrote:

You can install version React.AspNet 2.4.1-dev-20160628-1635 or above
from the development/build server
http://reactjs.net/getting-started/download.html#development-builds to
install the new build. I'll do a proper release soon :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/reactjs/React.NET/pull/287#issuecomment-229132091,
or mute the thread
https://github.com/notifications/unsubscribe/AAo35DNF3ROK5CQ5169HdPJewlWoK1VAks5qQWI_gaJpZM4JASRv
.

Pushed this as version 2.5, will update documentation later today.


Improve README

add link to Hackage docs
fix code example to be complete and working

Thanks, did a bit of more tuning and added example as a sample to see it actually works!


Search Feature on Website

That will permit to avoid Ctrl+F through the entire website

Closed for bc-font-website package: https://github.com/bchoubert/bc-font-website


ocis sometimes fails to start

In nightly tests the server sometimes fails to start:
Possible errors
https://drone.owncloud.com/owncloud/ocis/9537/43/5
{"level":"fatal","service":"nats","time":"2022-02-22T01:09:20Z","message":"STREAM: Failed to start: read tcp <IP_ADDRESS>:50472-><IP_ADDRESS>:4222: i/o timeout"}

https://drone.owncloud.com/owncloud/ocis/9537/51/5
{"level":"error","pid":9,"error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp <IP_ADDRESS>:9142: connect: connection refused\"","time":"2022-02-22T01:09:36Z","message":"error registering app provider: error calling add app provider"}

{"level":"error","service":"storage","error":"unable to register services: rgrpc: error creating unary interceptor: eventsmiddleware,: error connecting to nats cluster test-cluster: stan: connect request timeout (possibly wrong cluster ID?)","time":"2022-02-22T01:09:37Z","message":"error starting the grpc server"}

this night an API test fail
https://drone.owncloud.com/owncloud/ocis/9598/23/3
{"level":"error","error":"remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-24T01:12:07Z","caller":"/go/pkg/mod/github.com/cs3org/reva@v1.16.1-0.20220221135950-8cc813ecfc4c/pkg/storage/fs/ocis/ocis.go:48","message":"could not setup tree"}

{"level":"error","service":"storage","error":"unable to register services: rgrpc: grpc service storageprovider could not be started,: could not setup tree: remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-24T01:12:07Z","message":"error starting the grpc server"}

I had similar late yesterday in PR #3226
https://drone.owncloud.com/owncloud/ocis/9590/41/5
{"level":"error","error":"remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-23T15:21:30Z","caller":"/go/pkg/mod/github.com/cs3org/reva@v1.16.1-0.20220221135950-8cc813ecfc4c/pkg/storage/fs/ocis/ocis.go:48","message":"could not setup tree"}

{"level":"error","service":"storage","error":"http service dataprovider could not be started,: could not setup tree: remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-23T15:21:30Z","message":"error starting the http server"}

ocis did not start.

And again: https://drone.owncloud.com/owncloud/ocis/9599/27/3
latest: Pulling from owncloudci/alpine
Digest: sha256:326b0ab9ec8a2fe12247b5c54e37f7afd2daa179fe7bd2a3d376b2d3139d2297
Status: Image is up to date for owncloudci/alpine:latest
+ ocis/bin/ocis server
{"level":"error","error":"remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-24T05:12:14Z","caller":"/go/pkg/mod/github.com/cs3org/reva@v1.16.1-0.20220221135950-8cc813ecfc4c/pkg/storage/fs/ocis/ocis.go:48","message":"could not setup tree"}
{"level":"error","service":"storage","error":"http service dataprovider could not be started,: could not setup tree: remove /srv/app/tmp/ocis/storage/metadata/nodes/root.flock: no such file or directory","time":"2022-02-24T05:12:14Z","message":"error starting the http server"}

Fix in reva has been merged. https://github.com/cs3org/reva/pull/2582

Fixed by #3231

happened again
can't connect to nats (stan) server, retrying in 376.305592ms
{"level":"fatal","service":"nats","time":"2022-03-04T01:04:43Z","message":"STREAM: Failed to start: read tcp <IP_ADDRESS>:53876-><IP_ADDRESS>:9233: i/o timeout"}

https://drone.owncloud.com/owncloud/ocis/9762/33/5

Run into the "can't connect to nats (stan) server, retrying in xyz ms" with 1.18.0 as well.

Run into the "can't connect to nats (stan) server, retrying in xyz ms" with 1.18.0 as well.

Did it happen over and over again @nikslor ? I sometimes do see it once but then it seems to connect fine (in the past, I had retry logs over and over, also this issue is about oCIS crashing in CI since it can't connect to the nats service at all)

Facing a similar problem when trying to start ocis server in a 32-bit machine with debian 11.
Does anybody has an insight about what could be wrong ? Or how could I help to debug this ?
serza@acer-debian:~$ ocis server {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:43.140539377-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1.149704951s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:44.039810507-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1.129263415s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:44.214695036-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1.328811761s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:44.56518388-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1.553074138s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:44.9237403-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 3.334896886s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:45.688535669-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 3.421492733s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:46.033774823-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 1.650862525s"} {"level":"error","error":"error connecting to nats cluster ocis-cluster: error connecting to nats at <IP_ADDRESS>:9233 with tls enabled (false): nats: no servers available for connection","time":"2022-07-26T20:34:46.171282742-03:00","caller":"github.com/cs3org/reva/v2@v2.7.2/pkg/events/server/nats.go:65","message":"can't connect to nats (jetstream) server, retrying in 2.312673955s"} {"level":"error","service":"users","error":"unable to register services: rgrpc: grpc service userprovider could not be started,: Error reading LDAP CA Cert '/home/serza/.ocis/idm/ldap.crt.': open /home/serza/.ocis/idm/ldap.crt: no such file or directory","time":"2022-07-26T20:34:48.520289414-03:00","message":"error starting the grpc server"}

should be fixed by #8880


When a user hits the first and last available dates in the calendar, this is announced to them.

Users experience difficulty navigating through empty spots on the calendar.
(JAWS) Unavailable dates do not specify that they are unavailable.
PR https://github.com/cds-snc/ircc-rescheduler/pull/451 will take care of announcing "unavailable"
@zakkain if we're on the first or last date what should the label say?
User has enter the field:
"first available date Tuesday, October 23, 2018"
User has enter the field:
"last available date Tuesday, December 18, 2018"

@timarney let's replace "date" with "day" - everywhere in the UI and A11Y content, actually, to be consistent with our earlier work
other than that, looks great! 👍

Added this to #451


Updated docker setup for development

Another pass at Docker setup for local development.

The goal now is that Docker is The One True Way that all developers work on the codebase
One image/container for the entire project
Run Postgres and Redis in the Linux image
Run npm and node in the Linux image

Current limitations:

Postgres does not auto start correctly

You can currently start with service postgresql start
But I would like to figure out why it isn't starting like it should

VS Code on the host machine doesn't work correctly

Running npm ci inside the image works great
The problem is that npm uses symlinks to map our projects in /packages/ to /node_modules/
Those symlinks inside the container are not accurately represented on the host OS
So, for example, VS Code can find react and express just fine, but it cannot find @medplum/core
VS Code has a plugin for this exact use case: https://code.visualstudio.com/docs/remote/containers

Need to update the developer documentation accordingly

Delete sections about developing on host machine
Update sections about Docker image to reflect single image vs 4 images

Add additional convenience scripts

Something for "start docker"
Something for "shell into docker"

Improve the default shell experience

Ugly prompt configuration

@codyebberson I think we should close this PR now, given that we removed this path from our instructions: #798


Update dependencies

fs2 to 2.3.0
google-cloud-pubsub to 1.105.0
java-jwt to 3.10.2
scalatest to 3.1.1
scalatest-plus to <IP_ADDRESS>

Did this manually as a way to avoid scala-steward conflicts and it seems to have missed the GCP dep update.

Codecov Report

Merging #97 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master     #97   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files          24      24
  Lines         234     234
  Branches        9       9
======================================
  Misses        234     234

Continue to review full report at Codecov.

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


Keep user-entered fields if using advanced create after a failed creation

This is specifically referring to the entry point when a basic create fails and we direct users to try advanced create.

This issue has become stale and is at risk of being closed. The community has 60 days to upvote the issue. If it receives 5 upvotes we will keep it open and take another look. If not, we will close it. To learn more about how we handle issues, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this issue has received less than 5 community upvotes and we closed it. Still a big Thank You to you for taking the time to create it! To learn more about how we handle issues, please see our documentation.
Happy Coding!


[QUESTION] enhance serialization speed

Description
I have to return sometimes big objects, I'm constrained in the fact that chunking them is not an option
An example of such an object would be a dict {"key:: value} where value is a list of list, 20 list of 10k elements.
I wrote this simple test case that shows quite clearly the massive hit in several scenarios (run with pytest tests/test_serial_speed.py --log-cli-level=INFO)
Here's the output:
======================================================================================================================= 1 passed in 3.68 seconds =======================================================================================================================
(fastapi) ➜  fastapi git:(slow_serial) ✗ pytest tests/test_serial_speed.py --log-cli-level=INFO
========================================================================================================================= test session starts ==========================================================================================================================
platform linux -- Python 3.6.8, pytest-5.0.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/lotso/PycharmProjects/fastapi
plugins: cov-2.7.1
collected 1 item

tests/test_serial_speed.py::test_routes
---------------------------------------------------------------------------------------------------------------------------- live log call -----------------------------------------------------------------------------------------------------------------------------
INFO     tests.test_serial_speed:test_serial_speed.py:39 route1: 0.05402565002441406
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route1, 9.395180225372314, ['http_status:200', 'http_method:GET', 'time:wall']
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route1, 9.395131000000001, ['http_status:200', 'http_method:GET', 'time:cpu']
INFO     tests.test_serial_speed:test_serial_speed.py:52 route1: 0.049863576889038086
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route2, 10.358616590499878, ['http_status:200', 'http_method:GET', 'time:wall']
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route2, 10.358592000000002, ['http_status:200', 'http_method:GET', 'time:cpu']
INFO     tests.test_serial_speed:test_serial_speed.py:64 route1: 0.05589580535888672
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route3, 11.318845272064209, ['http_status:200', 'http_method:GET', 'time:wall']
INFO     tests.test_serial_speed:test_serial_speed.py:18 app.tests.test_serial_speed.route3, 11.318446000000002, ['http_status:200', 'http_method:GET', 'time:cpu']
PASSED                                                                                [100%]

====================================================================================================================== 1 passed in 31.60 seconds =======================================================================================================================

all routes do the same with slight variations:

build a big object, it's a dict, one key and a list of list value with 3 sublists of 100k elements, a little bit extreme maybe but it's to show clearly the impact
return the object

as you can see the time taken to build such an object is small, around 0.05s, but...
route1 just returns it, it takes 9s
route2 returns it but has the response_model=BigData in the signature, it takes 1s more
route3 is not intuitive to me, I thought that by already building a BigData object and returning it, there would be no penalty, but it's again slower
How can I [...]?
improve performance
edit: the tests are available at this branch, can PR should you want to https://github.com/euri10/fastapi/tree/slow_serial

Just to confirm, you do have ujson installed? What type of machine are you running this on?
Route 1 is going to be fastest as it is just returning the JSONResponse directly.
Route 2 is taking the dict, running field.validate   and then dumping it back out as JSON, so will be slower than route 1.
I  could be wrong on this one, have never really looked at the response portion of the fastapi code, but from a quick glance
Route 3 constructs the pydantic model (which validates it), then calls field.validate on it again  and then dumps it back out as json, making it the slowest.
FWIW, with ujson on a MBP:
------------------------------------------------------------------------------------------------ live log call -------------------------------------------------------------------------------------------------
test_serial_speed.py        41 INFO     route1: 0.028443098068237305
test_serial_speed.py        19 INFO     app.test_serial_speed.route1, 2.768159866333008, ['http_status:200', 'http_method:GET', 'time:wall']
test_serial_speed.py        19 INFO     app.test_serial_speed.route1, 2.7664400000000002, ['http_status:200', 'http_method:GET', 'time:cpu']
test_serial_speed.py        53 INFO     route2: 0.02795100212097168
test_serial_speed.py        19 INFO     app.test_serial_speed.route2, 3.3919589519500732, ['http_status:200', 'http_method:GET', 'time:wall']
test_serial_speed.py        19 INFO     app.test_serial_speed.route2, 3.386338999999999, ['http_status:200', 'http_method:GET', 'time:cpu']
test_serial_speed.py        64 INFO     route3: 0.03644418716430664
test_serial_speed.py        19 INFO     app.test_serial_speed.route3, 3.939689874649048, ['http_status:200', 'http_method:GET', 'time:wall']
test_serial_speed.py        19 INFO     app.test_serial_speed.route3, 3.9318400000000002, ['http_status:200', 'http_method:GET', 'time:cpu']```

I don't have ujson installed and my machine was a dual i5-2697v2 (until today when it seems I fried my mb bios...) well.
Will try ujson even if iirc it's kind of stalled project, isn't it?

I'm investigating it, a bit, with line_profiler.
Maybe calling fastapi.encoders.jsonable_encoder() part is main factor?, and too many calling this function (recursively).
File: /home/me/venvs/fastapi/lib/python3.7/site-packages/fastapi/encoders.py
Function: jsonable_encoder at line 8

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
     8                                           @profile
     9                                           def jsonable_encoder(
    10                                               obj: Any,
    11                                               include: Set[str] = None,
    12                                               exclude: Set[str] = set(),
    13                                               by_alias: bool = True,
    14                                               skip_defaults: bool = False,
    15                                               include_none: bool = True,
    16                                               custom_encoder: dict = {},
    17                                               sqlalchemy_safe: bool = True,
    18                                           ) -> Any:
    19    130008      85523.0      0.7      3.5      if include is not None and not isinstance(include, set):
    20                                                   include = set(include)
    21    130008      97039.0      0.7      3.9      if exclude is not None and not isinstance(exclude, set):
    22                                                   exclude = set(exclude)
    23    130008     172094.0      1.3      6.9      if isinstance(obj, BaseModel):
    24         1          2.0      2.0      0.0          encoder = getattr(obj.Config, "json_encoders", custom_encoder)
    25         1          1.0      1.0      0.0          return jsonable_encoder(
    26         1          1.0      1.0      0.0              obj.dict(
    27         1          0.0      0.0      0.0                  include=include,
    28         1          1.0      1.0      0.0                  exclude=exclude,
    29         1          1.0      1.0      0.0                  by_alias=by_alias,
    30         1      22756.0  22756.0      0.9                  skip_defaults=skip_defaults,
    31                                                       ),
    32         1          1.0      1.0      0.0              include_none=include_none,
    33         1          1.0      1.0      0.0              custom_encoder=encoder,
    34         1          6.0      6.0      0.0              sqlalchemy_safe=sqlalchemy_safe,
    35                                                   )
    36    130007     116806.0      0.9      4.7      if isinstance(obj, Enum):
    37                                                   return obj.value
    38    130007     136911.0      1.1      5.5      if isinstance(obj, (str, int, float, type(None))):
    39     30001      18834.0      0.6      0.8          return obj
    40    100006      76767.0      0.8      3.1      if isinstance(obj, dict):
    41     50001      59332.0      1.2      2.4          encoded_dict = {}
    42     70002      77972.0      1.1      3.1          for key, value in obj.items():
    43                                                       if (
    44                                                           (
    45     20001      13416.0      0.7      0.5                      not sqlalchemy_safe
    46     20001      15464.0      0.8      0.6                      or (not isinstance(key, str))
    47     20001      18121.0      0.9      0.7                      or (not key.startswith("_sa"))
    48                                                           )
    49     20001      13778.0      0.7      0.6                  and (value is not None or include_none)
    50     20001      14021.0      0.7      0.6                  and ((include and key in include) or key not in exclude)
    51                                                       ):
    52     20001      13916.0      0.7      0.6                  encoded_key = jsonable_encoder(
    53     20001      12987.0      0.6      0.5                      key,
    54     20001      13242.0      0.7      0.5                      by_alias=by_alias,
    55     20001      13011.0      0.7      0.5                      skip_defaults=skip_defaults,
    56     20001      13224.0      0.7      0.5                      include_none=include_none,
    57     20001      12971.0      0.6      0.5                      custom_encoder=custom_encoder,
    58     20001      33429.0      1.7      1.3                      sqlalchemy_safe=sqlalchemy_safe,
    59                                                           )
    60     20001      14937.0      0.7      0.6                  encoded_value = jsonable_encoder(
    61     20001      13204.0      0.7      0.5                      value,
    62     20001      13382.0      0.7      0.5                      by_alias=by_alias,
    63     20001      13164.0      0.7      0.5                      skip_defaults=skip_defaults,
    64     20001      12975.0      0.6      0.5                      include_none=include_none,
    65     20001      13333.0      0.7      0.5                      custom_encoder=custom_encoder,
    66     20001      27140.0      1.4      1.1                      sqlalchemy_safe=sqlalchemy_safe,
    67                                                           )
    68     20001      15872.0      0.8      0.6                  encoded_dict[encoded_key] = encoded_value
    69     50001      32725.0      0.7      1.3          return encoded_dict
    70     50005      54024.0      1.1      2.2      if isinstance(obj, (list, set, frozenset, GeneratorType, tuple)):
    71         5          3.0      0.6      0.0          encoded_list = []
    72     40009      30858.0      0.8      1.2          for item in obj:
    73     40004      29258.0      0.7      1.2              encoded_list.append(
    74     40004      29604.0      0.7      1.2                  jsonable_encoder(
    75     40004      28551.0      0.7      1.2                      item,
    76     40004      26669.0      0.7      1.1                      include=include,
    77     40004      27325.0      0.7      1.1                      exclude=exclude,
    78     40004      26618.0      0.7      1.1                      by_alias=by_alias,
    79     40004      26593.0      0.7      1.1                      skip_defaults=skip_defaults,
    80     40004      26568.0      0.7      1.1                      include_none=include_none,
    81     40004      27065.0      0.7      1.1                      custom_encoder=custom_encoder,
    82     40004      60135.0      1.5      2.4                      sqlalchemy_safe=sqlalchemy_safe,
    83                                                           )
    84                                                       )
    85         5          1.0      0.2      0.0          return encoded_list
    86     50000      36219.0      0.7      1.5      errors: List[Exception] = []
    87     50000      37246.0      0.7      1.5      try:
    88     50000      36024.0      0.7      1.5          if custom_encoder and type(obj) in custom_encoder:
    89                                                       encoder = custom_encoder[type(obj)]
    90                                                   else:
    91     50000      66823.0      1.3      2.7              encoder = ENCODERS_BY_TYPE[type(obj)]
    92                                                   return encoder(obj)
    93     50000      38776.0      0.8      1.6      except KeyError as e:
    94     50000      43301.0      0.9      1.7          errors.append(e)
    95     50000      37506.0      0.8      1.5          try:
    96     50000     114909.0      2.3      4.6              data = dict(obj)
    97     50000      38964.0      0.8      1.6          except Exception as e:
    98     50000      41277.0      0.8      1.7              errors.append(e)
    99     50000      37823.0      0.8      1.5              try:
   100     50000      54317.0      1.1      2.2                  data = vars(obj)
   101                                                       except Exception as e:
   102                                                           errors.append(e)
   103                                                           raise ValueError(errors)
   104     50000      37823.0      0.8      1.5      return jsonable_encoder(
   105     50000      38198.0      0.8      1.5          data,
   106     50000      36241.0      0.7      1.5          by_alias=by_alias,
   107     50000      35441.0      0.7      1.4          skip_defaults=skip_defaults,
   108     50000      34936.0      0.7      1.4          include_none=include_none,
   109     50000      34819.0      0.7      1.4          custom_encoder=custom_encoder,
   110     50000      75581.0      1.5      3.1          sqlalchemy_safe=sqlalchemy_safe,
   111                                               )

Total time: 4.87313 s
File: /home/me/venvs/fastapi/lib/python3.7/site-packages/fastapi/routing.py
Function: serialize_response at line 37

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
    37                                           @profile
    38                                           def serialize_response(
    39                                               *,
    40                                               field: Field = None,
    41                                               response: Response,
    42                                               include: Set[str] = None,
    43                                               exclude: Set[str] = set(),
    44                                               by_alias: bool = True,
    45                                               skip_defaults: bool = False,
    46                                           ) -> Any:
    47         1          1.0      1.0      0.0      if field:
    48         1          1.0      1.0      0.0          errors = []
    49         1       8834.0   8834.0      0.2          value, errors_ = field.validate(response, {}, loc=("response",))
    50         1          1.0      1.0      0.0          if isinstance(errors_, ErrorWrapper):
    51                                                       errors.append(errors_)
    52         1          0.0      0.0      0.0          elif isinstance(errors_, list):
    53                                                       errors.extend(errors_)
    54         1          0.0      0.0      0.0          if errors:
    55                                                       raise ValidationError(errors)
    56         1          0.0      0.0      0.0          r = jsonable_encoder(
    57         1          0.0      0.0      0.0              value,
    58         1          0.0      0.0      0.0              include=include,
    59         1          0.0      0.0      0.0              exclude=exclude,
    60         1          0.0      0.0      0.0              by_alias=by_alias,
    61         1    4864294.0 4864294.0     99.8              skip_defaults=skip_defaults,
    62                                                   )
    63         1          0.0      0.0      0.0          return r
    64                                               else:
    65                                                   return jsonable_encoder(response)

Maybe, it is good that running include = set(include) only once.

And ujson's effect is limited, maybe. because calling response_class is not slow.
Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
    83                                               @profile
    84                                               async def app(request: Request) -> Response:
    85         1          2.0      2.0      0.0          try:
    86         1          1.0      1.0      0.0              body = None
    87         1          1.0      1.0      0.0              if body_field:
    88                                                           if is_body_form:
    89                                                               body = await request.form()
    90                                                           else:
    91                                                               body_bytes = await request.body()
    92                                                               if body_bytes:
    93                                                                   body = await request.json()
    94                                                   except Exception as e:
    95                                                       logging.error(f"Error getting request body: {e}")
    96                                                       raise HTTPException(
    97                                                           status_code=400, detail="There was an error parsing the body"
    98                                                       ) from e
    99         1          1.0      1.0      0.0          solved_result = await solve_dependencies(
   100         1          1.0      1.0      0.0              request=request,
   101         1          1.0      1.0      0.0              dependant=dependant,
   102         1          0.0      0.0      0.0              body=body,
   103         1        102.0    102.0      0.0              dependency_overrides_provider=dependency_overrides_provider,
   104                                                   )
   105         1          1.0      1.0      0.0          values, errors, background_tasks, sub_response, _ = solved_result
   106         1          1.0      1.0      0.0          if errors:
   107                                                       raise RequestValidationError(errors)
   108                                                   else:
   109         1          1.0      1.0      0.0              assert dependant.call is not None, "dependant.call must be a function"
   110         1          1.0      1.0      0.0              if is_coroutine:
   111                                                           raw_response = await dependant.call(**values)
   112                                                       else:
   113         1       4045.0   4045.0      0.3                  raw_response = await run_in_threadpool(dependant.call, **values)
   114         1          1.0      1.0      0.0              if isinstance(raw_response, Response):
   115                                                           if raw_response.background is None:
   116                                                               raw_response.background = background_tasks
   117                                                           return raw_response
   118
   119         1          1.0      1.0      0.0              response_data = serialize_response(
   120         1          0.0      0.0      0.0                  field=response_field,
   121         1          1.0      1.0      0.0                  response=raw_response,
   122         1          0.0      0.0      0.0                  include=response_model_include,
   123         1          1.0      1.0      0.0                  exclude=response_model_exclude,
   124         1          0.0      0.0      0.0                  by_alias=response_model_by_alias,
   125         1    1345932.0 1345932.0     99.0                  skip_defaults=response_model_skip_defaults,
   126                                                       )
   127         1          2.0      2.0      0.0              response = response_class(
   128         1          1.0      1.0      0.0                  content=response_data,
   129         1          1.0      1.0      0.0                  status_code=status_code,
   130         1       8758.0   8758.0      0.6                  background=background_tasks,
   131                                                       )
   132         1         32.0     32.0      0.0              response.headers.raw.extend(sub_response.headers.raw)
   133         1          1.0      1.0      0.0              if sub_response.status_code:
   134                                                           response.status_code = sub_response.status_code
   135         1          0.0      0.0      0.0              return response

And this test case's input values are not valid encodable expression.
(e.g. fake.email is used instead of fake.email(), this is typo?)
So, the bottoms of each recursive call, exception is raised again and again, and, in generally, exception handling is high-cost, so this code is too slow.

yep it's a mistake, I corrected it and don't see same discrepancies, sorry for that !
it seems the original code I based this test case on might have same sort of bug that I didn't detect because of the Any type, which as you said raises exceptions
thanks for the hint, will dig more and see what's happening, Any is evil

I am also experiencing the same/related issue whereby a large nested payload takes ~10 mins to reach a point in the api whereby i can assign it to a variable. I have removed pydantic validation etc to just leave the bare endpoint and tried ujson but this doesnt seem to have helped significantly. for reference, the same payload is processed in ~1.8 seconds in flask.

@Charlie-iProov any chance you could put together a minimal example that is much faster in flask? It could be a good starting point for performance work.

Hi heres a quick example - not sure where to host the files so just made a public repo https://github.com/MarlieChiller/api-serialisation-comparison the test uses a payload that contains a nested base64 encoded image string as that was my initial use case where i discovered the difference. However, you can swap the image out for an array and i found the difference is still present (although the time difference was reduced). I think the larger the array length, the larger the time discrepancy though

for reference, in the base example in that repo i was getting approximately 44 seconds in fastapi to 1.4 seconds in flask. When i switched test cases to an array, i used a length of 10000 instead of the image string

for reference, in the base example in that repo i was getting approximately 44 seconds in fastapi to 1.4 seconds in flask. When i switched test cases to an array, i used a length of 10000 instead of the image string. Hope that helps

@MarlieChiller Something is definitely behaving strangely here. I'm getting similar results to you when I run your script. On the other hand, if I make use of the ASGI test client, I get performance in line with flask (maybe a little faster) -- ~1.3s of execution time on my machine (vs ~1.4 for the flask going through the server):
import base64
import json
import sys
from datetime import datetime

import requests as r
from fastapi import FastAPI
from starlette.testclient import TestClient

app = FastAPI(title="fast_api_speed_test")

@app.post("/test")
async def endpoint(payload: dict):
    if payload:
        print(type(payload))
        return 200

test_client = TestClient(app)

def main():
    iterations = 1000

    with open("black.png", "rb") as image_file:
        img = image_file.read()
        img = base64.b64encode(img)

    fast_api = send_request(iterations, img, 8000)
    print("fastapi speed >>> ", fast_api)

def send_request(iterations, encoded_string_img, port):
    payload = {"count": iterations, "payload": []}
    for i in range(iterations):
        payload["payload"].append(
            {"arbitrary_field": f"{i}", "image": encoded_string_img.decode("utf-8")}
        )

    print(sys.getsizeof(json.dumps(payload)))
    x = datetime.utcnow()
    response = test_client.post("/test", json=payload)
    y = datetime.utcnow() - x
    print(response.content)
    return y

if __name__ == "__main__":
    main()

Because of this, I don't think the performance issue is with fastapi, but maybe uvicorn instead? I'm looking into it some more...

out of the blue, can it be sync stuff ?
On Tue, Oct 1, 2019 at 11:48 AM dmontagu<EMAIL_ADDRESS>wrote:

@MarlieChiller https://github.com/MarlieChiller Something is definitely
behaving strangely here. I'm getting similar results to you when I run your
script. On the other hand, if I make use of the ASGI test client, I get
performance in line with flask (maybe a little faster) -- ~1.3s of
execution time on my machine (vs ~1.4 for the flask going through the
server):
import base64import jsonimport sysfrom datetime import datetime
import requests as rfrom fastapi import FastAPIfrom starlette.testclient import TestClient
app = FastAPI(title="fast_api_speed_test")
@app.post("/test")async def endpoint(payload: dict):
if payload:
print(type(payload))
return 200
test_client = TestClient(app)
def main():
iterations = 1000
with open("black.png", "rb") as image_file:
    img = image_file.read()
    img = base64.b64encode(img)

fast_api = send_request(iterations, img, 8000)
print("fastapi speed >>> ", fast_api)

def send_request(iterations, encoded_string_img, port):
payload = {"count": iterations, "payload": []}
for i in range(iterations):
payload["payload"].append(
{"arbitrary_field": f"{i}", "image": encoded_string_img.decode("utf-8")}
)
print(sys.getsizeof(json.dumps(payload)))
x = datetime.utcnow()
response = test_client.post("/test", json=payload)
y = datetime.utcnow() - x
print(response.content)
return y

if name == "main":
main()
Because of this, I don't think the performance issue is with fastapi, but
maybe uvicorn instead? I'm looking into it some more...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tiangolo/fastapi/issues/360?email_source=notifications&email_token=AAINSPWFAYZUTS6OUHVQQTTQMMMILA5CNFSM4H4YY6OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAAVWBA#issuecomment-536959748,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAINSPWJKQOQ3KAWLPO656DQMMMILANCNFSM4H4YY6OA
.

--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE

@euri10 I don't think that should be the issue (again, the ASGI TestClient speed seems to indicate the problem is not with application-level stuff). But this is deeply disturbing.

I didnt see Flask code but printing stuff take lts of time
On Tue, Oct 1, 2019 at 11:54 AM dmontagu<EMAIL_ADDRESS>wrote:

@euri10 https://github.com/euri10 I don't think that should be the
issue (again, the ASGI TestClient speed seems to indicate the problem is
not with application-level stuff). But this is deeply disturbing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tiangolo/fastapi/issues/360?email_source=notifications&email_token=AAINSPXAKJNGNU2UOKI37TLQMMM33A5CNFSM4H4YY6OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAAWFHY#issuecomment-536961695,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAINSPXKXEPKX33ZS5GCUFLQMMM33ANCNFSM4H4YY6OA
.

--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE

Okay, so if you change the annotation from dict to Any, the speed is still ridiculously slow. Also, the speed is relatively fast until the single request gets to be about 30+ MBs, at which point the response time starts scaling much-worse-than-linearly. So I think the problem is the server, not the fastapi / the validation. I'm trying to run a uvicorn in a profiler to find where it is slow now.
I think it may be worth trying to run the app using a different server (e.g., hypercorn) to see if that has any impact.

@MarlieChiller I simplified your script a bit, isolating the problem as specifically the payload size (and using just starlette, not even fastapi):
import sys
from datetime import datetime

import requests
import uvicorn
from requests import Session
from starlette.applications import Starlette
from starlette.requests import Request
from starlette.responses import Response
from starlette.testclient import TestClient

app = Starlette()

@app.route("/", methods=["POST"])
async def endpoint(request: Request):
    payload = await request.json()
    assert isinstance(payload, dict)
    return Response("success")

def _speed_test(session: Session, url: str):
    payload = {"payload": "a" * 100_000_000}
    start = datetime.utcnow()
    response = session.post(url=url, json=payload)
    elapsed = datetime.utcnow() - start
    assert response.status_code == 200
    assert response.content == b"success"
    print(elapsed)

def asgi_test():
    client = TestClient(app)
    _speed_test(client, "/")

def uvicorn_test():
    session = requests.Session()
    _speed_test(session, f"http://<IP_ADDRESS>:8000/")

def main():
    if "--asgi-test" in sys.argv:
        asgi_test()
        # 0:00:00.650825
    elif "--uvicorn-test" in sys.argv:
        uvicorn_test()
        # 0:00:17.502396
        # cProfile:
        # Name   Call Count   Time (ms)  Own Time (ms)
        # body      391         16670        16649
    else:
        uvicorn.run(app)

if __name__ == "__main__":
    main()

I'm going to post an issue on the starlette and the uvicorn repos about this.

sounds good, thanks for the help

I posted to starlette and uvicorn now, I guess we'll see if there is any response there!

@MarlieChiller I got to the bottom of this -- it was due to how the request body was being built by starlette.
I opened a PR to fix it: https://github.com/encode/starlette/pull/653

Nice! Why was += causing a quadratic growth in T vs .join may i ask?

It has to do with the way strings work in python — a new string is created in memory out of the two inputs every time you call +=. So you are basically making a copy of everything you’ve seen every time the += is called. The list-joining approach doesn’t do any copying until it puts all the pieces together at the end.

Just ran into this as well.
The example below is taking about 30ms:
@app.get('/', response_class=UJSONResponse)
async def root():
  return {'results': list(range(10000))}

doing the ujson dumps in the body cuts that down to around 5ms:
@app.get('/', response_class=UJSONResponse)
async def root():
  return ujson.dumps({'results': list(range(10000))})

Here's some strange behavior I don't understand:
import time

from fastapi import FastAPI
from starlette.responses import UJSONResponse, Response
from starlette.testclient import TestClient

app = FastAPI()

@app.get('/a', response_class=UJSONResponse)
async def root():
    content = {'results': list(range(10000))}
    return content

@app.get('/b', response_class=Response)
async def root():
    content = {'results': list(range(10000))}
    return UJSONResponse.render(None, content)
    # return ujson.dumps(content, ensure_ascii=False).encode("utf-8")

client = TestClient(app)

t0 = time.time()
for _ in range(100):
    client.get("/a")
t1 = time.time()
print(t1 - t0)
# 1.7897768020629883

t0 = time.time()
for _ in range(100):
    client.get("/b")
t1 = time.time()
print(t1 - t0)
# 0.32788991928100586

Seems like it's not using UJSONResponse properly; might be a bug.

I investigated -- the problem is that jsonable_encoder is very slow for objects like this since it has to make many isinstance calls for each object.
This seems like a pretty substantial shortcoming -- I think we need a way to get a faster fastapi.routing.serialize_response that doesn't require manually creating the response inside the function call.
A 6x overhead is not good!

@dmontagu was about to mention that it's mostly likely the jsonable_encoder and all of the validation code.

that's why I stopped using response_class, but I recon people may want to
use the swagger niceness of having it documented
On Thu, Oct 3, 2019 at 3:52 AM Mike<EMAIL_ADDRESS>wrote:

@dmontagu https://github.com/dmontagu was about to mention that it's
mostly likely the jsonable_encoder and all of the validation code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tiangolo/fastapi/issues/360?email_source=notifications&email_token=AAINSPSGAXZTER7BXZNNBCTQMVF6ZA5CNFSM4H4YY6OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGXGCA#issuecomment-537752328,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAINSPQ2USMGKKEID7LF7IDQMVF6ZANCNFSM4H4YY6OA
.

--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE

Yeah, it's also easy enough to write a decorator that performs the conversion to a response for endpoints you know are safe. Something like:
def go_fast(f):
    @wraps(f)
    async def wrapped(*args, **kwargs):
        return UJSONResponse(await f(*args, **kwargs))
    return wrapped

(Might want to use inspect.iscoroutinefunction to also handle def endpoints.)


this pull request closes the issue #47738

Checklist:

[x ] I have read freeCodeCamp's contribution guidelines.
[x ] My pull request has a descriptive title (not a vague title like Update index.md)
[x ] My pull request targets the main branch of freeCodeCamp.
[x ] I have tested these changes either locally on my machine, or GitPod.

Closes #47738

As a new contributor, we encourage you to read our contributing guidelines.
We expect our contributors to be aware of the process specific to this project. Following the guidelines religiously earns you the respect of fellow maintainers and saves everyone time.
Some examples of this are:

Do not edit files directly through GitHub – while you can, it's not a good idea.
Make sure you follow the PR checklist and not just tick things off; otherwise, we won't take you seriously.
Use the correct way to link issues in the description of the PR by updating the XXXXXX. Do not just add issue numbers everywhere and anywhere you feel like.
Keep mentions and review requests to a minimum. We understand you are excited about contributing, and our maintainers will get back to you as soon as they get a chance.
Do not work directly off your main branch - create a new branch for the changes you are working on.

We appreciate you taking the time to help us, and we hope to see more contributions from you.
Happy Contributing.

If you need help, please reach out in the contributors chat room, keeping opening PRs without changing anything is not going to help.

please review @raisedadead

For this PR to really close the issue it needs to include only changes related to that issue, you just added a commit for a different issue.

You are working on a 'dirty' main branch of your fork. This is the same problem you had with the last two nearly identical PRs you opened. I recommend you close this PR and look into how branches work.

please review @raisedadead

For this PR to really close the issue it needs to include only changes related to that issue, you just added a commit for a different issue.

now it is related to the issue

You are working on a 'dirty' main branch of your fork. This is the same problem you had with the last two nearly identical PRs you opened. I recommend you close this PR and look into how branches work.

As Ilenia mentioned:

Keep mentions and review requests to a minimum. We understand you are excited about contributing, and our maintainers will get back to you as soon as they get a chance.

Please do not repeatedly ping our staff. Multiple members of our team have given you guidance on how to proceed with your contribution - ignoring that guidance and pinging other maintainers is rather impolite.

As Ilenia mentioned:

Keep mentions and review requests to a minimum. We understand you are excited about contributing, and our maintainers will get back to you as soon as they get a chance.

Please do not repeatedly ping our staff. Multiple members of our team have given you guidance on how to proceed with your contribution - ignoring that guidance and pinging other maintainers is rather impolite.

now it will not happen

you have changes that are not related to the issue included in this PR.
Pinging @raisedadead multiple times is not going to change that, and it's pretty rude.

Yes, you have posted a screenshot of your 'dirty' main branch of your fork. This is making a messy PR because you have unrelated commits in your main branch. You need to re-sync your fork, create a branch off of the main branch of your fork, and then create commits that only apply to the issue you are trying to fix.

now it is updated

No, it is not. Your main branch is still dirty. You have unrelated changes in this PR, and a merge conflict to boot.
Please do not create a PR from the main branch of your fork.
You need to

You need to re-sync your fork, create a branch off of the main branch of your fork, and then create commits that only apply to the issue you are trying to fix.


[Content] mp4 not imported

https://main--blog--adobe.hlx3.page/en/publish/2021/10/26/new-creative-cloud-releases-enable-creative-collaboration-drive-innovation-empower-creative-careers
mp4 are missing.

Actually, only one is missing. The one pointing to https://blog.adobe.com/media_17356363ea0039c6c4ee091192d021a4e3d31dc86.mp4


Fix #21

The fixes comments appearing on the wrong line when git headers have different values for the remove/add line numbers.

Looks good to merge. 👍


ADD THE FEATURE PAGE

Can you please provide me the details about what is to be done.

Can you please assign this task to me ?


Using .KML file ?

It is possible to use .kml as path?

Not sure, but I don't think so. However, you can use this:
http://kml2gpx.com/

look at the sample given.
`[
{"location": "lat, lon"}
]`

Ok, thanks for your attention.  I used sublime to edit the .kml file, leaving in the format used path.example.json.


Added iplt.quiver for plotting vector fields

This is my first ever pull request so apologies if I've done anything wrong!
Further to #2355, I've added support for quiver in iris.plot.
The difference between quiver and most other plotting functions is that it requires two Cubes not one.  Therefore, I have changed the functions _map_common and _draw_2d_from_points (and, for consistency, _draw_2d_from_bounds) so they can be given a CubeList (or just a list) of Cubes.  All Cubes in the list (which could still have length 1, of course) are then passed as separate arguments to plt.[plotting_function].
Co-ordinates are always taken from the first Cube in the list, but I have included a sanity check (_check_cubes_for_consistency) which is always called to make sure the given Cubes have the same shape and consistent co-ordinates anyway.

Thanks @SimonPeatman! We will try and get a look at this soon.

Hi @SimonPeatman - again thanks for raising this PR. My main comment on this PR is that it has no tests associated with it. You've introduced a fair bit of new functionality that is currently untested, so I wonder if you could fix that. On the plus side, this change hasn't broken any existing functionality!
I think you have a coding standards error too currently - that's why the Travis build is failing below. If you click the 'details' link to the right of 'The Travis CI build failed' and scroll to the bottom of the webpage that link takes you to you'll find an error that describes the change you need to make.

I've corrected the lines of code which were causing the checks to fail (some lines were too long).
I'm afraid I'll need some guidance when it comes to creating tests since a) I've never done this before and don't really know what I'm doing, and b) the documentation on "Adding a new graphics test" is currently missing: http://scitools.org.uk/iris/docs/latest/developers_guide/graphics_tests.html#adding-a-new-graphics-test
Presumably I need to write tests for iplt.quiver and iplt._check_cubes_for_consistency as these are the two new functions I have created.  I think the other changes I've made would already have caused existing tests to fail if I had broken anything.

Thanks @SimonPeatman - I'm really sorry we haven't had time to look further at this. My main concern as I remember it is that this change means the general plotting functions now require two inputs, which is a big shift in their API. Of course this change would be (in some way at least) required to add quiver plotting, so doing so is not definitely wrong!
There is some documentation in the Iris developers guide on writing tests; see http://scitools.org.uk/iris/docs/latest/developers_guide/tests.html. This may be a good starting point for you although it does not explain much about writing tests! For writing tests probably a good way to learn is to see what is already being done by the existing tests - particularly the plot tests. See, for example, https://github.com/SciTools/iris/blob/master/lib/iris/tests/unit/plot/test_contour.py (the tests for iris.plot.contour). You'd need to add a new module in that directory for iris.plot.quiver.
In the test module for quiver it is a good idea to have one test class for each broad aspect of the functionality, and test methods in each of these classes that address particular behaviour that should or should not happen. I'd use the testing that's already done on contour (and the other plotting functionality in iris.plot) as inspiration for the kind of tests you'll also need to provide. Where you've added new functionality or updated existing functionality (particularly iris.plot._draw_2d_from_points) you'll also need to make sure that that behaviour is tested too - including the change to passing a cubelist, for example.
Hope this helps! I know it's still very abstract...

Hey @SimonPeatman, I just wanted to check how you're getting on with adding tests to this PR.
I noticed that if we merge this change it will alter the API for existing plot functions.  This is not a problem (and as @dkillick pointed out, if this change is necessary to enable a function which is not currently available then it is perfectly reasonable), but it does mean that we may not be able to introduce this change to a minor version release of iris.
What I mean by that is that we may have to wait until we are about to release iris 3.0 rather than 2.2, as it will change the way that iris responds to existing user code (we call this a 'breaking change').  I haven't confirmed this with the team yet, but that is my understanding of things.
What it does mean is that we have plenty of time to walk you through adding tests if you're a bit confused.  Please feel free to ask for more help, we will be happy to assist.

@pp-mo I suspect it's worth you taking a look at this; I know you have done some work in this area.


incorrect handling of "@" in responses when returning imports in javascript (nextjs/tailwind)

Which API Provider are you using?
OpenRouter
Which Model are you using?
Claude 3.5 Sonnet
What happened?
Code that looks like this:
import { Button } from "@/components/ui/button";
is replaced with this (which is incorrect)
import { Button } from "'components/ui/button"' (see below for file content);
I am not sure but I believe that this may be a conflict with Cline's "@" support
Steps to reproduce

Request a review of any code as long as the file has an import with an @ reference. (The @ reference is incidental to the code review; it's replaced as part of Cline's update)

Relevant API REQUEST output
No response
Additional context
No response

Example of Cline edits

Sometimes this now works, but it now sends Cline into infinite loops — after I manually fix, I have to abort most Cline sessions in React

I am having the same issue. It works sometimes. I am not sure if it is a bug with Cline or from Claude.


Add a note about enabling EnableLocalMode to fix an mmctl error

mmctl can fail with the following error:
Error: socket file "/var/tmp/mattermost_local.socket" doesn't exists, please check the server configuration for local mode

This issue is fixed by setting EnableLocalMode to true in config.json. This resolution could be documented at the docs here: https://docs.mattermost.com/configure/configuration-settings.html#enable-local-mode.
See: https://github.com/mattermost/mattermost-server/issues/20221.

Thanks. This was helpful!  Only setting "EnableLocalMode": true, and restarting service was not enough in my case. I guess I missed some steps during installation and messed around a little afterwards.
Eventually I solved my issue with the following steps (on Ubuntu 20.04, mattermost 7.2.0). I don't know which steps are necessary, but I hope they won't harm.

set "EnableLocalMode": true, in the config.json

delete /var/run/mattermost_local.socket  if exists
(I'm not sure if this is a good advice, but it worked for me)

give ownership and permissions to installation directory (although I did during installation)
sudo chown -R mattermost:mattermost /opt/mattermost
sudo chmod -R g+w /opt/mattermost

reset the password for the user mattermost. I used same as in config.json line "DataSource":
sudo passwd mattermost

restart service
sudo systemctl restart mattermost.service
now /var/run/mattermost_local.socket  reappeared with proper 0600 permissions

log in as user mattermost

done! mmctl --local works now

@isacikgoz - @smilster needed to perform additional steps to enable local mode for mmctl beyond setting EnableLocalMode to true. He's kindly shared the steps he followed in this docs issue.
Can you confirm whether all users would need to perform these additional steps to enable local mode? If not all users need to perform these steps, can you comment on the conditions under which a user would need to follow these additional steps, please?

Thanks for the ping @cwarnermm, actually we programmatically do what @smilster did :) The only key here is the owner of the process, it should be same for both mmctl and the mattermost-server. If the user doesn't have privileges to delete the socket (if it exists) it would fail. It doesn't matter changing the ownership of the /opt/mattermost as the socket file ownership is managed by the OS.
https://github.com/mattermost/mattermost-server/blob/a8154ddae01e66c1d2a4cd90401227957f09d96f/app/server.go#L1339
The actual logic is as given here:
socket := *s.platform.Config().ServiceSettings.LocalModeSocketLocation
if err := os.RemoveAll(socket); err != nil { // <- Removes file if exists (Step 2)
	return errors.Wrapf(err, i18n.T("api.server.start_server.starting.critical"), err)
}

unixListener, err := net.Listen("unix", socket) // <- Creates the socket file
if err != nil {
	return errors.Wrapf(err, i18n.T("api.server.start_server.starting.critical"), err)
}
if err = os.Chmod(socket, 0600); err != nil { // <- Check the permissions
	return errors.Wrapf(err, i18n.T("api.server.start_server.starting.critical"), err)
}

The improvement on the docs would be just a note about some debug steps; Either using same user whenever you run mattermost-server and mmctl, or, cleaning up the socket file before switching to a new user.


After Visual Studio Code update I am not able to clean, package the SPFx solution

I have updated my visual studio code to 1.23.1 (i don't know previous version)
After this update I am not able to clean my SPFx project.
When I execute gulp clean then it is showing me below error: ENOTEMPTY: directory not empty, rmdir 'E:\Practice\SharePoint\SPFx\Extensions2\HeaderFooter\temp\deploy'
When I run gulp package-solution --build then it is giving EPERM: operation not permitted, open 'E:\Practice\SharePoint\SPFx\Extensions2\HeaderFooter\temp\deploy\8ec0897a-3435-49ff-a26a-b2298331caa8.json'
First time it is successfully able to build.
When I restart my machine and try to clean the solution then it is working.
What could be possible reason for this?
How I can switch back to earlier version of Visual Studio code?

If you close VSCode and run the gulp clean command, does it work then?
Are you using any extensions related to SPFx?


Thank you

This extension is amazing, only 14 downloads wtf.
I use many extensions so this is very handy to access many commands. Even more powerful when combined with the multi-command extension.
Yeah this is not an "issue" but I had to say it

Hi AdmiralRazorbeard.
Thanks for the compliment.
I also think this extension is a tour de force, but it's a pity that there are so many command extensions already released that don't seem to catch people's attention.
Still, I am glad that there are people like you who are pleased with it.

I always wanted to write an article about hidden gems of Vscode, yours is definitely top 3. I hope I will be able to do that soon


Can't edit entity names as shown in .65 intro

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.65 0.65.1 0.65.2 0.65.3
Python release (python3 --version):
3.6
Component/platform:
Registry editor
Description of problem:
When trying to edit the entity name as shown in the release notes, the typed text does not show up in the field and none of the buttons work. I have to completely exit the window and reopen to get back into the interface
Expected:
The typed letters should appear and the save or cancel buttons should work.
Problem-relevant configuration.yaml entries and steps to reproduce:

Traceback (if applicable):

Additional info:

/move to home-assistant-polymer


cgroup driver option for kubelet

Feature Request
Feature
As a part of Lokomotive-Kubernetes project, we want to allow users to choose a cgroup driver of kubelet, either systemd or cgroupfs. While Container Linux only supports cgroupfs, Flatcar Linux edge enables the systemd cgroup driver by default. When Lokomotive-Kubernetes runs with a Flatcar edge image, it becomes possible to run kubelet with the systemd cgroup driver. We want to add such a feature not only for Lokomotive-Kubernetes, but also for Typhoon, because we should avoid divergence of the two projects as much as possible.
There can be multiple ways to do that.
1. Add a general variable for the kubelet parameter, like $KUBELET_EXTRA_ARGS.
Doing this, we can support arbitrary kubelet options with minimal changes. Though we are aware that Typhoon does not want such a huge possible feature matrix.
2. Add a single variable only for cgroup driver, like $CGROUP_DRIVER.
Good thing is, it will not make the supported features explode. Though we might need to add similar variables again in the future, whenever a new feature is needed.
3. Add a kubernetes config like /etc/kubernetes/configure-kubelet-cgroup-driver instead of kubelet parameters.
This approach is already implemented in Lokomotive-Kubernetes. Doing this, we can determine the cgroup driver at runtime, instead of specifying a cgroup driver to the kubelet.
Yesterday I had a short offline conversation about this issue with Dalton at KubeCon. He pointed to an experimental branch, which might address the cgroup driver issue. However I'm not sure the branch would be enough, because we still might need to have a way of specifying the cgroup driver.
So which of the approaches above would be the best approach for Typhoon?

Typhoon Kubelet's use the cgroupfs cgroup driver in modules for Container Linux derivatives and the systemd cgroup driver in modules for Fedora Atomic (its set in the system-container image) (docs). So exposing user selection of the cgroup driver shouldn't be needed and Typhoon has a precedent for setting it to match the OS's known Docker configuration.
The branch I alluded to just allows Flatcar Edge as the OS choice. Next, we can just set the Kubelet option to reflect that it should use cgroupfs for Flatcar Linux stable/beta/alpha, but systemd for Flatcar Linux edge.
To do that, I'm between either (1) internally templating the correct cgroup driver for the OS vendor or (2) a variant of the docker info based detection you're using in your configure-kubelet-cgroup-driver script. Neither seems great, but Flatcar Linux edge would be nice to have.
For (1), the oddity is just that Flarcar Linux isn't consistent across channels, so we get into which flavors need the special casing. Its tolerable. Perhaps Flatcar Linux will gravitate toward one setting?
For (2), its would be nice for the CLC to contain enough intelligence to detect the settings from docker like you're doing. But I'd like to resist having a script generating the config via heredoc if possible, since it kinda opens the door to more scripting of kubelet options (more awk). Another option might be to setup Flatcar Linux Edge users to use a droppin snippet to set the driver.
The ideal approach would of course be for Kubelet to detect the setting eventually.

Another argument for (2): the user might want to change Docker's configuration after provisioning to cgroup_driver=systemd. In that case, a reboot would just work without having to change the Kubelet config. Arguably, that's a weak argument because if the user already do manual changes to Docker, they can do manual changes to Kubelet too.

Perhaps Flatcar Linux will gravitate toward one setting?

I would like to push Flatcar Linux toward cgroup_driver=systemd in order to help tools like Inspektor Gadget. But we've not tested enough to push that to alpha/beta/stable yet. When we do, it would be nice if Typhoon does not need patching at the same time: coordinating releases in Typhoon & Flatcar Linux seems difficult; it should be decorrelated instead.

Keeping service settings aligned with vendor chosen defaults is also one of the reasons for the kubelet-wrapper script in the OS image. It may be simplest for the Flatcar Linux Edge kubelet-wrapper to have something like:
KUBELET_CGROUP_DRIVER="${KUBELET_CGROUP_DRIVER:-systemd}"
KUBELET_IMAGE_ARGS=${KUBELET_IMAGE_ARGS:---exec=/kubelet --cgroup-driver=${KUBELET_CGROUP_DRIVER}}

Then set the default according to the Docker default in the appropriate Flatcar channel and change them at your own pace / schedule. If a user does need to alter the Docker configuration, adjusting the Kubelet configuration could be done with an env variable file in a droppin.
The alternative I mention is just me doing something similar, but at the Typhoon level by using --cgroup-driver=${KUBELET_CGROUP_DRIVER}, adding the variable to an env file, and having flatcar edge users supply a snippet or maybe populating it for them.

With #496, Typhoon will handle setting the Kubelet cgroup driver as cgroupfs for Container Linux + Flatcar Linux alpha/beta/stable and systemd for Flatcar Linux edge. Its done as a variable such that its ammenable to override by systemd droppins defined as snippets. Avoids scripting.
storage:
  files:
    - path: /etc/systemd/system/kubelet.service.d/10-custom.conf
      filesystem: root
      contents:
        inline: |
          [Service]
          KUBELET_CGROUP_DRIVER=systemd

If a user needed to alter the Docker configuration (not shown), this will let the Kubelet cgroup driver be aligned. Or if future Flatcar Linux changes the Docker configuration on the alpha/beta/stable channel(s). Although, I'd prefer Flatcar Linux do what I suggested above - in any given OS image, the default kubelet wrapper and default Docker configuration should correspond. Then this can all be dropped.

Handled by  #497 and #496

Thanks! :+1:

With #496, Typhoon will handle setting the Kubelet cgroup driver as cgroupfs for Container Linux + Flatcar Linux alpha/beta/stable and systemd for Flatcar Linux edge. Its done as a variable such that its ammenable to override by systemd droppins defined as snippets. Avoids scripting.
storage:
  files:
    - path: /etc/systemd/system/kubelet.service.d/10-custom.conf
      filesystem: root
      contents:
        inline: |
          [Service]
          KUBELET_CGROUP_DRIVER=systemd

Hi @dghubble,
I think the last line should be:
Environment=KUBELET_CGROUP_DRIVER=systemd

or it will not override the KUBELET_CGROUP_DRIVER environment variable defined in /etc/systemd/system/kubelet.service
If this is correct, would you mind editing your post, so that others copying the snippet (as i did) don't have to debug it to find it wasn't overriding the env variable.
for any others i found that it didn't override the variable,
:: checking that the snippet was indeed loaded.
~ $ sudo systemctl status kubelet
● kubelet.service - Kubelet via Hyperkube
   Loaded: loaded (/etc/systemd/system/kubelet.service; disabled; vendor p>
  Drop-In: /etc/systemd/system/kubelet.service.d
           └─10-custom.conf            <<<<<<<<<<==========
   Active: ....

and then, checking the environment
 ~ $ sudo systemctl show --property=Environment kubelet | cat
KUBELET_CGROUP_DRIVER=systemd

and it should have being :
 ~ $ sudo systemctl show --property=Environment kubelet | cat
Environment=[unprintable] KUBELET_CGROUP_DRIVER=systemd

as i had changed docker to run using systemd
~ $ docker info |grep -i cgroup
Cgroup Driver: systemd

Thanks.


DOCUMENTATION: Readme Add Defaults

Closes: #1
@cjdutoit

@Christo had all the logos setup with the three houses icon from the youtube videos. Went to load them into the folder and noticed the logo you had. Darn should have looked before leaping.
Do you want the links from the three spal videos added? Assuming again these new libs are the spal?

Yes, it would be great if you could add those links. Thanks!


Operations of Entity Framework Core for Views

Describe what is not working as expected.

How does EFCore query complex views? Or how to map views to entity models! Use ADO.NET?
EF Core does not have context.Database.SqlQuery support?
Further technical details
EF Core version: 2.1.1
Database Provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Operating system: Win10
IDE: (e.g. Visual Studio 2017 15.4)

You can use Query Types: https://docs.microsoft.com/en-us/ef/core/modeling/query-types

Thank you very much.


Ensure proper licensing on all Dockerhub image READMEs & github repos e.g. MIT or GPL3

Confer with @dannylamb for what is needed here

Everything in the repository is currently licensed as MIT:
https://github.com/Islandora-Devops/isle-buildkit/blob/main/LICENSE
https://github.com/Islandora-Devops/isle-buildkit/blob/main/base/Dockerfile#L45
The images themselves dunno how that works in practice as there is a tonnes of software bundled in them. I think we can close this, @g7morris?


bazel: update rules_foreign_cc

This reverts commit 26dae5d6542f30c198f97ba9dac943b89c71ce56.
This issue was fixed by https://github.com/bazelbuild/rules_foreign_cc/commit/da8952e27c46659866b455de58f5eb3a86185507
Signed-off-by: Keith Smiley<EMAIL_ADDRESS>

/lgtm deps


when focus on a text field, shortcut can not used

Hi,
I could not find a way to use the shortcut when a text field is focused. How can I use it?
Thanks.

Hi, I could not find a way to use the shortcut when a text field is focused. How can I use it? Thanks.

Hello, met the same question, did you manage to find a workaround?

Hey @ChristmasWoe and @yurutung! I've figured out a solution for you and will update the library ASAP. Thanks for pinging on this!

Hey @ChristmasWoe and @yurutung! I've figured out a solution for you and will update the library ASAP. Thanks for pinging on this!

So great to hear it, thank you

Hello @ChristmasWoe
any news about the issue?


Editing the [allowlist] to allow certain regexes is not eliminating these from being detected

Hi,
I'm trying to use a custom configuration file to identify guid as part of the secrets exposed however trying to allow certain occurrences of the guid in certain files we configured the allowlist to whitelist these; However these are still being identified as the substring contains the guid. How is the allowlist configured to work. Following are the snippet of regex and values we are working with.
Regex for the allowlist :
[allowlist]
description = "global allow lists"
regexes = ['''(?im)^\t\t@schedule_uid([\s|']|[\s|"]|[=]|)N'[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?([\s|'])'''

Sample for the allowlist: **		@schedule_uid=N''**
Rule for GUID:
[[rules]]
id = "CUSTOM-02"
description = "GUID Rule"
path = '''\.(?:xml|pubxml|definitions|ps1|wadcfgx|ccf|config|cscfg|json|js|txt|cpp|sql|md|java|FF|template|settings|ini|BF|ste|isml|test|ts|Azure|sample|backup|rd|hpp|psm1|cshtml|htm|bat|waz|yml|Beta|py|sh|m|php|xaml|keys|cmd|rds|loadtest|properties)$|hubot'''
regex = '''(?im)(?:[\s|']|[\s|"]|[=]|)[{(]?[0-9A-F]{8}[-](?:[0-9A-F]{4}[-]){3}[0-9A-F]{12}[)}]?'''

Hi @meeragirijan ,
Your question is a Gitleaks question. I am not the maintainer on Gitleaks itself but only the extension. The best thing you can do is ask this question at the Gitleaks repo: https://github.com/zricethezav/gitleaks

@JoostVoskuil  Thank you. Will post this there. Just an update I was using this on the devOps extension.


fix(header-launcher): null check

Describe pull-request
Adding a null check for slotElement.
Solving issue
We get an console.error that it is null.
Fixes: CDEP-3126
How to test

Go to Storybook
Check in Header and see that there is no error in console.

See screenshot for error:

When browsing stories under Patterns -> Navigation I am getting warnings per story there. Is this expected? What should be done not to have this number of warnings?

Yeah, we need to look into that, cos now also, console.warn('Slot element not found or assigned elements.'); that I added hits. So something is incorrect in how we structured the component?

Solution needs to be improve. Iit seems that too many warnings or errors we emit now in regular usage of component.

You have a suggestion :)?

Solution needs to be improve. Iit seems that too many warnings or errors we emit now in regular usage of component.

You have a suggestion :)?

Not at the moment, I would need time to sit and understand the issue more. Just saw there are a lot of warnings popping up in the console in regular use of components.

Solution needs to be improve. Iit seems that too many warnings or errors we emit now in regular usage of component.

You have a suggestion :)?

Not at the moment, I would need time to sit and understand the issue more. Just saw there are a lot of warnings popping up in the console in regular use of components.

Yeah, Il have a look as well.

I am not sure if there is anything that can help, but worth checking Alexes old PR: https://github.com/scania-digital-design-system/tegel/pull/465


Configured language isn't validated

According to RFC 7483 section 4.4 the language identifier at a response:

This data structure consists solely of a name/value pair, where the
name is "lang" and the value is a string containing a language
identifier as described in [RFC5646].
"lang" : "mn-Cyrl-MN"

So, the server isn't validating the language identifier loaded from configuration.properties (property "language") just as indicated in the RFC cited.

This issue is out of scope of milestone 1.2.0, labeled as enhancement.


[api-spec] Collection of minor issues.

This issue tracks several minor issues related to api specification compliance.

The API returns the following type information for the id field:
"id": {
    "type": "int",
    "description": null,
    "create": false,
    "update": false,
    "nullable": true,
    "readOnCreateOnly": false
},

My ids look like this: 1a90, which is a string. Also is the id supposed to be nullable?

Rancher 1.4.1 returns a CreatedTS field in its data for a Host entity, but it is not mentioned in the schema.

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.


Add resourcepack-folder option

I would like to autoload some resource packs by placing them in a directory similar to how adding data packs using packwiz works currently. Would it be possible to add a resourpack-folder option which does exactly that? If time's a problem I can implement it myself and open a pr.

You can just use the add command as usual then move the .pw.toml files to the right place (then using packwiz refresh to update the index).
datapack-folder only exists because there is no standard default location to place datapacks, so packwiz doesn't know where to put them.

ok thanks for the quick response


Update values.yaml

Unfortunately, Docker Hub implemented rate limits that doesn't make it a good default. Thanks anyway!

Unfortunately, Docker Hub implemented rate limits that doesn't make it a good default. Thanks anyway!


Updates to gradle 2.13

lgtm
any particular new feature you are after?

Sorry I should have mentioned. Mainly this is maintenance, ie not falling
too far behind. Also there's supposedly a performance improvement. I'll
check logs to see if that helped at all.

performance has been erradic in general, so this might not change things on that note.

reverting this. Even with latest idea, the project no longer imports properly. will rev-lock for now.


Add a timeout for running Rspec examples

It is just a copy of the snippet from https://github.com/mbj/mutant/#configuration.
Without it, there is a mutation running indefinitely:
Mutant configuration:
Matcher:         #<Mutant::Matcher::Config match_expressions: [Equalizer*]>
Integration:     Mutant::Integration::Rspec
Expect Coverage: 100.00%
Jobs:            2
Includes:        ["lib"]
Requires:        ["equalizer"]
Subjects:        8
Mutations:       338
Kills:           337
Alive:           0
Runtime:         444.58s
Killtime:        31.13s
Overhead:        1328.07%
Coverage:        100.00%
Expected:        100.00%
Active Jobs:
174: evil:Equalizer#define_inspect_method:/home/home/ch1c0t/sources/ruby/equalizer/lib/equalizer.rb:79:70cf0
Active subjects: 1
Equalizer#define_inspect_method:/home/home/ch1c0t/sources/ruby/equalizer/lib/equalizer.rb:79 mutations: 87
......................................................................................
(86/87) 100% - killtime: 11.55s runtime: 11.55s overhead: 0.00s

Thx for digging into this and providing a fix.
Instead of your proposal I think its best to find the reason this one does not have an effect: https://github.com/dkubb/equalizer/blob/master/config/devtools.yml
Likely devtools simply needs to be correctly set-up in this project. The API changed a bit recently.

Thank you for the quick feedback.
I think I found out why it has happened. I was using bundle exec mutant -Ilib -requalizer --use rspec 'Equalizer*' instead of bundle exec rake metrics:mutant.
Thus, there is no need in this pull request.

@ch1c0t Make sure you pass the --zombie flag to mutant else you mutate parts of mutants implementation invalidating the results.
Also both should actually work, my guess is that the spec_helper.rb here does not call into devtools to trigger the devtools rspec setup.

@ch1c0t OT, if you want to understand the --zombie thing read this post https://github.com/padraic/humbug/issues/61#issuecomment-105238000

Thank you very much, @mbj. Very helpful information.


Scenario: Ensure all resources have tags, does not fail in the absence of tags

Description :
I am using version 1.2.11
I have scenario "Ensure all resources have tags" defined as shown in example here
Scenario does not fail the below terraform code when I comment out tags property from a resource.
To Reproduce

Terraform Code

provider "aws" {
  profile = "default"
  region = "us-east-1"
}

provider "archive" {
}

################################################################################
# Ensure all resources have tags
# Ensure that specific tags are defined
################################################################################
resource "aws_instance" "tf-example-ec2" {
  ami = "ami-0323c3dd2da7fb37d"
  instance_type = "t2.micro"
  iam_instance_profile = "${aws_iam_instance_profile.test_profile.name}"
  # tags = {
  #   Name = "tf-example-ec2"
  # }
}

################################################################################
# Validate lambda function runtime environment for non-compliant runtime
# Ensure all resources have tags
# Ensure that specific tags are defined
################################################################################
data "archive_file" "ssm_tag_collector_zip" {
  type        = "zip"
  source_file = "${path.module}/files/ssmTagCollector.py"
  output_path = "${path.module}/files/ssmTagCollector.zip"
}

data template_file "ssm_tag_collector_lambda_role" {
  template = "${file("${path.module}/files/ssm_tag_collector_lambda_role.json")}"
}

resource "aws_iam_role" "ssm_tag_collector_role" {
  assume_role_policy = "${data.template_file.ssm_tag_collector_lambda_role.rendered}"
  tags = {
    Name = "ssm_tag_collector_role"
  }
}

resource "aws_lambda_function" "ssm_tag_collector_lambda" {
  filename         = "${data.archive_file.ssm_tag_collector_zip.output_path}"
  function_name    = "ssm-tag-collector"
  description      = "Send tags from the list of instances in the event context to the ssm-tag-manager lambda in master account."
  role             = "${aws_iam_role.ssm_tag_collector_role.arn}"
  handler          = "ssmTagCollector.lambda_handler"
  source_code_hash = "${base64sha256("ssmTagCollector.zip")}"
  runtime          = "python3.6"
  timeout          = 25
  tags = {
    Name = "ssm_tag_collector_lambda"
  }
}
################################# END ##########################################

################################################################################
# API documentation check 1: API Documentation Part
# API documentation check 2: API Documentation Version
################################################################################
resource "aws_api_gateway_documentation_version" "example" {
  version     = "example_version"
  rest_api_id = "${aws_api_gateway_rest_api.tf_example_rest_api.id}"
  description = "Example description"
  depends_on  = ["aws_api_gateway_documentation_part.example"]
}

resource "aws_api_gateway_documentation_part" "example" {
  location {
    type   = "METHOD"
    method = "GET"
    path   = "/example"
  }
  properties  = "{\"description\":\"Example description\"}"
  rest_api_id = "${aws_api_gateway_rest_api.tf_example_rest_api.id}"
}

resource "aws_api_gateway_rest_api" "tf_example_rest_api" {
  name = "example_api"
  tags = {
    Name = "tf-example-rest-api"
  }
}
################################# END ##########################################

terraform-compliance parameters
-f
-p
--tags

 Run as python package

 None

Scenario

Given I have resource that supports tags defined
Then it must contain tags
And its value must not be null

Expected behavior :
Scenario should fail the above terraform code when tags property is absent from a resource.
Tested versions :

 1.2.11
 0.12.29
 3.7

Additional context
I found similar issue here

Hi @nikhilswagle,
Thanks for submitting the issue.
A fix (#352) is opened, I will ping the issue once it's released.

Hi @nikhilswagle,
Could you give 1.3.2 a try?

Hi @Kudbettin,
We did some testing from our side and saw a strange behavior. To explain it I will need to give you a full picture.
We have classified our compliance features into certain categories. Each category of features has its own .feature file and is annotated with its category name. For e.g. feature file annotated with @security has all the tests belonging to security.
Scenario 1:
If we intend to run only security tests in isolation we use below command (with —tags option)
terraform-compliance -f <location-of-feature-files> -p <tf-plan> --tags security
This only runs security tests and ignores tests from other feature files.
Scenario 2:
If we intend to run all tests across all features then we use below command (without —tags option)
terraform-compliance -f <location-of-feature-files> -p <tf-plan>
The fix #352 works in Scenario 1. It is able to identify the AWS resources with out tags or resources without specific tags.
But when it comes to Scenario 2, the test is skipped over with the message “Can not find resource that supports tags defined in target terraform plan.”
Not sure if this was newly introduced or always existed

Nice tags usage! It seems the problem was introduced with 1.3 and not related to changes on the last release.
The fix would likely release tomorrow (#356). Thanks for pointing that out. I will ping the issue once again upon release.

Hi @nikhilswagle
I'm sorry for the late response. Could you give 1.3.3 a try?

Thanks @Kudbettin
Gave 1.3.3 a shot. It works fine.
This issue can be closed now.


The example app doesn't seem to run

See the following example projects that use tauri-nspanel:

https://github.com/ahkohd/tauri-macos-spotlight-example/tree/v2
https://github.com/ahkohd/tauri-macos-menubar-app-example

See the commit at https://github.com/ahkohd/tauri-nspanel/commit/ff5ba21e1eaa0c5c21b87e8789efe419c9587473, as it fixes the broken example in this repository.


Proposal for environment context

This is a proposal for a new environment context which takes precedence of the config file.
We had the need for a context which can be configured for automation without touching files.
Happy to hear your feedback.

Hmm instead of going through all that trouble of creating and mapping config variables, you could also create an environment variable ESQUE_CONFIG_YAML that can hold the whole esque config as yaml string. That would be more dynamic, future proof and would only require minimal changes.

Hm. I get your point, in general. But that would only get rid of the need to write a file, not to create a YAML in general. :D

You wrote:

without touching files.

So I thought, that was your problem :smile:
Well, although I don't see how setting 15 environment variables is easier than creating a yaml string, I'm always a fan of "letting the user choose". So I'm not entirely against it.
I'm just afraid that we might have to rename, add and/or remove some of the variables while our config evolves. We do have a migration mechanism for file based configs but not for environment variables. Do you think a separate command to add a section to the config would help you?
Something like esque config add-context foo --bootstrap-servers broker1,broker2 --schema-registry registry ...
I think it's easier to keep a command stable than it is to keep the environment variables the same over time.

Guess I should have been clearer. Sorry for that. :D
I think you're right with your approach of not wanting to make it unnecessarily complicated and I think the idea of just adding another command is good. I'll see with what I can come up with over the weekend. 😊


Update base64.html for Parse exception

HTML is missing a double quotation resulting in parse exception during minification

Thank you!


Vulnerability Report for 0.13.0

Attached you will find a vulnerability report, some of these should be resolved by simply upgrading to the latest node:8.12-alpine image.
twistlock_konga_latest.zip

I guess this can be closed as the image has been upgraded a long time ago.


Update Info.plist for auto update support

Based on this plugin: https://prenagha.github.io/launchbar/updates.html.

Resolves #25.

This appears to be working but unfortunately when opening the Action Editor, the settings get overridden.


Adding 30 nodes make ARsceneview heavy

App works great by adding 2 to 4 nodes. I have added 30 to 40 nodes which makes the arsceneview heavy and jerky, although the node consists of simple textview. Looks like heavy calculations and loops are running in the backend.
Can anyone please guide how to make it smooth?
Thanks

Are you using ViewRenderable? - Unfortunately the way ViewRenderables work in ARCore is pretty resource intensive, so there's a good chance it could be that.

Yes I am using ViewRenderable. Is there any other way to add nodes which is more efficient? I have followed your suggestion in #20 .

I am interested in a solution to this as well...

Firstly if you must use ViewRenderable, make sure everything is as optimised as possible - all images are compressed and minimal scale etc.
The alternative, if you really want optimal performance, is to create your own renderer directly in OpenGL, and avoid using SceneForm. Here is an example of such a renderer from our legacy version of ARCore-location: https://github.com/appoly/ARCore-Location/blob/legacy/arcore-location/src/main/java/uk/co/appoly/arcorelocation/rendering/AnnotationRenderer.java


Cast inputs array to float64 in case of big endian architecture for normalization

These changes fixes https://github.com/tensorflow/tensorflow/issues/26135

Hi @martinwicke Gentle reminder to merge this PR.

Can one of the admins verify this patch?

@martinwicke Can you please review the comments and merge the PR?

Hi @martinwicke
Please review the comments and let me know those are fine.

@kbhute-ibm Could you please address Ubuntu Sanity errors? Thanks!

@gbaned Thanks for the notification. Done with fixing the Ubuntu Sanity errors.

Hi @martinwicke @gbaned,
As 'contrib' folder is removed from TF 2.0 (commit: https://github.com/tensorflow/tensorflow/commit/ffc25308ce2be84240ec90502b38800bc5a4dd60) this PR has merge conflicts in master. Had few queries:

Are we completely skipping tests present inside ./contrib from master and TF 2.0?
Can this PR be merged for TF 1.x?

Thanks,
Koumudini

No tests for contrib will be run in TF 2.0. In fact, contrib has plainly ceased to exist outside the 1.x branches.
Can you request a cherry-pick into the 1.15 branch?
@goldiegadde FYI, this is a harmless cherrypick that we can merge into 1.15.

Hi @martinwicke
As you mentioned in the comment https://github.com/tensorflow/tensorflow/pull/31188#issuecomment-533207777, no contrib tests would run in TF 2.0. However we could still see few python tests https://github.com/tensorflow/tensorflow/tree/v2.0.0/tensorflow/contrib. The tests which were failed in earlier versions on Z do not exist in TF 2.0.
Could you please comment on this and update our knowledge?
Thanks in advance.

We haven't deleted the contrib folder on the 2.0 branch because of build
complexities. We are not running any of the tests in it though. All code
inside should be considered dead.

@martinwicke Thanks for the clarification.


Users can run more than one instance of the bot at a time

Server hosts can run the bot more than once, and both instances will respond to commands. This could cause problems for hosts that accidentally re-run the bot.
One possible solution could be to run a simple socket on an arbitrary port and check for "EADDRINUSE" errors. (port 7383)

Implemented in 446742e


Mobile menu using javaScript

For this milestone of my portfolio website, I implemented the mobile menu using JavaScript tools, I used the Figma Template number 1 for this project.
The general requirements of this milestone are:

[ ] No linter errors.
[ ] Correct use of GitHub flow.
[ ] Work documented in a professional way.

Project Requirements

[ ] When the user clicks (or taps) the hamburger button, the mobile menu appears.
[ ] When the user clicks (or taps) the close (X) button, the mobile menu disappears.
[ ] When the user clicks (or taps) any of the mobile menu options, the mobile menu disappears.
[ ] When the user clicks (or taps) any of the mobile menu options, a correct part of the page is displayed.

I ask for your kind review in order to continue with the develop of my project.
Thank you for your support.

Thank you so much @Reem-lab!!!


Clients aren't allowed to perform the create operation on the role collection. (Code: 119, Version: 1.12.0)

Hello Team,
I am struggling with an issue which is related with PFRole Parse SDK Ver 1.12.0.
I have a parse app running on Parse server with iOS SDK 1.7.5 on PRODUCTION and in that app we are creating role from iOS app directly using PFRole, which is working fine.
But after migrating my Parse cloud app to Amazon + Mango DB and changed the Client iOS SDK to 1.12.0, I am getting issue and unable to create the PFRole.
The same code was working properly with iOS SDK 1.7.5. Will you please help me out to fix this issue

Did you check your class level permissions?

Request you to please more explain about class level permission. What I need to change in schema

hi @hramos
here is my class level permission (From MongoDB )for the Role-
{
"_id": "_Role",
"_metadata": {
"class_permissions": {
"get": {
"": true
},
"find": {
"": true
},
"update": {
"": true
},
"create": {
"": true
},
"delete": {
"": true
},
"addField": {
"": true
},
"readUserFields": [],
"writeUserFields": []
}
},
"role": "string",
"roles": "relation<_Role>",
"users": "relation<_User>",
"name": "string",
"organizationId": "string"
}
And from my iOS application I am trying to add the role like below:
    PFACL *roleACL = [PFACL ACL];
    [roleACL setPublicReadAccess:YES];
    [roleACL setPublicWriteAccess:YES];

    PFRole *roleAdmin = [PFRole roleWithName:roleNameAdmin acl:roleACL];
    [roleAdmin.users addObject:currentUser];
    [roleAdmin setValue:@"admin" forKey:@"role"];
    [roleAdmin setValue:orgId forKey:@"organizationId"];

will you please guide me what I am doing wring at Class level Permission.

Hi @hramos
Any guess ??

+1
I have the same problem here. I tried to find where this error message is coming from but I didn't find this string in parse-server or in the iOS SDK source code. Why does this error even exist? What's the reason behind not allowing us to query roles from the client app? This is a necessity in my application.

Oh here it is https://github.com/ParsePlatform/parse-server/blob/d33dd68cc521e63be68a93ab1a00cfdb7a7d243d/src/rest.js#L118
What is the point of enforeRoleSecurity? I don't want to enforce role security.

Oh wait I think I don't have the latest version... this was actually removed here https://github.com/ParsePlatform/parse-server/commit/dd7fad8e96c93b933d4515fc2dc5c7aebaaff115#diff-62e69722264e5a578707565ff5fcf41c

We have the same issue. Application gets:

Clients aren't allowed to perform the find operation on the installation collection. (Code: 119, Version: 1.12.0)

@drorsun Update your parse-server version.

@xissburg I am on version 2.2.7 which is the latest

I am having the same issue as @drorsun and am also on v2.2.7.
PFInstallation.currentInstallation().fetchInBackgroundWithBlock {......   returns error code 119.

Check what your have in enforeRoleSecurity at node_modules/parse-server/lib/rest.js

@xissburg the function is:
// Disallowing access to the _Role collection except by master key
function enforceRoleSecurity(method, className, auth) {
if (className === '_Installation' && !auth.isMaster) {
if (method === 'delete' || method === 'find') {
var error = 'Clients aren't allowed to perform the ' + method + ' operation on the installation collection.';
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, error);
}
}
}

@xissburg I also have the same code as @brianyyz does

Guys,
I updated my Parse-Server version and also the latest iOS SDK.
I setup my installation locally and now everything is working fine the issue is resolved


fix(pagerduty)

fix for pagerduty, use algo from before in leui of changing the url at the source

@kaustavha can you explain more in the description why the change is necessary?
just so I'm clear: this change ensures that the url is formatted using the hostname and port instead of the host

@phoebesimon So the last working version of this file was:
https://github.com/racker/dreadnot/blob/c00b82b87bd34e120b606c21ad51a2150b95d275/lib/util/pagerduty.js#L33
And it uses url to format the url. Sort of a random dart, but yea, remove any default host and reencode.

:+1: