[RFC] Quo vadis re: classes

Time for more existential questions.
Currently attrs has involuntarily two ways of attaching its methods.  Both come with certain problems and there are (or are suspected) remedies.
We should really discuss this once and for all and transition towards one approach.  Here’s what I’ve got:
We tack our methods to the existing class body.
Default behavior.
Problems

Edge cases may appear because Python runtime is confused.  As far as I can tell, so far only the inconsistence in the behavior of __eq__ and __hash__ (cf. ) is a real problem so far.

Remedies

Catch all edge cases.  So far it’s only one that popped up so it seems manageable?

We create a new class in @attr.s and return it instead of the original
Happens if slots=True.  This has the upside that we create a brand new class that doesn’t change so no edge cases are to be taken care of.
However, the user gets a different class, which comes with its own set of problems.
Problems

super() doesn’t work. #102

Solutions

ctypes voodoo

At this point, I find the confusingly broken super() worse than the default approach so I would prefer if we found a way to cheat __slots__ into existing classes and I’m not afraid of using C or meta programming to get there.

If others have more problems/solutions, I’ll happily add them.

The problem with tacking methods onto an existing class is we can't add "slotness" to an existing class, right?
I'm more interested in the user-facing API than the internals; there's going to be filth under the hood either way. All other things being the same, I'd prefer to keep the dirt on our side, and let users frolic in their ignorance of what we're doing in their name.
I'm assuming adding slotness with a metaclass would require users to actually specify that metaclass? Like this:
@attr.s
class C(metaclass=SlotsMetaclass)
    a = attr.ib()

Personally I find the current approach of attr.s(slots=True) very nice since I can do things like
def profile(cl):
    return attr.s(frozen=True, slots=True)(cl)

@profile
class C:
    a = attr.ib()

and it's nice and elegant. Also does using a metaclass for slotness means users can't use another metaclass?

I absolutely agree on the filth being on our side.
My fear is just that the filth might just…break eventually?  It seems like playing with internals that may also have other side-effects like confusing PyPy's JIT etc. :|
I really don’t know. 😖

So I tend to go with “cheating the interpreters and return new classes like slots=True” again.
Unless someone voices disagreement (@glyph?) we’ll ship the hacks in 17.3.0 and eventually move there in all cases.

My fear is just that the filth might just…break eventually? It seems like playing with internals that may also have other side-effects like confusing PyPy's JIT etc. :|

I know this fear very well :) Mentally I counter it by saying to myself "we're a volunteer open source project, we're doing the best we can, if we do something wrong or paint ourselves into a corner with a wrong decision oh well, we'll fix it and try again" :)
:+1: for returning new classes. I can put together a fix for #102 when I have some time and we can take it from there.

You've got any timeline in mind?  Seems like your plate keeps getting fuller. :)

Since this is settled now, we have to figure out a road map on how to make it “always new class”.
That’s a breaking change re: at least the hashing thingie, so we’ll have to be careful.

What is the plan for being careful?

What I meant is that we won't do the bandaid thing again and try to find a way to do some kind of deprecation cycle.
Maybe make it an attr.s Option so we can raise a DeprecationWarning?

So we’ve just ran into more problems re metaclasses and I’m afraid taking the “always create new class” is just not practical.  We’d break wayyy to much stuff on the way.
So the question is: what can be done instead?

find some clever hack to get __slots__ on existing classes
@RonnyPfannschmidt mentioned metaclasses but I know nothing about how they could help

sanely using meta-classes would require to inherit from a class that is a instance of them
since they are the then completely involved in the class construction, there is no need to modify a class, all preparation can be done before constructing the class and stuff like super() would just work as far as i understood (the class would never be taken away from under it)

The original problem with metaclasses is that they aren't composable, right?
Our current problem is replacing the class won't allow our users to use the metaclass they want. But switching attrs to a metaclass approach again won't allow our users to use the metaclass they want :)

true - but when using attrs, many things you do with metaclasses are displaced anyway
for example if you use a sqlalchemy declarative metaclass, you dont want any attrs behaviour
so i dont see enabling metaclass based inheritance for stuff like correct __slots__ support and correct super() a bad thing

Unfortunately, I think the approach of recreating the class is fundamentally incompatible with metaclasses. We might make it work in some cases but not in all cases.
So maybe we can brainstorm a better API for slots, and I can replace our black magic with different black magic so we set slots before the class is finalized. Then we would never have to replace the class.
Should we open a new issue to talk about different slots APIs?

I think this issue is fine since we don’t have anything else open.   We can open something new once something concrete starts crystallizing.

well, metaclasses are fundamentally a mechanism to make the need to recreate the class to begin with go away - since the initial instantiation of the class instance would already do the work, where attrs currently has to break the world by moving the actual class away from under its methods

What if we could make this work:
@attr.s
class C:
    attr.slots()    # Could take parameters, like attr.slots(weakref=True)
    a = attr.ib()

Option two:
@attr.s
class C:
    __slots__ = attr.slots()
    a = attr.ib()

But honestly the dunder slots just looks ugly to me, like an implementation detail leaking out.

Option one looks better but I could live with both I guess?

I think you could support attr.slots() in the class body using the trace hook:
In [35]: def slottify(frame, old_trace):
    ...:     def tracer(frame, event, arg):
    ...:         if event == 'call':
    ...:             return None
    ...:         if event == 'return':
    ...:             frame.f_locals['__slots__'] = ('a',)
    ...:             frame.f_locals['example'] = 'hi'
    ...:             print(frame.f_locals)
    ...:             sys.settrace(old_trace)
    ...:         return None
    ...:     sys.settrace(tracer)
    ...:     frame.f_trace = tracer
    ...:

In [36]: def slots():
    ...:     slottify(sys._getframe(1), sys.gettrace())
    ...:

In [37]: class A:
    ...:     foo: int = 1
    ...:     bar: str
    ...:     slots()
    ...:     baz: float
    ...:     quux: bytes = b"wat"
    ...:
{'__module__': '__main__', '__qualname__': 'A', '__annotations__': {'foo': <class 'int'>, 'bar': <class 'str'>, 'baz': <class 'float'>, 'quux': <class 'bytes'>}, 'foo': 1, 'quux': b'wat', '__slots__': ('a',), 'example': 'hi'}

In [38]: a = A()

In [39]: a.a = 'yo'

In [40]: a.b = 'hi'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-40-28f4f01f5c2c> in <module>
----> 1 a.b = 'hi'

AttributeError: 'A' object has no attribute 'b'

In [41]: A.a
Out[41]: <member 'a' of 'A' objects>

In [42]: A.example
Out[42]: 'hi'

Obviously the code that executes on 'return' here is just an example -- the actual version would need to collect the attribute names to put into __slots__, save the defaults/attr.ib parameters somewhere that @attr.s would know to look for them, detect if it's called outside a class body, etc. But I think it should be feasible to implement. I might take a stab at a PR if the approach seems reasonable?

I'd like to use attrs with e.g. Brython.  Depending on internal implementation details like these (ctypes, stack walking) seems doomed to become very very interpreter-specific.
@oremanj in addition to being interpreter-specific, doing that sort of thing makes PyPy really slow.  Maybe it'll only make it slow at import time, but importing my codebase at work already takes a good couple of seconds and I'd rather not stretch it out even more.

I think maybe a useful question here is, when are limitations that exist only on some interpreters worse than limitations that exist on all interpreters? (This isn't intended to be a straw man -- there's a maintenance cost to having code that's exercised only on some interpreters -- but since attrs already has some interpreter-specific code, I'm inferring that that maintenance cost has at least sometimes been judged to be worth it.)
Brython doesn't really support __slots__ anyway; it seems to implement them as a restriction on which attribute names can be set, but the attributes still go in the instance __dict__. attrs could choose to do something similar as its fallback mechanism for slots=True on unusual interpreters, or it could fall back on its current approach of re-making the class.
Performance is definitely an open question. (At a rough glance on a couple small inputs, the use of the trace hook looked better on CPython than attrs' current approach.) My understanding of PyPy is that most of the performance impact of getframe/settrace/etc comes from disabling the JIT, but I wouldn't expect the JIT to help much with class creation anyway, so I'd be surprised if the effect is as dramatic as you're worried about? Of course there's no way to know for sure without fully implementing it and timing it.

I'm definitely OK with the answer for Brython being "implement a new backend".  I wish I knew how to set up CI for something like attrs that could meaningfully verify it against some JS / frontend runtimes.  (Brython just being an example here; maybe VOC is a better one.)
The main thing is that I want to avoid jumbling up a gross interpreter hack in the interface to slotsification, i.e. an un-adorned function call at class scope being able to identify the defining class, necessitating stack-walking and other hacks to make it work, as opposed to something abstract in the decorator.

Thanks, that's useful feedback and makes sense when put that way. I suspect similar magic can be performed from the decorator, since the decorator gets evaluated before the class definition, but I haven't looked in detail yet.

I brainstormed some more about where we could insert the magic to make this work. I think the most promising options involve taking advantage of the fact that if you pass metaclass=foo where foo is a callable but not a type, foo gets called directly without calculating a most-derived metaclass. We could provide a callable that fiddles with __slots__, then determines the "real" metaclass and calls it. This attrs-provided "metaclass" would only be used at class definition time and would not be visible to inspections of the generated class. I'm limiting my analysis to Python 3+; I'm not sure what attrs' timeframe is for dropping Python 2 support but I don't see any reason Python 2 couldn't continue to use the existing slots logic with its metaclass limitations.
The easiest and least magical approach would require the user to put something in their class's bases list explicitly. This only uses stuff in the official Python language definition so it should theoretically be portable to all interpreters that implement py3. Saying slots=True in the @attr.s argument list would continue to produce the current behavior of re-creating the class. Simple example: the above C class would be written something like
@attr.s
class C(metaclass=attr.slotted):
    a = attr.ib()

which could support an alias
@attr.s
class C(attr.slotted):
    a = attr.ib()

in order to be less daunting for users who don't want to think about the word "metaclass". (The purest version of this latter base class form would only work when none of C's other bases have nontrivial metaclasses, though support could be added for GenericMeta and ABCMeta without much trouble. It might even be possible to support all metaclasses on 3.7+ using __mro_entries__.)
More complex example: if you had the non-slotted attrs class
@attr.s
class C(A, B, metaclass=Meta, keyword=42):
    ...

