runtime: simplify right shift and zero test

What version of Go are you using (go version)?
1.11
What did you do?
Please consider the following dummy code:
func Dummy(x uint64) int {
    i := 0
    for {
        x >>= 1
        if x == 0 {
            break
        }
        i -= 1
    }
    return i
}

What did you expect to see?
Main part of the loop could compile down to (i.e. without the test for zero):
SHRQ $1, AX
JNE label

or even:
SHRQ AX
JNE label

What did you see instead?
It compiles down to (on x86):
SHRQ $1, AX
TESTQ AX, AX
JNE label

PS: I've just noticed similar situation occurs with - 1, instead of >> 1:
func DummySub(x int64) int {
    if x == 0 {
        x = 10
    }
    i := 0
    for {
        x -= 1
        if x == 0 {
            break
        }
        i += 1
    }
    return i
}

There the:
DECQ AX
CMPQ AX, $1
JNE label

could also be replaced by:
SUBQ AX, $1 // or DECQ AX
JE label

not that this matters at all, but:
func Dummy2(x uint64) int {
	if x == 0 {
		return 0
	}
	return bits.LeadingZeros64(x) - 63
}

(or 1 - bits.Len64(x).)
I don't know whether it's intentional that both 0 and 1 inputs yield 0. It's irrelevant to the optimization opportunity, though.

@TuomLarsen w.r.t. to SHRQ AX vs SHRQ $1, AX, they both encode to the same instruction. Am I missing something, or did you have in mind just the difference in the presentation?

@josharian SHRQ AX is encoded as 48d1e8 (the 1 implicit), whereas SHRQ $1, AX can also be encoded as 48c1e801. I'm not sure which one Go uses, that's why I commented on both.

Ah, I mistranslated the assembly when checking on the encoding and used the wrong width register. Sigh.
We should start generating the shorter version. I’m AFK—would you mind opening a new issue for this so that it can be tracked separately from re-using the flags result of the shift? Thanks. It’d actually make a decent starter issue for someone who wanted to contribute to SSA world, since we also make last minute encoding decisions in a similar way e.g. to use MOVL instead of MOVQ for small constants. cc @martisch

I've just checked and it seems that Go is indeed generating the shorter (implicit 1) version for the shift so I guess there is no need to open a separate issue. The disassembler says SHRQ $0x1, AX but the content of memory is 48d1e8.


[BUG] Stick-related error in HA Core Logs

Describe the bug
This message is shown in HA Core Logs:
Logger: root
Source: custom_components/plugwise/usb.py:94
Integration: Plugwise Beta (documentation)
First occurred: 11:33:49 (1 occurrences)
Last logged: 11:33:49

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 1254, in run
    self.function(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/plugwise/stick.py", line 329, in scan_timeout_expired
    self.scan_callback()
  File "/config/custom_components/plugwise/usb.py", line 94, in discover_finished
    if config_entry.system_options.disable_new_entities:
AttributeError: 'ConfigEntry' object has no attribute 'system_options'

Home Assistant Core (please complete the following information):

Version: 2021.6.2
Deployment: Proxmox VM
Installed plugwise version: 0.15.0b0 + plugwise v0.10.0 (from testpypi)
Installed through 'HACS']

Plugwise product (please complete the following information):

Type: Stick
Firmware: NA

Looks like this line if config_entry.system_options.disable_new_entities: needs to change to if config_entry.system_options.get("disable_new_entities"):
After this change the error is gone.

This is actually a bug downstream in Plugwise Beta not in this repository, so I opened this issue overthere.
Closing this one


Experiment with putting mod files to ugc_tool wine prefix

Maybe this will help to fix
0029:Call KERNEL32.MultiByteToWideChar(0000fdf2,00000000,0021d620 "z:/home/xxx/.steam/steam/steamapps/common/warhammer end times vermintide mod tools/ugc_uploader//home/xxx/projects/vermintide/modding/mods_source/mods_zaphio/deathwish/item_preview.png",ffffffff,0032cc90,00001000) ret=f79a9e58

to make uploading to steam workshop possible.

I think the same behavior applies both for Linux and Windows.

Config path passed with -c to ugc_tool is processed correctly no matter if it's relative or absolute.

Experiments:
1
CWD: ~/.steam/steam/steamapps/compatdata/718610/pfx/drive_c/ugc_tool
CMD: SteamGameId=718610 WINEDEBUG=+relay STEAM_COMPAT_DATA_PATH=~/.steam/steam/steamapps/compatdata/718610 ~/.steam/steam/steamapps/common/Proton\ 5.0/proton run "C:\ugc_tool\ugc_tool.exe" -c "C:\deathwish\itemV1.cfg"
1.1 (success)
CFG: "../deathwish/item_preview.png"
OUT: "C:/deathwish/../deathwish/item_preview.png"


Out of bounds access in larfb

Larfb has an out of bounds access if m == k (i.e. there is only the triangular part of V and V2 is of size zero)
larfb also misses a lot of input checks

and to be clear, this isn't a problematic out of bounds access, it's similar as we had before in geqr2

I thought b6bf86f26c2297e7e0a6f2cf46b3a06583be6516 fixed the out of bounds on larfb. Can you point it out so I can fix it? Thanks

my branch is behind on master, my bad


[Artifacts Tab] Artifact Versioning

Describe changes
I added auto-increment artifact versioning and adjusted the CLI and Client methods accordingly.
Docs will be included in a separate PR.
Pre-requisites
Please ensure you have done the following:

[x] I have read the CONTRIBUTING.md document.
[ ] If my change requires a change to docs, I have updated the documentation accordingly.
[ ] If I have added an integration, I have updated the integrations table and the corresponding website section.
[x] I have added tests to cover my changes.
[x] I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Other (add details above)

Also, will there be a Docs PR for this whole set of changes?

@strickvl For smaller changes, I'll try to incorporate docs in the respective PR, but things that will require entire new pages (like versioning) will have their docs coming in a separate PR in the end.

Tests I always want to add with the respective changes though, so these are still missing in this PR

Q: so when people compare versions, they're comparing string to string now? We should warn about that somewhere in docs maybe? (Given "10" < "2" evaluates to True etc)

Ugh yeah, that's a problem. This also breaks the auto-increment feature since the DB column itself is string. Perhaps we do need to add version name / version number representation on a DB level at least. And revert to my original changes were the version in the model was typed as Union I suppose.

@avishniakov no, you will get what you ask for, i.e.:

I create an artifact version named "2' and it gets assigned number 1, right?
No, if you request "2" you will get 2.

I create an unnamed artifact version and what name it gets? Also, it gets number 2 attached, I bet. Right?
No, the current highest number upon creation is 2, so the second artifact you create will have version 3.

I fetch the artifact version using "2" as input, what do I get in return?
The first artifact you created that you named "2".

@avishniakov no, you will get what you ask for, i.e.:

I create an artifact version named "2' and it gets assigned number 1, right?

No, if you request "2", the artifact will have number 2.

I create an unnamed artifact version and what name it gets? Also, it gets number 2 attached, I bet. Right?

No, the current highest number upon creation is 2, so the second artifact you create will have version 3.

I fetch the artifact version using "2" as input, what do I get in return?

If you fetch "2", you get "2", i.e. the first artifact you created

Not sure how to approach this, cause now we have inconsistent behavior between Artifacts and Models. We need to align it somehow, either here or in Model CP, cause it might confuse users.

@avishniakov Agreed, we probably need @stefannica in that discussion though. Anyway, artifacts tab will not go live this sprint so we can still consolidate this later I suppose. I'm creating a ticket for it 👍

@avishniakov Agreed, we probably need @stefannica in that discussion though. Anyway, artifacts tab will not go live this sprint so we can still consolidate this later I suppose. I'm creating a ticket for it (2521) 👍

Yeah, let's follow up with him. He was advocating the immutability of version number, but let's spin this thread again 🙂


Black glass door is pink

there are 2 items named black glass door but one is pink

thx for report, fixed in new version


[Discussion] Should DbSet be abstracted away just like DbContext

Hi Jason,
Will you consider abstracting away the DbSet<T> in INorthwindDbContext so that INorthwindDbContext will be completely independent from EF? And thus we can swap out SqlServer provider to use any data provider that is not supported by EF such as NoSql Db providers?
Exemple code belows:
    public interface INorthwindDbSet<T>
    {
         void AddRange(IEnumerable<T> entities);
         ….
    }
    public class NorthwindDbSet<T> : DbSet<T>, INorthwindDbSet<T>, IEnumerable<T>, IQueryable<T>
    {
        .....
    }

    public interface INorthwindDbContext
    {
        IDbSet<Category> Categories { get; set; }

        IDbSet<Customer> Customers { get; set; }

        IDbSet<Employee> Employees { get; set; }

        IDbSet<EmployeeTerritory> EmployeeTerritories { get; set; }

        IDbSet<OrderDetail> OrderDetails { get; set; }

        IDbSet<Order> Orders { get; set; }

        IDbSet<Product> Products { get; set; }

        IDbSet<Region> Region { get; set; }

        IDbSet<Shipper> Shippers { get; set; }

        IDbSet<Supplier> Suppliers { get; set; }

        IDbSet<Territory> Territories { get; set; }

        Task<int> SaveChangesAsync(CancellationToken cancellationToken);
    }

DbSet is an implementation of the repository pattern, you don't need to put it in another repository abstraction. The same for DbContext - it is an implementation of UnitOfWork.

The point is to abstract away a dependency on entity framework, not to add an unnecessary wrapper around DbSet and UnitOfWork for the heck of it.
Right now your entire application's logic is still dependent on an external library, which degrades the infrastructure layer, as that is the main (or entire) reason the infrastructure layer exists in the first place.
I don't think it's a pragmatic issue since it seems highly unlikely you would ever make a switch from sql to no sql or even switch away from using Entity Framework to something else, but from a purist viewpoint, it would be nice to be able to say all external dependencies are part of the infrastructure layer.

Thank you for your interest in this project. This repository has been archived and is no longer actively maintained or supported. We appreciate your understanding. Feel free to explore the codebase and adapt it to your own needs if it serves as a useful reference. If you have any further questions or concerns, please refer to the README for more information.


Add last_login Field to /profile Response

Context
The /profile endpoint currently provides essential user information such as user_id, email, and role. To enhance the endpoint's functionality and provide users with more relevant account activity details, the last_login field should be included in the response. This field will represent the timestamp of the user's most recent login.
Objective
Modify the /profile endpoint to include a last_login field, derived from the IssuedAt field in the JWT token's claims. This ensures that the last_login timestamp accurately reflects the time when the JWT was issued, corresponding to the user's most recent login.
Requirements

