Polymer.Collection does not get updated after notifyPath

I'm trying to use .notifyPath to notify dom-bind template after non-polymer data provider changed the data-model. To obtain the path to be used I need to use undocumented Polymer.Collection that  works...
once.
// use Polymer's undocumented feature, to make it possible to use public API
var collection = Polymer.Collection.get(model.path_to.array[0].nested_array);
// fetch the key required by .notifyPath method
var old_value = model.path_to.array[0].nested_array[0];
var key_for_initial_value = collection.getKey(old_value);
console.log("Initial value key", key_for_initial_value);
// non-Polymer code changes an object
var first_value = {prop: "firstChange"};
model.path_to.array[0].nested_array[0] = first_value;
// notify dom bind to reflect the change in DOM
domBind.notifyPath("model.path_to.array.0.nested_array." + key_for_initial_value, first_value );
// so far it works, but it worked only for the first time.

But when I try to do this once again, collection.getKey returns undefined
Here is an example in http://jsbin.com/mezipa/3/edit?html,console,output

The solution is to use (also undocumented) ._notifySplice:
domBind._notifySplice(model.path_to.array[0].nested_array, "model.path_to.array.0.nested_array", 0, 1, [old_value] );

http://jsbin.com/siwuna/edit?html,output
I doesn't look like most intuitive API, especially that public, documented .notifyPath seemed to work fine for replacing array properties, and array items for the first time.
I think, even after solving #2509 it would be nice do cleary point such difference in docs.

@tomalec Do the docs after #2513 make this any clearer now?