and you wanted to make it slotted with no weakref slot, you would write something like
@attr.s
class C(A, B, metaclass=attr.slotted, attrs_weakref_slot=False, attrs_next_metaclass=Meta, keyword=42):
    ...

Other spelling options: metaclass=attr.slotted_with_metaclass(Meta), metaclass=attr.slotted[Meta].
More magic: Once the above exists, there's the option of additionally hooking builtins.__build_class__ (works on CPython and PyPy but isn't officially part of the language spec) to gain the ability to rewrite the bases list so the user doesn't need to explicitly write metaclass=attr.slotted or similar. This would add some slowdown to the creation of every class, not just attrs classes. There are a few different options for how the hook would decide whether to do the rewriting:

Rewrite if the user passes attrs_slotted=True (or whatever name) in the base class list. That is, you'd write something<EMAIL_ADDRESS>class C(attrs_slotted=True):
    a = attr.ib()

This seems no less ugly than inheriting from or using-as-a-metaclass attr.slotted, so I don't think it's a winning approach, but I mention it for completion.
Rewrite if there is a attr.s(slots=True) object (with no these) that has been created in the current thread but not yet applied to a class. (Class decorators are evaluated before the class body and called afterward.) This would provide the benefits of the new approach (better metaclass treatment) without requiring code changes, but at the cost of confusion if anyone creates other classes between creating a attr.s object and creating the class it's to be applied to. For example, if you write:def evil_decorator():
    class A: ...
    def decorate(cls): ...
    return decorate

@attr.s(slots=True)
@evil_decorator()
class C:
  ...

then the slottedness applies to evil_decorator.<locals>.A rather than to C. It would be possible to detect this when applying attr.s to C, but at that point it's too late to fix the issue (all you can do is raise an exception).
Rewrite if the next bytecode instruction after the call to attr.s is LOAD_BUILD_CLASS. This would have fewer negative externalities than the previous bullet, but would also miss more valid cases (such as calls to attr.s from a wrapper function). It also carries the downsides of stack introspection. I think the resulting "will it or won't it work with my metaclass?" uncertainty probably makes this a non-starter.

The trace hook could be used instead of hooking __build_class__, but I think it would carry most of the same downsides (not having a good way to tell which class body goes with which @attr.s decorator).
My gut feeling having written all this out is that the "more magic" approaches that could support unmodified @attr.s(..., slots=True) will be subject to a long tail of weird corner case problems. The earlier-discussed explicit metaclass approach represents an API change but is more portable and reliable. What do you think?

Oof there's a lot to unpack here. :)
So first of all, Brython is not gonna hold us back from having a better experience on the most used Python. We do have a portable solution right now and having a good experience on Py3+ should be worth some extra code.
That said, I think the first approach won't work because __slots__ need to be set before the class is created but I think you realized it in one of your comments too.
Ultimately I'm afraid we won't get around metaclasses unless CPython adds programmatic slots support (which they kinda thought about).
Having to subclass is obviously my least favorite approach; ideally everything would be done in the decorator. I wonder if something could be done with a custom __new__? I remember playing with it but don't remember what stopped me from actually using it. 🤔
P.S. we absolutely won't be rewriting bytecode but I appreciate the level of evilness. 😂


Permalink layer exclusion

This branch implements dynmical exclusion of layers from permalinks by means of a newly introduced layer attribute supportsPermalink. The corresponding issue is described in #244 (resolves #244).
I also added a documentation section for the permalink configuration, which did not exist yet.

Maybe someone more familiar than me with the PermalinkController could review the newly added configuration section in the docs.

@justb4 do you want to have a look since the Permalink implementation was by you initially? Thanks in advance.

@JakobMiksch Thanks for the review, Jakob!

This PR has been rebased to the current master to resolve documentation conflicts, there should be no changes. IMO we're good to merge this, but a quick review definitely can't hurt. :)

I gave it a quick test and it seems to be fine :+1:
Ready to merg!


_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+1 :green_heart:
mvninstall
5m 29s
master passed

+1 :green_heart:
compile
0m 51s
master passed

+1 :green_heart:
checkstyle
0m 22s
master passed

+1 :green_heart:
spotbugs
0m 59s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
5m  8s
the patch passed

+1 :green_heart:
compile
0m 43s
the patch passed

-0 :warning:
javac
0m 43s
hbase-backup generated 1 new + 72 unchanged - 1 fixed = 73 total (was 73)

+1 :green_heart:
checkstyle
0m 17s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
hadoopcheck
22m 56s
Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.

+1 :green_heart:
spotbugs
0m 54s
the patch passed

_ Other Tests _

+1 :green_heart:
asflicense
0m 14s
The patch does not generate ASF License warnings.

47m 55s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3766/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3766

Optional Tests
dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile

uname
Linux d76655052c43 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / f6348d4100

Default Java
AdoptOpenJDK-1.8.0_282-b08

javac
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3766/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-backup.txt

Max. process+thread count
96 (vs. ulimit of 30000)

modules
C: hbase-backup U: hbase-backup

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3766/1/console

versions
git=2.17.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


oscm-app-vmware writes logfile with wrong name

app-aws.log
app-aws.log
Observed:
if you want to debug the oscm-app-vmware controller you have to create a file<log4j.ess.aws.properties> in <apache/conf> directory and the output goes to  <app-aws.log>
in second installation this was the smae with <app-core.log>
Desired:
create a file <log4j.ess.vmware.properties> and the output goes to <app-vmware.log>

@fest-floreks
I think a root slash is missing in the vmware log file path.
Please check
https://github.com/servicecatalog/oscm/pull/154/commits/0e8ffbf0b7d528675ebaef21e2127176e099d412#diff-2acd3bb5ded6921a456e0dac1c2d0303R25

Relative path still works as the search starts from the root dir, but just to be sure that some future change will not collide with it I will add the root slash.

app-vmware.log is ok
app.aws.log does not work: Templet not found
app.openstack.log has entries from azure and vmware

Described behavior looks like the one before applying the fix. Is it possible that it was tested on some old build and not latest master?

tested with build from 19.10.2018:
app-vmware.log is ok
app.aws.log is empty
app.openstack.log is ok
app.azure is ok

Logging is set to quite high level so they can be empty unless controller is used.

Yes, but errors should be logged in any case.

They will be logged. WARN level means that warnings, errors and fatal level messages will be logged.

just for my understanding, I tested with a wrong authentication and received the following mail. But the log file is empty?
Dear user,
The current operation on subscription 'AWS_EC2' for customer 'PLATFORM_OPERATOR' has been suspended (Instance: 'aws-34b5c690-3ec3-4ee8-bbc5-ca523606598c').
Reported problem: AWS authentication failure: AWS was not able to validate the provided access credentials (Service: AmazonEC2; Status Code: 401; Error Code: AuthFailure; Request ID: b3904f7a-f0d5-4b9e-a992-fd2c88878040)
To continue automatic processing, please click the following URL:
https://estst1.intern.est.fujitsu.com:8881/oscm-app/notify?sid=aws-34b5c690-3ec3-4ee8-bbc5-ca523606598c&controllerid=ess.aws&_resume=yes
If the problem cannot be solved and the processing cannot be continued, please terminate the subscription and create a new one.

This means that error is thrown in the code but log4j is not used to log it. Only mail is sent.

I close this bug and create a new bug for oscm-app-aws  #164


Adding existing volume as persistent volume

Hi,
I'm using Rancher 2.1.6 on bare metal and I have installed Longhorn 0.3.3. I have restored some volumes from backups (as I had to wipe and rebuild my cluster). These volumes appear in Longhorn but I am unsure how to add the persistent volume to Rancher so I can create a PVC and link it to a workload.
If I try to add persistent volume and select Longhorn, it asks for a name. Should this be the name of the existing volume? The settings seem to be more about defining a new volume. If not, where can I do this?
Thanks,

Hi @paulmorabito
There are still a few changes we need to do to integrate with Rancher. Currently, we can workaround the problem using kubectl. You can take a look at https://www.youtube.com/watch?v=vRqvz-Ii49A&t=3328s which contains the demo on how to restore the volume to a workload.
I will keep this item open to track the effort.

Thanks for the reply. This worked!


support device-cgroup-rule

fix #4876
Add --device-cgroup-rule to podman create and run. This enables to add device rules after the container has been created.
Signed-off-by: Qi Wang<EMAIL_ADDRESS>

@QiWang19 the new tests are not happy

/retest

/approve

LGTM once tests go green

LGTM

@mheon @giuseppe @TomSweeneyRedHat  PTAL

/lgtm


Derive Name from DisplayName

Please describe the enhancement
Name is required to be in a specific format, whereas DisplayName is more freeform. When creating something new (such as a profile) using the API, the caller needs to have a display name, and will possibly derive the name by doing certain transformation (regexp replace, trim, etc) on the display name.
This means that clients of the API might implement this logic in different ways, and the logic is duplicated within the ecosystem, increasing the overall complexity in the ecosystem.
Solution Proposal
The logic to derive Name from DisplayName could be moved to all POST endpoints in the API. This would mean that the clients don't need to directly supply the Name value when creating a new object from scratch, and this logic could be removed from all client code.
Describe alternatives you've considered
No response
Additional context
No response
Acceptance Criteria
No response

The description does not call this out explicitly, but let's scope this down to profile creation.
Acceptance criteria
Given a logged in Minder user
when they call ProfileService.CreateProfile
and provide a display name, but no name
then the profile name is created and saved based on the profile display name*
Given a logged in Minder user
when they call ProfileService.CreateProfile
and provide both a display name and a profile name
then the profile name from the incoming request is used as the profile name
Given a logged in Minder user
when they call ProfileService.CreateProfile
and provide both a display name and a profile name
and the project already has a profile with that name
then Minder returns an error
*Deriving the profile name from the profile display name
The profile name should be derived from the profile display name given the following logic:

