W3C references not fetching

From @manuel489  in https://github.com/metanorma/mn-samples-ogc/pull/107

But the W3C references seem not to fetch anything.

e.g.
* [[[html5,1]]], W3C: *HTML5*, W3C Recommendation, 2019 http://www.w3.org/TR/html5/

I think the reference should be:
 * [[[W3C HTML5,1]]], W3C: *HTML5*, W3C Recommendation, 2019 http://www.w3.org/TR/html5/

the relaton needs a prefix W3C to recognize a document type.

@andrew2net
In fact, the format that I'm using is:
* [[[html5,W3C html5]]], W3C: *HTML5*, W3C Recommendation, 2019 http://www.w3.org/TR/html5/

I also tested it on this way:
* [[[html5,W3C HTML5]]], W3C: *HTML5*, W3C Recommendation, 2019 http://www.w3.org/TR/html5/

(Which I think is what you meant to say.)
And I get an error message:
...
[relaton-ietf] ("RFC 7946") fetching...
[relaton-ietf] ("RFC 7946") found RFC 7946
[relaton-w3c] ("W3C HTML5") fetching...
C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.0/lib/relaton_w3c/scrapper.rb:43:in `fetch_title': undefined method `text' for nil:NilClass (NoMethodError)
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.0/lib/relaton_w3c/scrapper.rb:24:in `parse_page'
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.0/lib/relaton_w3c/hit.rb:12:in `fetch'
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.0/lib/relaton_w3c/w3c_bibliography.rb:29:in `get'
...

@manuel489 fixed the error in the version 1.3.1

Thanks, since it's fixed, @manuel489 can you help run bundle update and retry?

Ok, I have tested these following references:
[bibliography]
== References
* [[[html5,W3C HTML5]]]
* [[[dwbp,W3C dwbp]]]
* [[[dcat,W3C vocab-dcat]]]

and got this message,
[relaton-w3c] ("W3C HTML5") fetching...
[relaton-w3c] ("W3C HTML5") found HTML5
Bibliography: ERROR: No document identifier retrieved for W3C HTML5
[relaton-w3c] ("W3C dwbp") fetching...
[relaton-w3c] ("W3C vocab-dcat") fetching...
Crossreferences: (XML Line 000342): iso19101 does not have a corresponding anchor ID in the bibliography!
...

and this output:

Even though an "error" message appeared for W3C HTML5, it did fetch something. Nonetheless, nothing is fetched for W3C dwbp and W3C vocab-dcat. Maybe I'm not using the correct identifier for those references. @andrew2net , what do you think?

[relaton-w3c] ("W3C HTML5") fetching...
[relaton-w3c] ("W3C HTML5") found HTML5
Bibliography: ERROR: No document identifier retrieved for W3C HTML5

@manuel489 this error isn't from relaton. I think the metanorma expects a document identifier, but there aren't any document identifiers to scrape. Maybe we can make a document identifier from a reference. What do you think @ronaldtse?

[relaton-w3c] ("W3C dwbp") fetching...
[relaton-w3c] ("W3C vocab-dcat") fetching...

these references should be "W3C Data on the Web Best Practices" and "W3C Data Catalog Vocabulary (DCAT)" respectively.

Crossreferences: (XML Line 000342): iso19101 does not have a corresponding anchor ID in the bibliography!

This message isn't from the relaton. I don't know what does it mean. Ping @ronaldtse @opoudjis.

@manuel489 this error isn't from relaton. I think the metanorma expects a document identifier, but there aren't any document identifiers to scrape. Maybe we can make a document identifier from a reference. What do you think?

@andrew2net yes I think we need to provide a document identifier. Let's just call it something like W3C {code-name}.

Crossreferences: (XML Line 000342): iso19101 does not have a corresponding anchor ID in the bibliography!
This message isn't from the relaton. I don't know what does it mean.

I think it means that there is no anchor ID set in the bibliography item, i.e. * [[[anchorID,name]]], anchorID is missing.

Even though an "error" message seems to appear for W3C HTML5, it did fetch something. Nonetheless, nothing is fetched for W3C dwbp and W3C vocab-dcat. Maybe I'm not using the correct identifier for those references. @andrew2net , what do you think?

These errors are raised after the relaton fetch a document, by the other gem.
Looks like in the references you use the form of a shortcut of documents title, but the relaton-w3c search documents in a YAML file with only full titles. I.e. dwbp is a shortcut of a "Data on the Web Best Practices" title. The shortcut only appears in the document page link https://www.w3.org/TR/2017/REC-dwbp-20170131/. So we could implement searching by a shortcut.
@ronaldtse what do you think? Do we need it?

@andrew2net yes I think we need to provide a document identifier. Let's just call it something like W3C {code-name}

@manuel489 what is {code-name}? Could you give an example?

{code-name} is like REC-dwbp-20170131 or REC dwbp.

Looks like in the references you use the form of a shortcut of documents title, but the relaton-w3c search documents in a YAML file with only full titles. I.e. dwbp is a shortcut of a "Data on the Web Best Practices" title. The shortcut only appears in the document page link https://www.w3.org/TR/2017/REC-dwbp-20170131/. So we could implement searching by a shortcut.

Yes we should allow searching by shortcut (let's call this the docname or docid).

Crossreferences: (XML Line 000342): iso19101 does not have a corresponding anchor ID in the bibliography!
This message isn't from the relaton. I don't know what does it mean.

Probably this is not important because, when I performed the tests, I cut out half of the document content (including the bibliography, which is the last section) in order to compile faster.

implemented short reference and parsing docidentifier in v 1.3.2

@andrew2net, I tested other W3C references:
[bibliography]
== References

* [[[html5,W3C HTML5]]]

* [[[dwbp,W3C dwbp]]]

* [[[dcat,W3C vocab-dcat]]]

* [[[w3cxml-0,W3C REC-xml]]], Extensible Markup Language (XML) 1.0 (Fifth Edition), W3C Recommendation, 26 November 2008, http://www.w3.org/TR/REC-xml

* [[[w3cxml-1,W3C xmlschema-1]]], XML Schema Part 1: Structures, http://www.w3.org/TR/xmlschema-1

* [[[w3cxml-2,W3C xmlschema-2]]], XML Schema Part 2: Datatypes, http://www.w3.org/TR/xmlschema-2

* [[[w3c,W3C REC-xml-names-19990114]]], Namespaces in XML, http://www.w3.org/TR/1999/REC-xml-names-19990114

and got this:
[relaton-w3c] ("W3C HTML5") fetching...
[relaton-w3c] ("W3C HTML5") found HTML5
[relaton-w3c] ("W3C dwbp") fetching...
[relaton-w3c] ("W3C dwbp") found Data on the Web Best Practices
[relaton-w3c] ("W3C vocab-dcat") fetching...
[relaton-w3c] ("W3C vocab-dcat") found Data Catalog Vocabulary (DCAT)
[relaton-w3c] ("W3C REC-xml") fetching...
[relaton-w3c] ("W3C REC-xml") found XML Signature Syntax and Processing Version 2.0
[relaton-w3c] ("W3C xmlschema-1") fetching...
C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.2/lib/relaton_w3c/w3c_bibliography.rb:30:in `get': undefined method `title' for nil:NilClass (NoMethodError)
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.2/lib/relaton_w3c/processor.rb:19:in `get'
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-1.3.0/lib/relaton/db.rb:180:in `new_bib_entry'
...

W3C xmlschema-1, W3C xmlschema-2, and W3C REC-xml-names-19990114 are not working. I tried several IDs..

This one is not working either:
* [[[W3C,W3C css-color-3]]], W3C: CSS3 Color, 2018. https://www.w3.org/TR/css-color-3/[https://www.w3.org/TR/css-color-3/]