After 1.2 it get even worse.
I change it to use . separated path with indexes for notifyPath
and the changes in nested array are not changed at all
http://jsbin.com/gufutu/edit?html,console,output
model.path_to.array[0].nested_array[0] = {prop: "first Change"};
domBind.notifyPath("model.path_to.array.0.nested_array.0", model.path_to.array[0].nested_array[0] );
setTimeout(function(){
    model.path_to.array[0].nested_array[0] = {prop: "second Change"};
    domBind.notifyPath("model.path_to.array.0.nested_array.0", model.path_to.array[0].nested_array[0] );

I have created a separate issue for this, as now code docs suggests that I should use notifySplices instead of notifyPath mentioned in original issue, and hopefully I will not have to bother about Polymer.Collection at all.
Just one thing. It's still not 100% clear to me which method should I use to notify about  changing array properties (not items)?

Polymer.Collection has been removed and I assume your usecase has been fixed since. If you can still reproduce this issue without Polymer.Collection please let us know!


Outgoing ports do not automatically convert Maybe anymore

As of 0.17, outgoing ports do not automatically convert Maybe anymore. According to the docs at http://guide.elm-lang.org/interop/javascript.html#customs-and-border-protection and the behaviour in 0.16 they should be.
For example:
type alias Options =
   { responseType : String
   , rememberLastLogin : Maybe Bool
   , closable : Maybe Bool
   , popup : Maybe Bool
   , sso : Maybe Bool
   , callbackURL : Maybe String
   , authParams: { scope: String }
   }

and later
auth0Options : Options
auth0Options =
  { responseType = "token"
  , callbackURL = Nothing -- "http://localhost:3000"
  , rememberLastLogin = Just True
  , closable = Just False
  , popup = Just False
  , sso = Just True
  , authParams = { scope = "openid" }
  }

results in:

While it should result in a callbackURL of null and a closable of false

Confirmed that the related behavior in 0.16 would have translated the callbackUrl = Nothing to null and the closable = Just False to false.
Format of the outgoing port in this instance:
port auth0showLock : Auth0.Options -> Cmd msg

Just did my own review of this, and things seemed to work fine for me. I saw the appropriate generated code:

And the appropriate conversion happening:

Could this possibly be due to Elm not rebuilding a dirty module? You can try deleting elm-stuff/build-artifacts and that should trigger a rebuild of all modules.

I removed it all, and tried again but still have the same problem.
This is the code which causes it: https://github.com/exira/admin
git clone https://github.com/exira/admin.git
npm install
elm-package install -y
gulp

Can you open this on the elm-compiler repo instead? This is not related to core libraries.
Also, is there any way you can get an http://sscce.org/ that does not require cloning a ton of files? Getting it down to something small makes it much easier to resolve, and it'll be more clear why @neoeinstein could not replicate the problem.

Given the state of this, I think it makes sense to close and wait for another report of the issue on elm-compiler.


Uses a cache to remove ant and jdk dependency.

As requested this pull request adds a cache for the jars.  To build the jar when it changes use
python setup.py --enable-jar develop

The jar and class file must be copied back manually to the cache.  Not sure if the native source directory is a good place for the jar.   If you have a better spot feel free to move it.

Thank you! I would not put the binaries to git, but just the code generating them.

Okay.  I guess I could check if the cache is present and use.   Where should the hook be to copy the build/lib contents to the cache location?

I would assume it to be in the spot where setup.py expects these files for shipment, or am I missing something?

I mean I don't know which setup command to put the command to copy from build/lib to native/jars.   I assume we have to add something to make it happen.  Do you know which stage I need to customize?

On 21.05.19 06:50, Karl Nelson wrote:

I mean I don't know which setup command to put the command to copy from build/lib to native/jars.   I assume we have to add something to make it happen.  Do you know which stage I need to customize?

I think we need it both at build and sdist stages. If we want to ship,
we need to make sure it is up to date as well as for building.

I made it such that if the cache is missing it will tell you to run with --enable-build-jar.  I just need to get it through the CI and then have sdist copy the jars into place so the distribution has the jars with it.
Sounds like a plan?

Placing it on the build stage seems bad to me.  If it caches the jars on build when doing development then you can end up with stale jars leading to bugs.  Better to build the jars on the fly up until we are ready to make a shipable copy, then push the jars into the cache.

That sounds like a good solution. So just check it during sdist

It may take me a little while to get the pattern right to get distutils to add a hook to copy from build during sdist.  Distutils is a dark, dark place, and the documentation never seems to shine light.

Okay I think I finally hit the right notes and got it to pull the files into a cache on sdist and use those files on a copy resulting from the sdist.  The enable-build-jar is not necessary as it is smart enough to run it on automatically.  Note sure if targets that indirectly use sdist will have bad behavior but that is the mystery of distutils.

@marscher I made an attempt at updating the installation instructions.  They were really choppy has we are describing multiple methods of installation (binary, source from pip, source from sdist, source from github) all of which have differences in requirements and procedure.   I gave a stab at it.  Assuming you don't see anything wrong I will merge the request tonight.

I think it would be a good idea to cache the Java portion of the test and add instructions for how to run the test into the instructions.  However, I am out of time for now so I will just submit a ticket and work on that in another pull request.


Add support for arbitrary class instances

Change Summary
Add support for arbitrary class instances.
From the new docs:
from pydantic import BaseModel

class DatabaseFoo:
    def __init__(self, count, size=None):
        self.count = count
        self.size = size

class Foo(BaseModel):
    count: int = ...
    size: float = None

database_foo = DatabaseFoo(count=2, size=4.2)
m = Foo(database_foo)
print(m)
# Foo count=2 size=4.2
print(m.dict())
# {'count': 2, 'size': 4.2}

This makes Pydantic compatible with virtually all ORMs and many other tools.
A Pydantic model would be able to receive a SQLAlchemy model, a MongoEngine (MongoDB) model, etc.
It doesn't make any assumption about the underlying data, nor any compromise with any third party library.
I also tried to minimize the code change surface and the code flow alterations. So, using it as normally should be close to unaltered, but this new use case would be supported too.

This solves several things requested by FastAPI users (I think some have requested similar things here too).
I planned and started the code initially in FastAPI directly but I ended up having to duplicate most of the Field validation functions, after trying several different things, to modify a single line in them. It would become a lot of code duplication and desynchronization with the upstream code here in Pydantic. So, I thought it could be added here.

Related issue number
Slightly related to #491
Related to/fixes in FastAPI:
https://github.com/tiangolo/fastapi/issues/218
https://github.com/tiangolo/fastapi/issues/214
https://github.com/tiangolo/fastapi/issues/194
https://github.com/tiangolo/fastapi/issues/84

Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] HISTORY.rst has been updated

if this is the first change since a release, please add a new section
include the issue number or this pull request number #<number>
include your github username @<whomever>

@tiangolo - have you investigated he performance implications of this change? If I follow the change correctly, you're replacing one straight dict.get() with a functional call, a try/except on .get and then a fall through to attribute lookup for every attribute.
I'd hope most ORMs provide a better way to get this info, for example a super dirty SQLAlchemy example would be MyPydanticModel(**my_orm_obj.__dict__), @zzzeek can probably tell us the right way to do that, as that will have the SQLCalchemy instance state variable in it.

@cjw296 that's very ORM-dependent. They all have their own way of doing it, it's not very standard.
If they all implemented my_orm_obj.__iter__, just dict(my_orm_obj) would work. ...but they don't.
Let's wait for @samuelcolvin's opinion.

You probably want to rebase to avoid conflicts with #518

You probably want to rebase to avoid conflicts with #518 now it's merged

Great! Done :heavy_check_mark:

Humm, I'm very keen to try and help here, but I'm quite scared of this, I think it will change the behaviour of pydantic in some subtle ways that will be very hard to debug.
I also think it will also damage performance and (worse) make further performance optimisations (eg. rewriting some of validate_model in c) much more difficult.
Please could you provide a self contained example of what you're trying to allow here and I'll take it away and hack at it. Maybe I can find another way, maybe I can't and I'll be persuaded that this solution is ok.
Sorry if that's an annoying response.

https://www.youtube.com/watch?v=GiPe1OiKQuk
I get this feeling quite often, here I feel there are edge cases that will break - I can only partially think what they are right now, but I'd rather just avoid them completely.

Hehe, I know (unknow).
And from the changes proposed it's not obvious how this all actually affects what I'm trying to achieve.
Let me write something that can show the use case better here.

The simplest/most generic use case:
from pydantic import BaseModel
from typing import List

class PetCls:
    def __init__(self, *, name: str, species: str):
        self.name = name
        self.species = species

class PersonCls:
    def __init__(self, *, name: str, age: float = None, pets: List[PetCls]):
        self.name = name
        self.age = age
        self.pets = pets

class Pet(BaseModel):
    name: str
    species: str

class Person(BaseModel):
    name: str
    age: float = None
    # Having recursive models/sub-models is what makes it necessary for Pydantic models
    # To receive arbitrary objects too
    pets: List[Pet]

bones = PetCls(name="Bones", species="dog")

orion = PetCls(name="Orion", species="cat")

alice = PersonCls(name="Alice", age=20, pets=[bones, orion])

alice_model = Person(alice)

assert alice_model.dict() == {
    "name": "Alice",
    "pets": [{"name": "Bones", "species": "dog"}, {"name": "Orion", "species": "cat"}],
    "age": 20.0,
}

The closest to my actual use case in FastAPI:
from pydantic import BaseModel, Schema, BaseConfig
from pydantic.json import pydantic_encoder
from pydantic.fields import Field
from typing import List

class PetCls:
    def __init__(self, *, name: str, species: str):
        self.name = name
        self.species = species

class PersonCls:
    def __init__(self, *, name: str, age: float = None, pets: List[PetCls]):
        self.name = name
        self.age = age
        self.pets = pets

class Pet(BaseModel):
    name: str
    species: str

class Person(BaseModel):
    name: str
    age: float = None
    # Having recursive models/sub-models is what makes it necessary for Pydantic models
    # To receive arbitrary objects too
    pets: List[Pet]

# In FastAPI, a response is declared with a Python type
# the same as for Pydantic model's attributes
# This allows using, e.g. List[Person]
response_type = List[Person]

# Because the type is List[Person], FastAPI creates a Field from it, not a Pydantic model
field = Field(
    name="person_list",
    type_=response_type,
    class_validators={},
    default=None,
    required=False,
    model_config=BaseConfig,
    schema=Schema(None),
)

bones = PetCls(name="Bones", species="dog")

orion = PetCls(name="Orion", species="cat")

goose = PetCls(name="Goose", species="flerken")

snowball = PetCls(name="Snowball", species="cat")

alice = PersonCls(name="Alice", age=20, pets=[bones, orion])

bob = PersonCls(name="Blice", age=25, pets=[goose, snowball])

people = [alice, bob]

# Afterwards, FastAPI validates/serializes the data using the field.validate method
# Because it calls the classes (Pet, Person) with the data directly, adding a new
# method (like some_pydantic_model.from_arbitrary(alice)) wouldn't work. Because
# field.validate() internally ends up calling Person(alice).
values, errors = field.validate(people, {}, loc="root")

print(values)
# [<Person name='Alice' pets=[<Pet name='Bones' species='dog'>, <Pet name='Orion' species='cat'>] age=20.0>, <Person name='Blice' pets=[<Pet name='Goose' species='flerken'>, <Pet name='Snowball' species='cat'>] age=25.0>]

# FastAPI uses its own jsonable_encoder, but it does something very similar to this:
jsonable_people = [pydantic_encoder(p) for p in values]

# This data is what would be returned by an endpoint (converted to JSON)
assert jsonable_people == [
    {
        "name": "Alice",
        "pets": [
            {"name": "Bones", "species": "dog"},
            {"name": "Orion", "species": "cat"},
        ],
        "age": 20.0,
    },
    {
        "name": "Blice",
        "pets": [
            {"name": "Goose", "species": "flerken"},
            {"name": "Snowball", "species": "cat"},
        ],
        "age": 25.0,
    },
]

The second example is the closest to my actual use case, simplifying as much as possible, without mixing SQLAlchemy nor FastAPI itself in it.
The first example is what I suspect would be the most obvious "benefit"/use case for other Pydantic users, being able to call:
alice_model = Person(alice)

A side benefit is that even when using ORMs/tools that have recursive/circular references, by declaring models without circular references the original data can be converted to Pydantic models that can be serialized to JSON without the circular reference problem.
It also solves several cases with dynamic attributes, it would work for Python @property decorated methods, etc.

If that still was not desirable/acceptable, another option that I considered was being able to inject the function to use for Field.validate. Having a default of the current one, but allowing to inject a custom one (that would do the check I'm proposing here).
But that would imply changing the signature in all the Field.validate methods: Field._validate_sequence_like, Field._validate_tuple, etc.
I don't know if that would also affect performance (maybe more).
After trying something with that style, I realized that if it was implemented at this level (as proposed in this PR) it would work with fewer changes in Pydantic, and would have that side-effect/"benefit".

please review #562 and let me know if that works for you.
It's quite a small change but I hope it covers this use case.

replaced by #562


build(deps): move dependencies to dev

The dependencies are really only needed for the build script and not for end-users when they install the typings. By moving the dependencies to devDependencies this exact effect is achieved, thus ensuring much larger install bundles for end-users.
If I had seen this before I would've included it in my previous PR but I was only made aware of it when a friend was reviewing a PR I made to include v0.0.10 of @igdb/types package.
Like before then I would really appreciate if this could bump to v0.0.11 so we can really use the published typings in our project this time around.

@Favna thanks! I cannot cut a new release until tomorrow but it will happen.

@krazyjakee thanks for the quick merge! That's perfectly fine, looking forward to it.

@krazyjakee could you give an ETA for the new release?

@krazyjakee I'm still waiting a reply, can you give an ETA for a new release?

@Favna this slipped past me. I will escalate and get this deployed tomorrow.

this has been pushed

tyvm!


Update README and GIFs to include the "run Python file" button

Done a while ago, so closing it.


Revert "[build-script] When cross compiling tools, don't install nati…

Related to #5353

@swift-ci Please smoke test


new solution

Cant understand why PR dont show my "docker-compose.yml"

And I understood my last time mistake
When I wrote this command <git add .> -> I automatically added files from all my folders. It was not right!)


feat(PE-6111): get contracts for wallet like WarpContract

Codecov Report
Attention: Patch coverage is 11.36364% with 78 lines in your changes are missing coverage. Please review.

Project coverage is 70.70%.

Files
Patch %
Lines

src/utils/graphql/smartweave.ts
6.02%
78 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha     #104      +/-   ##
==========================================
- Coverage   80.37%   70.70%   -9.67%
==========================================
  Files          20       23       +3
  Lines         540      628      +88
  Branches      102      115      +13
==========================================
+ Hits          434      444      +10
- Misses        106      184      +78

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Update windmill extension

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

I had submitted before, it had flickering issues, that's fixed now
You also asked me how to get the workspace id, the workspace id is the name of the workspace, I think it defaults to the username if using the cloud version.
But also works with the workspace "demo", that is included by default in windmill cloud.
I improved the readme too, let me know if there is any other issues and I'll fix them.
Thank you


Using an ipynb as the root (index) file

It is almost as if it is expecting .md extension by default and can't find the files specified in the index.ipynb.
Originally posted by @mmcky in https://github.com/ExecutableBookProject/myst-nb.example-project/issues/3#issuecomment-608995444

cc: @AakashGfude

@AakashGfude let's coordinate a fix for this around https://github.com/ExecutableBookProject/myst-nb.example-project

this seems to be getting issued within sphinx:
https://github.com/sphinx-doc/sphinx/blob/0ae1bf6f037010b5599d12196b155bbf2cece9ba/sphinx/directives/other.py#L131

This line in sphinx seems to be issuing the warning: https://github.com/sphinx-doc/sphinx/blob/3.x/sphinx/util/nodes.py#L427

In the case of myst-nb.example-project it looks like no extension is being applied
(Pdb) print(toctreenode['includefiles'])
['ar1_processes-MyST', 'finite_markov-MyST']

It seems to be triggering the exception on the second call of the inline_all_toctrees function.

@AakashGfude tried a few pdb runs -- and can't see why this Exception is getting triggered. Let me know if you have any ideas.

@mmcky , it is being triggered by this line on the second call of the inline_all_toctress :-
https://github.com/sphinx-doc/sphinx/blob/3.x/sphinx/util/nodes.py#L413
The cast function from the typing module is throwing this error :-
TypeError: __init__() got multiple values for argument 'outputs'

right - but what does that mean? There is no argument outputs right?

ah - you are a better pdb user than me :-).