Trim the leading and trailing whitespace from the display name
Remove any non-alphanumeric characters
Replace all whitespace with underscores
Turn all upper-case characters into lower-case
Trim the string to be a maximum length of 63 characters

If the derived profile name already exists in the same project, then we append a -1 to the end of the derived profile name (my_profile-1).
If the new name also exists in the project, then we increment the appending digit by 1 until we find a name that doesn't already exist. (my_profile-2,  my_profile-3 etc)
Examples
Below are some examples of profile names derived from profile display names.
"My custom profile" -> "my_custom_profile"
"A very long profile name that is longer than sixty three characters and will be trimmed" -> "a_very_long_profile_name_that_is_longer_than_sixty_three_charac"
"Profile with !#$() characters" -> "profile_with_characters"
"My 1st Profile" -> "my_1st_profile"


No vCheck Updates in 4 Months?

The various repository branches show that the most recent commit was 4 months ago.  Has development for this software stopped?

At the moment I have a couple of large projects at work taking up most of my time, so really just replying to issues at the moment and not really tackling any coding :/
Not helped by the fact the next steps are fairly big ones as well- settings handling, config GUI, etc.

I'm glad to hear that this project has not been abandoned, and I'm excited to hear that "settings handling" is coming in the future.  I really like vCheck and our organization definitely uses it.

Especially with PowerCLI 6 R2 with modules versus snapins

The great thing about vCheck being hosted on Github is that it's nice and easy for other people to contribute as well :)


Documentation improvements

Improved descriptions of some parameters, "parameters" section
is referenced from README as a "complete list of configurable parameters".

fixed, thanks


GA version for WAC needs to be updated.

2007 has now entered GA as of 7/21 based on https://techcommunity.microsoft.com/t5/windows-admin-center-blog/windows-admin-center-version-2007-is-now-generally-available/ba-p/1536215#M114
Document needs to be updated to reflect this new version.

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

ID: 9509faf3-2ec5-daa3-51a4-d050f04debec
Version Independent ID: b70c774f-8962-0e48-8294-645c03530f40
Content: Windows Admin Center Frequently Asked Questions
Content Source: WindowsServerDocs/manage/windows-admin-center/understand/faq.md
Product: windows-server
Technology: manage
GitHub Login: @nwashburn-ms
Microsoft Alias: niwashbu

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


Constraints warnings

2015-03-31 22:55:39.629 Colo[30839:730209] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fb022ec5600 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fb022ec6020(44)]>",
"<NSLayoutConstraint:0x7fb022ec6450 V:|-(0)-[UIView:0x7fb021f7a140]   (Names: '|':UITableViewCellContentView:0x7fb022ec6020 )>",
"<NSLayoutConstraint:0x7fb0222d8e40 V:[UIView:0x7fb021f7a140(100)]>",
"<NSLayoutConstraint:0x7fb022ec6d50 V:[UIView:0x7fb021f7a140]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb022ec6020 )>"
)

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7fb022ec6d50 V:[UIView:0x7fb021f7a140]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb022ec6020 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-31 22:55:39.635 Colo[30839:730209] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fb022f76330 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fb0220fac50(44)]>",
"<NSLayoutConstraint:0x7fb022f75ac0 V:|-(0)-[UIView:0x7fb0220f7d30]   (Names: '|':UITableViewCellContentView:0x7fb0220fac50 )>",
"<NSLayoutConstraint:0x7fb022f75b50 V:[UIView:0x7fb0220f7d30(100)]>",
"<NSLayoutConstraint:0x7fb022f78a90 V:[UIView:0x7fb0220f7d30]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0220fac50 )>"
)

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7fb022f78a90 V:[UIView:0x7fb0220f7d30]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0220fac50 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-31 22:55:39.644 Colo[30839:730209] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fb022eccca0 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fb0225f05c0(44)]>",
"<NSLayoutConstraint:0x7fb022ecfb50 V:|-(0)-[UIView:0x7fb019c3fcb0]   (Names: '|':UITableViewCellContentView:0x7fb0225f05c0 )>",
"<NSLayoutConstraint:0x7fb022ecfac0 V:[UIView:0x7fb019c3fcb0(100)]>",
"<NSLayoutConstraint:0x7fb022ecdf30 V:[UIView:0x7fb019c3fcb0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0225f05c0 )>"
)

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7fb022ecdf30 V:[UIView:0x7fb019c3fcb0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0225f05c0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-31 22:55:39.652 Colo[30839:730209] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fb022f89fe0 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fb0227650d0(44)]>",
"<NSLayoutConstraint:0x7fb022f88500 V:|-(0)-[UIView:0x7fb0223fb3b0]   (Names: '|':UITableViewCellContentView:0x7fb0227650d0 )>",
"<NSLayoutConstraint:0x7fb022f8adf0 V:[UIView:0x7fb0223fb3b0(100)]>",
"<NSLayoutConstraint:0x7fb022f8ad60 V:[UIView:0x7fb0223fb3b0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0227650d0 )>"
)

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7fb022f8ad60 V:[UIView:0x7fb0223fb3b0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb0227650d0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-31 22:56:05.631 Colo[30839:730209] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fb021b61620 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fb02189a190(44)]>",
"<NSLayoutConstraint:0x7fb021b64350 V:|-(0)-[UIView:0x7fb021b5e6d0]   (Names: '|':UITableViewCellContentView:0x7fb02189a190 )>",
"<NSLayoutConstraint:0x7fb021b64bd0 V:[UIView:0x7fb021b5e6d0(100)]>",
"<NSLayoutConstraint:0x7fb021b643a0 V:[UIView:0x7fb021b5e6d0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb02189a190 )>"
)

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7fb021b643a0 V:[UIView:0x7fb021b5e6d0]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fb02189a190 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

https://github.com/wongzigii/Colo/commit/da5b901a671fffc14fde53766cfb34ef793f4b5f


TCP Server listens only for IPv4, not IPv6

While outgoing connections can use IPv6 addresses, mavlink-router does not listen for incoming IPv6 TCP connections.
E.g.

mavlink-router version 123da4e
Opened UDP Server [4]GCS: [::]:14550
Opened TCP Server [5] <IP_ADDRESS>:5760

It is suggested by the above output that the UDP server is listening on IPv6 ([::]) whereas the TCP server is only listening on IPv4 (<IP_ADDRESS>), and this indeed seems to be the case.
This creates a connection (and then immediately closes it): socat -4 /dev/null tcp-connect:ubuntu.local:5760
This fails: socat -6 /dev/null tcp-connect:ubuntu.local:5760

2022/02/26 22:46:04 socat[60098] E connect(8, LEN=28 AF=30 [2601:0444:c300:03e6:f405:0cff:fed3:f1c6]:5760, 28): Connection refused

The first IPv6 support in mavlink-router could be disabled all together using a build configuration switch. (I had a system with kernel IPv6 support disabled a few years back.) But this added many branches in the code, which made the code quite unreadable and was removed when switching from automake to meson.
Could you please double-check that my pull request works? I quickly connected to it with netcat, but nothing more.

It works for me! I can connect with both IPv4 and IPv6 and exchange heartbeat messages


Morning Edition failed on 2024-12-5

Nothing else to add right now, just that no stories appeared this morning.

Sorry, it was working fine later in the day.


Allow live error analysis to be turned off

I may be overlooking something, but is it not possible to turn off the live error analysis? I know that some typings are not installed correctly in my project, but I still want to be able to edit without being bombarded with red bullet items and a busy status bar listing all the "errors". Thanks for any advice.

In the very bottom left corner of the Atom window > click on "File" to hide the linter

(I just discovered how to do this myself by trawling thru some old issues)

Nice! thanks for tip

No worries. I've been trying to debug some code with only four or five lines of it visible for the last couple of days and finally figured there must be a way! :stuck_out_tongue_closed_eyes:


Subnet details for AKS Internal load balancer

Added additional details to host the load balancer in the same aks subnet or in different subnet with in the same vnet.

@dcbrown16 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

doing a fresh look at this one fyi

@ktoliver  can you please close this one?

@andresnava  premium is available in both azure files and disks, can you resolve conflict and we'll merge?

@andresnava premium is available in both azure files and disks, can you resolve conflict and we'll merge?

This comment looks like it goes with a different PR. I'll see if I can determine which PR and reference this comment in it.


fix: rpc and async_rpc had err msg trace already

// remove dup err msg in GotoSymbolLoc

test fail due to tsserver_test.vim missed a comma, see commit here.

Another approach would be to tell the function that it shouldn't handle errors, and let the caller handle errors, something like:
diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim
index e750c02..a57703b 100644
--- a/autoload/lsp/lspserver.vim
+++ b/autoload/lsp/lspserver.vim
@@ -598,7 +598,7 @@ enddef

 # Send a sync RPC request message to the LSP server and return the received
 # reply.  In case of an error, an empty Dict is returned.
-def Rpc(lspserver: dict<any>, method: string, params: any): dict<any>
+def Rpc(lspserver: dict<any>, method: string, params: any, handleError: bool = true): dict<any>
   var req = {}
   req.method = method
   req.params = {}
@@ -623,13 +623,15 @@ def Rpc(lspserver: dict<any>, method: string, params: any): dict<any>
   endif

   if reply->has_key('error')
-    # request failed
-    var emsg: string = reply.error.message
-    emsg ..= $', code = {reply.error.code}'
-    if reply.error->has_key('data')
-      emsg ..= $', data = {reply.error.data->string()}'
+    if handleError
+      # request failed
+      var emsg: string = reply.error.message
+      emsg ..= $', code = {reply.error.code}'
+      if reply.error->has_key('data')
+        emsg ..= $', data = {reply.error.data->string()}'
+      endif
+      util.ErrMsg($'Error(LSP): request {method} failed ({emsg})')
     endif