JWT Parsing

Extract the IssuedAt field from the jwt.RegisteredClaims embedded in the JWT.
Convert the IssuedAt timestamp to ISO 8601 format for the response.

Update /profile Service and Handler

Modify the service handling the /profile endpoint to include the last_login field.
Ensure the handler correctly parses and includes the last_login field in the response.

Validation

Ensure the implementation correctly extracts and formats the last_login field.
Implement error handling to manage invalid or missing JWT data.

Testing

Write tests to verify the last_login field is correctly included in the /profile response.
Ensure the timestamp is formatted in ISO 8601 and reflects the expected login time.

Acceptance Criteria

The /profile endpoint includes the last_login field in its response, derived from the JWT's IssuedAt field.
The last_login timestamp is formatted in ISO 8601 (e.g., 2024-12-14T10:30:00Z).
The implementation is robust, with appropriate error handling and tests to ensure reliability.

Example Response
{
  "id": "12345",
  "email"<EMAIL_ADDRESS>  "role": "admin",
  "last_login": "2024-12-14T10:30:00Z"
}

Impact
Adding the last_login field improves transparency for users by providing insight into their account activity. It also lays the groundwork for potential future features, such as login alerts or account monitoring.

fix on #47


Not receiving join-accept

Hi, sorry to bother you. Was just wondering what regional parameters you were using? I am setting up the node with the following params:

I have tried every type of regional parameters but the heltec still is unable to receive the join-accept or any downlinks:

Just want to be able to rule this out as an issue, could not find which ones you were using in any of the documentation. Thanks :)

I am still having same issues unfortunately, I am not sure why. It will not receive downlinks.

Yeah, you probably/hopefully found this issue, which tells you everything I do, in the greatest level of detail, to get a working setup. If you're doing exactly the same thing and it doesn't work, I'm really not sure how to help further. Please do post if you figure it out.


Error fetching data

I've been receiving this alert for a few months, what could be happening?
2024-04-14 12:12:31.917 ERROR (MainThread) [custom_components.cloudflare_tunnel_monitor.sensor] Error fetching data:
2024-04-14 12:12:51.917 WARNING (MainThread) [homeassistant.components.sensor] Updating cloudflare_tunnel_monitor sensor took longer than the scheduled update interval 0:00:30
2024-04-14 13:59:32.092 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.cloudflare_tunnel_homeassistant is taking over 10 seconds
2024-04-14 13:59:32.094 ERROR (MainThread) [custom_components.cloudflare_tunnel_monitor.sensor] Error fetching data:
2024-04-14 13:59:52.091 WARNING (MainThread) [homeassistant.components.sensor] Updating cloudflare_tunnel_monitor sensor took longer than the scheduled update interval 0:00:30

Hello @budswarez, thank you for your comment and sorry for not replying earlier..
Yes, I know that this error sometimes occurs. We have discussed this topic in another issue, I should not have closed it.
Actually, I do not have time to identify and resolve the problem.
I will only work on things strictly necessary to ensure the integration continues functioning in future versions.
If I have time later, I will try to investigate and resolve it. Until then, I will keep this issue open.

Hello, thank you very much for your feedback. Apparently the error stopped and may have been due to an update after the report. Thank you for your attention.


upgrade blackbox to v0.19.0

What this PR does / why we need it:
This PR upgrades Blackbox helm chart to v5.3.1 and Black-box app to v0.19.0
Which issue this PR fixes : fixes #660
Public facing documentation PR (if applicable)

Special notes for reviewer:
Checklist:

[x] Added relevant notes to WIP-CHANGELOG.md
[ ] Proper commit message prefix on all commits
[ ] Updated the public facing documentation
Is this changeset backwards compatible for existing clusters? Applying:

[x] is completely transparent, will not impact the workload in any way.
[ ] requires running a migration script.
[ ] will create noticeable cluster degradation.
E.g. logs or metrics are not being collected or Kubernetes API server
will not be responding while upgrading.
[ ] requires draining and/or replacing nodes.
[ ] will change any APIs.
E.g. removes or changes any CK8S config options or Kubernetes APIs.
[ ] will break the cluster.
I.e. full cluster migration is required.

Chart checklist (pick exactly one):

[ ] I upgraded no Chart.
[x] I upgraded a Chart and determined that no migration steps are needed.
[ ] I upgraded a Chart and added migration steps.

Pipeline config (if applicable)
If you change some config options (e.g. add/rename variable or change the default value) you may need to update the config used by the pipeline in pipeline/config.

Kube-apiserver is only giving out HTTP 200s. and hence I see kube-apiserver as down in the grafana.

is the upgrade transparent?
please check the correct box for "Is this changeset backwards compatible for existing clusters?"

a general questions: why do we have a "custom" service-monitor and we do not use the one from the blackbox-exporter chart?

I don't have an answer to that. But I don't see a reason to use a custom service monitor either. Do you want me to change that?

I don't have an answer to that. But I don't see a reason to use a custom service monitor either. Do you want me to change that?

If you do that, you can also just move the chart to the upstream folder instead since the "elastisys chart" doesn't add anything. But if you want you can just leave this as it is and create a new issue for moving it, since that's not really the point of this issue.

I tried moving the chart to upstream and there seem to be some issues with the service monitor targets. I guess that's why we chose a custom service monitor. So, I  will merge this now and create an issue, so we can look at it in the future.


Fix parsing months for cs and sk #2243

Fixes #2243 for Czech (overwrites default parser due to #477) and Slovak (uses default parser since it doesn't actually have the same problem).
I've tried writing a test for parsing in strict mode by changing
function equalTest(input, mmm, monthIndex) {
  assert.equal(moment(input, mmm).month(), monthIndex, input + ' should be month ' + (monthIndex + 1));
}

to
function equalTest(input, mmm, monthIndex) {
  assert.equal(moment(input, mmm, true).month(), monthIndex, input + ' should be month ' + (monthIndex + 1));
}

but it fails with:
Module: locale:cs Test: strict parse
Died on test #1     at /Users/petrbela/code/petrbela/moment/build/umd/test/locale/cs.js:74:5
    at test (/Users/petrbela/code/petrbela/moment/build/umd/test/locale/cs.js:3:67)
    at Object.<anonymous> (/Users/petrbela/code/petrbela/moment/build/umd/test/locale/cs.js:6:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17): Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
    at Locale.localeMonthsParse [as monthsParse] (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:659:49)
    at Object.<anonymous> (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:626:36)
    at addTimeToArrayFromToken (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:580:26)
    at configFromStringAndFormat (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:1197:17)
    at createFromConfig (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:1324:13)
    at createLocalOrUTC (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:1380:16)
    at local__createLocal (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:1384:16)
    at utils_hooks__hooks (/Users/petrbela/code/petrbela/moment/build/umd/moment.js:16:29)
    at notEqualTest (/Users/petrbela/code/petrbela/moment/build/umd/test/locale/cs.js:80:30)
    at Object.<anonymous> (/Users/petrbela/code/petrbela/moment/build/umd/test/locale/cs.js:84:13)

Any idea what might be going wrong?

Hi @petrbela. I faced the same issue with Russian language #2527

@petrbela -- well that is why we're fixing it. If you have short and long months parse, then it wouldn't crash.
Now I got the time and figured out why these locales had monthsParse in the first place. It wasn't needed in sk, in cs it was because of a month being a prefix of another, and in ru I just used all the same regexes for all 3 cases (long, short, both).
Have a look at #2634.

Great :+1:
Do you need any other input from me?


Fix: Add missing tenantID when updating the tenant from PATCH /organization/circle-config

What
Add missing tenantID when updating the tenant from PATCH /organization/circle-config
Why
It should have been added in #332
Checklist
PR Structure

[x] This PR has a reasonably narrow scope (if not, break it down into smaller PRs).
[x] This PR title and description are clear enough for anyone to review it.
[x] This PR does not mix refactoring changes with feature changes (split into two PRs otherwise).

Thoroughness

[x] This PR adds tests for the new functionality or fixes.
[x] This PR contains the link to the Jira ticket it addresses.

Configs and Secrets

[x] No new CONFIG variables are required -OR- the new required ones were added to the helmchart's values.yaml file.
[x] No new CONFIG variables are required -OR- the new required ones were added to the deployments (pr-preview, dev, demo, prd).
[x] No new SECRETS variables are required -OR- the new required ones were mentioned in the helmchart's values.yaml file.
[x] No new SECRETS variables are required -OR- the new required ones were added to the deployments (pr-preview secrets, dev secrets, demo secrets, prd secrets).

Release

[x] This is not a breaking change.
[x] This is ready for production.. If your PR is not ready for production, please consider opening additional complementary PRs using this one as the base. Only merge this into develop or main after it's ready for production!

Deployment

[x] Does the deployment work after merging?

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr334.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr334.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr334.previews.kube001.services.stellar-ops.com


Adapt CmakeLists.txt for easier consumption of GSL Lite by another project

Changes:

Use target_include_directories over include_directories.
Use INTERFACE library.
Add GSL project to tests/CMakeLists.txt.

Note: requires CMake 2.8.12 instead of <IP_ADDRESS> (Travis).
See M-GSL PR #370.

In reality, using interface libraries may require CMake 3.3, at least if your library clients want to be able to depend on them, due to this bug. This SO question may also be informative.


"Florești", "Gura Izbitei" are listed in the drop-down menu

Description:
When user writes "Florești" and "Gura Izbitei" the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Florești"

Expected results
The location appears in the drop-down menu as "Florești, Alba (Bucium)"

Step 3
Write in the search bar "Gura Izbitei"

Expected results
The location appears in the drop-down menu as "Gura Izbitei, Alba (Bucium)"


Line chart with extend_to_end: false stops at  instead of at .

Checklist

[x] I updated the card to the latest version available
[x] I cleared the cache of my browser
[x] I verified that I'm really running the lastest version in my browser console
[x] I checked if there is another issue opened with the same problem

Describe the bug
Line chart of today with extend_to_end: false stops at the point where the sensor was last updated/changed. Instead, I would expect that the line gets extended until the current moment in time.
Version of the card
Version: 1.10.0
To Reproduce
This is the configuration I used:
type: custom:apexcharts-card
header:
  title: Batterie
  standard_format: true
series:
  - entity: sensor.solar_battery_state_of_charge
    name: Ladezustand
    color: var(--energy-battery-in-color)
    opacity: 0.2
    stroke_width: 2
    type: area
    fill_raw: last
    extend_to_end: false