Message:
...
[relaton-w3c] ("W3C css-color-3") fetching...
C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.2/lib/relaton_w3c/w3c_bibliography.rb:30:in `get': undefined method `title' for nil:NilClass (NoMethodError)
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-w3c-1.3.2/lib/relaton_w3c/processor.rb:19:in `get'
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-1.3.0/lib/relaton/db.rb:180:in `new_bib_entry'
        from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/relaton-1.3.0/lib/relaton/db.rb:156:in `check_bibliocache'
...

@manuel489 fixed these errors in version 1.3.3

Thanks @andrew2net !


fix(tools): Update createStepFile function in new curriculum helper sript

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[x] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

This PR updates two helper script utility functions to use the new challenge file format.

@RandellDawson since this adds a bit to the parser, let me know when you're happy with it and I'll clean up the commits.


Reinstate CRAN snapshots for frozen images

Posit Package Manager 2023.08.0
September 07, 2023
New
[...]

Adds support for serving precompiled binary packages for Debian 11 (Bullseye) and Debian 12 (Bookworm).

[...]

– Release Notes - Posit Package Manager 2023.08.0

Thank you @RStudio / Posit (@jjallaire) for adding Debian precompiled binary packages to the public Posit Package Manager.

Will be available for R versions ≥ 4.3.1.


Added frei0r plugins and some minor changes

frei0r is more commonly being requested alongside vidstab (for people stabilizing and de-fisheying wide angle video, and the dozens of other useful frei0r filters), so I added it. Unfortunately I don't know of a way for it to be statically compiled so I did kind of the next best thing (that I know of) here.  If you know of a better way, please let me know! :)
(I omitted the OpenCV dependency for frei0r for now, as it is only needed for certain face detection functions.)

Pulling this for now, fixing some bugs and adding other things. Also, if you don't want this stuff added, lmk and I'll just start fresh and give you credit :)

Hi rtgoodwin, thanks for your contribution. I think you are right, frei0r cannot be compiled statically. I think  the best way would be to add a flag like "--with-nonstatic-plugins" to the build script which will than include extensions like this one.


update all deps

update all deps
used the following commands:
npm run lerna -- exec -- npm update
npm run clean
npm install

to merge after release

this PR is too old and needs to be re-created


All controls are un-hidden when any control is selected.

Hey, great module!
I'm running v9. Editing controls works as expected, and they are successfully hidden. Once any other control is selected, however, all hidden controls are revealed.
https://user-images.githubusercontent.com/26096062/159151514-9f772ef1-6d09-4655-8fd0-ee0d02a4a2d6.mp4

Yeah, I have noticed this, as well. The left column seems to remember hide settings, but the right column doesn't.

I'm having the same issue. I'd like to suggest, as a solution for v9, abandon the dev and prod tabs and implementing keyboard shortcuts, to switch between the two. The configuration of what to show or hide could be done via module configuration. Thanks for your work so far!

Can you try the new vesion and see if it is fixed?

Perfect to me! Thank you!

It's worse than before for me. When you go into edit mode, right click makes it look like things will be hidden, but when you confirm your changes, the UI doesn't change at all - controls stay in the "white" mode rather than being hidden, and if you click another control tab, your changes are lost.

I had this same problem, bit with me it was incompatibility with the Narrator Tools module

I had this same problem, bit with me it was incompatibility with the Narrator Tools module

I don't have that module, but I will see if another module is the issue later today.

Seems to work for me now, but I haven't really tested all the permutations. Thanks for working on this.

appears to be a compatibility issue with Combat Carousel. I've disabled that for now, but would love for that to be fixed.

I'll close this issue because it was a module incompatibility which was fixed.
If the issue persists just open a new issue.


Limit not working? Rate Limit not honored as the Request Volumes Increase

I set the rate limit at 3 TPS. When I send 4 TPS, it works and I see 3TPS rate honored. However, when I put this into production, as the volumes go up, 3 TPS begins to break.
AT 10 TPS INPUT, I see ~4 TPS getting through the rate limiter.
AT 40 TPS INPUT, I see ~6 TPS getting through the rate limiter.
Any help is appreciated.

var limiter = require('express-limiter')(router, client);
limiter({
path: '/',
method: 'post',
onRateLimited: function (req, res, next) {
next({ message: 'Rate limit exceeded', status: 429 })
},
lookup: function(req, res, opts, next) {
opts.lookup = 'headers.id';
opts.total = 3; // 1 TPS
}
return next();
},
expire: 1000  // (1 seconds)
});

This package uses Get/Set approach, which is vulnerable on high traffic. Similar vulnerability was found on express-brute package.
rate-limiter-flexible package implements atomic increments.


Add new edu file

Add marmara university

here is the university web page:
https://www.marmara.edu.tr/en

@EralpN I am sorry, the domain marun.edu.tr is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


add evaluation frameworks LangSmith and Ragas

Description
Added a few frameworks (LangSmith and Ragas) to help on LLM evaluation tasks.

Appreciate!


Wireshark Bluetooth Dissector

Unable to view opendroneid protocol with BT. Cannot select protocol to decode as. Using NRF52840. Appears as LE LL. Dissector and sniffer installed per instructions.
Sample output, maybe "Wireshark Lua fake item" is indicative of issue?

Personal Lua Plugin Path:

Repo cloned to directory:

The protocol is enabled:

Appears in plugins:

Results are the same with default configuration profile.
Issue encountered on both win10 (WS 4.0.1) and macos 10.14 (WS 3.4.8)
Please advise.

@dkempr  Can you elaborate on your solution? I am also using the NRF52850 dongle with the nrf sniffer firmware. I have the latest dissector installed and I see packets but they're not being detected as OPENDRONEID. I am testing using the transmitter-linux example
sudo ./transmit 5 p


feat(diagnose): aliases, plurals and fully qualified names for resources to check

fixes #43
Signed-off-by: Xavier Coulon<EMAIL_ADDRESS>

Codecov Report

Merging #44 (69c32c7) into main (97e5451) will increase coverage by 1.01%.
The diff coverage is 95.12%.

@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
+ Coverage   72.99%   74.00%   +1.01%
==========================================
  Files           9        9
  Lines         574      604      +30
==========================================
+ Hits          419      447      +28
- Misses        108      110       +2
  Partials       47       47

Impacted Files
Coverage Δ

pkg/diagnose/diagnose.go
70.31% <94.44%> (+20.31%)
:arrow_up:

test/fake_api_server.go
79.46% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Enums as method parameters should have default documentation

The first sentence of an enum as a method parameter should start with:

One of the <see cref="EnumType" /> enumeration members
One of the <see cref="EnumType" /> enumeration members that

The phrase to be checked is One of the enumeration members that


benches: include debuginfo for codspeed / flamegraphs

Changes the bench profile so that debug info is included, which should allow codspeed benchmarks to gather execution traces...

Well, this didn't seem to make a difference to the traces codspeed captured, so I'll close for now. Sorry for the noise.


fix: update the get org from url function to include other chars

Description
The old get_org_from_course_url function was not working correctly as it was omitting text that included some of the following chars: -~.:%
We are using the deprecated version as it's a superset of the actual version and it will allow us to support very old courses
This was extracted from: https://github.com/openedx/opaque-keys/blob/e0ee525df4395f3795501fdc3a75a7ecdbedcb1f/opaque_keys/edx/locator.py#L46-L47

Thanks for the pull request, @Ian2012!  Please note that it may take us up to several weeks or months to complete a review and merge your PR.
Feel free to add as much of the following information to the ticket as you can:

supporting documentation
Open edX discussion forum threads
timeline information ("this must be merged by XX date", and why that is)
partner information ("this is a course on edx.org")
any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.
Please let us know once your PR is ready for our review and all tests are green.

Note that this doesn't fix any existing incorrectly parsed org keys. We don't think any are in the wild, but worth calling out.

@Ian2012 🎉 Your pull request was merged!  Please take a moment  to answer a two question survey so we can improve your experience in the future.


Configuration Help

Describe your desired configuration
First of all really great job on the project, had it working earlier, but my old config was lost during a pc reset and I somehow cant get it working again and would appreciate your help :D
I have 1 controller with 5 devices attached (1 Pump, 4 fans).
Desired config would be the following curve:
35°C -> 20%
45°C -> 100%
For the effect the RazerChroma integration would be nice.
Would really appreciate your help, its a great project
Hardware info
Controllers
-------------------------------
»
»  Name: Riing Plus
»        VendorId: 9802
»        ProductId: 8116
»        Ports:
»                1:
»                        Data: [PortId: 1, Speed: 50, Rpm: 886, Unknown: 255]
»                        Identifier: [9802, 8116, 1]
»                2:
»                        Data: [PortId: 2, Speed: 50, Rpm: 871, Unknown: 255]
»                        Identifier: [9802, 8116, 2]
»                3:
»                        Data: [PortId: 3, Speed: 50, Rpm: 885, Unknown: 255]
»                        Identifier: [9802, 8116, 3]
»                4:
»                        Data: [PortId: 4, Speed: 50, Rpm: 0, Unknown: 255]
»                        Identifier: [9802, 8116, 4]
»                5:
»                        Data: [PortId: 5, Speed: 100, Rpm: 1114, Unknown: 255]
»                        Identifier: [9802, 8116, 5]
»        Available effect types: Flow_Extreme, Flow_Fast, Flow_Normal, Flow_Slow, Spectrum_Extreme, Spectrum_Fast, Spectrum_Normal, Spectrum_Slow, Ripple_Extreme, Ripple_Fast, Ripple_Normal, Ripple_Slow, Blink_Extreme, Blink_Fast, Blink_Normal, Blink_Slow, Pulse_Extreme, Pulse_Fast, Pulse_Normal, Pulse_Slow, Wave_Extreme, Wave_Fast, Wave_Normal, Wave_Slow, PerLed, Full
»
-------------------------------
Sensors
-------------------------------
»
»  Intel Core i7-4790:
»        Temperature:
»                CPU Core #1 (/intelcpu/0/temperature/0): 39,0 °C
»                CPU Core #2 (/intelcpu/0/temperature/1): 39,0 °C
»                CPU Core #3 (/intelcpu/0/temperature/2): 44,0 °C
»                CPU Core #4 (/intelcpu/0/temperature/3): 41,0 °C
»                CPU Package (/intelcpu/0/temperature/4): 44,0 °C
»
»  NVIDIA GeForce GTX 970:
»        Temperature:
»                GPU Core (/nvidiagpu/0/temperature/0): 27,0 °C
»
»  KINGSTON RBU-SMS100S360GD:
»        Temperature:
»                Temperature (/hdd/0/temperature/0): 41,0 °C
»
»  WDC WD10EZEX-21M2NA0:
»        Temperature:
»                Temperature (/hdd/1/temperature/0): 35,0 °C

Current configuration
  "Profiles": [
    {
      "Name": "Default",
      "Guid": "20af9207-7e67-4581-9d13-506cad5d53c1",
      "Ports": [
        [9802, 8116, 1],
        [9802, 8116, 2],
        [9802, 8116, 3],
	[9802, 8116, 4],
	[9802, 8116, 5]
      ],
      "SpeedControllers": [
        {
          "Type": "PwmSpeedController",
          "Config": {
            "CurvePoints": [
              [35, 0],
              [45, 100]
            ],
            "Sensors": ["/nvidiagpu/0/temperature/0"],
            "MinimumChange": 4,
            "MaximumChange": 8,
            "Trigger": {
              "Type": "AlwaysTrigger"
            }
          }
        }
      ],
      "Effects": [
        {
          "Type": "FullColorEffect",
          "Config": {
            "Color": [0, 0, 139],
            "Trigger": {
              "Type": "OneTimeTrigger"
            }
          }
        }
      ]
    }
  ],
  "ComputerStateProfiles": [
    {
      "StateType": "Shutdown",
      "Ports": [
        [9802, 8116, 1],
        [9802, 8116, 2],
        [9802, 8116, 3],
	[9802, 8116, 4],
	[9802, 8116, 5]
      ],
      "Speed": 35
    }
  ],
  "SensorConfigs": [
    {
      "Sensors": ["/nvidiagpu/0/temperature/0"],
      "Config": {
        "CriticalValue": 90
      }
    }
  ]
}

I can't find anything wrong with the config, I think you were just missing the main {} brackets.
Some notes on the config tho:

You are using only the gpu sensor to control the fans, most of the time the gpu is almost not used so your cpu can be at 90C but the fans will not respond. To fix:

Switch to cpu sensor
Or, add the cpu sensor to the Sensors array and use SensorMixFunction.Max to select the highest sensor value
Or, split cpu/gpu fans to two profiles

I dont think you can control the pump speed, port 4 does not report rpm so I assume that is the pump. If you can feel/hear the pump speed changing with the fans I would move it to a separate profile and set a different curve profile so the pump does not go below 30-50%, or set it to always 100%.
Setting the fans to 0% can be quite dangerous if the temperature will fluctuate between 35-36C because the fans have a minimum operating speed of 20%. So at 35C they will be set to 0%, but at 36C at 20%, that might add wear to the fans.

This config should work:
{
  "Profiles": [
    {
      "Name": "Default",
      "Guid": "20af9207-7e67-4581-9d13-506cad5d53c1",
      "Ports": [
        [9802, 8116, 1],
        [9802, 8116, 2],
        [9802, 8116, 3],
        [9802, 8116, 4],
        [9802, 8116, 5]
      ],
      "SpeedControllers": [
        {
          "Type": "PwmSpeedController",
          "Config": {
            "CurvePoints": [
              [35, 0],
              [45, 100]
            ],
            "Sensors": ["/nvidiagpu/0/temperature/0"],
            "MinimumChange": 4,
            "MaximumChange": 8,
            "Trigger": {
              "Type": "AlwaysTrigger"
            }
          }
        }
      ],
      "Effects": [
        {
          "Type": "RazerConnectEffect",
          "Config": {
            "Trigger": {
              "Type": "AlwaysTrigger"
            }
          }
        }
      ]
    }
  ],
  "ComputerStateProfiles": [
    {
      "StateType": "Shutdown",
      "Ports": [
        [9802, 8116, 1],
        [9802, 8116, 2],
        [9802, 8116, 3],
        [9802, 8116, 4],
        [9802, 8116, 5]
      ],
      "Speed": 35
    }
  ],
  "SensorConfigs": [
    {
      "Sensors": ["/nvidiagpu/0/temperature/0"],
      "Config": {
        "CriticalValue": 90
      }
    }
  ]
}

wow that was fast :D, the config is working now, awesome stuff!
Yeah, i have two loops, one for the GPU thats used mainly for rendering videos and one seperate for the CPU, so the GPU sits either around 20 in idle or around 50 when in action thats why I´d like the fans completely off when im working.
And yes port 4 is the pump, but its not hooked up to a PWM and always runs the same speed.
Great project, I love it :3


Does not replace the 'Callback' method from Moq

For the given code snippet, there is no support to replace the '.Callback' method with the NSubstitute equivalent.
_mockAuditLog .Setup(l => l.Add(AuditLevel.Information, It.IsAny(), null, It.IsAny(), It.IsAny<object[]>())) .Callback<AuditLevel, AuditAction, Exception, string, object[]>((l, a, ex, msg, args) => { _action = a; Message = msg; _args = args; });

Also, this should cover exceptions:
I'm not sure if this issue should also cover exceptions, since they use callbacks for void methods:
https://nsubstitute.github.io/help/throwing-exceptions/
moq:
mock(x => x.Method(It.IsAny())).Throws();
NSubstitute:
mock.When(x => x.Method(Arg.Any())).Do(call => { throw new Exception(); });


Trouble provisioning grafana-llm-app

Receiving the following message in Grafana logs:
logger=plugin.grafana-llm-app t=2024-05-31T20:42:26.774942632Z level=warn msg="Could not get LLM Gateway URL from config, the LLM Gateway support is disabled" logger=plugin.grafana-llm-app t=2024-05-31T20:42:26.774987423Z level=warn msg="Unable to get service account token" err="PluginAppClientSecret not set in config"
I have the following provisioned:
  - type: 'grafana-llm-app'
    disabled: false
    jsonData:
      openAI:
        url: https://api.openai.com
    secureJsonData:
      openAIKey: ${OPENAI_API_KEY}

I'm trying to run this in Grafana OSS 11.0.0 with plugin version 0.10.4.

Hi @chewrocca - just to check, is the LLM app actually not working with those settings? That log line is just a warning which will be logged if Grafana isn't running the externalServiceAccounts feature toggle, but it shouldn't be a problem for normal usage.

Correct, it's not working.  Clicking "Auto-generate" doesn't seem to work as desired.

@sd2k are there different settings I should use for provisioning besides the settings I pasted?

@chewrocca could you try including something like this?:
  - type: 'grafana-llm-app'
    disabled: false
    jsonData:
      openAI:
        provider: openai
        url: https://api.openai.com
    secureJsonData:
      openAIKey: ${OPENAI_API_KEY}

i.e. the provider key? if not we may need to look for any relevant logs, either from the Grafana backend or frontend.

I made the changes you recommended and set Grafana to debug.  When I select "auto-generate," I do not get much information.
logger=plugin.grafana-llm-app t=2024-06-13T12:47:56.50883769Z level=debug msg="Creating new app instance"
logger=plugin.grafana-llm-app t=2024-06-13T12:47:56.508856821Z level=debug msg="Loading settings"
logger=plugin.grafana-llm-app t=2024-06-13T12:47:56.509235255Z level=warn msg="Could not get LLM Gateway URL from config, the LLM Gateway support is disabled"
logger=plugin.grafana-llm-app t=2024-06-13T12:47:56.509282566Z level=warn msg="Unable to get service account token" err="PluginAppClientSecret not set in config"

Any other ways to get more information for troubleshooting?

Hmm strange, none of those logs are problematic for your setup. We may need to go a level deeper.
Firstly, which browser are you using? I'm aware of some issues with Safari at least.
Secondly, which AI generation feature are you trying to use? You mentioned an 'Auto-generate' button, is that the panel name/description feature, Incident auto-summary, or something else?
Finally, do you see any more information in your browser's console, or in the network logs in your browser? You may be able to glean more information by looking at the websocket request to ws://localhost:3000/api/live/ws which is one of the first requests made by Grafana, as the streaming AI features go via this websocket connection.
Any more information you can provide will help - right now it feels like this should be working!

I was using Safari, and now I've tried Chrome with the same results.  I opened an issue with Grafana Support last month regarding issues with LLM and Safari.
I'm trying to use this feature in dashboards: panel titles/descriptions and general titles/descriptions.
I definitely feel like it feels like it should be working as well.  I will look into gathering more information from the browser side.

When I change the settings in https://grafana.example.com/plugins/grafana-llm-app in dev tools I'm seeing:
health:
{"details":{"openAI":{"configured":true,"models":{"base":{"ok":true},"large":{"ok":true}},"ok":true},"vector":{"enabled":false,"ok":false},"version":"0.10.4"},"message":"","status":"OK"}

settings:
{"name":"LLM","type":"app","id":"grafana-llm-app","enabled":true,"pinned":true,"module":"public/plugins/grafana-llm-app/module.js","baseUrl":"public/plugins/grafana-llm-app","info":{"author":{"name":"Grafana","url":""},"description":"Plugin to easily allow LLM based extensions to grafana","links":null,"logos":{"small":"public/plugins/grafana-llm-app/img/logo.svg","large":"public/plugins/grafana-llm-app/img/logo.svg"},"build":{},"screenshots":[{"name":"Configuration","path":"public/plugins/grafana-llm-app/img/screenshot-configuration.png"}],"version":"0.10.4","updated":"2024-05-16","keywords":["app","generative","AI","LLM","OpenAI","assistant"]},"includes":[],"dependencies":{"grafanaDependency":"\u003e=9.5.2","grafanaVersion":"*","plugins":[]},"jsonData":{"models":{"default":"base","mapping":{"base":"gpt-3.5-turbo","large":"gpt-4-turbo"}},"openAI":{"disabled":false,"organizationId":"","provider":"openai","url":"https://api.openai.com"}},"secureJsonFields":{"openAIKey":true},"defaultNavUrl":"","latestVersion":"","hasUpdate":false,"state":"","signature":"valid","signatureType":"grafana","signatureOrg":"Grafana Labs","angularDetected":false}

when I try to use auto-generate in the dashboards I'm getting:
Error: OpenAI stream timed out after 10000ms     at hooks.ts:156:17

Inside the container, I'm seeing traffic to api.openai.com:
15:53:02.794860 IP <IP_ADDRESS>.42712 > <IP_ADDRESS>.443: Flags [.], ack<PHONE_NUMBER>, win 501, options [nop,nop,TS val 125194766 ecr<PHONE_NUMBER>], length 0
15:53:02.795837 IP <IP_ADDRESS>.443 > <IP_ADDRESS>.42712: Flags [.], ack 1, win 8, options [nop,nop,TS val<PHONE_NUMBER> ecr 125164743], length 0

I've verified the token works using the token and the test commands here.
I changed the endpoint to something on my local laptop, and the bearer token matches what I'm putting in the configuration when I make a post.

I've attached a screen capture.  I'm not seeing anything in the network tab with ws selected when I try "auto-generate."
https://github.com/grafana/grafana-llm-app/assets/17680862/8cff8174-466a-4aae-bba3-d8498c7602c0

Ah that's actually expected; rather than making a new connection, the traffic flows over the existing connection to the /api/live/ws file - that connection is one of the first ones that Grafana makes on a page load, so you'd need to check activity on there instead.

Ugh.  Our configuration had GF_LIVE_MAX_CONNECTIONS = "0" Removing, which made this work in Chrome.  We're still having issues with Safari not working with LLM.
Thanks so much for your guidance and working through this with me.

:scream: ah that's quite frustrating, we should really document the dependency on Grafana Live for this. Sorry about that, glad to hear it's working in Chrome now. The Safari thing is a known issue already so I'll encourage the relevant team to follow up.

Ben will make a followup ticket around adding docs / adding to health check.


Use configured toolchain to build conan/vcpkg deps

Xmake Version
xmake v2.7.8+HEAD.87dff1e
Operating System Version and Architecture
macOS M1
Describe Bug
Use xmake f to configure the C and C++ compiler:
$ xmake f --cc=clang@/opt/homebrew/opt/llvm/bin/clang --cxx=clang++@/opt/homebrew/opt/llvm/bin/clang++

Install a package using xrepo and conan:
$ xrepo install "conan::benchmark 1.7.1"

conan tries to use the system toolchain instead of the toolchain configured previously:
benchmark/1.7.1: WARN: Package binary is corrupted, removing: d0999c277cf09f4a0197e19c267cfae17dd3d362
benchmark/1.7.1: WARN: Build folder is dirty, removing it: /Users/user/.conan/data/benchmark/1.7.1/_/_/build/d0999c277cf09f4a0197e19c267cfae17dd3d362
benchmark/1.7.1: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
CMake Error at /Users/user/.conan/data/cmake/3.26.3/_/_/package/cc471ed355602ffa7007968c83aa4e7e648a38b5/CMake.app/Contents/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler
    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++"
  is not able to compile a simple test program.
  It fails with the following output:
    Change Dir: /Users/user/.conan/data/benchmark/1.7.1/_/_/build/d0999c277cf09f4a0197e19c267cfae17dd3d362/build/Release/CMakeFiles/CMakeScratch/TryCompile-IOjjzU

    Run Build Command(s):/Users/user/.conan/data/cmake/3.26.3/_/_/package/cc471ed355602ffa7007968c83aa4e7e648a38b5/CMake.app/Contents/bin/cmake -E env VERBOSE=1 /opt/homebrew/bin/gmake -f Makefile cmTC_dcda1/fast && /opt/homebrew/bin/gmake  -f CMakeFiles/cmTC_dcda1.dir/build.make CMakeFiles/cmTC_dcda1.dir/build
    gmake[1]: Entering directory '/Users/user/.conan/data/benchmark/1.7.1/_/_/build/d0999c277cf09f4a0197e19c267cfae17dd3d362/build/Release/CMakeFiles/CMakeScratch/TryCompile-IOjjzU'
    Building CXX object CMakeFiles/cmTC_dcda1.dir/testCXXCompiler.cxx.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -D_GLIBCXX_USE_CXX11_ABI=0  -stdlib=libstdc++  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fPIE -MD -MT CMakeFiles/cmTC_dcda1.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_dcda1.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_dcda1.dir/testCXXCompiler.cxx.o -c /Users/user/.conan/data/benchmark/1.7.1/_/_/build/d0999c277cf09f4a0197e19c267cfae17dd3d362/build/Release/CMakeFiles/CMakeScratch/TryCompile-IOjjzU/testCXXCompiler.cxx
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    Linking CXX executable cmTC_dcda1
    /Users/user/.conan/data/cmake/3.26.3/_/_/package/cc471ed355602ffa7007968c83aa4e7e648a38b5/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_dcda1.dir/link.txt --verbose=1
if you want to get more verbose errors, please see:
  -> /private/var/folders/gw/ygflm0814f14b9r3fdt77dyh0000gn/T/.xmake501/230506/xrepo/working/build/.packages/c/conan_benchmark/1.7.1/cache/installdir.failed/logs/install.txt
error: install failed!
error: execv(xmake require -j 12 --extra={system=false} "conan::benchmark 1.7.1") failed(255)

Expected Behavior
Conan uses the toolchain configured via xmake f --cc ... to build packages.
Project Configuration
No response
Additional Information and Error Logs
No response

xmake f --cc=

It's used for the current project.
you can add add_requires to your project xmake.lua

xrepo install

xrepo is a standalone command and has nothing to do with the project or xmake f.
if you use xrepo install, you need define a toolchain file and switch toolchain.
xrepo install --includes=your_toolchain_conf.lua --toolchian=your_toolchain_name  zlib

Also, the conan package does not currently support switching toolchains, it only supports packages from the xmake-repo repository.

Thank you @waruqi
I have:
add_requires("conan::benchmark 1.7.1", {configs = {toolchain = "clang"}, alias = "benchmark"})

target("test")
    set_toolchains("clang")

    add_files("test.cpp")
    add_packages("benchmark")
target_end()

And conan is still trying to use /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Do I have to define a custom toolchain as documented here: https://xmake.io/#/guide/configuration?id=custom-toolchain ?

Also, the conan/vcpkg package does not currently support switching toolchains, it only supports packages from the xmake-repo repository.

Does that mean I cannot use {configs = {toolchain = "your_toolchain"}}) you specified above?

Also, the conan/vcpkg package does not currently support switching toolchains, it only supports packages from the xmake-repo repository.

Does that mean I cannot use {configs = {toolchain = "your_toolchain"}}) you specified above?

right, it is only for xmake package now.

Ok it works using xmake-repo. Thanks, closing this issue.


[HOLD #11768][$8,000] Page goes to home screen if press chat and refresh the page - reported by @phivh

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Launch the URL https://staging.new.expensify.com/
Log in with any account.
Open any chat
Refresh the page

Expected Result:
After page refresh user should stay on the chat conversation with recent user
Solution hints:
So if we break down the problem into steps considering https://github.com/Expensify/App/issues/8126#issuecomment-1103000322.
Manage the drawer state somehow https://github.com/Expensify/App/issues/8126#issuecomment-1103000322.
Able to navigate the state of the drawer via URL ?? (look at linkingConfig if you can find something).
we can think of A hybrid solution using react-navigation and Onyx.
Actual Result:
User redirected back to LHN
Workaround:
unknown
Platform:

Where is this issue occurring?

Mobile Web

Version Number: 1.1.42-2
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Linked to https://github.com/Expensify/App/issues/5027
https://user-images.githubusercontent.com/43995119/158106720-73d3cf1c-f2ad-4ddf-bcb7-047206d94cf6.mp4
Expensify/Expensify Issue URL:
Issue reported by: @phivh
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1646153934144159
View all open jobs on GitHub

Triggered auto assignment to @danieldoglas (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Seems like something related to the router.

Triggered auto assignment to @NicMendonca (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@NicMendonca I'm out for a couple days, wanted to make sure someone picks this up before then - just saw this was I was logging off for day 😅

Upwork job: https://www.upwork.com/jobs/~01c09e65fbbdd4bb12

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

I reported this issue earlier but it did not get any response then https://expensify.slack.com/archives/C01GTK53T8Q/p1643463262081129

Sorry but based on the Slack thread it was reported before your report.

Proposal
Make the drawer defaultStatus to closed on mWeb will prevent LHN to show. To make sure that this only applied to mWeb I add some condition below.
+    if (isSmallScreenWidth && Platform.OS === 'web') {
+        return 'closed';
+    }

https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L81-L86
Result
https://user-images.githubusercontent.com/25520267/158653896-ed899368-1c60-4eb4-8a90-2eb4cbaf2948.MP4

Thanks for the proposal @mollfpr. Could you please tell me what the would be the output of? LHN or report screen?

Open the App via localhost:8080 URL.
Do 1 and refresh.
Do 1 and click on any report, refresh the page.
Open the app via localhost:8080/r/anyreportid
Do 4 and refresh the app.
Do 4 and use the back arrow to go back to LHN and refresh the app.

@parasharrajat

It's open the recent report screen
It's staying on the report screen
Number 1 shows the recent report screen, so I press the back button and select another report list. After refresh is shown the recent report screen.
It's open the report screen from the attached reportID in the route
Still stay the recent report screen after refresh
Show the latest report screen shown

Could you please use LHN or report screen words in your prev reply? It is hard to understand what are you referring to.

@parasharrajat updated ^

Ok. Thanks.
The output should be:

LHN.
LHN.
Report screen.
Report screen.
Report screen.
LHN.

If the route is ‘REPORT_WITH_ID’ it should show the ‘report screen’ right? Even after you enter the base url with logged in account will redirect you to route ‘REPORT_WITH_ID’. 🤔

Yup. That is an issue. Currently, navigation is configured in a way that it always loads the report screen. we need a way to keep the user on LHN when user was on LHN before refreshing and vice-versa.

Any background story why the app redirect us to ‘REPORT_WITH_ID’ route in the first place?

WE load Drawer on Home route /r which will always load the first screen which is report screen /r/id. DefaultStatus controls whether we want to see closed(report screen) or opened(LHN). As you see the situation here is different we need to dynamically control this status.

Sorry but based on the Slack thread it was reported before your report.

@parasharrajat If I am not wrong I reported this on slack January 29th. And this one is on March 1st.

The original report was JAN 21. The attached slack thread reshares that bug report. let me know if I am missing something.

@mdneyazahmad Sorry bro, this bug has reported at Jan 21st. Please take. ;)

@phivh I am sorry. I missed the reference part. It is indeed JAN 21st.

@NicMendonca Could we please get this issue doubled? We are still awaiting and evaluating proposals

doubled price: https://www.upwork.com/jobs/~01c09e65fbbdd4bb12

doubled: https://www.upwork.com/jobs/~01c09e65fbbdd4bb12

doubled: https://www.upwork.com/jobs/~01c09e65fbbdd4bb12

Just it need to change the code
There are 2- one for refresh and other for chat

Proposal
Adding a new Onyx key IS_DRAWER_CLOSED_LAST_TIME to save the state of the drawer should be open or closed.
On src/libs/Navigation/Navigation.js watch the Onyx key value
let isDrawerClosedLastTime = false;
Onyx.connect({
    key: ONYXKEYS.IS_DRAWER_CLOSED_LAST_TIME,
    callback: val => isDrawerClosedLastTime = val,
});

Set ONYXKEYS.IS_DRAWER_CLOSED_LAST_TIME to false when the drawer is gonna be opened.
https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L56-L63
Set ONYXKEYS.IS_DRAWER_CLOSED_LAST_TIME to true when navigating to the report route.
https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L143-L146
The last thing to do is determined should the drawer state opened or closed on mWeb.
    if (isSmallScreenWidth && Platform.OS === 'web') {
        return isDrawerClosedLastTime ? 'closed' : 'open';
    }

https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L81
Result

Open the App via localhost:8080 URL.

https://user-images.githubusercontent.com/25520267/164077698-56b9e1e3-4e21-4dad-a453-450f99351c0b.mov

Do 1 and refresh.

https://user-images.githubusercontent.com/25520267/164077791-f977f0cc-2019-4489-96a3-1fee6fa0160d.mov

Do 1 and click on any report, refresh the page.

https://user-images.githubusercontent.com/25520267/164077881-70f83e35-f0e1-47d5-9e33-e243e24d7574.mov

Open the app via localhost:8080/r/anyreportid

https://user-images.githubusercontent.com/25520267/164078297-410da91b-c78e-4b49-84a2-4b0dd823c69c.mov

Do 4 and refresh the app.

https://user-images.githubusercontent.com/25520267/164078504-033131b0-12fd-4c08-9a5b-9c08b0a6ac3e.mov

Do 4 and use the back arrow to go back to LHN and refresh the app.

https://user-images.githubusercontent.com/25520267/164078515-b6f983e4-742b-4a89-bfb0-521171ca986b.mov

Cases that you presented should be working already. What we need is that

When user is on LHN and refreshes the page, it should open LHN.
when user is on report page, and refreshed the app, it should open the reportscreen.

Cases that you presented should be working already. What we need is that

When user is on LHN and refreshes the page, it should open LHN.
when user is on report page, and refreshed the app, it should open the reportscreen.

Is the above case the same as https://github.com/Expensify/App/issues/8126#issuecomment-1103000322 result number 2 and 5?
Btw when a user is currently on LHN and opening the app with localhost:8080/r/reportid what is the expected result here? Should stay on LHN or report screen?
And when a user is currently on the report screen and they open the app with localhost:8080 should it open LHN or report screen?

let's forget the opening of the App for a moment. First, these should work. So user should land on the same page when he *refreshes the page whatever url is.
Using localhost:8080 should open the Home page which is LHN.

I just check the URL path from the home screen which / is always navigated to / and then /r/reportid, whether we refresh the page from localhost:8080 or localhost:8080/r/reportid.
Also if we refresh from localhost:8080/r/reportid it will navigate to / then r/reportid.

Yeah probably the limitation from the drawer, since other screens that define in the navigator is doesn't have that behavior.

Looking through the thread it seems like we're limited by the ability to control the page behavior using the URL. It looks like we're limited by the react-navigation library? What's suggested outcome here @parasharrajat, it doesn't seem like we'll be able to do this with react-navigation

I haven't seen any proposal attempt using React-navigation to the solve the problem so I can't say the same. I think it would be actually possible to do with react-navigation.
So if we break down the problem into steps considering https://github.com/Expensify/App/issues/8126#issuecomment-1103000322.

Manage the drawer state somehow https://github.com/Expensify/App/issues/8126#issuecomment-1103000322.
Able to navigate the state of the drawer via URL ??

we can think of A hybrid solution using react-navigation and Onyx.

Cool cool, going to add that to the description and have the job doubled

doubled price: https://www.upwork.com/jobs/~01c09e65fbbdd4bb12

I am working on solving it

Just for confirmation please
The issue for the refresh problem
Right?

Does this help https://github.com/Expensify/App/issues/8126#issuecomment-1104168082? Please go through the discussion on the issue to get more details.

Proposal

Create Onyx key to hold value for default drawer status
https://github.com/Expensify/App/blob/a0a76d83945059c15e86e700fd74eb58500d7c59/src/ONYXKEYS.js#L195

+    DEFAULT_DRAWER_STATUS: 'defaultDrawerStatus',

Create action to set the DEFAULT_DRAWER_STATUS Onyx key

function setDefaultDrawerStatus(defaultDrawerStatus) {
    Onyx.set(ONYXKEYS.DEFAULT_DRAWER_STATUS, defaultDrawerStatus);
}

Use screenListeners param on Drawer.Navigator to get the state every time the screen drawer change
https://github.com/Expensify/App/blob/dee673570654cd14aae5c36230aeda69bc04db13/src/libs/Navigation/AppNavigator/BaseDrawerNavigator.js#L54-L68

                screenListeners={{
                    state: (e) => {
                        // Get the current navigation screen state
                        const state = e.data.state;

                        // Get the history. If the current state has history that type to drawer,
                        // that`s mean the current route is report screen.
                        // If there`s no history then current route is home screen.
                        // But those condition only apply when navigate, not when refresh the page
                        const hasDrawerHistory = _.find(state.history || [], h => h.type === 'drawer');

                        // Set the Onyx key `DEFAULT_DRAWER_STATUS`
                        // We only change the default drawer status `closed`` when
                        // 1. Current route is report screen and last default drawer status is open
                        // 2. When current route is report screen and we do refresh there`s no history saved.
                        //    So we check if last drawer status is `closed` we keep the drawer status to `closed`
                        // Other than that will be opening set drawer status to `open`
                        if ((hasDrawerHistory && state.default === 'open') || (!hasDrawerHistory && state.default === 'closed')) {
                            App.setDefaultDrawerStatus('closed');
                        } else {
                            App.setDefaultDrawerStatus('open');
                        }
                    },
                }}