yeah, it's weird. I will try to compare the tree on the first pass when it was working vs. the tree on the second pass when it broke. Let's see if I can find any noticeable anomalies.

OK so this is also different to myst-parser.example-project in that there are no executed outputs for that example repo.

The xml representation of the ar1_processes document is:
ar1_processes-MyST.txt

Is this because sphinx cast is against nodes.document and perhaps the output cell is not defined?

It is also interesting that make html doesn't use the function inline_all_toctrees

@mmcky  the error is not caused by the cast function apparently
tree = cast(nodes.document, tree.deepcopy())

but by the deepcopy  function in tree.deepcopy()

@AakashGfude the only difference I see in the xml is that the markup relating to Cell uses camelcase names when the rest of the xml uses lower case. Could this be breaking some xml schema when copying the document?

so tree is of type docutils.nodes.document.
It has inheritance from class document(Root, Structural, Element):
It seems that the class Element has a method deepcopy
    def copy(self):
        obj = self.__class__(rawsource=self.rawsource, **self.attributes)
        obj.document = self.document
        obj.source = self.source
        obj.line = self.line
        return obj

    def deepcopy(self):
        copy = self.copy()
        copy.extend([child.deepcopy() for child in self.children])
        return copy

but can't see why these copy methods except.

this may be related: https://github.com/ExecutableBookProject/myst-nb.example-project/issues/4 and will fix this first.