update_interval: 1min
graph_span: 24h
span:
  start: day
apex_config:
  chart:
    offsetY: -24
    parentHeightOffset: 0
  grid:
    borderColor: '#80808080'
    padding:
      top: 0
      right: 16
      bottom: 0
      left: 13
  yaxis:
    tickAmount: 2
    min: 0
    max: 100
    labels:
      formatter: |
        EVAL:function(value) {
          return (value) + " %";
        }
      style:
        colors: '#A0A0A0'
  xaxis:
    labels:
      style:
        colors: '#A0A0A0'
    axisTicks:
      color: '#A0A0A0'
      offsetY: 2
    axisBorder:
      show: false
    tooltip:
      enabled: false

Screenshots
This is the actual state at ~13:45:

This is the expected outcome at current point in time which is ~13:45:

This is the history of the sensor used in the apex chart. In contrast to apex, it extends till now:

Desktop (please complete the following information):

Browser Chrome
Version latest

Additional context
As it can be seen in my config, I want to visualize the battery charge from today 0:00 till current point in time. Basically exactly like in the official HA energy dashboard.
Is there any chance to fix this (in case it is a bug)? Are there any workarounds? I played a bit with data_generator  but was not successful. Maybe there is also something that I can do on my template sensor which delivers the data?

That is expected, but I'll introduce a feature to "extend to now"

Does this mean the previous behaviour to stop the graph with the last given value with
extend_to_end: false
will be replace by
extend_to: now ?
I explicitly do not want to extend some graphs and I am also not interested to span them to "now" if the old value is in the past...

No, it's replaced by extend_to: false

Thanks, you were faster than i could edit my initial question :-)


Suggestion: 1.18.2 Wicker recipe change

Both the sugar cane and fiber recipes produce 3 wicker patches each. In my own opinion, perhaps the flax fiber stalks could produce more? Like 4? It already takes more then two crafts of wicker patches to craft a basket.
Are they placeable, these wicker patches?

You may already know this, but recipes can be overridden with datapacks.
I left the wicker crafting yield at parity with the sugarcane recipe in the base mod because Flax matures more quickly than Sugarcane, and is more prolific (multiple stalks yielded per block of crop). In this way, the Flax to Wicker recipe already seemed "cheaper" and allows you to keep your Sugarcane stalk ... stock ... for paper and what-have-you. However I'm open to discussion on any balance points of course.

Aw, the wicker isn't placeable. Thats fine.
I think sugar cane should offer 4 wicker then, since it does take longer. That way its not leaving a pile of extra wicker patches laying around.


Added a 'relax_camel_case' proto-objc compiler option.

When this option is set, only the first letter after an underscore is
forced to uppercase.  I added this feature so that the generated obj-c code
could more closely match our own in-house camel casing style.
This is better explained in the updated the README.md file.
Thank you for all your work maintaining this repo!

Thanks a lot!


toolbox: init at <IP_ADDRESS>

Description of changes
The two fetched patches from #110473 have been merged upstream, so they have been dropped, but we have carried through the glibc patch. It sounds like the ux of this is still pretty sharp, but I am happy to try and drive this one forward.
Fixes #96115
Closes #110473
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1492

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1541

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1571

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 203904 run on x86_64-linux 1

1 package built:

toolbox

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1605


fix comment

This + 1 is what distinguishes already fully written slot from a free or partially written slot

bors r+


Cosmetic fixes for minor issues

Mainly cosmetic fixes for minor issues raised recently - see #1715 and #1749

Let's ship this to v0.9.15.

If no-one adds any further comments I'll merge this in a week or so for v0.9.15


Unable to detect MRZ Code

Hai there,
I tried this plugin to detect MRZ code , but unfortunately nothing results ,
Is this Plugin supports MRZ detection.

Hello! Unfortunately QR and MRZ scanning is not supported at this time. We plan to implement them in 0.2.0 and 0.3.0 versions


Installation error occurred, seems to still be a path issue with conda.

Run INSTALL_BARK_INFINITY.bat.
Received errors as follows：
ERROR:root:Command '"C:\00000_suno_ai\bark\installer_files\conda\condabin\conda.bat" activate "C:\00000_suno_ai\bark\installer_files\env" >nul && ffdl install -U --add-path 6.0@full' failed with exit status code '1'. Exiting...
If there is an error, take note of it here.
Run START_BARK_INFINITY.bat
Received errors as follows：
Running command: "C:\00000_suno_ai\bark\installer_files\conda\condabin\conda.bat" activate "C:\00000_suno_ai\bark\installer_files\env" >nul && conda
Running command: "C:\00000_suno_ai\bark\installer_files\conda\condabin\conda.bat" activate "C:\00000_suno_ai\bark\installer_files\env" >nul && python bark_webui.py
python: can't open file 'C:\00000_suno_ai\bark\bark\bark_webui.py': [Errno 2] No such file or directory
If there is an error, take note of it here.

If you downloaded the zip less than 3 hours ago, can you try again with a fresh downloaded .zip file? It looks like it didn't install at all, even to the point of downloading bark_webui.py.

Okay, the problem is resolved. It was because of my antivirus software that blocked the installation program.

Great, thanks for following up.


beets: fix lyrics dependency

Motivation for this change
Noticed this was missing during usage
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 115921 at 2a43b93f run on aarch64-linux 1

4 packages built successfully:

beets
beetsExternalPlugins.alternatives
beetsExternalPlugins.copyartifacts
beetsExternalPlugins.extrafiles


try changing formatting for env markers differently

Perhaps this will enable dependabot to parse them correctly?
Since it has no problem with the pywin32 related env markers

This does not seem to have any effect. Most likely dependabot uses python 3.8 or newer to parse the requirements files so reqs that are marked as 3.7 only are ignored


⚠ Bofrost.nl has degraded performance

In 3dddc87, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 940 ms

Resolved: Bofrost.nl performance has improved in 4f65632.


feat: expose configs

Closes #1331
This may have a small impact on startup time (5-10 ms)

@kylo252 @williamboman I think this is what you all wanted.
:lua print(vim.inspect(require('lspconfig.servers.pyright')))

This may have a small impact on startup time (5-10 ms)

I didn't notice any performance degradation following this method in my benchmarks, see the scripts here: https://gist.github.com/kylo252/8ed50f2d69c069d066bd6ef69c9ee182

Baseline

hyperfine "./nv-bench" -r 100 --cleanup "rm -f $HOME/.cache/nvim/{lsp.log,log}" --export-markdown results-baseline.md --command-name 'baseline'

Command
Mean [ms]
Min [ms]
Max [ms]
Relative

baseline
39.2 ± 6.9
30.3
61.5
1.00

Modularized

hyperfine "./nv-bench" -r 100 --cleanup "rm -f $HOME/.cache/nvim/{lsp.log,log}" --export-markdown results-1479.md --command-name 'modular-configs-1479'

Command
Mean [ms]
Min [ms]
Max [ms]
Relative

modular-configs-1479
39.3 ± 5.4
30.7
63.7
1.00

Why not call the new folder simply servers?

I called it servers originally, I changed it in a later push. These aren't language servers, they are configurations for language servers. I do not want people getting confused.

Sure, sligh

This may have a small impact on startup time (5-10 ms)

I didn't notice any performance degradation following this method in my benchmarks, see the scripts here: https://gist.github.com/kylo252/8ed50f2d69c069d066bd6ef69c9ee182, where I've added about 50 servers.
Results
* Baseline

hyperfine "./nv-bench" -r 100 --cleanup "rm -f $HOME/.cache/nvim/{lsp.log,log}" --export-markdown results-baseline.md --command-name 'baseline'

Command 	Mean [ms] 	Min [ms] 	Max [ms] 	Relative
baseline 	39.2 ± 6.9 	30.3 	61.5 	1.00
* Modularized

hyperfine "./nv-bench" -r 100 --cleanup "rm -f $HOME/.cache/nvim/{lsp.log,log}" --export-markdown results-1479.md --command-name 'modular-configs-1479'

Command 	Mean [ms] 	Min [ms] 	Max [ms] 	Relative
modular-configs-1479 	39.3 ± 5.4 	30.7 	63.7 	1.00

Try on slower hardware. I don't think the performance impact is noticeable enough to be a blocker.

@lithammer @mfussenegger @clason @neovim/lsp Does anyone have objection to this change?

Ok, I think everyone is in agreement. Would be great if others could also daily drive this and report any breakages, I'll clean up the commits.

I wrote a config for nvim-lspconfig which doesn't live in the nvim-lspconfig repository. How can I make my config compatible with both older versions and newer versions of nvim-lspconfig?

At nvim-lspconfig commit 10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49, require("lspconfig/configs") works and require("lspconfig.configs") doesn't work ("attempt to index a boolean value" when calling .setup).
At nvim-lspconfig commit 97da7ed12e7e0d86e735e38a8170e941d4ed3e9a, require("lspconfig.configs") works and require("lspconfig/configs") doesn't work ("Cannot access configuration for quick_lint_js. Ensure this server is listed in server_configurations.md` or added as a custom server.").

See :help lspconfig-adding-servers

See :help lspconfig-adding-servers

Those instructions don't work with nvim-lspconfig commit 10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.
~/.config/nvim/init.lua:
require('plugins') -- Packer

local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'
if not configs.foo_lsp then
  configs.foo_lsp = {
    default_config = {
      cmd = {'quick-lint-js', '--lsp-server'},
      filetypes = {'javascript'};
      root_dir = function(fname)
        return lspconfig.util.find_git_ancestor(fname)
      end;
      settings = {};
    };
  }
end
lspconfig.foo_lsp.setup{}

Results:
When I hope a .js file, I see this:
Error detected while processing /home/strager/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/strager/.config/nvim/init.lua:17: attempt to index field 'foo_lsp' (a nil value)

Note: This init.lua does work correctly with nvim-lspconfig commit 97da7ed12e7e0d86e735e38a8170e941d4ed3e9a; I see diagnostics as expected.

@strager the above snippet you've posted (sans require('plugins')) works fine for me, I dropped it into my config and was able to run quicklint.js

@strager the above snippet you've posted (sans require('plugins')) works fine for me

With which version of nvim-lspconfig? 10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49? Something older?

I'm using the latest lspconfig.

I'm using the latest lspconfig.

The latest nvim-lspconfig works for me. My question was not about only the latest nvim-lspconfig. I want quick-lint-js' config to work with older versions of nvim-lspconfig, not just the latest. How can I do this?