Now we return the default drawer status to Drawer.Navigator. The drawer status value will be from Onyx key DEFAULT_DRAWER_STATUS and when url is open from home route we return open status.
https://github.com/Expensify/App/blob/dee673570654cd14aae5c36230aeda69bc04db13/src/libs/Navigation/Navigation.js#L77-L80

    if (isSmallScreenWidth) {
        const path = getPathFromState(navigationRef.current.getState(), linkingConfig.config);
        return path === '/' ? 'open' : defaultDrawerStatus;
    }

The result will be https://github.com/Expensify/App/issues/8126#issuecomment-1104168082 and https://github.com/Expensify/App/issues/8126#issuecomment-1069452614
https://user-images.githubusercontent.com/25520267/166974869-4a4918ae-9699-408a-a37e-9d5a69ade4b0.mov
https://user-images.githubusercontent.com/25520267/166975033-1a9d00de-4093-401c-af2f-2296bbcbe83b.mov

@parasharrajat Any thought on this https://github.com/Expensify/App/issues/8126#issuecomment-1118839624 ?

@parasharrajat bump ☝

Thanks for the proposal but this does not seem durable. I do not understand the changes in screenListeners. what are the reasons for using that code? ScreenListener runs on each screen which could be part of any navigator. This code will run on any navigator.