@AakashGfude, @choldgraf @chrisjsewell I am starting to wonder if this is because teach markdown cell in the notebook is being parsed by myst_parser independently. Is it possible the tree is malformed as it isn't a complete doctree causing the underlying copy method to fail?

@chrisjsewell can we compare the AST between html and latex to see how they differ?

re: code above in docutils we fail at:
copy.extend([child.deepcopy() for child in self.children])

one of the child objects doesn't deepcopy. Currently trying to figure out which one


Add support for Datadog events

It would be useful to have the ability to send custom events to Datadog.
https://docs.datadoghq.com/developers/events/dogstatsd/?tab=java

awesome, thanks Tom!


Damage from Personal Antithesis not being Added

Hi, I was trying to get the exploit weakness set up. everything worked except for the damage calculation, which you can see below:

What is not being set right?

Do you have IWR turned on?

I'm not sure. here are my settings:

It's in the pf2e settings
https://github.com/mysurvive/pf2e-thaum-vuln?tab=readme-ov-file#important

Oh, I understand, yup, that was not clicked. The module functions as desired now, thank you.


LabView - Better Location For Example Projects

LabView has a very awesome place to search and open example projects.  It would be great if your examples could be found there as well.  Maybe they should exist in both places for the time being, but I think it could just as easily be moved to the easier to find searchable location.