-    util.ErrMsg($'Error(LSP): request {method} failed ({emsg})')
   endif

   return {}
@@ -883,7 +885,7 @@ enddef
 # Result: Location | Location[] | LocationLink[] | null
 def GotoSymbolLoc(lspserver: dict<any>, msg: string, peekSymbol: bool,
 		  cmdmods: string)
-  var reply = lspserver.rpc(msg, GetLspTextDocPosition(true))
+  var reply = lspserver.rpc(msg, GetLspTextDocPosition(true), false)
   if reply->empty() || reply.result->empty()
     var emsg: string
     if msg ==# 'textDocument/declaration'

I like the approach of the Rpc() function accepting the "handleError" argument.  Can you update the PR with this change?

I like the approach of the Rpc() function accepting the "handleError" argument. Can you update the PR with this change?

https://github.com/yegappan/lsp/pull/179

I like the approach of the Rpc() function accepting the "handleError" argument

this is unnecessary, as per the specification, if it had error key in the resp, that meant it had error, just some lsp server did not follow the specification, then now we specifically adding the symbolloc err handler for those ones.
// only one thing looks Ugly which needing to handle it had no error AND result is empty at 2 Places, it becauses the original code designed if no Rpc result is empty then return {} which cannot get original error !
I Think we do not need to make code complex which adding such many or unnecessary parameter.

but whatever, this should be not a matter to me, as long as no dup err.


gitui: 0.17 -> 0.17.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/extrawurst/gitui/releases.
meta.description for gitui is: "Blazing fast terminal-ui for git written in rust"
meta.homepage for gitui is: "https://github.com/extrawurst/gitui"
meta.changelog for gitui is: ""
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/ry0b9466hk7g69snhn50j394by49i65q-gitui-0.17.1/bin/gitui passed the binary check.

1 of 1 passed binary check by having a zero exit code.

1 of 1 passed binary check by having the new version present in output.

found 0.17.1 with grep in /nix/store/ry0b9466hk7g69snhn50j394by49i65q-gitui-0.17.1

found 0.17.1 in filename of file in /nix/store/ry0b9466hk7g69snhn50j394by49i65q-gitui-0.17.1

directory tree listing: https://gist.github.com/1cc488fa9597588f662b86aabbfdae11

du listing: https://gist.github.com/6bd4347ae0c52b6ac367d44d4e04285a

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

215 total rebuild path(s)

64 package rebuild(s)

64 x86_64-linux rebuild(s)
56 i686-linux rebuild(s)
40 x86_64-darwin rebuild(s)
55 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
adoptopenjdk-icedtea-web
arcanist
bazel-buildtools
buildifier
buildozer
collectd
collectd-data
diffoscope
docker-machine-kvm
docker-machine-kvm2
firefox-unwrapped
firefoxPackages.firefox
gitui
gnome.gnome-boxes
haskellPackages.libvirt-hs
libguestfs
libvirt
libvirt-glib
libvmi
lightburn
melonDS
minikube
minishift
navidrome
nixopsUnstable
nixos-install-tools
perl532Packages.SysVirt
perl534Packages.SysVirt
python38Packages.awkward
python38Packages.deemix
python38Packages.deezer-py
python38Packages.dpath
python38Packages.guestfs
python38Packages.libvirt
python38Packages.uproot
python39Packages.awkward
python39Packages.deemix
python39Packages.deezer-py
python39Packages.dpath
python39Packages.guestfs
python39Packages.libvirt
python39Packages.uproot
rubyPackages.ruby-libvirt
rubyPackages_2_6.ruby-libvirt
rubyPackages_2_7.ruby-libvirt
rubyPackages_3_0.ruby-libvirt
slack
slimerjs
system76-firmware
terraform-full

Instructions to test this update (click to expand)

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

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

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

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

1 package built:

gitui

Maintainer pings
cc @Br1ght0ne @yanganto for testing.

Built and tested


Missing automations keyword in *.cm

Describe the bug
Running the github action produces the following error:
.cm/gitstream.cm
Missing automations keyword in *.cm

To Reproduce
Steps to reproduce the behavior:

The .cm automation file

# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  estimated_time_to_review:
    if:
      - true
    run:
      - action: add-label@v1
        args:
          label: "{{ calc.etr }} min review"
          color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}

  safe_changes:
    if:
      - {{ is.formatting or is.docs  }}
    run:
      - action: add-label@v1
        args:
          label: 'safe-changes'
      - action: approve@v1

calc:
  etr: {{ branch | estimatedReviewTime }}
is:
  formatting: {{ source.diff.files | isFormattingChange }}
  docs: {{ files | allDocs }}

The PR URL (as it contains the repo and PR identifiers)
https://github.com/Glossai/Production/pull/824

Describe your PR relevant content
It happens in all of our PRs, this is just 1 example

Add relevant commit SHA

Expected behavior
We do have automations keyword so there just should not be an error
Screenshots

@SiviP-Glossai can you attach the github action log?

I'm also having this issue across a lot of repositories
This seems to be the main error in the log
/bin/sh: cd: line 1: can't cd to repo: No such file or directory

@Fitz7 its the same issue, can you attach the github action log?

Run faceit/gitstream-github-action@v1
Run echo "timestamp=$EPOCHSECONDS" >> $GITHUB_OUTPUT
Run mkdir gitstream
  mkdir gitstream
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Run actions/checkout@v3
Syncing repository: faceit/infrastructure
Getting Git version info
  Working directory is '/home/runner/work/infrastructure/infrastructure/gitstream'
  /usr/bin/git version
  git version 2.39.2
Temporarily overriding HOME='/home/runner/work/_temp/8412f938-d0df-4a2d-8e96-4d7311acdbb9' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/infrastructure/infrastructure/gitstream
Deleting the contents of '/home/runner/work/infrastructure/infrastructure/gitstream'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/bin/git log -1 --format='%H'
'17002e3f28f1cb078afc25af18087af1587b3457'
Run cd gitstream
From https://github.com/faceit/infrastructure
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
Switched to a new branch 'master'
branch 'master' set up to track 'origin/master'.
Switched to branch 'whitelist-clips-worker-machines'
Your branch is up to date with 'origin/whitelist-clips-worker-machines'.

There was an update to the gitStream GitHub action but it seems that due to GitHub caching it didn't update for some of the users (you...). We are working on a fix.

@SiviP-Glossai @Fitz7 It should work for you now

thanks, can confirm it works now :raised_hands:

Thanks, it is working now.
Thanks for the quick response :)


Remove explicit values from seeders incrementing column

Fixes the following error:
[2021-05-27 18:25:07] local.ERROR: SQLSTATE[23505]: **Unique violation: 7 ERROR:  duplicate key value violates unique constraint "menus_pkey"**
DETAIL:  Key (id)=(3) already exists. (SQL: insert into "menus" ("name", "updated_at", "created_at") values (sidebar, 2021-05-27 18:25:07, 2021-05-27 18:25:07) returning "id") {"userId":1,"exception":"[object] (Illuminate\\Database\\QueryException(code: 23505): SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint \"menus_pkey\"

Only affecting PostgreSQL.
Seems like when you explicitly assign a value to the incrementing column PostgreSQL does not register this in the next sequence causing the  duplicate key value violates unique constraint error. By leaving it out, everything works properly.

You could just run this instead and it would fix the sequence, No need to edit the seeders.

Hi @7Skiez,
Ah yes very good point. I like your fix better! Will close this PR then!


Issue with allowClear

Hi there, thanks for the component – it’s great!
I did notice an issue, though. When I clear the selected item, the component still returns the last selected item instead of None. Am I missing something? This is a bit frustrating, as I’m planning to use this component for filtering data.
Thanks!
See attached screenshots

Hi,
thanks for reporting this.
I have looked into it and I think it should be fixed with new version.
https://pypi.org/project/st-ant-tree/0.0.13/


Container Manager doesn't change version on loaded camera

"Kameran kan inte upgrade/downgrade

Kamera exporterades inte med animation fören jag slog på "shake", Ska undersöka lite mer på denna."

Process to get to bug:
When working with the container manager

Open new scene with already published assets
Load the shot camera
open the container manager
cameras versions are visible
camera version cannot be changed neither up nor down

Try not to add bug etc. in the title, that's what labels are for. At the moment, you don't have write permissions to this project (to avoid accidental pushes) and can't add labels yourself, but I'll manage labels till then.

This might be an issue with the Alembic export. Have a look a the Alembic exporter, and see if there are any options for Cameras in the Maya documentation you need to add. Alternatively, have a look at your previous alembic exporter, and see what flags were passed when exporting cameras.

That was why I added the labels in the titles. But I will stop doing so if it is annoying. :)

No problem. :) A minor thing that I expect you to find elsewhere on GitHub
and other places, it's good to stay consistent.

Is this still a problem?

I will start investigating this again, tonight

This is the Error message I get:
Program error: Unsupported representation: {u'path': u'{dirname}/CameraRig{format}', u'schema': u'mindbender-core:representation-1.0', u'format': u'.abc'}

I ran this code two times to publish two cameras:
cmds.file(new=True, force=True)

from maya import cmds
from mindbender import maya, api

camera = cmds.camera(name="studioCamera_RIG")
cmds.select(camera)
assembly = cmds.group(name="ROOT")
cmds.select(camera)
transform = cmds.ls(selection=True, type="transform")

startTime = cmds.playbackOptions( query=True, minTime=True)
endTime = cmds.playbackOptions( query=True, maxTime=True)

halfTime = (((endTime-startTime)/2)+startTime)

cmds.cutKey( transform, time=(startTime, endTime), attribute="ty" )

cmds.setKeyframe(transform, time=startTime, attribute="ty", value=0)
cmds.setKeyframe(transform, time=halfTime, attribute="ty", value=1)
cmds.setKeyframe(transform, time=endTime, attribute="ty", value=0)

cmds.select(assembly)

container = maya.create(
    "CameraRig",
    family="mindbender.animation",
    options={"useSelection": True}
)

cmds.file(rename="temp.ma")
cmds.file(save=True)