// Set the Onyx key DEFAULT_DRAWER_STATUS
// We only change the default drawer status closed`` when                         // 1. Current route is report screen and last default drawer status is open                         // 2. When current route is report screen and we do refresh theres no history saved.
//    So we check if last drawer status is closed we keep the drawer status to closed
// Other than that will be opening set drawer status to `open

Why? for all conditions.
Also, I need to ask someone from team to review your proposal as well. I am not sure how suitable is this approach?

Thanks for the proposal but this does not seem durable. I do not understand the changes in screenListeners. what are the reasons for using that code? ScreenListener runs on each screen which could be part of any navigator. This code will run on any navigator.

// Set the Onyx key DEFAULT_DRAWER_STATUS
// We only change the default drawer status  closed when                         // 1. Current route is report screen and last default drawer status is open                         // 2. When current route is report screen and we do refresh there ``s no history saved.
//    So we check if last drawer status is closed we keep the drawer status to closed
// Other than that will be opening set drawer status to `open

Why? for all conditions.
Also, I need to ask someone from team to review your proposal as well. I am not sure how suitable is this approach?

@parasharrajat  Yes, the choose is either set onyx key on screen listener or at the lib when try to change drawer state.
The reason why I use screenListener is to make it cleaner to handle set onyx value. If you prefer to set the value on drawer state change we can combine my other proposal to do that.