Whoops!  Meant to post this at https://github.com/Digilent/dmc60c-frc-api


WARNING: An illegal reflective access operation has occurred

When starting with Java 11, I get a warning on start-up relating to LuckPerms while running LuckPerms 5.0.94 and PaperMC 1.15.2 (Version 136)
C:\srv\minecraft-server>C:\srv\minecraft-server\jdk-11.0.6\bin\java.exe -Xms10G -Xmx10G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar paperclip_latest.jar
System Info: Java 11 (Java HotSpot(TM) 64-Bit Server VM 11.0.6+8-LTS) Host: Windows Server 2019 10.0 (amd64)
Loading libraries, please wait...
[14:39:10 INFO]: Starting minecraft server version 1.15.2
[14:39:10 INFO]: Loading properties
[14:39:11 INFO]: This server is running Paper version git-Paper-136 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
[14:39:11 INFO]: Debug logging is disabled
[14:39:11 INFO]: Server Ping Player Sample Count: 12
[14:39:11 INFO]: Using 4 threads for Netty based IO
[14:39:11 INFO]: Default game type: SURVIVAL
[14:39:11 INFO]: Generating keypair
[14:39:11 INFO]: Starting Minecraft server on *:25566
[14:39:11 INFO]: Using default channel type
> WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by me.lucko.luckperms.common.dependencies.classloader.ReflectionClassLoader (file:/C:/srv/minecraft-server/plugins/LuckPerms-Bukkit-5.0.94.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of me.lucko.luckperms.common.dependencies.classloader.ReflectionClassLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

#952
Thank you for not checking about other issues with that exact error message and opening yet another duplicate.

#952
Thank you for not checking about other issues with that exact error message and opening yet another duplicate.

Sorry.
When I searched, I forgot GitHub defaults to only showing Open Issues and there were no current Issues Open with "Reflective" in them.

It's fine, no worries :)


Updated API router to accept a CCF Config

Checklist

[ ] PR description included and stakeholders cc'd
[ ] tests are changed or added
[ ] yarn test passes
[ ] yarn lint has been run
[ ] git pre-commit hook is successfully executed.
(Please refrain from using --no-verify)
[ ] yarn changeset was run and relevant packages have been updated as a major/minor/patch bump with descriptions
(Determine version update using Semantic Versioning)
[ ] relevant documentation is changed or added

Notes
Hi 👋  As part of Spotify's Climate Change Hackweek we're looking at putting the CCF dashboard into a Backstage plugin .
The approach we're trying out is plugging the CCF express router into Backstages express server, like so...
import ccfRouter from '@cloud-carbon-footprint/api/dist/api';

app.use(ccfRouter({
  AZURE: {
     USE_BILLING_DATA: bsConfigLoader.get('...'),,
     authentication: {
        mode: bsConfigLoader.get('...'),
        clientId: bsConfigLoader.get('...'),
        clientSecret: bsConfigLoader.get('...'),
        tenantId: bsConfigLoader.get('...'),
      }
  }
}));

Backstage has it's own configLoader system, this PR makes changes to allow a CCFConfig to be passed in and set inside the router. Please let us know your thoughts, if this is a welcomed change and/or if there's a better way to go about this.
Additional information relevant to the changes
The '@cloud-carbon-footprint/api/dist/api isn't ideal, and if this is a welcomed change, then we can look into having the router as a top level export?
© 2021 Thoughtworks, Inc.

Merged!


fix(deps): update gomod

This PR contains the following updates:

Package
Type
Update
Change

github.com/IBM/platform-services-go-sdk
require
patch
v0.48.0 -> v0.48.1

golang.org/x/crypto
require
minor
v0.12.0 -> v0.13.0

Release Notes

IBM/platform-services-go-sdk (github.com/IBM/platform-services-go-sdk)
v0.48.1
Compare Source
Bug Fixes

IAM Access Groups: rRemove update action control from assertions (#276) (75ec5ee)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

/run pipeline

/run pipeline

/run pipeline

Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠ Warning: custom changes will be lost.

:tada: This PR is included in version 1.21.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Introduce shoot_dashboard_url label

How to categorize this PR?
/area monitoring
/kind enhancement
What this PR does / why we need it:
This PR introduces a new alert label shoot_dashboard_url that can be used in alerts to quickly access the shoot dashboard URL for more information. We use the configuration property alert_relabel_configs so that this new label is only added for alerts. In the past, there was a similar feature using external labels to calculate the dashboard URL but this changed after GEP-19. For this improvement, we decided against external labels because they are always added (i.e., not only on alerts) and a constant dashboard URL in the external labels would probably add some additional payload in the HTTP requests and that is not necessary nor desired.
This change also covers seeds that are shoots and are consequently accessible via the dashboard. The slight difference is that the garden project does not become /namespace/garden-garden/ in the URL but simply /namespace/garden. To circumvent this, a second alert relabel config captures when the project is garden and builds the URL correctly.
As for the code change, the new alert relabel config only applies to the garden Prometheus for now. Therefore, a new configuration property AdditionalAlertRelabelConfigs is introduced and only the garden Prometheus configuration populates it. Note it is called "additional" because there is always a default relabel config to drop alerts with label ignoreAlerts = true.
Special notes for your reviewer:
/cc @istvanballok @rickardsjp
/fyi @rfranzke
Release note:

Introduce new label `shoot_dashboard_url` in the alerts from the garden Prometheus

/lgtm

To interactively try out this PR in the local setup:
make kind-operator-up operator-up
export KUBECONFIG=$PWD/example/gardener-local/kind/operator/kubeconfig
k apply -f example/operator/20-garden.yaml

port-forward to Prometheus and the Alertmanager:
k port-forward prometheus-garden-0 9090
k port-forward alertmanager-garden-0 9093

and add a pseudo alert that is always firing:
k apply -f - <<"EOF"

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  labels:
    prometheus: garden
  name: test
  namespace: garden
spec:
  groups:
  - name: test
    rules:
    - alert: ShootLabelTest
      expr: vector(1)
      for: 1m
      labels:
        topology: shoot
        name: shootName
        project: shootProject
      annotations:
        summary: Shoot test summary
        description: |
          Shoot test description

          Test alert for {{ $labels.shootName }} shoot.
EOF

Afterwards, you can verify the new shoot_dashboard_url label in the alertmanager.
with @vicwicker


Routes formatted as $foo-bar are being prioritised over routes formatted as foo-bar.

Reproduction

Go to this reproduction on StackBlitz
Visit /pages/foo-bar

System Info
System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.10.5 - /usr/local/bin/pnpm
  npmPackages:
    @remix-run/css-bundle: * => 2.4.1
    @remix-run/dev: * => 2.4.1
    @remix-run/node: * => 2.4.1
    @remix-run/react: * => 2.4.1
    @remix-run/serve: * => 2.4.1

Used Package Manager
npm
Expected Behavior
In the case where there are routes using pages.$foo-bar.tsx and pages.foo-bar.tsx routes, I would expect /pages/foo-bar to match with the pages.foo-bar.tsx file, not the pages.$foo-bar.tsx file.
Actual Behavior
When visiting /pages/foo-bar, the pages.$foo-bar.tsx file is matched over the pages.foo-bar.tsx file.

For additional context:
We are aware that the behaviour of $foo-bar matching all routes ending in -bar might not be intended behaviour, but it is behaviour we'd love to preserve if possible. It actually works fine as is with the exception of this bug.
In our case, we're building out an e-commerce site that uses different collection page templates depending on the route suffixes. We have:

Standard Collection Pages (formatted as collections.$handle.tsx).
Bundle Collection Pages (formatted as collections.$handle-bundle.tsx).
Look Collection Pages (formatted as collections.$handle-look.tsx).

Before realising this was a thing, we were originally loading all collection templates into the collections.$handle.tsx file and doing all the fetching for all three pages in one loader. Being able to format routes to then match against these suffixes works much better for us, and let's us handle all loader logic and page templates in seperate files.
The only issue we're running into is that we have a SEO heavy index page on /collections/shop-the-look which matches the collections.$handle-look.tsx instead of the existing collections.shop-the-look.tsx page.

We are aware that the behaviour of $foo-bar matching all routes ending in -bar might not be intended behaviour, but it is behaviour we'd love to preserve if possible. It actually works fine as is with the exception of this bug

Unfortunately, it's not It's not intended behavior - the behavior itself is the bug.
Dynamic segments (named parameters) are required to be the full URL segment.  Partial named parameters are not supported (they inadvertently worked for a small period of time, and were fixed in 6.5.0).
This appears to be a bug due to an internal assumption that named parameters are only word characters (via an internal \w regex match), so the - is not being picked up as part of the param name when it should be.  I.e., /pages/:foo-bar should populate params["foo-bar"].
I'm going to transfer this over to an issue in React Router but to align with expected behavior, I would recommend avoiding the dash in the param name ($foo-bar -> $fooBar).
If you need to do this type of route/bundle spitting, I would do it via URL segment:
/collections/$handle.tsx
/collections/bundle/$handle.tsx
/collections/look/$handle.tsx


Store query history in spice.runtime.query_history table

Create a new spice.runtime.query_history prefixed table that holds the history of jobs ran by the runtime. Columns

start_time
end_time
sql
text (nullable, present for NSQL queries)
execution_time
rows_produced
schema

See #1361 for comparison.

Need to think more about schema

Or in INFORMATION_SCHEMA


[FEAT]: Pico option show link RSS

Description
Pico module preferences option to show RSS
Additional Information
No response

Define Smarty constant for Dashboard preferences.


[SR-7432] Can't see through boxed _SwiftValue when casting from @objc Type

Previous ID
SR-7432

Radar
rdar://problem/39415812

Original Reporter
@tkrajacic

Type
Bug

Status
Reopened

Resolution

Additional Detail from JIRA

Votes
0

Component/s
Compiler

Labels
Bug, Runtime

Assignee
None

Priority
Medium

md5: be79066c5a2ee131780c4b6bfd8678cb

Issue Description:
When conforming to an @objc protocol, the check using `is` can't get the original type information.
In the Playground, uncomment the @objc in front of the protocol and suddenly the check at the end doesn't pick up on the fact that the passed type is in fact a `User.Type`
import Foundation

//@objc(Exporter)
protocol Exporter: NSObjectProtocol {
var type: Any { get }
func export(item: Any)
}

struct User { var name: String }

final class UserExporter: NSObject, Exporter {
var type: Any { return User.self }
func export(item: Any) {
guard let u = item as? User else {
return print("That's not a user")
}
print("Got user: \(u.name)")
}
}

let user = User(name: "Kermit")
let exporter: Exporter = UserExporter()

if exporter.type is User.Type {
print("Correct exporter")
}
exporter.export(item: user)

Fixed by #33561 (test here).


Update: Persian

Strings.fa.resx needs to be updated.
@robin98 maybe you can assist :)

I take this.
it's done.

thank you very much!! :D