...why? you can check out :help lspconfig from before the refactor. I believe it was:
local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'
if not lspconfig.foo_lsp then
  configs.foo_lsp = {
    default_config = {
      cmd = {'quick-lint-js', '--lsp-server'},
      filetypes = {'javascript'};
      root_dir = function(fname)
        return lspconfig.util.find_git_ancestor(fname)
      end;
      settings = {};
    };
  }
end
lspconfig.foo_lsp.setup{}

Ah, nvm, I get what you're asking (still not why). You would have to check the commit and have two different conditionals for each version.

...why?

I don't want people to be forced to upgrade nvim-lspconfig (pulling in a bunch of breaking changes) and also upgrade Neovim (pulling in more breaking changes) just to try my tool (quick-lint-js).

You would have to check the commit and have two different conditionals for each version.

Yup. I'm asking how to do this.

There's no version string I can check. (Or is there?)
require("lspconfig.configs") and require("lspconfig/configs") return non-nil in old and new versions. So I can't check which one will work by checking the result of require.

I don't want people to be forced to upgrade nvim-lspconfig (pulling in a bunch of breaking changes) and also upgrade Neovim (pulling in more breaking changes) just to try my tool (quick-lint-js).

There's really only two breaking changes between neovim 0.6 and nvim-lspconfig, most of which would not affect normal users.
No version string, there's not a good way you can distinguish the version.
Why don't we just add quick-lint-js to lspconfig? Then it will be 1 line to set it up.


Document items annotated as deprecated

Items (messages, fields) from input protos that are annotated as deprecated should have an appropriate @deprecated yardoc tag on their corresponding classes/methods.

Reserving for @aandreassa


Replace hoa/mime

Replace hoa/mime by another package for MIME type lookup (this library is way to heavy for the job and carries a lot of unused dependencies)

Done in 1.2.3


FileNotFoundError after choosing project type.

When I try to create the project, it gives this error:

In this screenshot I tried in Python 3.10.9. First in 3.11.1 same error, but apparently Cookiecutter doesn't work in 3.11 anyway.
I have Python 3.8, 3.10 and 3.11 installed at same time right now.
And I don't know why this error.

@luccasbpereira closing this issue as you managed to get it working after formatting your PC.


Issue with Codewalk: Share Memory By Communicating

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.6.3
What operating system and processor architecture are you using (go env)?
Centos 7 / amd64
What did you do?
Found an issue with the example code given at :
https://golang.org/doc/codewalk/sharemem/
What did you expect to see?
I expected to see the Poll function being called at a fairly regular interval.
What did you see instead?
Dead lock between the pending and complete channels. It seems that the second case in the select statement was never getting hit after the first three status updates. The code just continues to print the same status as it started with. I came up with a partial solution by creating a ticker object to write garbage status to the status channel in main. I am incredibly new with Go and don't know what the intended solution should be.  Here is the original code with my fix.
CODE
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"log"
"net/http"
"time"
)
const (
numPollers     = 2                // number of Poller goroutines to launch
pollInterval   = 60 * time.Second // how often to poll each URL
statusInterval = 10 * time.Second // how often to log status to stdout
errTimeout     = 10 * time.Second // back-off timeout on error
)
var urls = []string{
"http://www.google.com/",
"http://golang.org/",
"http://blog.golang.org/",
}
// State represents the last-known state of a URL.
type State struct {
url    string
status string
}
// StateMonitor maintains a map that stores the state of the URLs being
// polled, and prints the current state every updateInterval nanoseconds.
// It returns a chan State to which resource state should be sent.
func StateMonitor(updateInterval time.Duration) chan<- State {
updates := make(chan State)
urlStatus := make(map[string]string)
ticker := time.NewTicker(updateInterval)
go func() {
for {
select {
case <-ticker.C:
logState(urlStatus)
case s := <-updates:  // Only gets called three times
urlStatus[s.url] = s.status
}
}
}()
return updates
}
// logState prints a state map.
func logState(s map[string]string) {
log.Println("Current state:")
for k, v := range s {
log.Printf(" %s %s", k, v)
}
}
// Resource represents an HTTP URL to be polled by this program.
type Resource struct {
url      string
errCount int
}
// Poll executes an HTTP HEAD request for url
// and returns the HTTP status string or an error string.
func (r *Resource) Poll() string {
resp, err := http.Head(r.url)
if err != nil {
log.Println("Error", r.url, err)
r.errCount++
return err.Error()
}
r.errCount = 0
return resp.Status
}
// Sleep sleeps for an appropriate interval (dependent on error state)
// before sending the Resource to done.
func (r *Resource) Sleep(pending chan<- Resource) {
time.Sleep(pollInterval + errTimeouttime.Duration(r.errCount))
pending <- r
}
func Poller(pending <-chan *Resource, complete chan<- Resource, status chan<- State) {
/ Seems like we cannot write again due to need to write to status */
for r := range pending { // WATING HERE
s := r.Poll()
status <- State{r.url, s}
complete <- r
}
}
func main() {
// Create our input and output channels.
pending, complete := make(chan *Resource), make(chan *Resource)
// Launch the StateMonitor.
status := StateMonitor(statusInterval)
// Launch some Poller goroutines.
for i := 0; i < numPollers; i++ {
go Poller(pending, complete, status)
}
// Send some Resources to the pending queue.
go func() {
for _, url := range urls {
pending <- &Resource{url: url}
}
}()
/* MY TEMP FIX /
go func() {
ticker := time.NewTicker(5 * time.Second)
for {
select {
case <-ticker.C:
log.Println("Writing garbage to status")
status <- State{"example.com" , "all is garbage"}
}
}
}()
/ END MY TEMP FIX */
for r := range complete { // WAITING HERE
go r.Sleep(pending)
}
}
CODE

CC @campoy

I took a look at the code, and it seems fine to me.  The URLs are polled every pollInterval, which is every 60 seconds.


Quick fix support?

Hi,
Just wondering, any chances for getting quick-fix support? :)
Like for example for creating nonexisting methods, type constructors with non existing parameters, etc... , eg:
When I have a type SomeType with default non-parameter constructor like this:
public class SomeType {
 // empty, just type declaration
}

and I want to call it this way:
new SomeType("string value")

so then vscode can create the constructor when I use the quick-fix feature.
It would be great to make vscode automatically fix it by creating constructor with string parameter type in SomeType :)

Yes, definitely. This is something planned, but it's a feature to implement in the language server itself with the textDocument/codeAction API.


feat: escrow frontend

Type of change

New feature

Changes
The following changes have been made:

Add basic frontend components

Notes
Related Issues

Closes #30

Currently blocked by this issue

Closing due to inactivity


Unable to view PDF File inline for Bot Framework

Hello Bot Framework support,
I am trying to get a pdf to display inline for the Direct Line Channel of a Bot. I used the following code below, but only received a link to the file.

Screenshot is from Bot Framework Emulator.

FYI, out of my experience, pdf.js can be used to generate PDF previews inside a browser. But it is quite resource intensive, requires modern browsers (Web Workers), and may not work perfectly with some fonts. It is the PDF reader engine behind Firefox.
You can try build one based from our custom attachment renderer sample.

FYI, out of my experience, pdf.js can be used to generate PDF previews inside a browser. But it is quite resource intensive, requires modern browsers (Web Workers), and may not work perfectly with some fonts. It is the PDF reader engine behind Firefox.
You can try build one based from our custom attachment renderer sample.

This is not an action item to Web Chat due to resources.


[Bug] Water color in Basalt deltas is blue, not red

Or maybe it should be gray, not sure how it looks like in BE

Bedrock Edition has it the standard blue, but it should be patched to appear grey (IIRC) when using BedrockWaters--will investigate!


Autogenerated SSL certificate too weak

Using django-extensions 1.9.9 you get SSL error that autogenerated cert is too weak.
Workaround, manually creating cert, documented here
https://www.reddit.com/r/django/comments/2jbs45/django_runserver_plus_with_ssl_and_firefox_33/

Link: https://github.com/pallets/werkzeug/issues/611

I cannot reproduce this... when I run:
./manage.py runserver_plus --cert=/tmp/temporary.cert
On latest Django-Extensions, Werkzeug, Django and Python and Firefox I need to accept the self-signed certificate and then all works fine.
Could you check the versions you are using ?
(Since this should be fixed in Werkzeug as of 0.10)
Please submit a PR to enforce using a minimum version of werkzeug that creates the right certificates.


EOL 4.0.x line

I'd propose ending maintenance mode for 4.0.x series starting from the upcoming version.

Slightly tricky. Probably should send this to cas-user and see what sort of feedback we get. 4.1.9 might be too aggressive.

I did change the topic of this issue to be about 4.0.x. That is a much more legible candidate for EOLing. We probably have a few more months before cutting 4.1.x loose.

Discussed in PMC. Got a plan to move forward


Hooks and cascade using backend calls