@parasharrajat We can do this instead to handle drawer state.
Set ONYXKEYS.DEFAULT_DRAWER_STATUS to open when the drawer is gonna be opened.
https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L56-L63
Set ONYXKEYS.DEFAULT_DRAWER_STATUS to closed when navigating to the report route.
https://github.com/Expensify/App/blob/7919e24c808dea9dedfe4a2d513365cf092cc1e1/src/libs/Navigation/Navigation.js#L143-L146

https://github.com/Expensify/App/issues/8126#issuecomment-1123095585 This looks better. You mean to do this instead of point 3. What else can be done for point 4? Did you check this with navigation? it should not break the navigation of the app.

@parasharrajat Yeah, we replace point 3 with this https://github.com/Expensify/App/issues/8126#issuecomment-1123095585 instead.
Point 4 is to handle drawer state from URL. Currently, I only handle when the path is / and will return the drawer state to open. Other than that will return value from onyx which the last drawer states the user.

Did you check this with navigation? it should not break the navigation of the app.

For now, nothing different happens with the navigation. My proposal does nothing to change the navigation behavior. The only thing my proposal does is save the drawer state to onyx and return it to drawer defaultStatus.

@parasharrajat any comments on the above?

I will update you by tomorrow. I need to test a few things.

I doubt that https://github.com/Expensify/App/issues/8126#issuecomment-1123095585 will always work. What if the drawer is opened/closed based on state change but from our action? will this be tracked in Onyx if we do https://github.com/Expensify/App/issues/8126#issuecomment-1123095585?
If we follow your suggestion of a screen listener. Could you please explain that code to me? I don't see anything telling me in the comments why you add the next line of code.
How do you know that the current state is related to the drawer navigator? You haven't added anything in the code that only runs the code only for the drawer navigator. ScreenListeners runs on each navigator.