from pyblish import util
util.publish()

I then proceeded to try and load the camera, it worked to load the latest publish but when trying to downgrade I got into above error message

After some research on help.autodesk.com
I cannot find a link between our exporter and this problem, there are not any flags specifically about exporting cameras.
And after researching our old alembic exporter I cannot find any extra flag except for the write worldspace flag, but that doesn't seam to be linked to our issue .
That is as far as I will get today, I will return to this issue again.
@mottosso Do you see something I don't ?

I'll try and take a look in the afternoon.

Discovered two related issues.

You cannot publish a camera rig, how are you using and animating cameras today?
An error appears on trying to save a scene with a camera. An mbID is trying to get added but cannot. You should have been seeing errors on each save with cameras.


Add alias support for docker

Ignore the .gitignore update (was not sure how to remove this part of the commit...)

Done in https://github.com/Bash-it/bash-it/pull/403.


Repair Lightning Display, Start Speed, Sleep Wake Speed

Thanks osy86 for contributing to this model
Lightning display repair.zip
EFI.zip

10.14.6 Test passed

Can you detail your changes aside from darkwake=0. Note this disables power nap so it’s a workaround not a repair.

除了 之外,您能详细说明您的更改吗？请注意,这将禁用电源午睡,因此它是解决方法,而不是修复。darkwake=0

It's strange to add darkwake = 0 separately without adding anything else. The skull lights of the machine flicker, and it looks like it's dormant and normal.

Can you explain what problem this resolves?

你能解释一下这能解决什么问题吗？

The speed of waking up after sleep

你能解释一下这能解决什么问题吗？

change HECI to IMEI（The problem of starting speed has been solved.）

你能解释一下这能解决什么问题吗？

I'm sorry, maybe because of the translator, part of the meaning expression is not perfect.

With darkwake=0 I see monitor power up every half hour.

You can check the console record, and what exactly caused the wake-up. I haven't had this situation for one night. It's strange.

And the BIOS of Pluto Canyon is perfect. DSDT-HDAS to HDEF, GFX0 to IGPU can be deleted without any impact.

Caused by network wake up (notification sync)
darkwake=0
2019-08-02 05:26:57 -0700 Notification        	Display is turned on
2019-08-02 05:26:58 -0700 Wake                	Wake from Normal Sleep [CDNVA] due to /Network: Using AC (Charge:0%) 612 secs
2019-08-02 05:26:58 -0700 WakeDetails         	DriverReason:PXSX - DriverDetails:
DriverReason:WiFi.MDNSService - DriverDetails:
2019-08-02 05:26:58 -0700 HibernateStats      	hibmode=3 standbydelay=86400                                               	          51

No darkwake=0
2019-08-01 20:19:59 -0700 DarkWake            	DarkWake from Normal Sleep [CDNP] due to /Network: Using AC (Charge:0%) 45 secs
2019-08-01 20:19:59 -0700 WakeDetails         	DriverReason:PXSX - DriverDetails:
2019-08-01 20:19:59 -0700 HibernateStats      	hibmode=3 standbydelay=86400                                               	          35

Power nap is enabled.

If it's convenient, you can add QQ to communicate,<PHONE_NUMBER>

And the BIOS of Pluto Canyon is perfect. DSDT-HDAS to HDEF, GFX0 to IGPU can be deleted without any impact.

HDEF is used in AppleHDA driver to detect graphics audio. Maybe AppleALC fixes this already. IGPU is used by the AGPM for power management.

If it's convenient, you can add QQ to communicate,<PHONE_NUMBER>