Question
I have two fields (select) that currently get populated based on backend calls
Field1: devicetemplId
Field2: deviceId
I would like to apply cascade to the two fields where selection of a value in Field1 should trigger a backend call to get the data related to the selection(Field1) and populate the values for Field2.
For some reason selection within Field1 is not passed below to Field2
Additionally I would like extend this code to support multiselect.
Can you please help me figure out what I am doing wrong?
The code I have so far is
       {
      fieldGroupClassName: "row",
      fieldGroup: [
      {
        type: "select",
        key: "devicetemplId",
        className: "col-6 col-md-6 col-lg-4",
        templateOptions: {
          type: 'array',
          options: [],
          label: "Device Template Model",
          placeholder: "Select Device Template",
        },
        hooks: {
          onInit: (field) => {
            this.userApi
              .getDevicedefs(this.userId)
              .subscribe((devicedefs: Devicedef[]) => {
                this.devicedefCatalog = devicedefs;
                const xy = [];
                devicedefs.forEach((devicedef: Devicedef) => {
                  const item = {
                    value: devicedef.id,
                    label: devicedef.model,
                  };
                  xy.push(item);
                });
                field.templateOptions.options = xy;
              });
            field.formControl.valueChanges.subscribe((x) => {
              this.devicedefCatalog.forEach((y) => {
                if (y.devicemodel === x) {
                  this.geofenceModel.devicetemplId = y.devicemodel;
                }
              });
            });
          },
        },
      },
      {
        type: "select",
        key: "deviceId",
        className: "col-6 col-md-6 col-lg-4",
        templateOptions: {
          type: 'array',
          options: [],
          label: "Device Model",
          placeholder: "Select Device Model",
        },
        hooks: {
          onInit: (field) => {
            const form = field.parent.formControl;
            return form.get('deicetemplateId').valueChanges.pipe(
              // takeUntil(this.onDestroy$),
              startWith(form.get('devicetemplId').value),
              tap(devicetemplateId => {
                if(devicetemplateId) {
                  console.log(devicetemplateId);
            this.userApi
              .getDevicedefsDevices(this.userId, devicetemplateId)
              .subscribe((devices: Device[]) => {
                this.deviceCatalog = devices;
                const xy = [];
                devices.forEach((device: Device) => {
                  const item = {
                    value: device.id,
                    label: device.deviceid,
                  };
                  xy.push(item);
                });
                field.templateOptions.options = xy;
              });
            field.formControl.valueChanges.subscribe((x) => {
              this.deviceCatalog.forEach((y) => {
                if (y.deviceid === x) {
                  this.geofenceModel.deviceId = y.deviceid;
                }
              });
            });
          }
        }));
        },
        },
        // This is my earlier code which works independently
        // hooks: {
        //   onInit: (field) => {
        //     this.userApi
        //       .getDevices(this.userId)
        //       .subscribe((devices: Device[]) => {
        //         this.deviceCatalog = devices;
        //         const xy = [];
        //         devices.forEach((device: Device) => {
        //           const item = {
        //             value: device.id,
        //             label: device.deviceid,
        //             // ? devicedef.devicemake +
        //             //   " (" +
        //             //   devicedef.devicemodel +
        //             //   ")"
        //             // : devicedef.devicemodel,
        //           };
        //           xy.push(item);
        //         });
        //         field.templateOptions.options = xy;
        //       });
        //     field.formControl.valueChanges.subscribe((x) => {
        //       this.deviceCatalog.forEach((y) => {
        //         if (y.deviceid === x) {
        //           this.geofenceModel.deviceId = y.deviceid;
        //         }
        //       });
        //     });
        //   },
        // },
      },
    ],
  }

check our demo example https://formly.dev/examples/other/cascaded-select

@aitboudad
I actually took a different approach based on #1738
name/value/group and modified my backend call to support that scenario.
While I can do multiple selects in this case, is there a way I can select the group and it gives me everything under it?
If Yes, can you please share some details around it?
thanks

is there a way I can select the group and it gives me everything under it?

Not sure what do you mean by the group but if I clearly understood you may define you can define a helper function getField to find a field by key: https://github.com/ngx-formly/ngx-formly/issues/815#issuecomment-374586474

is there a way I can select the group and it gives me everything under it?

Not sure what do you mean by the group but if I clearly understood you may define you can define a helper function getField to find a field by key: https://github.com/ngx-formly/ngx-formly/issues/815#issuecomment-374586474


backend: Update dependencies

Signed-off-by: Santhosh Nagaraj S<EMAIL_ADDRESS>

I wonder if you reviewed the release notes/change logs for these? Most are minor and patch updates (which can include breaking changes), but there are some major version changes too.

I checked yesterday once again to check if there are any breaking changes and made the changes accordingly.


Licensing

I was wondering what the licensing is on this repo? I don't see a LICENSE file nor do I see a specification in the package.json, which essentially limits the ability to fork or modify. Please advise. Thanks!

Oh, it seems like I forgot to add it, will fix that

Awesome, thank you so much!


Update AWS Lambda Executor to use AWSExecutor

Acceptance Criteria

[ ] Pass any required attributes from credentials_file, region, s3_bucket_name, profile, execution_role, and log_group_name to AWSExecutor super class
[ ] Re-structure executor in order to accord with abstract class methods as defined in RemoteExecutor, namely _upload_task, submit_task, get_status, _poll_task, _query_result, and cancel when appropriate
[ ] Update unit tests for executor
[ ] Update doc strings for executor

Closed as duplicate of https://github.com/AgnostiqHQ/covalent-awslambda-plugin/issues/19


[BEAM-7850] Adds documentation for environment_id fields.

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

R: @lostluck
CC: @robertwb @lukecwik

Thanks!


Update initial dm

PR to update the Welcome Bot's initial direct message content.

Update content
Show the "I've kicked off some conversations..." only if tracked onboarding messages exists.

Fixes: #30051
Screenshots and screen captures:
Realms with old onboarding messages

Realms with new onboarding messages

Note: We're further improving the interaction with welcome bot in #30049

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Works for me in manual testing! I tried the default realm (non-admin user), and a new realm (admin and non-admin).

Merged, thanks @prakhar1144! I'm really excited to have this onboarding rework project finally getting to the late stages.


False positives for some methods of lists for boolean trap rule FBT003

When providing True or False as an argument to the append, count, insert, and remove methods of a list, the rule for catching boolean traps (FBT003) yields false positives even though the arguments are positional-only.
I created file.py which contains:
some_list = []
some_list.append(True)
some_list.count(True)
some_list.insert(0, True)
some_list.remove(True)

Using ruff v0.0.265, I ran:
ruff file.py --select FBT003 --isolated

and got the output:
file.py:2:18: FBT003 Boolean positional value in function call
file.py:3:17: FBT003 Boolean positional value in function call
file.py:4:21: FBT003 Boolean positional value in function call
file.py:5:18: FBT003 Boolean positional value in function call

This follows up on #1336.
Thank you!

Wow, that was quick!  Thank you for fixing it!

No prob, it's an easy one :)


Bad optimisation on Vars.time

The optimisation there is not expected
var factor = 1000;
var last = Math.floor(Vars.time / factor);
while (Math.floor(Vars.time / factor) == last);
print "I want to arrive here but I cant";
printflush(message1);

See the infinite loop at line 3:
set factor:2:4 1000
op div &t0 @time factor:2:4
op floor last:3:4 &t0
jump 3 always  <------------ Yeeepeeee :-D
print "I wont arrive here"
printflush message1

By the way, the optimiser should have discarded the print and printflush if the loop were ok.
Best regards

Hello
It seems that the website does not reflect this change.
I don't know which version of the website (should be a little enhancement to display it somewhere ?)
I've used this code as the previous one was a little buggy (!!)
var factor = 1000;
var message = getBuilding("message1");
var last = Math.floor(Vars.time / factor);
while (Math.floor(Vars.time / factor) == last);
print("I want to arrive here but I cant");
printFlush(message);

Mlogjs is really great !

The github pages website is updated on each release. To view the latest changes, you can checkout out the unreleased version