@parasharrajat Thank you for checking my proposal.

I doubt that https://github.com/Expensify/App/issues/8126#issuecomment-1123095585 will always work. What if the drawer is opened/closed based on state change but from our action? will this be tracked in Onyx if we do https://github.com/Expensify/App/issues/8126#issuecomment-1123095585?

You might be right. We have custom action to reset the route accordingly.

If we follow your suggestion of a screen listener. Could you please explain that code to me? I don't see anything telling me in the comments why you add the next line of code.

How do you know that the current state is related to the drawer navigator? You haven't added anything in the code that only runs the code only for the drawer navigator. ScreenListeners runs on each navigator.

In my proposal, we use screenListener on Drawer.Navigator which means only listening to the screen changing on the drawer. I check it and it only calls screenListener when the drawer change either open/closed.
https://user-images.githubusercontent.com/25520267/168837030-714d83c3-b31f-4f99-a04b-f27c443cd7a2.mp4
I also think this https://github.com/Expensify/App/issues/8126#issuecomment-1118839624 is a more fit solution than my first proposal.

@NicMendonca applied!

Just to clarify here... the issue we're fixing is that if you refresh the page on a chat while on mobile web you land back on the sidebar? Does that not sound like an issue with the react-navigation library?

This is a kind of missing feature from react-navigation. The way Drawer is built over Tab-navigator prevents it from creating browser history entries. We can't control its state via url or configuration.
IMO, The goto answer from react-navigation maintainer would be to use a custom router for drawer navigator to meet our needs. I also think that we should also create a custom router. It can also help us in getting away from custom actions. I previously experimented with it but it is quite complex.
But I agree that first we should create an issue on the upstream repo and get the suggestion of what type of solution, they are expecting. Are they willing to change it?

The reason why we land back to LHN is because we return ‘open’ to the ‘defaultStatus’ of Drawer Navigator.

If we refreshing the page and navigating to a report why are we passing 'open'. We should initialize it as 'closed' in that case? Or am I thinking about this wrong?

This is a kind of missing feature from react-navigation

Which feature is missing exactly?

The way Drawer is built over Tab-navigator prevents it from creating browser history entries. We can't control its state via url or configuration.

Can you elaborate on this? I'm not sure why browser history entries are relevant. And also do not understand why we can't control the state of the drawer based on the url.

The goto answer from react-navigation maintainer would be to use a custom router for drawer navigator to meet our needs. I also think that we should also create a custom router.

To clarify, are you saying that we presented this particular problem and the suggestion was to use a custom router and we took that feedback and decided to not do what the maintainer suggested to do?

To correctly answer your questions, I will gather more information/facts from react-navigation repo which can be used to validate our analysis.

Any update here @parasharrajat regarding info from the react-navigation repo?

Nothing new from me, except for some improvement to the code. Honestly, I get confused about the expected result we looking for.
We need more people to join the discussion.
Here’s the slack chat https://expensify.slack.com/archives/C01GTK53T8Q/p1653068209660299

Pinged the slack conversation, hoping to get some more input

still available submit proposal?

@MTN718 not at the moment. But you can look for issues with the Help Wanted label.

Recap
this issue is still reproducible
In our slack conversation, we agree to use the URL as a source of truth and we decide not to use the drawer tracker to make it simple.
The possible case will be handled:

When the user opens the App from URL /, the LHN will be shown ✅
When a user opens the App from the URL is /r/reportID, the report screen will be shown ❌
When a user on the LHN (current URL /r/reportID) then refresh the page, the report screen will be shown ❌
When a user is on the report screen (current URL /r/reports) and then refresh the page, the report screen will be shown ❌

✅ Is current behavior, ❌ Not yet implemented
For the next step, I will close the current PR (in case we need it in the future) and create a new one with the solution.
const path = getPathFromState(navigationRef.current.getState(), linkingConfig.config);
return path === '/' ? CONST.DRAWER_STATUS.OPEN : CONST.DRAWER_STATUS.CLOSED;

We will open the drawer when the user accesses the App from the root URL / and other than that we close the drawer to show the ReportScreen.
If you are all on board with this send this 🚀 or 👎 for other thoughts.
Thank you!
cc @marcaaron @thienlnam @parasharrajat

When a user is on the report screen (current URL /r/reports) and then refresh the page, the report screen will be shown ❌

I don't know what r/reports is - not sure if we have a route like this. I think you just mean we are on a report and then refresh. Other than that, LGTM.

@marcaaron Yeah, it’s ‘/r/reportID’ 😅

@marcaaron @thienlnam @parasharrajat
On the desktop minimize to mobile layout, when we refresh the app what should be expected? Is showing the LHN or Report Screen?
This is when defaultStatus drawer is set to close.
https://user-images.githubusercontent.com/25520267/174280490-6eeb574e-6f8a-47ff-a331-ba536984662a.mov

It should behave as MWeb.

PR is being worked on

not overdue! waiting for the payment ping

PR is still in review / revisions

Same as above, @mollfpr any update on the PR revisions?

@thienlnam I push a new commit and just waiting for a review.

cc @parasharrajat

not overdue!

Pending review from @parasharrajat

pending review

Been going through reviews, and now is pending another review from @parasharrajat
Here's the PR link for reference https://github.com/Expensify/App/pull/9483

What's the status on this, still pending review?

Should we put this on HOLD for now? @parasharrajat @thienlnam

@parasharrajat @thienlnam is there anything I should be watching for with this issue? Or can we close this out?

This is holding on high level changes with our navigation implementation - https://github.com/Expensify/App/issues/11768
However, we're unsure if this will remain an issue after those changes.  We've spent a lot of time on this proposal and solution and so let's keep this issue open (on a monthly), and see where we're at after https://github.com/Expensify/App/issues/11768.  But either way we should be compensating mollfpr for their time if we end up closing this or not

Snagging this since I'm in the tracking issue.

See the tracking issue for the latest.

Still holding.

Still held as this initiative goes through the design process.

Still holding on the larger react navigation project.

Still on hold for the larger navigation re-write.

Same as above.

Still on hold for navigation. No ETA.

Same same

Same as above

Same same.

The navigation PR has been merged - now we just need to see if this is still a bug and needs to be addressed

Sorry, do we consider bounty of reported this issue?
@JmillsExpensify @thienlnam

I think we should pay for reporting here

Agree on that. This shouldn’t have been closed. I’m aiming to get through testing issues early this week, at which point I’ll issue payment.

Agree on that. This shouldn’t have been closed. I’m aiming to get through testing issues early this week, at which point I’ll issue payment.

Gentle bump on this @JmillsExpensify

@phivh Can you please re-test this issue, including video, and comment confirming whether the issue is still present? Thanks!

Gentle bump on that last comment. Thank you!

@phivh Mind testing this issue again per the above comment and we'll ideally be able to close this issue out and issue payment?

Sorry. I was occupied on something, will find time to test this week.

Great thank you!

Waiting on test

Same

I think this is not repro anymore and we should close this out, i dont know if we need to pay anything out here

Wow, this bug is over two years old and @mollfpr was hired close to two years ago 🤯
I'm going to close as it's not reproducible.  @parasharrajat , @mollfpr , if you believe you're due compensation, can you please propose the amount, based on 25, 50 or 100% of the job price? Please provide reasoning too (ie. link the PR if one was created).   We'll reopen this if needed.

I don't remember much of the detail but considering the length of the discussion on the proposal and the PR and how long the issue is held, 75% would be great! This was the highest job I ever got, so I would expect that I could finish the job at that time.

Lot to unpack here.  @JmillsExpensify , tagging you since  you're the BZ and might have more context.
It looks like