Sorry I don’t have QQ :(

If it's convenient, you can add QQ to communicate,<PHONE_NUMBER>

Sorry I don’t have QQ :(

And the BIOS of Pluto Canyon is perfect. DSDT-HDAS to HDEF, GFX0 to IGPU can be deleted without any impact.

HDEF is used in AppleHDA driver to detect graphics audio. Maybe AppleALC fixes this already. IGPU is used by the AGPM for power management.

config.plist.zip

Looking forward to Dashen joining the QQ exchange group, a large wave of netizens of Pluto Canyon looking forward to your joining

I tried to register for qq, but the international registration page seems to be broken. It keeps saying "server busy".

I tried to register for qq, but the international registration page seems to be broken. It keeps saying "server busy".
There is no need to use qq.


Choose learning rate during the training

Test
1e-3
1e-4
5e-5

argmax likelihood = 5e-4,  atm?

6.9e-4


Enable periodic jobs for "latest+1"

#4490
/area testing

PR https://github.com/openshift/release/pull/16813 will fix this.

I will handle it in another pr because there are some failures observed while enabling 4.8 jobs https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_release/16813/rehearse-16813-periodic-ci-openshift-odo-master-v4.8-integration-e2e-periodic/1371461371509608448#1:build-log.txt%3A1322 . It needs dedicated time of individual. So moving it to next sprint.


Add support for applicationWillEnterForeground

Thanks so much for RxAppState!
This PR adds in support for applicationWillEnterForeground.
I needed this because I wanted to distinguish the difference between an app which is resuming from the background, and an app which was merely temporarily inactive because a user opened up the control center (swipe from bottom).  In particular, if an app is resuming from background, I want to refresh certain network resources.  But if they just opened up the control center for a moment, there's no need to refresh.
Thanks!

Thanks for your contribution! That indeed was a missing piece to the puzzle. And nice "drawing" of the app states BTW 👍
How about we add another convenience Observable to make the use of your contribution more obvious?
Something like this:
public var willOpenAppFromBackground: Observable<Void> {
        return Observable.of(
            applicationDidEnterBackground,
            applicationWillEnterForeground
            )
            .merge()
            .distinctUntilChanged()
            .filter { $0 == .inactive }
            .map { _ in
                return
        }
    }

Excellent!  I'll add that in.
As a newcomer to RxSwift, the examples in your code are very useful for understanding what's possible.

Hmm, actually on second thought, I'm not sure we need willOpenAppFromBackground.  I think just keying off of applicationWillEnterForeground will accomplish the same thing, because applicationWillEnterForeground doesn't fire when the app is initially launching, it only fires after the app has been put into the background.

You are absolutely right that we don't absolutely need it. I just thought that for someone who is not familiar with the different app states it would be more intuitive if it was there. Because IMHO an Observable that is called  willOpenAppFromBackground describes what it does and is a bit clearer than an Observable called applicationWillEnterForeground.
But we don't really need to add it. Maybe it's a bit too redundant.
BTW you would't really need the applicationWillEnterForeground Observable. This would achieve the same ;-) :
UIApplication.shared.rx.didOpenApp.skip(1)

But I think you found a missing state that should be there, so we should really add it.
Thanks again for your contribution and discussion! If you find something else, let me know!


High CPU usage when read data from Azure and seems has memory leak issue

When reading data from AzureBlob, we get high CPU usage in worker. Attached the profile results from async-profiler. Seems it caused by decode https response.
https-azure.zip
And we found worker doesn't free the memory of AzureStorageResponse. So when memory usage reach Xmx limit, the CPU usage will become much higher (about 900% in our env).
Currently, we use AzureStorage SDK v8, and it integrated with hdfs client. But v8 seems has many performance issues, maybe we can change to v12. Since v12 is not compatible with HDSF, need type of UFS need to be added.
Refer: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-java?tabs=powershell

@apc999 Please help take a look, maybe we should do some performance test for AzureStorage SDK

The memory dump link: https://alluxiotestms.blob.core.windows.net/dump/heap.zip?sp=r&st=2021-04-06T02:54:13Z&se=2021-04-30T10:54:13Z&spr=https&sv=2020-02-10&sr=b&sig=%2B1SZXtEAjrvEUaRTHUdYQR5Bfhp%2B%2FOs4tbE1EK8UN1I%3D

seems like resolved.Will close it for now, feel free to reopen it and contact us if this is still valid.


panel doesn't recognize an active session

I've put the following
def callback():
    import panel as pn
    import html

    return pn.pane.HTML(html.escape(str(pn.state.session_info)))

here
https://github.com/bokeh/bokeh-fastapi/blob/0c0fdc0bc895c90ac6c28520316da4b90e475c46/test.py#L250
This is the result
Screencast from 2024-04-25 23-45-37.webm

pn.state.curdoc is also empty
Screencast from 2024-04-25 23-49-52.webm
def callback():
    import panel as pn
    import html

    return pn.pane.HTML(
        "<br>".join(
            html.escape(line)
            for line in [
                f"{pn.state.session_info=}",
                f"{pn.state.curdoc=!r}",
            ]
        )
    )

pn.state.curdoc is now correctly set and session_info can be enabled with pn.config.session_history = -1


Plugin stops working if workspace includes clone of GitHub wiki

Describe the bug
When navigating to the GitHub Actions tab in VS Code, I only see the message "Unable to connect to the GitHub API, please check your internet connection" along with a Refresh button. Clicking Refresh appears to have no effect.
Tried opening the Developer Console in VS Code, and am seeing the following error message:

My VS Code workspace has several different Git repositories in it. I tried creating a brand new workspace and added just one Git repository, and the GitHub Actions plugin works as expected. Adding more than one Git repository also seems to work fine.
After playing around with my original workspace some more, the issue appears to be stemming from a local clone of a GitHub wiki that I have included in my workspace. After removing the directory containing my GitHub wiki, the GitHub Actions plugin works as expected.
To Reproduce
Steps to reproduce the behavior:

Install the GitHub Actions plugin via the Extensions tab.
Open a workspace that has a local clone of a GitHub wiki.
On the GitHub Actions tab in VS Code, an error message is displayed. Clicking the Refresh button has no effect.

Extension Version
v0.25.4

If the root cause of this is an expired PAT, a possible workaround here is to revoke the trusted extension grant from the Action extension. Reload and do the whole PAT setup process again.

The PR has been completed and the fix will be available in our upcoming release v0.25.7, which planned for release May 5, 2023. Thanks so much for submitting great bugs and feedback to help make the extension even better!

The fix has been released and is available in v0.25.7 🎉 !

This fix appears to be working. Including a wiki repo in my workspace no longer causes the plugin to stop working. Thanks for the fix.


BT scanning issues

I've been experimenting with the bluetooth stack today and got a NodeMCU-based proof-of-concept going with advertisements relatively easily (have the example as reference was quite useful, thanks!). However, I'm hitting a wall when it comes to scanning on the ESP32.

While it reports that the scan enable command was successful, I never receive any advertising reports, despite there being plenty of advertising BT devices around. I've tried explicitly setting the event mask to include advertising reports, but that did not help (and the default value should be enough anyway). Other than setting the parameters and then enabling the scan, am I supposed to do something else? Yes, the LE Meta-Event bit in the baseband event mask.
When an LE SET SCAN ENABLE command has been sent once (whether to enable or disable), all subsequent LE SET SCAN ENABLE commands report failure, code 0x0c (Command Disallowed). As such, it does not appear to be possible to stop scanning other than via a HCI_RESET command. Edit: Actually, I see the same behaviour with LE SET ADVERTISE ENABLE as well; once on, it's not going off. Mea culpa. Bug found and removed.

Are these bugs, or am I just doing things wrong? I haven't got the code checked in or pushed anywhere yet (it needs a lot of cleanup, and ideally it should also work...), but here is some example output:
> bt.reset()
BT: 04 0e 04 05 03 0c 00
BT command 0c03 completed, 5 queue free, retval(s):  00

> bt.scan.setparams({mode=1,interval=32,window=16,own_addr_type=0,filter_policy=0})
BT: 04 0e 04 05 0b 20 00
BT command 200b completed, 5 queue free, retval(s):  00

> bt.scan.enable(1)
BT: 04 0e 04 05 0c 20 00
BT command 200c completed, 5 queue free, retval(s):  00

> -- No advertising events generated :(
>
> bt.scan.enable(0)
BT: 04 0e 04 05 0c 20 0c
BT command 200c completed, 5 queue free, retval(s):  0c
> -- and I can't even stop the scanning!

And for the advertising:
> bt.reset()
BT: 04 0e 04 05 03 0c 00
BT command 0c03 completed, 5 queue free, retval(s):  00

> bt.adv.setparams({type=bt.adv.NONCONN_UNDIR})
BT: 04 0e 04 05 06 20 00
BT command 2006 completed, 5 queue free, retval(s):  00

> bt.adv.setdata(encoder.fromHex("080861626364656667"))
BT: 04 0e 04 05 08 20 00
BT command 2008 completed, 5 queue free, retval(s):  00

>bt.adv.enable(1)
BT: 04 0e 04 05 0a 20 00
BT command 200a completed, 5 queue free, retval(s):  00

> -- happily advertising at this point
>
> bt.adv.enable(0)
BT: 04 0e 04 05 0a 20 0c
BT command 200a completed, 5 queue free, retval(s):  0c

> -- and will be forever more, because the stop command gets rejected

Also, currently the BT stack uses callbacks for delivering events/responses. Which task context are those executed from? And is the BT stack expected to move over to use esp_event_send() like the WiFi stack in the near future?

Hi,
Thank you for paying attention to bluetooth reference.
You said you have sent "event_mask", besides, do you have  sent "set_event_mask_enable" hci command ?
And, this VHCI APIs is for common hci interface, so it doesn't have task conext. If you receive something , you must do xQueueSend to switch to your application task.

A-ha! I'd missed the LE Meta-Event bit in the Controller/Baseband event mask. I'm now seeing the advertisements, thanks!
I still can't stop the scan (or advertising) without a full HCI reset however.

Hi，
We do the experiment to try stop the advertising stop, it can be worked. So, could you check your hci command content? Or you send advertising stop too quickly after send advertising enable?

@TianHao-Espressif  hi, which Bluetooth protocol stack will be used in esp-idf?  Coming soon?

@negativekelvin  Hi, ble reference will be coming firstly.

@negativekelvin , actually, we will support classic bt and ble dual mode.

@TianHao-Espressif OK thanks, but will protocol stack be full open source above hci layer?  Who is stack provider?

@negativekelvin ， yeah，the protocol will be open source above hci layer.

@TianHao-Espressif I found a bug in my code that was causing the issue with stopping advertising and scanning. Apologies for the noise - everything is now working. Thanks for your help!

Hi jmattson,
I am currently struggling with the bluetooth part for esp32.
I am not sure where to start here, since it's my first bluetooth esp project. I would be very happy to see your bluetooth code on github, to have a small reference. Even if the code isn't too clean.
Is there any BLE-API Reference beside the example code and the address definitions in "/components/esp32/ld/esp32.rom.ld". (I just tried to understand the ble example)
Kind regards

I haven't got much beyond the example code myself; we're still waiting for Espressif to release the full BT LE & Classic stacks. Right now it's only the VHCI that's available for use, the higher level protocols aren't there yet. As for code, it's all in the NodeMCU32 bthci module, which has its Lua interface documented here.

Ok, thank you!

@TianHao-Espressif, Hello, I am doing a continuous  BLE scanner and it works well for a couple minutes, then suddenly the ble scanner doesnt detect any ble advertisement, and after a couple of minutes it detects again, do U have some advice to make that scanner detect the ble advertisement all the time? I am using the gatt_client example to make my scanner
Regards
Diego

@diegojpalaquibay ,  Thank you pay attention on ESP32. We're debugging on this scan problem. Please wait for a little time.

@TianHao-Espressif , thank you very much for your help, please let me know when u get  some news for this problem...thx
Regards
Diego

Got the same problem, is there a workaround available for this?
Thanks and regards
Max


Web Map "Maritime Security Collections" (2nd) references services/layers that do not exist

Item id baca87986fe444ee9b669ac2722e7eeb   references the following services/layers that do not exist:
https://nsec.esri.com/ags/rest/services/Military/MaritimeSecurityCollections/FeatureServer/0

Same as https://github.com/Esri/ops-server-config/issues/806.

Same issue, different Web Map. There are two web maps with the same name.

Deleted.


Raw Output

I am just processing the below reference using processRawReference option.
Greaves M, Lawlor F. Angioedema: manifestations and management. J Am Acad Dermatol. 1991;25(1 Pt 2):155-161;
First I got the below output :
		<title level="j">J Am Acad Dermatol</title>
		<imprint>
			<biblScope unit="volume">25</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="155" to="161" />
			<date type="published" when="1991" />
		</imprint>

Then I did some sample training and got the output:
		<title level="j">J Am Acad Dermatol</title>
		<imprint>
			<biblScope unit="volume">25</biblScope>
			<biblScope unit="issue">1 2</biblScope>
			<biblScope unit="page" from="155" to="161" />
			<date type="published" when="1991" />
		</imprint>

Refer the issue details. I noted that some kind of post processing is happening and that removes the content. Missing content is the biggest problem that we face currently with Grobid. Is there any way we could get the basic/raw text without any post processing. I am not looking for proper XML output. I am looking for output something like https://github.com/inukshuk/anystyle-parser hash output option.

Hello Dominic,
There are some design choices behind the scene, and I didn't want to do something like parscit or anystyle-parser (the latter being more or less just a re-packaged parscit), which has a bibtex-style representation of bibliographical information. BibTex is "presentation-oriented", and this kind of raw fields cannot be exploited easily with digital library tools, openUrl, etc. I think this cannot be the kind of representation we want for a bibliographic tool.
Contrary to parscit training data format for citations, only the values of the fields are tagged in GROBID, so not the syntactic sugar around (parenthesis, punctuation, etc.). So for instance, there is no post-processing for the field issue, what you get is actually already the "raw" value. There are of course some post-processing for certain fields, but this is limited because only the actual useful values are labelled and the rest is simply ignored and not require post-processing.
So if you have a special use-case where you need some raw fields output, GROBID might simply not be the right tool as it prioritises compatibility with bibliographic services. I think it makes GROBID more powerful and clean and it improves the CRF recognition accuracy. The representation choice in parscit and the CORA corpus was made a long time ago and, I think, are not the best - for instance anystyle-parser or parscit not even recognized issue from volume, because issue was not an independent field in the CORA corpus, and one reason for this is that "raw fields" were labelled, not allowing unlabelled stuff.
Now more concretely to solve your issue about possible missing information, the first thing you can do is to use the parameter consolidate. As the bibliographical data as tagged by GROBID are compatible with bibliographical services, crossref will complete your citation as follow (processed with current GROBID version):
<biblStruct >
    <analytic>
        <title level="a" type="main">Angioedema: Manifestations and management</title>
        <author>
            <persName
                xmlns="http://www.tei-c.org/ns/1.0">
                <forename type="first">M</forename>
                <surname>Greaves</surname>
            </persName>
        </author>
        <author>
            <persName
                xmlns="http://www.tei-c.org/ns/1.0">
                <forename type="first">F</forename>
                <surname>Lawlor</surname>
            </persName>
        </author>
    </analytic>
    <monogr>
        <title level="j">Journal of the American Academy of Dermatology</title>
        <title level="j" type="abbrev">Journal of the American Academy of Dermatology</title>
        <idno type="ISSN">01909622</idno>
        <imprint>
            <biblScope unit="volume">25</biblScope>
            <biblScope unit="issue">1</biblScope>
            <biblScope unit="page" from="155" to="161" />
            <date type="published" when="1991" />
        </imprint>
    </monogr>
    <idno type="doi">10.1016/0190-9622(91)70183-3</idno>
</biblStruct>

So you get much richer and complete information than what was in the input string, and the issue field is normalised according to CrossRef publisher metadata.
Second, if you really want the raw fields, you can get them with the Java API, in the class BiblioItem (see the fields prefixed by original*), but it won't help you at all, because as mentioned above in (1 Pt 2), parenthesis and Pt are not labelled, thus the raw issue is anyway in this case 1 2 - which is consistent with the design choice. Of course it could be improved by putting Pt as acceptable value for the issue fields in the training data and/or add some post-processing or data model for issue aware of Pt as part, but this is complicated and would be anyway solved more easily and naturally with consolidate or at the stage of solving/matching the bibliographical reference with a bibliographical database (which always add some flexible/partial/fuzzy matching for robustness).

So if you have a special use-case where you need some raw fields output, GROBID might simply not be the right tool as it prioritises compatibility with bibliographic services. I think it makes GROBID more powerful and clean and it improves the CRF recognition accuracy.

I agree, GROBID is a very powerful engine indeed. I am not sure about how others are using GROBID in a live environment. I discussed with many in the publishing industry and missing content is a big issue for everyone. So my use-case is simple, if GROBID engine is not able to identify a particular content, it should just leave it as it is or put it in a XML comment. In my opinion this will make GROBID even more powerful. This is just not specific for any particular section like bibliography or header. I am not a java person but if I get any pointers how to do this, then I can arrange to give it a try.


Undefined behaviour found by clang sanitizer

Running the test suite with the clang Undefined Behaviour sanitizer I'm getting a bunch of errors:
flatcc/src/compiler/parser.c:1276:19: runtime error: applying zero offset to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior flatcc/src/compiler/parser.c:1276:19 in
flatcc/external/hash/cmetrohash.h:62:22: runtime error: load of misaligned address 0x562a0e5a99fe for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
0x562a0e5a99fe: note: pointer points here
 6e 75 6d 20 43 6f  6c 6f 72 3a 62 79 74 65  20 7b 20 52 65 64 20 3d  20 30 2c 20 47 72 65 65  6e 2c
             ^

and many more.
I'm configuring and compiling like this:
$ mkdir build && cd build
$ LDFLAGS="-fsanitize=undefined" CFLAGS="-fsanitize=undefined" cmake -DFLATCC_TEST=ON ..
$ make

The reason this came up is that we use sanitizers to check our project code, one part of which uses flatcc. When flatccrt is compiled with the same flags, the following error pops up:
flatcc/src/runtime/builder.c:208:13: runtime error: applying zero offset to null pointer
    #0 0x5f5952 in refresh_ds flatcc/src/runtime/builder.c:208:13
    #1 0x60106c in flatcc_builder_start_table flatcc/src/runtime/builder.c:1099:5
    ...
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior flatcc/src/runtime/builder.c:208:13

I'm using flatcc master branch as of today, on Ubuntu Linux with clang-14.
The cmetrohash functions in particular appear to do some crazy bit trickery that is raising red flags in the sanitizers, also when using -fsanitize=address and  -fsanitize=integer. I assume this is tested, safe code. Do you have a policy for supporting, or not, this kind of error detection?

I haven't spent much time with sanitizers. I did look at leak detection, but there were too many false positives to be worthwhile.
cmetrohash is a widely used hash function, but some years old. I doubt it would cause any problems, but it can be trivially replaced by something else. I'm not sure it is worthwhile for flatcc, but if is very important in your project, you can just drop in another hash - I do have some you could test - possibly xxhash32 or xxhash64. Generally the issue is how words a loaded. They must be cast to char * and/or memcpy into a target word - I haven't looked at the metrohash code.
I did have a branch where I converted all runtime type casts to memcpy because this is formally the only portable way although flatcc uses union conversion which is also widely accepted and very unlikely to break. In the end it got too messy and there was a risk of poor performance on old compilers, so I dropped it.
I have not looked at all your locations, but the builder line 208 uses ds_ptr which is implemented as:
https://github.com/dvidelabs/flatcc/blob/5ff2e604a3e5a44d3885ff6887890c689b0a6b59/src/runtime/builder.c#L180-L181
So I am guessing that the sanitizers does not like pointer math in cases where the base pointer is a null pointer, which could happen after an allocation failure. That should be a non-issue if allocation checks are in place, which they should be. I'm not sure I want to rearchitect all of the flatcc to work around such issues.
Unaligned reads and writes are generally accessed through
https://github.com/dvidelabs/flatcc/blob/master/include/flatcc/portable/punaligned.h
And in runtime through
https://github.com/dvidelabs/flatcc/blob/master/include/flatcc/flatcc_accessors.h
As to reported locations in the builder: I suspect you will also find something in the verifier and in generated for reading buffers. These typically use the above accessor methods.
As to policy for flatcc, there are no firm rules, but guidelines are:

Code should be portable and reliable and not generally rely on undefined behavior - but eliminating all warnings on all compilers are not always practical - let alone sanitizers.
no tolerance for obnoxious compilers: that means gcc pendantic warnings are disabled, but enabled on clang.
If users contribute with safe meaningful tested improvements that are not all over the place, and which do not pose a major risk, they will usually be adopted - recently there were some integer sign conversion warnings by clang.
No plan for integrating sanitizers in main build - it might just break things on every compiler update for no good reason.

If you contribute fixes make sure to run scripts/test.sh.

Hi @mikkelfj, thank you for your reply, especially the clarification on your view on sanitisers. Different projects take different views on these things.
I will do some more investigations on my end. If there's a simple fix to the runtime issue then I'll submit a PR.

BTW: you experiment with cast to size_t in the pointer math macro. I think the type is already size_t, but who knows.

I am also seeing undefined behaviour from the lines
 #define T_ptr(base, pos) ((void *)((uint8_t *)(base) + (uoffset_t)(pos)))
 #define ds_ptr(pos) (T_ptr(B->buffers[flatcc_builder_alloc_ds].iov_base, (pos)))

in builder.c. Often an early exit or a ternary operator to check for null can prevent this.

Often an early exit or a ternary operator to check for null can prevent this.

But if the compiler cannot statically figure that there is no null pointer in the code, then a ternary will be a serious bottleneck, predictive branching or not.
There might of course be a bug where allocation is not checked properly, but otherwise I am not sure how to fix this. Basically the sanitizer is not smart enough, and the overhead of a runtime check at this location in the code is not acceptable. It is used everywhere, all the time.

@mikkelfj: What you're saying makes sense; however, this is a run-time issue, so a fix is only needed on the code path that gets us to the point I mentioned above. I should have provided this info from the get-go. Specifically, I the traceback I see is:
flatcc/src/runtime/builder.c:200:13: runtime error: applying zero offset to null pointer
    #0 0x7f8e226df652 in refresh_ds flatcc/src/runtime/builder.c:200
    #1 0x7f8e226e3fe5 in flatcc_builder_start_table flatcc/src/runtime/builder.c:1069

Printing the value of B->ds_first in refresh_ds shows that it sometimes has NULL as a value. So, I think:
    if(B->ds_first){
        B->ds = ds_ptr(B->ds_first);
        B->ds_limit = (uoffset_t)buf->iov_len - B->ds_first;
    }

is sufficient to ensure that this undefined behaviour doesn't occur.

I replaced a few
return B->ds + offset;

which were causing issues with
assert(B->ds != 0 || offset == 0); // If the data structure doesn't exist, offset should be zero
return B->ds ? B->ds + offset : NULL;

The assertion caused issues, so I commented it out.
This gets me to a new issue:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1746790==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x7f0d033b088e bp 0x7ffd2bae1250 sp 0x7ffd2bae0ea0 T0)
==1746790==The signal is caused by a READ memory access.
==1746790==Hint: address points to the zero page.
SCARINESS: 10 (null-deref)
    #0 0x7f0d033b088e in flatcc_builder_create_table flatcc/src/runtime/builder.c:1256
    #1 0x7f0d033b3021 in flatcc_builder_end_table flatcc/src/runtime/builder.c:1337

At this point I agree with the sanitizer that things are getting a little scary since null dereferencing can be used in DoS and privilege escalation attacks (link).

@r-barnes So you are saying the problem is (likely) here:
https://github.com/dvidelabs/flatcc/blob/5ff2e604a3e5a44d3885ff6887890c689b0a6b59/src/runtime/builder.c#L1274
when called from the function flatcc_builder_end_table?
I think I would need a minimum reproducible setup that works with clang 13.0.0 on MacOS, preferably with debug assertions added that highlight the problem before a sanitizer needs to raise an alert.
As to refresh_ds:
Maybe it is worth figuring that out first, because the second problem (in create_table) might be a consequence of ignoring the first (in refesh_ds).
Ah wait:
reading my own comment:
assert(B->ds != 0 || offset == 0); // If the data structure doesn't exist, offset should be zero
return B->ds + offset;

I think what happens here is that the code is optimized to return NULL if the ds stack is currently unallocated without having to do an extra runtime check. The offset should in this case be zero for this to work. This is what the assertion claims, and since the assertion presumably does not kick in if people are using this in debug builds, that is correct so far.
However It is not valid to add zero to a null pointer, and this is what the sanitizer complains about.
I am curious why the assertion causes problems? What is it doing wrong? Or is it in fact raising an assertion because the invariant has been broken?
If I remember correctly, refresh_ds is not called very often. I think it it reserves some space on a stack with enough space to handle a single table without additional checks, so likely called about once per table.
In contrast ds_ptr is used all the time.
So I don't yet have an answer to how to fiks this without a performance penalty, but I am open to suggestions.
One solution might be:
return (uint8_t *)((size_t)B->ds + (size_t)offset); /* Cast to avoid UB warning on zero added to NULL. */

This also makes it unlikely to cause the second problem in create_table.

To the original issue:
#define T_ptr(base, pos) ((void *)((uint8_t *)(base) + (uoffset_t)(pos)))

This can likely be fixed using
#define T_ptr(base, pos) ((void *)((size_t)(base) + (size_t)(uoffset_t)(pos)))

or
#define T_ptr(base, pos) ((void *)((size_t)(uint8_t *)(base) + (size_t)(uoffset_t)(pos)))

So I don't recall all details, but I think it is worth noting for context, that the builder operates on a number of small stacks and other temporary. Pointers are avoided because these stacks may have to be reallocated. This is why offsets are being added in T_ptr and other places. Not all of these datastructures are necessarily required and may remain unallocated until required which happens via a "is there enough space on stack" check. By adding zero offsets to unused stacks some special cases can be avoided.
Historically: I think some stacks are now allocated with a minimum size even though not required because it became too tedious to deal with, but that was kind of a lazy hack to avoid making the code robust against special cases that were not properly handled.
This comment does not relate to the issue at hand directly, it is just to help provide some insights for anyone contributing.

I'm worried your proposed casting solution might sweep a real problem under the rug.
I actually added the assertion
assert(B->ds != 0 || offset == 0); // If the data structure doesn't exist, offset should be zero

to highlight the problem. If it were always the case that B->ds being null meant the offset being added was 0, then things would be fine. As it is, sometimes B->ds is null and the offset is not zero. This is problematic.
If I change CMakeLists.txt to include
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")

then the run the tests, I do see undefined behaviour. I'll open a reproducing PR.

#237 adds the undefined behaviour sanitizer to the Debug build mode and fixes the three instances of undefined nullptr math this reveals. This fixes the UBN issue in both flatcc's test suite as well as my internal one.
I do see instances of misaligned address loads that I'm not sure how to fix.

As it is, sometimes B->ds is null and the offset is not zero. This is problematic.

Yes it is.

I'm worried your proposed casting solution might sweep a real problem under the rug.

Not if assertions are in place.
Thanks for adding PR, I'll have a look.

I do see instances of misaligned address loads that I'm not sure how to fix.

Can you detail more?
Generally FlatBuffers should be aligned, but the issue could also originate in the compiler source. I already mentioned how unaligned are handled in the portable library in my first comment to this issue. Maybe you are hitting the Metrohash issue that OP mentioned? We can add xxhash if important and if it helps.

The misaligned loads I'm seeing look similar to OP's. There are many, but they are all similar to:
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/rick/projects/contributing/flatcc/external/hash/cmetrohash.h:67:22 in
[50/122] Running utility command for gen_monster_test_json
/home/rick/projects/contributing/flatcc/external/hash/cmetrohash.h:57:22: runtime error: load of misaligned address 0x559822b944ee for type 'uint64_t' (aka 'unsigned long'), which requires 8 byte alignment
0x559822b944ee: note: pointer points here
 6e 75 6d 20 46 72  6f 6d 49 6e 63 6c 75 64  65 3a 6c 6f 6e 67 20 7b  20 49 6e 63 6c 75 64 65  56 61
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/rick/projects/contributing/flatcc/external/hash/cmetrohash.h:57:22 in
/home/rick/projects/contributing/flatcc/external/hash/cmetrohash.h:67:22: runtime error: load of misaligned address 0x559822b944c1 for type 'uint16_t' (aka 'unsigned short'), which requires 2 byte alignment
0x559822b944c1: note: pointer points here
 72 69 62  75 74 65 22 3b 0a 0a 6e  61 6d 65 73 70 61 63 65  20 4d 79 47 61 6d 65 2e  4f 74 68 65 72
              ^

If you clone https://github.com/r-barnes/flatcc and run
mkdir build
cd build
CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=Debug ..
make

That should reproduce them (at least with clang-14).

@r-barnes Thanks, as you can see in above reference there is a new issue with link time optimizations (LTO) affecting either in cmetrohash or in interfacing code. I added a tmp. hash branch where xxhash can be used for experimentation, but it is not integrated. You are welcome to also give it a go if you like.

I just made a comment that changes the line mentioned earlier:
#define T_ptr(base, pos) ((void *)((uint8_t *)(base) + (uoffset_t)(pos)))
such that it casts to size_t before summing, then to void *.
As to metrohash, I keep hearing about it but I don't get any warnings even though the sanitizer flag is now added to debug as per input from @r-barnes in separate PR.
I tried the branch  https://github.com/r-barnes/flatcc and build it as described above.
There are some new warnings as errors that needs to be fixed, and have been on the flatcc master branch (unused assignment, main() vs main(void)), but I get nothing on cmetrohash.
This is with clang 15 on MacOS arm64, but the change I made with the sanitize flag on the master branch has also been running many other clang versions.
metrohash can be replaced with xxhash if it makes a difference, but currently I cannot reproduce.

I'm closing this as I cannot reproduce and got no feedback. It may be that the hash gets updated as some point.


Fix typo "the it" to "it"

@cicovica : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Looks good. @cicovica Thanks for this typo fix.


Update config.yml

pip install requirements.txt won't work, the -r is required.

They fixed this themselves, it appears.  Without paying attention to the PR.
Also, the settings forces sqlite but the circle.yml implies that postgres works, so even that is broken/misleading/inconsistent (like the rest of the docs)
I think CircleCI is now a single person company, everything is equally half baked.


evaluation metrics

I am glad to find this project, but I would like to ask if there are some evaluation metrics for offline reinforcement learning (cuz in some cases there is no available env), such as OPE, init value, soft opt score, etc.

Hi,
Here, unfortunately, we do not provide implementations for OPE metrics. However, there seems to be a good set of implementations from the "Empirical Study of Off-Policy Policy Evaluation for Reinforcement Learning" paper. As for the Soft-OPC, you can checkout an implementation in d3rlpy.
If you have any more questions, please, let us know.


added Slack integration

Should hopefully resolve #50. However unit tests and exception handling were not instituted.

I'll have to write some unit tests for the extension, I'll get to that either tomorrow or Thursday. Also, since create_game in league/dashboard/views.py invokes the messenger, we'll need to deal with that in the tests as well.

Tbh I'm not sure there's sufficient local complexity to warrant unit tests, nor do we have a convenient or practical option for testing it end-to-end with the Slack API. If/when we start to have more complex local logic we can add unit tests.

(However, if you'd like to add a simple test just to make sure you can instantiate it with a test app, that's fine)

Re: existing tests, we shouldn't need to mock. Rather, I would add an additional setting for toggling slack notifications (SLACK_NOTIFICATIONS_ENABLED or similar) and set it to False in the TestConfig.

Btw I'm not sure why Travis isn't bubbling up the test failures to the PR status, I'll try to fix that

I fixed Travis. If you pull upstream/master and rebase this, we should be able to see correct test status.

@wisygig it looks like you rebased master onto your branch... should be the other way round

actually I'm not sure what you did, but my commits should not be showing here

remote: Counting objects: 16, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 16 (delta 5), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (16/16), done.
From github.com:massgo/league
 * branch            master     -> FETCH_HEAD
   2de77c5..a6e3c17  master     -> upstream/master
Merge made by the 'recursive' strategy.
 travis-scripts/test.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
$ git rebase
First, rewinding head to replay your work on top of it...
Applying: Add dummy test
Applying: Fix test script
Applying: Fix script again
Applying: Remove dummy test
Applying: changes```

This basically looks good. I'm going to test manually before releasing of course :)


Add Jekyll Tailwind Starter

@huphtur for future reference please make sure to add your links at the bottom of the list. It's a first come first serve basis.

Apologies. Want me to do a quick PR to move to bottom?

No that's alright.


Add new NetIf variant to NatResolver for IP resolution via network interface

Closes https://github.com/paradigmxyz/reth/issues/10832

Hey @emhane could you PTAL again, thanks!

clippy unrelated


[BUG] in sample: firebase function (2nd generation)

Which sample has a bug?
Sample name or URL where you found the bug
https://github.com/firebase/functions-samples/blob/539345b1d7b3af7a7fd4fadaa54255329bdff3e3/2nd-gen/callable-functions/functions/index.js#L17
const {onCall, HttpsError} = require("firebase-functions/v2/https");
How to reproduce the issue
Not sure how this can be reproduced: previous versions of same code had been deployed and currently in production. This started randomly.
Tl:Dr:

I have a few firebase functions (2nd generation) currently being tested in production
I deployed several iterations of one of the functions already
Then I refactored some code, tried re-deploying again, and suddenly, onCall imported from firebase-functions/v2/http stopped working

Failing Function code used (if you modified the sample)
Current code in production (and working) has onCall imported as a named import this way:
import {HttpsError, onCall} from "firebase-functions/v2/https"
After the deployment failure started, I fell back to using require as shown in the example I posted above. i.e.
const {onCall, HttpsError} = require("firebase-functions/v2/https");
Basic structure of what I have in production:
import * as admin from "firebase-admin";
import {HttpsError, onCall} from "firebase-functions/v2/https"
import {CallableRequest} from "firebase-functions/lib/common/providers/https";
import {APIRequestPayload} from "./typeDef"; //some custom type definition

exports.myfunctionname = onCall({
  enforceAppCheck: true,
  secrets: ["A_SECRET_I_USE"],
  region: "us-east1",
  cpu: 2,
  concurrency: 500,
  maxInstances: 15,
}, async (incomingData: CallableRequest) => {

  const data: APIRequestPayload = incomingData.data;
  const secretVariable = process.env.A_SECRET_I_USE;

//
** some code logic
//

      if(someError) {
                    throw new HttpsError("internal", "Something went wrong");
          }

           return {codeLogicResult: somecodeprocessingresult}
})

Steps to set up and reproduce

Write a basic function
Run npm run deploy from the function folder

Debug output
Errors in the
console logs
Error: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/v2/providers/https' is not defined by "exports" in /Users/myuser/path_to_function_folder/functions/node_modules/firebase-functions/package.json
Screenshots

Expected behavior

Function should be deployed when npm run deploy is run from the cli as per documentation
Actual behavior

Function fails to deploy with the error message above

Did you figure this out?
I'm having exactly the same error, tried reinstalling all dependencies, updating to newest version, nothing works...

Did you figure this out?
I'm having exactly the same error, tried reinstalling all dependencies, updating to newest version, nothing works...

Apparently Google randomly reduces quotas for projects at their discretion. Went through GCP, Cloud Run to be specific, to figure out the new quota limit. Closer look showed me the limits are per region, so my workaround is to deploy to different regions. Figure out your limit per region and plan your development accordingly, choosing regions with best performance for your performance-needing endpoints, and deploying other lower priority endpoints elsewhere.
This is not sustainable though when you have so many endpoints to maintain. AWS will be the way to go once you prove product feasibility as they're more straightforward and responsive.