About the unreleased version.
You may ignore this post since it's about unreleased (!).
=> let me know if such comment is useless of if you're happy with it.
I've seen that generated code is longer and a few slower than the stable one (my js gives 719 lines vs 693)
*** Which may become a issue as asm is limited to 1000 lines
Loss of speed on my js is about 1%
=> My guess is that optimisation of expression evaluation seems to be ok but
suffers of spurious jumps as saw in this code (as already commented there
=> My second guess is that jump optimization once implemented will reduce the oversize.
var a;
var b;
while (true) {
    if (a == 0 && b == 1)
    {
        print("do some stuff");
    }
}
print("end");

Generated asm should be
op equal &t0 a:1:4 0
jump 0 equal &t0 0
op equal &t0 b:2:4 1
jump 0 equal &t0 0
print "do some stuff"
jump 0 always

Which becomes same number of rows of old version but running faster !
Anyway, I guess that the short-circuit optimisation could lead to larger code that won't fit in 1000 lines.
=> Having an option (if both generators are available) could help in this situation
(optimize for size / speed).
My js has a fps counter, loop is 1.06s vs 1.05s when the processor is connected to

core
4 containers
1 disass
1 surge alloy factory
1 phase factory
2 small silicium factories
1 big sicium factory
(if ever you'd like to test)

Thanks again for this very cool project !
Here is my js script
const version: String = "hyper-controller-20240325-4";
var v = version;    // First line of asm
const display_version = "[violet]" + version + "[white]";
var min_power = 0;
var message;
var keep_coal = 6500;
var keep_copper = 6500;
var keep_graphite = 6500;
var keep_lead = 8000;
var keep_sand = 6500;
var keep_tit = 6500;
var keep_pyr = 4080;
var keep_tho = 6500;
var keep_sil = 6500;
var keep_spore = 6500;
var keep_scrap = 6500;
var keep_phase = 5000;
var keep_surge = 6500;
var keep_blast = 6500;
var keep_glass = 6500;
var keep_plast = 6500;
var min_cryo = 25;

const need_color: String = "[cyan]";
const color_send: String = "[blue]";
const error = "[red]";
const warning = "[yellow]";
const white: String = "[white]";

var powSteam = 330;
var powCombustion = 60;
var powDifferential = 1080;

var n = "message";

var loop = 0;                // Loops incremental counter
var core_max_rsrc = 4000;    // Max resources of the core
var link_low_rsrc = 3990;    // Hyper link enable build rsrc if below this value
var core : AnyBuilding = undefined;

var copper, coal, glass, scrap, lead, sand, pyr, tit, tho, sil, graphite, plast, phase, surge, blast, spore;
var enough_lead, enough_blast, enough_plast, enough_glass, enough_copper, enough_surge, enough_phase, enough_graphite, enough_scrap, enough_coal, enough_sand, enough_tit, enough_pyr, enough_tho, enough_sil, enough_spore;
var enabled : Boolean;
var mass_enabled = false;

var pow_node : AnyBuilding = undefined;
var pow_stored = 0, pow_capacity = 0;
var impact_next_change = Vars.second;   // Next time to change state of impact reactor

// Automatic select item to send for launchPad
// will never go below keep_{rsrc}
var launch_item = undefined;
var sender: Boolean;   // True if we find a unloader (normally connected to launchPad)

var standalone_disass_tho_cryo;
var need_disass;
var power = -999;
var power_max = 0;  // max power ever seen

// memory cell link
var id = undefined;
var time = undefined;   // Last time we received something

var last_tick = Vars.tick;
var avg_ticks = 60;

while (true) {
    loop++;
    var ticks = Vars.tick - last_tick;
    last_tick = Vars.tick;
    avg_ticks = 0.7 * avg_ticks + 0.3 * ticks;

    var latency = avg_ticks / 60;
    latency = Math.floor(latency * 100) / 100;

    print(display_version, " #", id, "\nLoop ", loop, " / ", latency, "s\n");

    sender = false;
    if (core !== undefined) {
        copper = core.copper;
        coal = core.coal;
        lead = core.lead;
        sand = core.sand;
        glass = core.metaglass;
        pyr = core.pyratite;
        tit = core.titanium;
        tho = core.thorium;
        sil = core.silicon;
        scrap = core.scrap;
        graphite = core.graphite;
        plast = core.plastanium;
        phase = sensor(Items.phaseFabric, core);
        surge = sensor(Items.surgeAlloy, core);
        blast = sensor(Items.blastCompound, core);
        spore = sensor(Items.sporePod, core);

        enough_copper = copper > keep_copper;
        enough_lead = lead > keep_lead;
        enough_coal = coal > keep_coal;
        enough_sand = sand > keep_sand;
        enough_tit = tit > keep_tit;
        enough_pyr = pyr > keep_pyr;
        enough_tho = tho > keep_tho;
        enough_sil = sil > keep_sil;
        enough_spore = spore > keep_spore;
        enough_scrap = scrap > keep_scrap;
        enough_graphite = graphite > keep_graphite;
        enough_phase = phase > keep_phase;
        enough_surge = surge > keep_surge;
        enough_blast = blast > keep_blast;
        enough_glass = glass > keep_glass;
        enough_plast = plast > keep_plast;
    }
    else
    {
        enough_copper = true;
        enough_lead = true;
        enough_coal = true;
        enough_sand = true;
        enough_tit = true;
        enough_pyr = true;
        enough_tho = true;
        enough_sil = true;
        enough_spore = true;
        enough_scrap = true;
        enough_graphite = true;
        enough_phase = true;
        enough_surge = true;
        enough_blast = true;
        enough_glass = true;
        enough_plast = true;
    }
    var old_std_disass = standalone_disass_tho_cryo;
    standalone_disass_tho_cryo = 0;
    var power_left = power;
    for (let i = Vars.links - 1; i >= 0; i--) {
        var unhandled: Boolean = false;
        var link : AnyBuilding = getLink(i);
        var ltype = link.type;
        if (ltype == Blocks.thoriumReactor) {
            var enough_cryo = sensor(Liquids.cryofluid, link) >= min_cryo;
            enabled = (power_left < -15) && enough_cryo;
            // print("Tho enabled ", enabled, ", pleft ", power_left, ", enough_cryo ", enough_cryo, "\n");
            if (core === undefined) {
                var t: number = sensor(Items.thorium, link);
                var m = link.itemCapacity;
                standalone_disass_tho_cryo += m - t;
                if (!enough_cryo)
                    standalone_disass_tho_cryo = 1000;
                if (enabled && link.enabled == false)
                    power_left = power_left + 30 * t;
            }
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.powerNode || ltype == Blocks.powerNodeLarge) {
            pow_node = link;
        }
        else if (ltype == Blocks.disassembler) {
            if (core) {
                asm`control enabled ${link} ${need_disass} 0 0`;
            }
            else {
                enabled = old_std_disass > 1;
                asm`control enabled ${link} ${enabled} 0 0`;
            }
        }
        else if (ltype == Blocks.impactReactor) {
            // print("impact cryo: ", link.cryofluid, "\n");
            var cryo = link.cryofluid;
            print("cryo:", cryo, "\n");
            var capa = link.powerNetCapacity;
            if (cryo > 10) {
                enabled = (sensor(Items.blastCompound, link) > 5)
                    && ((pow_stored > 30000) || (capa == 0))
                    && (power_left < -200);
                print("impact ", capa, " power_left:", power_left, " pow_stored:", pow_stored, ":", enabled, "\n");

                if (enabled || (enabled != link.enabled) && (Vars.second > impact_next_change)) {
                    if (enabled)
                        impact_next_change = Vars.second + 60;
                    asm`control enabled ${link} ${enabled} 0 0`;
                    power_left = power_left - 6300;
                }
            }
            else
                asm`control enabled ${link} false 0 0`;

            print("Impact Power_left, ", power_left, " next:", Math.max(0, Math.floor(impact_next_change - Vars.second)), "\n");
        }
        else if (ltype == Blocks.steamGenerator
            || ltype == Blocks.combustionGenerator // 60
            || ltype == Blocks.differentialGenerator) {
            var plink = powSteam;
            enabled = link.enabled;
            if (ltype == Blocks.combustionGenerator)
                plink = powCombustion;
            else if (ltype == Blocks.differentialGenerator)
                plink = powDifferential;
            if (power_left < -50) {
                enabled = true;
                if (link.enabled == false)
                    power_left += plink;
            }
            else {
                if (power >= plink && link.enabled) {
                    enabled = false;
                    power_left -= plink;
                    enabled = false;
                }
            }
            asm`control enabled ${link} ${enabled} 0 0`;
            // print("Power ", power_left, "/", power, ", link ", plink, " en=", enabled, "\n");
        }
        else if (ltype == Blocks.coalCentrifuge) {
            enabled = coal != core_max_rsrc;
            asm`control enabled ${link} ${enabled} 0 0`;
            if (link.oil == 0)
                print(warning + "Need oil in ", link, "\n" + white);
        }
        else if (ltype == Blocks.launchPad) {
            enabled = link.totalItems / link.itemCapacity >= link.progress;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.message) {
            message = link;
        }
        else if (ltype == Blocks.coreShard) {
            core = link;
        }
        else if (ltype == Blocks.coreFoundation) {
            core = link;
        }
        else if (ltype == Blocks.coreNucleus) {
            core = link;
        }
        else if (ltype == Blocks.graphitePress || ltype == Blocks.multiPress) {
            if (graphite == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_coal;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.siliconSmelter || ltype == Blocks.siliconCrucible) {
            enabled = enough_coal && enough_sand;
            if (sil == core_max_rsrc)
                enabled = false;
            else if (ltype == Blocks.siliconCrucible)
                enabled = enabled && enough_pyr;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.massDriver) {
            enabled = (mass_enabled && link.totalItems > 50) || (link.totalItems == 0);
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.memoryCell) {
            const memory = new Memory(link, 64);
            if (core) {
                print("Dumping to memory\n");
                id = 0;
                memory[0] = 65; // controller
                memory[1] = 0; // main controller
                memory[2] = core_max_rsrc;
                memory[3] = link_low_rsrc;
                memory[4] = Math.floor(Vars.time);
                memory[5] = min_power;
                memory[10] = copper;
                memory[11] = coal;
                memory[12] = lead;
                memory[13] = sand;
                memory[14] = glass;
                memory[15] = pyr;
                memory[16] = tit;
                memory[17] = tho;
                memory[18] = sil;
                memory[19] = scrap;
                memory[20] = graphite;
                memory[21] = plast;
                memory[22] = phase;
                memory[23] = surge;
                memory[24] = blast;
                memory[25] = spore;
            }
            else if (memory[0] == 65) {
                var cell_id = memory[1];
                var next_id = cell_id + 1;
                var last_update = Math.floor(Vars.time - memory[4]);
                // print("Last update: ", last_update, ", id=", id, "\n");
                if (id === undefined || id > next_id)
                    id = next_id;
                if (last_update > 10000) {
                    print(warning + "Resync, id=", id, white + "\n");
                    memory[0] = 0;  // data too old, trying to reconnect
                    id = undefined;
                }
                if (id != undefined && id > cell_id) {
                    print("Retrieving data from cell #", cell_id, ", id=", id, "\n");
                    core_max_rsrc = memory[2];
                    link_low_rsrc = memory[3];
                    time = Math.floor(Vars.time);
                    min_power = memory[5];
                    copper = memory[10];
                    coal = memory[11];
                    lead = memory[12];
                    sand = memory[13];
                    glass = memory[14];
                    pyr = memory[15];
                    tit = memory[16];
                    tho = memory[17];
                    sil = memory[18];
                    scrap = memory[19];
                    graphite = memory[20];
                    plast = memory[21];
                    phase = memory[22];
                    surge = memory[23];
                    blast = memory[24];
                    spore = memory[25];
                }
                if (id != undefined && id <= cell_id) {
                    print("Transmitting data to cell #", cell_id, ", id=", id, "\n");
                    memory[0] = 65;
                    memory[1] = id;
                    memory[2] = core_max_rsrc;
                    memory[3] = link_low_rsrc;
                    memory[4] = time;
                    memory[10] = copper;
                    memory[11] = coal;
                    memory[12] = lead;
                    memory[13] = sand;
                    memory[14] = glass;
                    memory[15] = pyr;
                    memory[16] = tit;
                    memory[17] = tho;
                    memory[18] = sil;
                    memory[19] = scrap;
                    memory[20] = graphite;
                    memory[21] = plast;
                    memory[22] = phase;
                    memory[23] = surge;
                    memory[24] = blast;
                    memory[25] = spore;
                }
            }
            else if (id !== undefined) {

                // Allocate this memory cell to this processor.
                // print("Allocating memory #", id, "\n");
                memory[0] = 65; // controller
                memory[1] = id; //
                memory[4] = Vars.time;
            }
        }
        else if (ltype == Blocks.kiln) {
            if (glass == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_lead & enough_sand;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.sporePress) {
            if (spore == core_max_rsrc)
                enabled = false;
            else {
                enabled = true;
                if (link.oil == 0)
                    print(warning + "Need oil in ", link, "\n" + white);
            }
        }
        else if (ltype == Blocks.plastaniumCompressor) {
            if (plast == core_max_rsrc)
                enabled = false;
            else {
                enabled = enough_tit;
                if (link.oil == 0)
                    print(warning + "Need oil in ", link, "\n" + white);
            }
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.phaseWeaver) {
            if (phase == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_sand & enough_tho;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.surgeSmelter) {
            if (surge == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_copper & enough_lead & enough_tit & enough_sil;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.pyratiteMixer) {
            if (pyr == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_coal & enough_lead & enough_sand;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.blastMixer) {
            if (blast == core_max_rsrc)
                enabled = false;
            else
                enabled = enough_pyr & enough_spore;
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.cultivator) {
            enabled = (spore < core_max_rsrc)
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else if (ltype == Blocks.unloader) {
            sender = true;
            if (launch_item !== undefined) {
                asm`control enabled ${link} true 0 0`;
                asm`control config ${link} ${launch_item} 0 0`;
            }
            else
                asm`control enabled ${link} false 0 0`;
        }
        else if (link.maxHealth > 2000) {
            unhandled = true;
            // Try to avoid power big failure by deactivating
            // tower that eats a lot
            var ammo = link.ammoCapacity;
            enabled = true;
            if (ammo == undefined)
                unhandled = true;
            else {
                unhandled = false;
                if (link.powerNetStored < 60000) {
                    print("[red]Avoiding loose of power for ", ltype, " pstored=", link.powerNetStored, "[white]\n");
                    enabled = false;
                }
            }
            asm`control enabled ${link} ${enabled} 0 0`;
        }
        else
            unhandled = true;
        if (unhandled)
            print(warning + "Not handled: ", link, "\n" + white);
    }
    if (sender) {
        launch_item = undefined;
        var count = 0;
        if (count < blast && enough_blast) { launch_item = Items.blastCompound; count = blast; }
        if (count < phase && enough_phase) { launch_item = Items.phaseFabric; count = phase; }
        if (count < surge && enough_surge) { launch_item = Items.surgeAlloy; count = surge; }
        if (count < tho && enough_tho) { launch_item = Items.thorium; count = tho; }
        if (count < tit && enough_tit) { launch_item = Items.titanium; count = tit; }
        if (count < spore && enough_spore) { launch_item = Items.sporePod; count = spore; }
        if (count < plast && enough_plast) { launch_item = Items.plastanium; count = plast; }
        if (count < pyr && enough_pyr) { launch_item = Items.pyratite; count = pyr; }
        if (count < sil && enough_sil) { launch_item = Items.silicon; count = sil; }
        if (count < scrap && enough_scrap) { launch_item = Items.scrap; count = scrap; }
        if (count < glass && enough_glass) { launch_item = Items.metaglass; count = glass; }
        if (count < lead && enough_lead) { launch_item = Items.lead; count = lead; }
        if (count < graphite && enough_graphite) { launch_item = Items.graphite; count = graphite; }
        if (count < coal && enough_coal) { launch_item = Items.coal; count = coal; }
        if (count < sand && enough_sand) { launch_item = Items.sand; count = sand; }
        if (count < copper && enough_copper) { launch_item = Items.copper; count = copper; }
        if (count) {
            print(color_send + "Sending ", launch_item, ":", count, "\n" + white);
        }
        else {
            print(color_send + "Unloader stopped\n" + white);
        }
    }

    if (pow_node) {

        pow_capacity = sensor(LAccess.powerNetCapacity, pow_node);
        pow_stored = sensor(LAccess.powerNetStored, pow_node);
        power = Math.floor(pow_node.powerNetIn - pow_node.powerNetOut) - min_power;
        if (pow_node.powerNetIn > power_max)
            power_max = Math.ceil(pow_node.powerNetIn);
        if (power < 0)
            print(error + "Need power\n" + white);
        // print("pnetin ", pow_node.powerNetIn, ", pnetout ", pow_node.powerNetOut, "\n");
        var percent = Math.floor(100 * power / power_max + 0.5);
        print("Power: ", Math.floor(power), "/", power_max , " (", percent, "%) :", Math.floor(pow_stored / 1000), "k/", Math.floor(pow_capacity / 1000), "k\n");
        if (pow_stored < pow_capacity)
            power = Math.floor((pow_stored - pow_capacity) / 100);
    }
    else {
        power = 0;
    }

    if (core) {
        core_max_rsrc = core.itemCapacity;
        link_low_rsrc = Math.floor(core_max_rsrc * 0.97);
        need_disass = enough_scrap &&
            ((tho != core_max_rsrc) || (tit != core_max_rsrc) || (graphite != core_max_rsrc) || (sand != core_max_rsrc));
        mass_enabled = true;
        if (!enough_coal) {
            print(need_color + "Need coal\n" + white);
            mass_enabled = false;
        }
        if (!enough_lead) {
            print(need_color + "Need lead\n" + white);
            mass_enabled = false;
        }
        if (!enough_copper) {
            print(need_color + "Need copper\n" + white);
            mass_enabled = false;
        }
        if (!enough_sand) {
            print(need_color + "Need sand\n" + white);
            mass_enabled = false;
        }
        if (!enough_pyr) {
            print(need_color + "Need pyratite[white]\n" + white);
            mass_enabled = false;
        }
        if (!enough_tit) {
            print(need_color + "Need titanium\n" + white);
            mass_enabled = false;
        }
        if (!enough_tho) {
            print(need_color + "Need thorium\n" + white);
        }
        if (!enough_sil) {
            print(need_color + "Need silicium\n" + white);
            mass_enabled = false;
        }
        if (!enough_spore) {
            print(need_color + "Need spore\n" + white);
            mass_enabled = false;
        }
        if (!enough_scrap) {
            print(need_color + "Need scrap\n" + white);
            mass_enabled = false;
        }
        if (!enough_blast) {
            print(need_color + "Need blast compound\n" + white);
            mass_enabled = false;
        }
        if (!enough_graphite) {
            print(need_color + "Need graphite\n" + white);
            mass_enabled = false;
        }
        if (!enough_surge) {
            print(need_color + "Need surge alloy\n" + white);
            mass_enabled = false;
        }
        if (!enough_plast) {
            print(need_color + "Need plastanium\n" + white);
            mass_enabled = false;
        }
    } else
    {
        if (pow_node.powerNetCapacity) {
            if (pow_node.powerNetStored > 600)
                mass_enabled = true;
            else if (pow_node.powerNetStored < 10)
                mass_enabled = false;
        }
        else
            mass_enabled = true;
    }
    pow_node = undefined;

    printFlush(message);
}

The github pages website is updated on each release. To view the latest changes, you can checkout out the unreleased version

Yes I've edited the comment in the meanwhile

let me know if such comment is useless of if you're happy with it.

I'm happy with it, after all the unreleased version has to be released eventually.

My second guess is that jump optimization once implemented will reduce the oversize.

Indeed, it is one of the major problems with the current internal architecture of the compiler, as it cannot be implemented trivially without rewriting most of it from scratch (#222).

Having an option (if both generators are available) could help in this situation

A desirable improvement that may be implemented after the compiler rewrite.

May I suggest that a nth pass in order to polish the code is imho easy to code.
I can write it in C++ in less than one hour.
A first approach is to not remove the jumps, only to make them go to their final destination.
A second one should be to also remove the jumps wich may seem easy also, even with renumbering, but one have to find all the set return_var @count in order to not break functions calls.
And I understand now why you are not using labels, this would break function calls.

I do not prioritize the jump skipping optimization because it is already covered by #222. And I prefer to put more effort into finishing that pull request instead of duplicating the work just to bring a less flexible version of that feature to the main branch.

Ahem ... in fact I've finish to write the C++ code that resolves the jumps.
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <fstream>
#include <algorithm>

using namespace std;

bool is_number(const string& s)
{
  return !s.empty() && all_of(s.begin(), s.end(), ::isdigit);
}

std::string getword(std::string& s, char sep=' ')
{
  if (s.length()==0) return "";
  std::string r;
  auto pos=s.find(sep);
  if (pos == std::string::npos) pos=s.length();
  r=s.substr(0, pos);
  s.erase(0,pos+1);
  return r;
}

int getint(std::string& s)
{
  string n = getword(s);
  if (is_number(n))
    return atol(n.c_str());
  else
    return -1;
}

int main(int argc, const char* argv[])
{
  set<int> always;        // list of always jumps
  map<int, int> jumps;    // line => destination
  map<int, string> code;  // rownum => original code
  ifstream f("test.asm");
  int row_nr = 0;
  while(f.good())
  {
    string row;
    getline(f, row);
    code[row_nr] = row;
    cerr << row << endl;
    string op = getword(row);
    if (op == "jump")
    {
      int dest = getint(row);
      if (dest != -1)
      {
        jumps[row_nr] = dest;
        code[row_nr] = row;
        if (row == "always") always.insert(row_nr);
      }

    }
    // else if (op == "end")
      // jumps[row_nr] = 0;

    row_nr++;
  }

  cerr << "detected jumps: " << jumps.size() << ":" << endl;
  for(const auto& [n, d]: jumps)
    cerr << "   " << n << " goes to " << d << endl;
  cerr << endl;

  cerr << "result:" << endl;
  for(const auto& [row_nr, origin] : code)
  {
    if (jumps.find(row_nr) != jumps.end())
    {
      int end = jumps[row_nr];
      cerr << "resolving jump " << jumps[row_nr] << ", end=" << end;
      while(always.find(end) != always.end() && end != row_nr)
      {
        end = jumps[end];
        if (end == row_nr) break;
      }
      if (end == row_nr)
      {
        cerr << "jump at line row_nr is an infinite loop !" << endl;
        cout << origin << endl;
      }
      else
      {
        cerr << " -> " << end << endl;
        cout << "jump " << end << " " << origin << endl;
      }
    }
    else
      cout << origin << endl;
  }

  return 0;
}

compile: g++ jumps.cpp -o jumps
usage: ./jumps > result.asm
The source asm is test.asm. The result is written in result.asm
It works on the example of the bug report
test.asm:
jump 6 greaterThanEq c:1:4 10
jump 4 greaterThanEq c:1:4 5
set c:1:4 5
jump 5 always
set c:1:4 10
jump 7 always
set c:1:4 23
end

And result is
jump 6 greaterThanEq c:1:4 10
jump 4 greaterThanEq c:1:4 5
set c:1:4 5
jump 7 always
set c:1:4 10
jump 7 always
set c:1:4 23
end

The github pages website is updated on each release. To view the latest changes, you can checkout out the unreleased version

Arf... of course, in the meantime, I've finish the c++ (very ugly) code.
Anyway, this code will allow me to rejump actual ouput of mlogjs until #222 is out :-)
I'm up for today (this is late here).


Fixes #26 [ Killing ptop properly while exiting ]

Kill ptop properly.

Proposed solution is to kill ptop while by using psutil during a quit action.

This is not required as ptop is already quitting gracefully, a global  global_stop_event = threading.Event() is being passed to all the sensors which is getting used for making ptop exit gracefully. Line 41, main.py Let me know if you have any further queries otherwise we can close it.

I guess this is required. As ptop was being killed on my PC, it returned to the terminal. But again on calling ptop on the same terminal, 2 ptop processes are visible in the processes. I think this is because the previous ptop was not killed.

Yes, you are right. It works fine, exits fine. Now we can close the issue.


Question - How to compile a PTE with dependency on AppSource apps in a build pipeline

Scenario:
A PTE app with dependency on 2 AppSource apps where the apps/code are not available for download.
The PTE can be built and deployed with VS Code using symbols.
How to compile, deploy and run tests for this PTE?
Is it possible to download the symbols from an online sandbox and build the app? - are there any helpful commands?
Thanks!

Yes, you can download the symbols from an online sandbox, and you can build the app locally with those, but you cannot deploy it - it won't work as the dependent app is not installed.
Currently the best mechanism you have is to get a runtime package from the app provider and use that.
That can be deployed and used locally for tests.

If I can get the symbols from an online sandbox, I could build the app and deploy it back on the cloud sandbox.
Maybe it doesn't make much sense to go that way.
With runtime packages I have another issue, we cannot debug even if we set the resource policy.
https://github.com/microsoft/AL/issues/7049 - Cannot see code from runtime packages when "includeSourceInSymbolFile": true
Will try to get a runtime package from the app provider for now.
Thanks for your help!

@catadumitru you can check out this idea https://experience.dynamics.com/ideas/idea/?ideaid=42616aad-587b-eb11-8fed-0003ff4582f9 and share it, that it'll be priorized

@catadumitru you can check out this idea https://experience.dynamics.com/ideas/idea/?ideaid=42616aad-587b-eb11-8fed-0003ff4582f9 and share it, that it'll be priorized

I have voted for it, thanks for sharing.


HypervisorEnforcedCodeIntegrity resulting in NotApplicable in Windows 10

CSP returns not applicable on Windows 10 (22H2+LCU) - please confirm applicability and correct if appropriate.
353578410

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

ID: c8cc4c83-133e-d299-8fcf-1580a572a8f4
Version Independent ID: c8cc4c83-133e-d299-8fcf-1580a572a8f4
Content: Policy CSP - VirtualizationBasedTechnology - Windows Client Management
Content Source: windows/client-management/mdm/policy-csp-virtualizationbasedtechnology.md
Product: windows-client
Technology: itpro-manage
GitHub Login: @vinaypamnani-msft
Microsoft Alias: vinpa

@jerryabo . Which processor model you are using and which windows version edition you have installed.

Hiya @jerryabo 😄
We're in progress to migrate all of the CSP content to automated markdown pulled directly from the DDF XML, same as what's done with the Intune Settings Catalog. This specific article isn't published yet, but here's the new applicability table that will be included:

Scope
Editions
Applicable OS

:heavy_check_mark: Device  :x: User
:x: Home  :heavy_check_mark: Pro  :heavy_check_mark: Enterprise  :heavy_check_mark: Education  :x: Windows SE
:heavy_check_mark: Windows 11, version 21H2 [10.0.22000] and later

Where you can see that it's only applicable on Windows 11 version 21H2 and later.
I'm closing this issue, as it will be addressed soon when we publish the new automated article 😁


intel_adsp: Fix corrupt fatal logs

printk and log could race against each other as the lock on the output buffer may only be locked for 1 character at a time.
This would show up most often at the worst time, in the fatal error logs
Adds a trace_lock() trace_unlock() pair that wrap a spinlock which prevents printk from writing while log is also writing to the underlying buffer (winstream).
fixes #44145

Even with LOG_PRINTK=y there's garbled output in the example prior to this fix. Maybe not the  best way to fix this and I'm open to suggestions, but the fix does in fact solve a problem

Then maybe there's missing synchronization in the logging subsystem?

Possibly, the lock around winstream is fine (in trace_out.c) but it effectively is locking character at a time given the way printk works.
I don't disagree this isn't a pretty fix, marking DNM for now, but at least something of a solution (and perhaps a cause) is known now.

I believe I fully grok the issue(s) now and the commit message reflects all the races I found and how to avoid them, along with a lock around process() in particular avoiding the re-entrance and buffer trampling.
The output looks good.

There's potentially an alternative fix that involves putting a lock around the body of z_impl_log_process though I'm not sure of all the implications.

This seems to address the problem indeed! I did note following weird output when I had also #44529 included. It's still readable, but ordering is unexpected.
@nordic-krch had good comments, but other than that, looks good to me.
Example log with the backtrace PR also included: `` 535816 zephyr_ll_scheduler_in[00000000] main: SOF initialized it(): unsupported domain 2 3552786: SHM: FW ABI 0x3015000 DBG ABI 0x5003000 tags SOF:v2.0-rc1-696-gc9814111ab20-dirty zephyr:zephyr-v3.0.0-1972-g7994080741fb src hash 0x6311e5b4 (ldc hash 0x6311e5b4) 4165080 zephyr_ll_scheduler_init(): unsupported domain 2
Backtrace:0xBE0267B9:[00000030] os: ** FATAL EXCEPTION 0xBE0761C0 0xBE026A7F:0xBE07[00000030] os: ** CPU 2 EXCCAUSE 6 (divide by zero) 6210 0xBE02819A:0xBE076240 0x[00000030] os: ** PC 0xbe0267bc VADDR (nil) BE0392D4:0xBE076280 0xB[00000030] os: ** PS 0x60320 E0396C3:0xBE0762A0 0xBE025604:0xBE0762D0 [00000030] os: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:3 CALLINC:0x2) BE01557E:0xBE076300 0xBE0137BC:0xBE076330 [00000030] os: ** A0 0xbe026a82 SP 0xbe0761c0 A2 0x60040000 A3 0x9e07 fc00
[00000030] os: ** A4 0xc A5 0x1 A6 0x40000 A7 0xbe02a188 [00000030] os: ** A8 0xbe02678a A9 0xbe0761a0 A10 0x9e084740 A11 (nil) [00000030] os: ** A12 0x40000 A13 0x2 A14 0x9e07ef78 A15 0x9e07f00c [00000030] os: ** LBEG 0xbe040108 LEND 0xbe040116 LCOUNT 0xbe026788 [00000030] os: ** SAR 0xf [00000030] os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 2 [00000030] os: Current thread: 0x9e07e3b0 (unknown) [00000030] os: Halting system ``

I believe this is because printk is used to print the backtrace, which can lead to other issues. CONFIG_LOG_PRINTK=y should solve this.

And right: per the discussion above, if there's desire to use printk() in application code alongside the logging macros, we almost certainly want to set CONFIG_LOG_PRINTK=y so that printk() is implemented in terms of logging.  Having both trace subsystems active at once is allowed, but really only useful for special purposes (e.g. you might be debugging one by using the other), and we don't want them interacting more than is absolutely required.  I think interleaving between the two seems acceptable to me given the obvious workaround.

@andyross wrote:

And right: per the discussion above, if there's desire to use printk() in application code alongside the logging macros, we
almost certainly want to set CONFIG_LOG_PRINTK=y so that printk() is implemented in terms of logging. Having both trace

I can confirm this to be the case. With CONFIG_LOG_PRINTK (and this PR), the OS panic is clean including the backtrace. Submitted https://github.com/zephyrproject-rtos/zephyr/pull/44684 to enable this for SOF builds.


pull request for e2e test at 01/02/2017 11:15:15

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Enable background OOM detection in react native

Bugsnag for iOS has settings reportOOMs and reportBackgroundOOMs to configure OOM detection (https://docs.bugsnag.com/platforms/ios/configuration-options/#reportbackgroundooms). Are these settings available for react native as well? They don't appear in the react native docs (https://docs.bugsnag.com/platforms/react-native/react-native/configuration-options/).
Specifically, I'd like to enable reportBackgroundOOMs for react native.
(FYI, we're currently using react-native-bugsnag 2.21.1.)

Never mind.

@bengtan Were you able to figure this out?

Hi @stripathi669
Background OOM detection is no longer available in bugsnag-cocoa. This property was removed in v5.22.9 as determining background OOMs was found to be unreliable and caused a number of false positives.
Foreground OOM detection is now enabled by default in bugsnag-cocoa and bugsnag-react-native, but you can alter this (and any other bugsnag-cocoa configuration options), by using the enhanced native integration for bugsnag-react-native as shown here:
https://docs.bugsnag.com/platforms/react-native/react-native/enhanced-native-integration/#ios-native-installation

@mattdyoung Thank you for that information!


Kill rsessions when single-user notebook server stops

Hello,
Is there a way to cleanup rsessions when the single-user servers stop running?
It seems like unless I explicitly quit the R session through R Studio, they are left untouched which could result in a large number of orphan sessions.
Let me know if I'm just doing something wrong.
Thanks!

You're not doing anything wrong, but I'm afraid there is no good way of doing this IMO unless one integrates real process management into the extension (e.g. via cgroups, systemd, or some such). Ultimately I think the functionality of this extension will be obviated by having the JupyterHub spawner launch the rsession directly rather than through the Jupyter notebook. Since that already keeps track of the state of running servers it wouldn't be necessary to have something else keep track.
I think that will all be practical when the support for multiple servers per user lands which is either very soon or already done. :)

We should be able to do this by registering for a python handler for 'atexit' (https://docs.python.org/3/library/atexit.html) and killing the subprocess when we receive this.


.kubefirst file - Create 3 sections to make clear what is  input, output or status

To start an effort to break the .kubefirst file into a more defined set of parameters:

Inputs: Data/properties collected and used as is by installer to feed some steps action.

Outputs: Data/properties  produced by installer to be show to the user or to be feed to installer steps, usually values that are derivate from other values or process of installations. (not status values)

Status: Set of values, that are not credentials, usually booleans or values from set of status to be used to know where is the installer in a current installation process.

The goal of this change is to allow better path to generate UIs to show the status of the installation in progress.

We still need this, to improve signals to feed a local or remote UI.


Added new plugin issue

Can you please help me to fix this error "The plugin dll could not be loaded: 126"
Thank you.

#4


Use union type instead of intersection; update statusCode to status

Changed HttpErrorC codec from an intersection type to union type
Changed former statusCode key to status.

Why changing to union type? This makes the codec pass even with non-HTTP errors. What are you trying to solve?

Yup, you're right. The problem is that to extract properties from an Error class instance you have to spread it, infact the codec works fine on the first element of the intersection – the $Er.ErrorC codec – but fails on the second element because it can't recognize the response property. So, take a look to the latest solution I propose.

Interesting catch, and very smart way to solve it! Any chance we can add a test on this?

Tests are served.


fix(widget-add-modal): fix useContextMenuFixedStyle bug

To Reviewers

[ ] Skip (style, chore ONLY)
[x] Not that difficult

Type of Change

[ ] New feature
[x] Bug fixes
[ ] Feature improvement
[ ] Refactor
[ ] Others (performance improvement, refactoring, CI/CD, etc.)

Checklist

[x] Error / Warning / Lint / Type

Description
An error occurred when useContextMenuFixedStyle hook is called while the component is not loaded.

As a result of checking by page, there was no side effect!


certrotation: doc and clean up naming

When it takes 2 senior principal engineers to figure out what cert rotation does, we need better names and proper docs.

/lgtm

/lgtm

/lgtm

/lgtm