The job got raised to $8k at one point and @mollfpr was hired and @parasharrajat to review. @mollfpr worked on two PRs (one and two)
We then put the issue on hold pending this issue.
Issue was closed because it wasn't reproducible.
We should pay something and we need to figure out what the fair amount is.

I'm leaning towards 50% for each @mollfpr and @parasharrajat .  It's quite a lot of money, $4k each, but we were increasing prices frequently a year+ ago and I don't think either should be penalized because this one stayed open for so long (and we're paying less now).  @JmillsExpensify , @thienlnam, what do you think?

I'm fine with @mallenexpensify's summary, though Matt can you please type out the payment summary. I can't approve my own summaries and both request in Expensify.

Contributor: @mollfpr due $4000 via NewDot
Contributor+: @parasharrajat due $4000 via NewDot
Thanks!

$4,000 approved for @parasharrajat


ERC20 transfer not decoded as such

Describe the bug
ERC20 transfer not decoded as such
(In case this is not a bug, I'm wondering why the tx is not marked as ERC20 transfer.)
To Reproduce

Open https://gnosis-safe.io/app/#/safes/0x4a5a0f167880da1d268b3cbfc031444aad61e5d6/transactions or https://safe-client.mainnet.gnosis.io/v1/safes/0x4a5A0F167880dA1d268B3CBfc031444AaD61e5D6/transactions/queued/

-> Tx is marked as custom tx
Expected behavior
The transfer is decoded as ERC20.
Additional context
Add any other context about the problem here.

Hi @tschubotz now it appears to be classified correctly. Could it be that at the time of opening the issue the token metadata was not available yet? In that case we would need to wait for the caches to expire, as we would indeed, classify it as custom and that would be cached for a while, even if the TokenInfo would become available in that time. As far as I know there isn't any webhook for NewToken or something like that. Could be something to incorporate in the backend :thinking:

Could it be that at the time of opening the issue the token metadata was not available yet?

Not sure, I didn't check that, will do next time in case something like this appears again.

Let's keep an eye on this


fix: refactor pipelinesHandler response

Earlier, the response was excessively large now, only the fields that are being used are sent.

/cc @ankitm123 @babadofar


Replace practise with practice

Both are correct, Practise is British/world english, Practice is US.
https://en.oxforddictionaries.com/definition/practise

@orodabaugh I had considered that but I believe 'practise' is a verb in the British spelling.
I think 'best practice' is a noun and googling for 'best practise' doesn't return any links spelling that way..


Upgrade from 3.3 to 5.1 - Permission Denied

Hi,
I haven't updated Zulip for longer than I should have (I thought it was Nov 2021, but it turned out to be since just before 3.4), so that's my fault.
However, I tried to update and it said pip was out of date so sorted that with /srv/zulip-venv-cache/some-long-ID/zulip-py3-venv/bin/python -m pip install --upgrade pip
Unfortunatley I got this:
2022-04-13 19:28:59,980 upgrade-zulip-stage-2: Installing static assets... cp: cannot create regular file '/home/zulip/prod-static/images/logo/zulip-icon-128x128.png': Permission denied Traceback (most recent call last):   File "/home/zulip/deployments/2022-04-13-19-28-51/scripts/lib/upgrade-zulip-stage-2", line 229, in <module>     subprocess.check_call(   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call     raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cp', '-rT', '/home/zulip/deployments/2022-04-13-19-28-51/prod-static/serve', '/home/zulip/prod-static']' returned non-zero exit status 1. Traceback (most recent call last):   File "/home/zulip/deployments/current/scripts/lib/upgrade-zulip", line 68, in <module>     subprocess.check_call([os.path.abspath("./scripts/lib/upgrade-zulip-stage-2"), deploy_path]   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call     raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/zulip/deployments/2022-04-13-19-28-51/scripts/lib/upgrade-zulip-stage-2', '/home/zulip/deployments/2022-04-13-19-28-51']' returned non-zero exit status 1.
I am (G)root, so I'm not sure why I'm getting permission denied. Any help appreciated, thank you.

I got to 3.4 by starting all the 'supervisorctl' programs as I had stopped them all. But I still can't get to 4.0 or above using;
/home/zulip/deployments/current/scripts/upgrade-zulip-from-git 4.0
or
/home/zulip/deployments/current/scripts/upgrade-zulip zulip-server-latest.tar.gz

Hi!  The Zulip upgrader drops permissions to the zulip user for operations that don't require root access, as a standard security best practice.
That permission denied error seems likely to result from something that you did making a part of the /home/zulip directory not owned by the Zulip user; your mention of running manual pip install operations suggests you've been doing that sort of thing.
chown -R zulip:zulip /home/zulip is likely to fix the permissions error.
In general, please get help in chat.zulip.org when you run into issues upgrading -- the manual pip upgrade you mention is likely also not the correct solution to whatever pip error message you saw, but I don't know what is without the traceback. Can you find it in /var/log/zulip/upgrade.log and add it to your chat.zulip.org thread?


[local_auth] Improve exception handling of local_auth plugin

Use case
The local_auth plugin can throw a wide variety of exceptions. All of those exceptions are PlatformExceptions. That means, that you as a developer have to write code to decide based on the PlatformException.code on how to handle that error.
There's a file which contains a lot of those error codes, but the don't contain all possible error code. That can be seen by comparing the error code used in this file for example.
Even the example for the package, doesn't really teach you how to handle all the exception cases and just does generic catch all error handling.
Additionally, adding different exceptions for different error cases, makes it easier to monitor in error monitoring software, because they're not grouped together with other PlatformExceptions.
Proposal

Introduce specific exceptions for all the different error codes.
The following is an example of how I image it, for the isDeviceSupported() method. All the other methods should follow a similar pattern.
/// Returns true if device is capable of checking biometrics or is able to
/// fail over to device credentials.
Future<bool> isDeviceSupported() async {
  try {
    LocalAuthPlatform.instance.isDeviceSupported();
  } on PlatformException catch (exception, stackTrace) {
    Error.throwWithStackTrace(_convertException(exception), stackTrace);
  }
}

Object _convertException(PlatformException e) {
  switch (e.code) {
    // Taken from https://github.com/flutter/plugins/blob/e6184f9cca0139ad3a45c212c2189b928b4e690d/packages/local_auth/local_auth/lib/error_codes.dart#L13
    case 'NotEnrolled': return NotEnrolledException();
    // handle all the other error codes
  }
}

We should have at least one plugin exception type per https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#platform-exception-handling

Additionally, adding different exceptions for different error cases, makes it easier to monitor in error monitoring software, because they're not grouped together with other PlatformExceptions.

Having a single exception type achieves that goal. Is there a specific reason you want different exceptions for every error case?

Having a single exception type achieves that goal. Is there a specific reason you want different exceptions for every error case?

I think that makes it easier to handle different error cases. It doesn't necessarily have to be one exception per error code. But, for example, having the same exception type for the error code NotAvailable and no_activity doesn't quite seem right to me. That's why I suggested one exception per error code.


[5.8] add createIfNotExists method.

When creating a migration of an existing system, it may be necessary to execute create after using the hasTable method.
public function up()
{
    if (!Schema::hasTable('users')) {
        Schema::create('users', function(Blueprint $table) {
            //
        });
    }
}

With the addition of this method we can write:
public function up()
{
    Schema::createIfNotExists('users', function(Blueprint $table) {
        //
    });
}

Wouldn't this create issues once you start adding columns?

What is the real use case of such a method? Can you describe your work situation a bit more?

@taylorotwell
There is no "migration" in our existing system.
Basically, dump from DB such as staging and introduce locally.
With plans to migrate to Laravel, I wanted to make "migration" available locally.
Because some tables are dropped during migration, it is difficult to insert only data after performing a ”migrate”.
As a result, you will execute "migrate" after putting the dump first.
Using only the "create" method will cause migrate to fail, so it must be used in conjunction with "hasTable".
Because it is troublesome to enter the same argument each time, I wanted to create the "createIfNotExists" method.
Since I use translation software, I am sorry if it is a strange sentence.

@fagai In that case, how about creating a 'migrations' table on the dump you already have and populate it to simulate a scenario where the migration you're trying to migrate has already been executed?

@henriquebremenkanp
I see. It was unthinkable to put them in the 'migrations' table first.
Although it is somewhat troublesome, I think it is a good idea.

Just wrap your schema call in a hasTable if statement.


EPS Meteograms Broken With OpenData Update

EPS Meteograms notebook is broken with OpenData update. Fix will include:

support for 0.25 degree data
AIFS (though its deterministic)

Currently waiting for pypi to update with ecmwf-opendata 0.3.0.

Hi, Caleb. What was the fix that cleared the 'string indices must be integers' TypeError? I've combed through my code adapted from your EPS_Meteograms notebook and I'm still unable to get past it. I've even tried copying/pasting your exact code in the notebook and adding the current date to see if I'm just overlooking something. Appreciate the help!


Class 'Aschmelyun\Larametrics\Larametrics' not found

Hello guys! Who can help me?

Looks like the service provider isn't loaded. Double check your config/app.php to make sure it's in the providers array.

Looks like the service provider isn't loaded. Double check your config/app.php to make sure it's in the providers array.

I added the necessary line and such error appeared.

Laravel 5.6 I have no problems on Localhost, but there are problems when I install on a hosting.

Run composer dump-autoload to clear your cache. That should grab it.
Laravel 5.5+ has the ability to automatically "discover" packages. Double check your hosting Laravel version.

Run composer dump-autoload to clear your cache. That should grab it.
Laravel 5.5+ has the ability to automatically "discover" packages. Double check your hosting Laravel version.

Did not help. :( I just copied my local project and uploaded to the hosting.

If the package wasn't discovered, it probably isn't in your composer file.
Glad you found a workaround for it.

You misunderstood me, the problem is not solved :(

Hey @MrFallen, can you run the following command from your app's root and let me know what the output is?
composer remove aschmelyun/larametrics && composer require aschmelyun/larametrics
I've just tried installing the package on Laravel 5.6, 5.7, and 5.8 versions and all of them discovered the package at the end of the composer update running.

Hey @MrFallen, can you run the following command from your app's root and let me know what the output is?
composer remove aschmelyun/larametrics && composer require aschmelyun/larametrics
I've just tried installing the package on Laravel 5.6, 5.7, and 5.8 versions and all of them discovered the package at the end of the composer update running.

Hosting:

Localhost:

Looks like it's an issue with Composer not having enough memory to complete its install. The recommended amount is 1GB, or 512MB physical and 512MB swap.

Looks like it's an issue with Composer not having enough memory to complete its install. The recommended amount is 1GB, or 512MB physical and 512MB swap.

Now I am upgrade hosting to VDS.

Hey @MrFallen, can you run the following command from your app's root and let me know what the output is?
composer remove aschmelyun/larametrics && composer require aschmelyun/larametrics
I've just tried installing the package on Laravel 5.6, 5.7, and 5.8 versions and all of them discovered the package at the end of the composer update running.

Idk what's happened but Larametrics works!


fix: [dart_cli] Activating a cli project after updating files and version doesn't use the new version

Description
For some reason I can't figure out, for the past three days, no matter how I try to do it, as I am developing my dart_cli template-base CLI project, whenever I change anything in a file and activate the package, the newest version of the file is not the one I see when testing my cli.
Steps To Reproduce

dart pub global activate very_good_cli to get the latest version of very_good_cli
very_good create dart_cli sfdk_cli  to create a brand new CLI project
dart pub get in the newly created project to get dependencies.
dart pub global activate --source path . to build and install the executable without changing anything in the project.
I get

Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 68.0.0 (72.0.0 available)
  analyzer 6.5.0 (6.7.0 available)
  macros 0.1.0-main.0 (0.1.2-main.4 available)
  very_good_analysis 5.1.0 (6.0.0 available)
Got dependencies!
4 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Package sfdk_cli is currently active at path ".../sfdk_cli".

sfdk_cli --version
I get

Building package executable...
Built sfdk_cli:sfdk_cli.
0.0.1

which is expected.

Change version to 0.0.2 in the pub spec.yaml file and dart pub global activate --source path . again
I get

Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 68.0.0 (72.0.0 available)
  analyzer 6.5.0 (6.7.0 available)
  macros 0.1.0-main.0 (0.1.2-main.4 available)
  very_good_analysis 5.1.0 (6.0.0 available)
Got dependencies!
4 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Package sfdk_cli is currently active at path ".../sfdk_cli".
Installed executable sfdk_cli.
Activated sfdk_cli 0.0.2 at path ".../sfdk_cli".

which is expected (except for the dependencies issues)

Run sfdk_cli --version again
I get
0.0.1

If I change anything in the files from the template, like just changing the help text from Print the current version. to Print the current version of the CLI., if I add any debugging instructions, NOTHING is being picked, as if the package is stuck to the previous version.
Cleaning the cache, deactivating, etc do not change a thing.
I have also been unable to fix the dependency constraints issues...
Additional Context
My dart version is Dart SDK version: 3.4.3 (stable)
MacOS 14.5 (23F79)
Any thoughts? Can anyone reproduce? I've been going insane for the past couple days trying to figure this out...

Thank you for bringing this to our attention @eripoll
I was able to reproduce this with the steps and also reproduced it with both the very_good_cli, dart_frog_cli and the mason_cli. None of them showed this issue in the past and I know that the last two haven't actively had changes to them that could impact this.
I suspect this is some strange pub issue, I haven't yet seen the issue on Windows while working on the Dart Frog CLI there but no matter what it will require some further investigation to find the true culprit.

Good to hear you were able to reproduce! I was going bonkers here 😀
If I can be of some assistance, let me know!

I was able to reproduce this with the steps and also reproduced it with both the very_good_cli, dart_frog_cli and the mason_cli. None of them showed this issue in the past and I know that the last two haven't actively had changes to them that could impact this.
I suspect this is some strange pub issue, I haven't yet seen the issue on Windows while working on the Dart Frog CLI there but no matter what it will require some further investigation to find the true culprit.

@wolfenrain
It may be related:
https://github.com/dart-lang/pub/issues/4295

@wolfenrain It may be related: dart-lang/pub#4295

I had some time to look into this and it does seem related. Downgrading to an older version of Dart (and by extension pub) allowed me to install CLIs locally and test changes on them but that is more of a temporary solution than a fix. Seems we just have to wait until the Dart team fixes it for us.

Moving this to the backlog so we don't keep carrying it across iterations in the Blocked column. We are not going to take action on this until we see some movement on the linked Pub issue as that's the root cause of this issue unfortunately.


Destination link ignores pop by binding

Steps to reproduce:

Press Push button
Press Pop button

Expected result: view will pop to root.
Actual result: nothing happens.
struct ContentView: View {
    @State var pushed = false

    var body: some View {
        NavigationContainer {
            Button("Push") {
                pushed = true
            }
            .destination(isPresented: $pushed) {
                Button("Pop") {
                    pushed = false
                }
            }
        }
    }
}

struct NavigationContainer<Content: View>: UIViewControllerRepresentable {
    @ViewBuilder let content: () -> Content

    func makeUIViewController(context: Context) -> UINavigationController {
        UINavigationController(rootViewController: UIHostingController(rootView: content()))
    }

    func updateUIViewController(_ uiViewController: UINavigationController, context: Context) {
        (uiViewController.viewControllers.first as? UIHostingController<Content>)?.rootView = content()
    }
}

update: looks like changing state declared outside of .destination doesn't trigger recomposition when modified from inside destination.

Yea this is a known issue. I believe it's because the UIHostingController that pushed the destination view is no longer in the view hierarchy so SwiftUI updates no longer take place.
The expected workaround is to use the @Environment(\.destinationCoordinator) to pop the view programatically. I havent found a good fix to allow mutating a @State in a previous hosting controller like your example shows.

Ok I actually stumbled upon a nice fix. In 1.1.1, wrap your NavigationContainer like so:
struct NavigationContainer<Content: View>: View {
        @ViewBuilder let content: Content

        var body: some View {
            ViewGraphBridgeAdapter {
                content
            } content: { content in
                Wrapper(content: content)
            }
        }

        struct Wrapper<C: View>: UIViewControllerRepresentable {
            let content: C

            func makeUIViewController(context: Context) -> UINavigationController { }

            func updateUIViewController(_ uiViewController: UINavigationController, context: Context) { }
        }
    }


Feature/form edits 2023

1.adding FEATURE_SERVICE_URL into configurations.ini
2.adding start and completion date into receiving site
3.commenting out attributes not be in AGOL

LGTM, please merge and deploy as per your convenience @rxjeong


Node should not be QObject because WidgetNode inherits from QWidget.

This fixes unit tests for #19.
Python classes are not allowed to inherit from more than one Qt class; I think that was causing the crash.

Debugging strategy: write a unit test that crashes, then remove code iteratively until it becomes obvious where the problem is. It usually takes several hours  :(

Ready for merge here? I should be able to merge #19 once this is in.

Yep sorry.


Getting this error on mac machine while running sdk

credmark.cmf.engine.model_loader - ERROR - Error loading manifest for module models.examples.historical_examples in model file models/examples/historical_examples.py: No module named '_bz2'

@Deadsec69 are you using the credmark-dev utility or the new client SDK?

@murphy I was using credmark-dev but I found a solution for the above just needed to run the command
brew install bzip2


"Solidity assertion failed" on "forge build" when using "emit" in test

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (2f4a77e 2023-08-31T00:32:46.319290372Z)
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
I have the following error when trying to test event expectEmit:
> forge build
[⠢] Compiling...
[⠒] Compiling 22 files with 0.8.21
[⠑] Solc 0.8.21 finished in 3.33s
Error:
Compiler run failed:
Error: Internal exception in StandardCompiler::compile: /solidity/libsolidity/interface/Natspec.cpp(85): Throw in function static Json::Value solidity::frontend::Natspec::userDocumentation(const solidity::frontend::ContractDefinition&)
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed

Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed

Simple minimal project to reproduce error: https://github.com/pgonday/forge-issue-event/tree/master
When I comment the line with "emit" in the test (https://github.com/pgonday/forge-issue-event/blob/0af5420668c158f19cf5f7e004f9442e51b3969c/test/Counter.t.sol#L22)  I don't have the error...

In fact it is a known bug with 0.8.21: https://github.com/ethereum/solidity/issues/14430


add traversed passages to properties

sorry, forgot to turn off my auto formatter before commiting, I'll try to fix that, but basically I would just like to get access to the passages that the routes travel along via the properties field

Hi @abajorat, thanks for your contribution!
I'll need to double check this possibility and "stress test" this solution with multiple random requests to see how it affects the speed quality.
My main concern is when looping and getting edge = M.get_edge_data(previous, now) which could affect the speed for long routes with many edges, maybe there is another way to do it directly in the Marnet class while routing.
Will come back with findings..

hi @abajorat
please see  #34 latest commit : 48f885d which proposes this option