How to set cache duration by "expires" header

More of a question than an issue really:
I use apicache-plus version 2.3.0 with an ioRedis database.
There is an external API that I would like to cache, which responds with an "expires" header as the only reliable indication of response expiration. The access-control-max-age doesn't really help, as this is set to a default value, which doesn't have anything to do with the real expiry.
The very hacky way I have tried to include this is in redis-cache.js directly before writing to DB:
var final = function(cb) {
          if (hasErrored) return cb()

          try {
            var chunkCount = Math.ceil((byteLength || 1) / highWaterMark)
            var serverToRedisLatency = POOR_SERVER_TO_REDIS_LATENCY * chunkCount
            var dataMaxAllowedTimeToRead = Math.round(
              byteLength / TYPICAL_3G_DOWNLOAD_SPEED + serverToRedisLatency
            )
            var group = getGroup()
            var value = getValue()
            if (cacheEncoding === 'buffer') {
              if ((value.headers['content-encoding'] || 'identity') === 'identity') {
                value.encoding = 'utf8'
              } else value.encoding = 'binary' // 'alias to latin1 from node >= v6.4.0'
            } else {
              value.encoding = cacheEncoding || 'utf8'
            }

            // patch for "expires" header
            expireAt = Date.parse(value.headers['expires'])

Is there an alternative way to achieve "cache expiry = expires header"?

Hello! You may make the duration dynamic using this middleware config:
router
  .get('/external_api',
    async (req, res, next) => {
      // e.g.: { headers, data }
      res.locals.payload = await fetchExternalApi()
      next()
    },
    (req, res, next) => {
      const durationMs = Number(res.locals.payload.headers.expires)
      return apicache(durationMs)(req, res, next)
    },
    (req, res, next) => {
       const { data } = res.locals.payload
       ...
       res.send(data)
    }
)

Oh, you should also add the following to fetchExternalApi so that you don't hit external api too often:
async function fetchExternalApi () {
  let payload = await apicache.get('myKey')
  if (payload) return payload

  payload = fetch('www.external.url').then(...) // payload should be e.g.: { headers, data }
  await apicache.set('myKey', payload, Number(payload.headers.expires))
  return payload
}

Thanks!

Thanks!


Battery loading and nothing show

I find bug right now, the battery log loading and loading and nothing show.

I recorded a video for more explanation the problem.
https://github.com/opa334/Dopamine/assets/96495576/b71e1b38-b356-4b93-8930-fa97a739386b
I wait max 4+ minutes but nothing happen.

Same here

What device / version is this? This is most likely a tweak issue

What device / version is this? This is most likely a tweak issue

I have a 13 Pro Max on iOS 15.0. My battery settings is telling me I have a non genuine battery. This phone has never had any parts replaced.

I checked the battery settings in jailed mode which it never loads. The loading circle spins infinitely, but it does not say non genuine part this time.

It does look like this is a tweak issue, when starting from a fresh dopamine 2 jailbreak, the graph does populate.

this is happening on my iphone x on 16.6.1 too, loads battery data fine when rebooted into jailed state. i've tried uninstalling my tweaks individually to find the culprit but no luck. not that important tho the jailbreak is working perfect probably the most stable one i've used yet. i remember this issue happening on 13.3 using unc0ver had to disable loading tweaks with choicy can't remember what in tho

What device / version is this? This is most likely a tweak issue

I have iPhone X ios 16.1 dopamine 2.0.5

for me the issue is with preference loader:
PreferenceLoader - sileo://package/preferenceloader - from https://apt.procurs.us/dists/1900
as soon as this tweak is removed, the chart populates again.

for me the issue is with preference loader:
PreferenceLoader - sileo://package/preferenceloader - from https://apt.procurs.us/dists/1900
as soon as this tweak is removed, the chart populates again.

Okay but how to unistall is show me this error, I try uninstall or reinstall but don't work.

Maybe uninstall manually but how?

I'm unfortunately not sure- you just may want to uninstall the dopamine jailbreak entirely and rejailbreak.

I'm unfortunately not sure- you just may want to uninstall the dopamine jailbreak entirely and rejailbreak.

Okay I try thanks you

Maybe do what it tells you and refresh sources?
Besides, I don't think uninstalling PreferenceLoader is something you should do.

Maybe do what it tells you and refresh sources?
Besides, I don't think uninstalling PreferenceLoader is something you should do.

i think when you select the hide jailbreak option in dopamine it throws an error like that, it happened to me earlier when i tried to uninstall something

Yep, my point with uninstalling PreferenceLoader was just that it was tweak related, and not jailbrak related.  As you will need PreferenceLoader, you could also install Choicy and turn on an option to launch the settings app without tweaks.  This way you can view the battery information when launching the Settings app without tweaks, and when launching the Settings app normally, will be able to view your tweaks in Settings, but not the Battery information.

Yep, my point with uninstalling PreferenceLoader was just that it was tweak related, and not jailbrak related. As you will need PreferenceLoader, you could also install Choicy and turn on an option to launch the settings app without tweaks. This way you can view the battery information when launching the Settings app without tweaks, and when launching the Settings app normally, will be able to view your tweaks in Settings, but not the Battery information.

It definitely is jailbreak related because I have never had this issue with Dopamine 1, Xina 1, or Xina 2.

This issue seems exlusive to arm64 for that matter.

Well now I uninstalled the jailbreak and I'm still getting the non genuine message.

Well now I uninstalled the jailbreak and I'm still getting the non genuine message.

Maybe someone broke into your house and switched the battery while you're asleep?

haha so funny

It's all good, I fixed it.

I'm unfortunately not sure- you just may want to uninstall the dopamine jailbreak entirely and rejailbreak.

I try reinstalling dopamine but I can't uninstall any tweak :/ and refreshing source don't work, hide jailbreak broke Sileo and zebra. And now I can't uninstall/install anything (tweak) maybe one tweak broke my sileo and zebra? Yes hide jailbreak work for battery but don't work for my bank app :/
I try reinstalling packages but I don't know which ones of tweak broke my sileo and zebra and I worry it's happening again :/ maybe new update fix this issue but it'll have to do for now. Thank you very much oppa and everyone who try or helped me I appreciate that.

Hide jailbreak fix this issue, hide jail and battery log show so I close this issue.

that's not an appropiate fix

I'm unfortunately not sure- you just may want to uninstall the dopamine jailbreak entirely and rejailbreak.

I try reinstalling dopamine but I can't uninstall any tweak :/ and refreshing source don't work, hide jailbreak broke Sileo and zebra. And now I can't uninstall/install anything (tweak) maybe one tweak broke my sileo and zebra? Yes hide jailbreak work for battery but don't work for my bank app :/
I try reinstalling packages but I don't know which ones of tweak broke my sileo and zebra and I worry it's happening again :/ maybe new update fix this issue but it'll have to do for now. Thank you very much oppa and everyone who try or helped me I appreciate that.

Hi Bob, just to clarify, when you hide the jailbreak in the Dopamine app, Sileo and Zebra will not open.  When you unhide the jailbreak, they will open again.  In one of my previous replies, I mentioned another avenue you can go, installing the tweak Choicy, and setting the option for the settings app to be launched without tweaks.  This will allow the battery information to show as expected when tweaks are ignored, and to see the tweaks as normal when the option is not used to open the Settings app.

for me disable tweak injection in settings is grayed out in choicy

I see the exact same behavior even on palera1n jailbroken devices as soon as having Poomsmart's "EmojiFontManager" being installed. Disabling this tweak with iCleaner Pro makes the battery-display work again...
So, I doubt it's connected to Dopamine...

for me disable tweak injection in settings is grayed out in choicy

Right, but what you can do is this:

and 3d or haptic touch settings and select "Launch without tweaks"

It appears that CS_VALID was cleared from the csflag of the powerlogHelperd process and it terminated.  so only arm64(-A11) devices are affected. This appears to be a similar issue to the previous failure of emojiport to work with jailbreaks such as meowbrek2.

Should be fixed in latest nightly:
https://github.com/opa334/Dopamine/actions/runs/8023037614/artifacts/1270506846
Please test!

can confirm battery info now loading on iphone x 16.6.1 👌😁

https://github.com/opa334/Dopamine/assets/49694850/137784fe-6ed9-4b8b-97a3-dbe083af41a3

you are a genius, work perfekt on iPhone 6s, 15.8


Automate Hunt Prey

This is a draft for for a Hunt Prey implementation. Since there is a lot here, I will write the idea behind it to hopefully make reviewing easier. I have no doubts this would require a migration, which I unfortunately don't have the ability to write.
Hunt Prey Effect
We add a Hunt Prey effect to be dragged onto the critter, which serves two purposes

Add a self:prey:{item|origin.signature} roll option to the hunted prey, which helps automate many ranger abilities by using its target or origin counterparts as a predicate. The signature makes this roll option unique per Hunt Prey user, allowing multiple of them to mark the same creature without any conflicts in automation.
Add an Ephemeral Effect rule element to the critter, which applies an effect containing a MAP rule element. This allows Flurry rangers, and those who share its benefits, to automatically get an adjusted MAP when targeting the hunted prey.

Why not Token Mark?
I decided against using the Token Mark rule element because while it's sufficient for the ranger's own abilities, it falls short when it comes to sharing your Hunt Prey and Hunter's Edge benefits. The on-critter effect allows other characters to enjoy the same automation the ranger does without needing to mark the same target multiple times.
What the effect can't handle
Since a few Hunt Prey and Hunter's Edge benefits either can be done out of combat (such as Tracking or Gathering Information) or don't have target data (such as Recall Knowledge, or "loose" skill checks), these are handled via toggles. For instance, Hunt Prey has a toggle to Track or Seek your Hunted Prey, or Outwit has one for its various skill checks against Hunted Prey.
These replace the existing, broader "Target is your Hunted Prey" toggle, which I felt necessary because, in my opinion, it would not be clear otherwise which features require the toggle to be automated and which don't, which would lead to an awkward player experience.
Hunt Prey Action
The action itself contains the effect to be dragged from chat once posted. It also contains rule elements for the previously mentioned "exploration" benefits of Hunt Prey, as well as the roll option to ignore range increment, which is now predicated on the new Hunt Prey effect.
Once the effect is applied, we can leverage it in various forms.
Hunter's Edge
Flurry
The Flurry class feature and its Masterful Hunter upgrade have had their rule elements removed, instead they all rely on a new Flurry effect containing MAP rule elements, which is only applied ephemerally when attacking the hunted prey. This approach gets around the current limitation on target roll options on that specific rule element.
Outwit
While Outwit still needs a toggle for its skill benefits, as these can't reliably contain target data, a Flat Modifier to their AC predicated on "origin:prey:{actor|signature}" allows them to automatically gain this bonus against the Hunted Prey.
Precision
Due to its effects requiring a first attack against the Hunted Prey, something not kept track of in the system, Precision does not benefit as much from this change, but it does allow us to further predicate its Damage Dice bonus. We also add mergeable suboptions to keep its "first, second and third" attack toggles contained in a single toggle.
Sharing Hunt Prey and Hunter's Edge
For feats that allow sharing your Hunt Prey benefits, such as Warden's Boon and the ranger Animal Companion feats, we modify the existing effects in the system to benefit from the same automation the Hunt Prey user has by predicating these benefits on the origin's signature. Flurry has a slightly different approach, where the flurry benefits are applied ephemerally when attacking the hunted prey, whose Ephemeral Effect rule element checks that flurry has been shared with the attacker (via the self:shared-flurry:{item|origin.signature} roll option to ensure these benefits come from the origin of the Hunt Prey effect)
Additionally, we use the Item Alteration rule element on these feats to override their description to only contain the correct effect according to their Hunter's Edge.
Other feat and features
Ranger Weapon Expertise, Hunter's Aim, Monster Hunter and Hamstringing Strike and a couple of pieces of equipment have all been implemented using the Hunt Prey effect. I thoroughly searched the system to make sure I didn't miss any instance of the old Hunt Prey implementation in feats and features.
Non-Ranger Hunt Prey
Namely the Game Hunter and Bounty Hunter archetypes have had their features that interact with Hunt Prey reworked to play nice with this implementation. Not much about them has been automated yet, so the changes are overall small.

That's about everything this PR encompasses. I know it's a lot, but any feedback here would be welcome.

I need to read fully, but this seems like a case for token mark upgrades if token mark doesn't handle this scenario, given this is exactly the kind of thing token mark was built for.

I need to read fully, but this seems like a case for token mark upgrades if token mark doesn't handle this scenario, given this is exactly the kind of thing token mark was built for.

That'd be great. I think the things Token Mark is missing to accommodate a Hunt Prey implementation are, as far as I can tell

The ability for other characters to reference that Token Mark, that way ranger benefits can be shared.
Each mark needs to be able to be unique, so that multiple rangers don't trip over each other when marking critters.

Just wanted to chime in and say I'd be really excited to see this automated. Is there anything I could do to help with this PR?

Just wanted to chime in and say I'd be really excited to see this automated. Is there anything I could do to help with this PR?

The main thing holding it back is some improvements needed on the Token Mark rule element, as mentioned here in my earlier comment. The PR does work, but ideally Token Mark should be extended to handle this use case, as opposed to getting around it, like I am here.
If you are interested in that, it may be worth getting a hold of the main developers on the #development-help channel in the Discord, just to make sure there it's something they're interested in currently.

Note that the PF2e Ranged Combat module automates Hunt Prey too.  It's similar in concept to this.
The PF2e Thaumaturge module also has the same issues with TokenMark.  It uses it, but also needs extra stuff, such as an effect on the thaum's target that contains a reference back to the thaum, like this PR does.  Same reason basic reason: allies can't see token marks.
How about an extension:
TokenMark:  "share": "allies"|"enemies"|"all"
Allow the specified group to also see this mark in their rolls against the target.
Roll options of this form are added:
target:mark:${mark.slug}:ally and target:mark:${mark.slug}:${mark.origin.signature}

Note that the PF2e Ranged Combat module automates Hunt Prey too. It's similar in concept to this.
The PF2e Thaumaturge module also has the same issues with TokenMark. It uses it, but also needs extra stuff, such as an effect on the thaum's target that contains a reference back to the thaum, like this PR does. Same reason basic reason: allies can't see token marks.
How about an extension: TokenMark:  "share": "allies"|"enemies"|"all" Allow the specified group to also see this mark in their rolls against the target.
Roll options of this form are added: target:mark:${mark.slug}:ally and target:mark:${mark.slug}:${mark.origin.signature}

I was actually contacted by the Ranged Combat author, since they wanted to use this PR's approach for their module. I'm not sure if that went anywhere. Anyway, I agree with your assessment here and is more or less what I had in mind. I've created an issue here #16674 to actually request the feature, so it doesn't get lost.
I will close this PR now, since several things would need to be rewritten here, and there are several improvements I would make (plus, I mucked up the rebase a bit!)


[WIP] Adding Pauli to the standard gate library

Summary
A PauliGate which applies pauli operations (given as a string) to a set of qubits is added to the standard library.
Details and comments
While functionally equivalent to sequential application of pauli gates, this instruction can be performed efficiently by statevector simulator using a single pass on the statevector.

If we are storing the label in the params, we don't really need to store it also as an attribute, we can just get it from self.parameters[0] in other functions that use it. Alternatively we don't store parameters at all and modify the assemble method of this class to use the attribute rather than params.
ie.
def assemble(self):
    instruction = super().assemble()
    instruction.params = [self.pauli_string]
    return instruction

This later way might be preferable if we want to move towards having all gate parameters be floads (@ajavadia what do you think?)

For me, params is preferable. It's more in line with how the other gate classes handle parameters, so more tooling is likely to work out of the box (drawing, assembly, ...) and with validate_parameters, there should be enough control to specify what parameters are valid for this gate type.
Also, looking now, this would be better for generalized_gates than standard_gates.


Fix creating secrets in github:environment:create action

Hey, I just made a Pull Request!
The github:environment:create has been using the wrong set of keys for creating secrets. This was causing the secrets to be empty.
I was able to reproduce the issue with following steps:

Created this template

kind: Template
metadata:
  name: kamil-template
  title: Kamil Template
  description: Kamil Template
spec:
  owner<EMAIL_ADDRESS>  type: website
  parameters:
    - title: Provide some simple information
      required:
        - name
        - clientId
        - clientSecret
      properties:
        name:
            title: Repo name
            description: Repo name
            type: string
        clientId:
            title: Client Id
            description: Client Id
            type: string
        clientSecret:
            title: Client Secret
            description: Client Secret
            type: string
            ui:widget: password
  steps:
    - id: log
      name: "Values"
      action: debug:log
      input:
        name: ${{ parameters.name }}
        clientId: ${{ parameters.clientId }}
        clientSecret: ${{ parameters.clientSecret }}
    - id: create-github-dev-environment
      name: Create GitHub Dev environment
      action: github:environment:create
      input:
        repoUrl: github.com?owner=kmarkow&repo=${{ parameters.name }}
        name: dev
        environmentVariables:
          CLIENT_ID: ${{ parameters.clientId }}
        secrets:
          CLIENT_SECRET: ${{ parameters.clientSecret }}

Launch the above template from backstage
Print the secret with this github action to see if it was saved correctly
The value would always come empty

After long investigation I found out that the action is fetching repo-level public key and not the env-level public key. After changing the lines included in this PR I was finally able to see my secrets saved correcly.
:heavy_check_mark: Checklist

[X] A changeset describing the change and affected packages. (more info)
[X] Tests for new functionality and regression tests for bug fixes
[X] All your commits have a Signed-off-by line in the message. (more info)

@aochsner you implemented this functionality originally, can you review and test this to see if it works for you also?

Nice! Thanks both @kmarkow @aochsner :tada:


[1.11] Bump Mesos to nightly 1.5.x aedbcfd

High-level description
This is a routine bump to the latest 1.5.x branch of Mesos.
Related JIRA Issues
Checklist for all PRs

[ ] Included a test which will fail if code is reverted but test is not. If there is no test please explain here:
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last Mesos version integrated:
mesosphere/mesos diff

[ ] Test Results: [link to CI job test results for component]

[ ] Code Coverage (if available): [link to code coverage report]

Corresponding EE PR: https://github.com/mesosphere/dcos-enterprise/pull/2645

@mesosphere-mergebot label Ready For Review

Corrected the SHAs in patches.json;
Removed contents from READme.md to avoid confusion.

@mesosphere-mergebot bump-ee


[GenericPoseGraph] Add proto defs for landmark cost functions.

@mbokeloh Martin, please, take a look, maybe you'll come up with less idiotic naming than I did.

@wally-the-cartographer merge

Merge requested by authorized user pifon2a. Merge queue now has a length of 3.

Error: exit status 1
Log:
=> handle work item: PR 1312 on googlecartographer/cartographer.
 => Switching to branch master.
 $ git reset --hard HEAD [data/cartographer]
HEAD is now at 3a9d1bc4 [GenericPoseGraph] Added rotation cost 3d. (#1313)
 $ git clean -fd [data/cartographer]
 $ git checkout master [data/cartographer]
Already on 'master'
Your branch is up to date with 'origin/master'.
 $ git pull [data/cartographer]
Already up to date.
Current branch master is up to date.
 => Checking out pifon2a/protodef as local branch pr_1312.
 $ git remote add pifon2a git@github.com:pifon2a/cartographer.git [data/cartographer]
fatal: remote pifon2a already exists.
 $ git fetch pifon2a [data/cartographer]
 $ git branch --track pr_1312 pifon2a/protodef [data/cartographer]
Branch 'pr_1312' set up to track remote branch 'protodef' from 'pifon2a'.
 => Switching to branch pr_1312.
 $ git reset --hard HEAD [data/cartographer]
HEAD is now at 3a9d1bc4 [GenericPoseGraph] Added rotation cost 3d. (#1313)
 $ git clean -fd [data/cartographer]
 $ git checkout pr_1312 [data/cartographer]
Switched to branch 'pr_1312'
Your branch is up to date with 'pifon2a/protodef'.
 $ git pull --force [data/cartographer]
Already up to date.
Current branch pr_1312 is up to date.
 => merge master.
 $ git merge master [data/cartographer]
Auto-merging cartographer/pose_graph/proto/cost_function.proto
CONFLICT (content): Merge conflict in cartographer/pose_graph/proto/cost_function.proto
Automatic merge failed; fix conflicts and then commit the result.
 => Abandoning branch pr_1312.
 => Switching to branch master.
 $ git reset --hard HEAD [data/cartographer]
HEAD is now at af129ba2 [GenericPoseGraph] Add proto defs for landmark cost functions.
 $ git clean -fd [data/cartographer]
 $ git checkout master [data/cartographer]
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
 $ git branch -D pr_1312 [data/cartographer]
Deleted branch pr_1312 (was af129ba2).


Curriculum-related additions: open elm, task encoder, manual curriculum

Want to merge in open elm, task encoder, manual curriculum

a skeleton for the end-to-end workflow in the submission/submission_curriculum_track.py
a manually-curated training tasks in curriculum/manual_curriculum.py, with inputs from @dsctt
an open-elm based task generator in the elm_for_nmmo folder (by @nishaanthkanna ), with a api-related tests in tests/test_elm_for_nmmo.py
an LLM-based task encoder (by @nikhilpinnaparaju ), with a api-related tests in tests/test_task_encoder.py

TODO: replace these dummies in the curriculum/train_helper.py with the actual functions/classes

task-conditional RL: train_on_tasks, evaluate_on_tasks, load_agent_model
use leaning-progress based task sampler: SyllabusTaskSampler

The end-to-end training script has been modified to use the file-based curriculum.
Also, the format of curriculum (i.e., task spec) has been refactored to use the TaskSpec class, instead of somewhat arbitrary task spec tuples, and it made the code cleaner. Please see the TaskSpec refactor PR on the env: https://github.com/CarperAI/nmmo-environment/pull/91

Resolved the conflicts with the 2.0 branch. Merging in.


Statement timeout to prevent long running queries

Add a statement timeout to the database connections to prevent long running queries.
The API gateway will timeout a connection as per this rule:
The response from your API backend must receive chunks at least every 5 minutes or it will timeout (but it can exceed this 5 minutes if it is streaming and chunks are send by your server <300 seconds apart).
When the gateway times out the connection, the node process will continue to run the query.  If we institute a statement timeout this will cancel the query in the database and release resources (locks, temp files, etc).
Reference #6335 for background information on the underlying issue.
The biggest culprits are the emissions-api and streaming-services.
There's some information in the node-postgres docs about the timeouts that can be set:
type Config = {
  user?: string, // default process.env.PGUSER || process.env.USER
  password?: string or function, //default process.env.PGPASSWORD
  host?: string, // default process.env.PGHOST
  port?: number, // default process.env.PGPORT
  database?: string, // default process.env.PGDATABASE || user
  connectionString?: string, // e.g. postgres://user:password@host:5432/database
  ssl?: any, // passed directly to node.TLSSocket, supports all tls.connect options
  types?: any, // custom type parsers
  statement_timeout?: number, // number of milliseconds before a statement in query will time out, default is no timeout
  query_timeout?: number, // number of milliseconds before a query call will timeout, default is no timeout
  lock_timeout?: number, // number of milliseconds a query is allowed to be en lock state before it's cancelled due to lock timeout
  application_name?: string, // The name of the application that created this Client instance
  connectionTimeoutMillis?: number, // number of milliseconds to wait for connection, default is no timeout
  idle_in_transaction_session_timeout?: number // number of milliseconds before terminating any session with an open idle transaction, default is no timeout
}

Here's the information from the postgres documentation about the statement_timeout parameter:

statement_timeout (integer)
Abort any statement that takes more than the specified amount of time. If log_min_error_statement is set to ERROR or lower, the statement that timed out will also be logged. If this value is specified without units, it is taken as milliseconds. A value of zero (the default) disables the timeout.
The timeout is measured from the time a command arrives at the server until it is completed by the server. If multiple SQL statements appear in a single simple-Query message, the timeout is applied to each statement separately. (PostgreSQL versions before 13 usually treated the timeout as applying to the whole query string.) In extended query protocol, the timeout starts running when any query-related message (Parse, Bind, Execute, Describe) arrives, and it is canceled by completion of an Execute or Sync message.
Setting statement_timeout in postgresql.conf is not recommended because it would affect all sessions.

Based on this if we set log_min_error_statement to ERROR or lower, the statement will also be logged.  I checked the Cloud.gov postgres configuration and log_min_error_statement is set to 'error' so we should be able to capture the timed out queries.

Need to ID which APIs to add a timeout for and the timeout duration.

@mark-hayward-erg has confirmed that there should be sufficient emissions data on the staging database to create a request that will hit the new timeout.

Tested in staging by using the CAMPD UI to query hourly emissions by facility from 1/1/2017 to 12/31/2023.  The query will run for 5 minutes and then is cancelled by the statement timeout (300000ms).  When this occurs I can see the API call fail in the browser:

and the following message in the application log file:
{
     "errorId":"8225d146-fb5b-48e9-85b9-26e45d7640dc",
     "level":"error",
     "message":"canceling statement due to statement timeout",
     "stack":"LoggingException: canceling statement due to statement timeout at HourlyApportionedEmissionsService.getEmissionsFacilityAggregation (/home/vcap/app/dist/apportioned-emissions/hourly/hourly-apportioned-emissions.service.js:49:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
}

I also confirmed the statement that caused the timeout is written to the database log file:

"2024-08-12 13:46:30 UTC:<IP_ADDRESS>(43492):usMu5U0tyGW3dWyN@cgawsbrokerprod4dsl7fy3:[10395]:ERROR:  canceling statement due to statement timeout"
"2024-08-12 13:46:30 UTC:<IP_ADDRESS>(43492):usMu5U0tyGW3dWyN@cgawsbrokerprod4dsl7fy3:[10395]:STATEMENT:  SELECT ""hud"".""state"" AS ""stateCode"", ""hud"".""facility_name"" AS ""facilityName"", ""hud"".""orispl_code"" AS ""facilityId"", ""hud"".""op_date"" AS ""date"", ""hud"".""op_hour"" AS ""hour"", SUM(""hud"".""gload"") AS ""grossLoad"", SUM(""hud"".""sload"") AS ""steamLoad"", SUM(""hud"".""so2_mass"") AS ""so2Mass"", SUM(""hud"".""co2_mass"") AS ""co2Mass"", SUM(""hud"".""nox_mass"") AS ""noxMass"", SUM(""hud"".""heat_input"") AS ""heatInput"" FROM ""camddmw"".""vw_hour_unit_data"" ""hud"" WHERE ""hud"".""op_date"" >= $1 AND ""hud"".""op_date"" <= $2 AND ""hud"".""op_time"" > 0 GROUP BY ""hud"".""state"", ""hud"".""facility_name"", ""hud"".""orispl_code"", ""hud"".""op_date"", ""hud"".""op_hour"" ORDER BY ""hud"".""orispl_code"" ASC, ""hud"".""op_date"" ASC, ""hud"".""op_hour"" ASC LIMIT 100"

The parameter that were used in the statement are not logged but these can be determined by cross referencing the API gateway.
Note:  The CAMPD UI will silently retry the query 4 times before finally displaying the following error message to the user:

This is not an optimal user experience as the user essentially waits 20 mins (4 tries x 5 mins) for a response from a query that will never be processed but this addresses the immediate issues caused by these long running queries.  I will open a separate ticket to address the client side error handling and user experience.


Scaffold typescript

Init project and set up scaffold for the lambda

closing in favour of #3 to be able to deploy in the pipeline


Do not hard code subscriber agreement URL

Boulder provides the current subscriber Agreement in a Link header of the type terms-of-service in response to a valid /acme/new-reg POST request, this should be used instead of hard coding the most recent URL.
Continuing to hard code the URL will cause consistent failures for anyone trying to create a new registration whenever Let's Encrypt chooses to update their agreement.

AFAIK, the reason for the current “hard-coding” (it's not hard-coded, it's a variable adjustable in the config file) is that that in theory provides a fool-proof method of demonstrating you agree with the current terms of service.
I don't think it should be automatically drawn from the headers — but perhaps it would be smart for letsencrypt.sh to include logic that informs you “The terms of service have updated; here is the link to the Subscriber Agreement. Please update your configuration to agree with the new terms.”

Just added support for this in vestacp.
You can use the following command to get the agreement url agreement=$(curl -s -I "$api/terms" |grep Location |cut -f 2 -d \ |tr -d '\r\n') with $api being api='https://acme-v01.api.letsencrypt.org'

Closing in favor of #346, thanks for your hints.


[SPARK-41697][CONNECT][TESTS] Enable test_df_show, test_drop, test_dropna, test_toDF_with_schema_string and test_with_columns_renamed

What changes were proposed in this pull request?
This PR enables the reused PySpark tests in Spark Connect that pass now.
Why are the changes needed?
To make sure on the test coverage.
Does this PR introduce any user-facing change?
No, test-only.
How was this patch tested?
Manually ran it in my local.

All related tests (linter, connect tests) passed.
Merged to master.


Get input from custom layout

Hello, I'm trying to use your library to get some text inside a dialog.
The problem I'm struggling with is getting the text entered by the user after he closes the dialog.
I tried this approach:
    boolean wrapInScrollView = true;
    new MaterialDialog.Builder(this)
            .title("New Post")
            .customView(R.layout.dialog_new_dash, wrapInScrollView)
            .callback(new MaterialDialog.ButtonCallback() {
                @Override
                public void onPositive(MaterialDialog dialog) {
                    LayoutInflater layoutInflater = LayoutInflater.from(getBaseContext());
                    View v = layoutInflater.inflate(R.layout.dialog_new_dash, null);
                    EditText postMessage = (EditText) v.findViewById(R.id.edittext_new_dash_item);

                    String s = postMessage.getText().toString();
                }
            })
            .positiveText("Done")
            .build()
            .show();
}

But it does not seem to work.
Please reply when u have the time.
Your library is really cool by the way, very useful!
Thanks,
Gabriel

You're inflating a new layout inside the dialog callback. You may wanna get a little more familiar with how Android works.

To expand on what I mean, when you use customView(), it's inflating the view into the dialog. You're inflating a brand new view again later that is not in the dialog.
You should be using dialog.getCustomView() from inside the dialog callback.

Hmm, Confused by what he means when he says use the dialog.getCustomView()
Where at are you telling him to use it?
I am having the same issue, where my input is coming out to be null.

@Going-Gone inputName is out of scope. .customView(R.layout.dialog_server_url) is inflating a new view with different child view references.

The second usage in there is correct, where you use findViewById on getCustomView().

Thank you for the quick reply!
I was looking at ways so that i could use use the serverUrl variable within the whole dialog, but what I did was copied the calling for the EditText to the callback, and it worked. So basically i created two instances of it.


Update nightly tests to run from commits on specified branches

These tests should run all integration and validation tests every night on multiple OSes as seen in the Support matrix. They should run based on commitids from specific branches. The branches should be easily configurable as a new branch is added (and another removed) every few months when new minor versions are released.
As of this writing, the branches where it should pull commits from are: master, release-1.24, release-1.23, and release-1.22.

@ShylajaDevadiga is this in progress?

We will revert back to this task when the priority tasks with OS and PR runs are complete. Moving it to backlog for now.


Bracket pair color is not working correctly

Issue Type: Bug
Steps to produce:

Add these 2 lines in settings.json:

{
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs":"active"
}

Open a React.js component
Choose a JSX element that is not the outermost element
See the issue => The bracket pair is not highlighted at all

VS Code version: Code 1.63.2 (Universal) (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
OS version: Darwin x64 21.2.0
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 3, 3

Memory (System)
16.00GB (1.53GB free)

Process Argv
--crash-reporter-id 52ec3cd5-fac4-4905-850d-49c46048dfb4

Screen Reader
no

VM
0%

Extensions (25)

Extension
Author (truncated)
Version

path-intellisense
chr
2.6.0

vscode-markdownlint
Dav
0.45.0

vscode-eslint
dba
2.2.2

gitlens
eam
11.7.0

vscode-great-icons
emm
2.1.79

prettier-vscode
esb
9.0.0

vscode-pull-request-github
Git
0.34.2

go
gol
0.30.0

solidity-debugger
hos
0.2.1

svg
joc
1.4.15

vscode-styled-components
jpo
1.7.0

solidity
Jua
0.0.136

rust-analyzer
mat
0.2.867

git-graph
mhu
1.30.0

vscode-docker
ms-
1.18.0

csharp
ms-
1.23.17

python
ms-
2021.12.1559732655

vscode-pylance
ms-
2021.12.2

jupyter
ms-
2021.11.1001550889

remote-containers
ms-
0.209.6

cadence
onf
0.6.3

vscode-yaml
red
1.2.2

vscode-vyper
tin
0.0.10

learn-vim
vin
0.0.27

markdown-all-in-one
yzh
3.4.0

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30384386
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vscop804:30404766
vscop453:30404998
vsrem710cf:30416617
vscexrecpromp3t2:30407763

There are no bugs on screenshot:

It's bracket pairs highlight, not a tags pairs highlight so line that arrow points to in not supposed to be highlighted by this feature. You should check for existing requests for this kind of feature and create feature request if there are no existing requests.

</> were intentionally excluded from highlight as they caused problems(check closed issues) and in JSX its always same color: ach tag has open and close pair of </> so there is no color change for nested tags.

In your case active pair would've been pair of </> in just <PageWrapper>.

@IllusionMH : please check the screenshot below. It's the default setting, there is actually a highlight on the ruler of  tag

The same highlight exists with Bracket Pair Colorizer:

So with 1, I think it's a bug
With 2, I think it's a feature that should be included (Bracket Pair Colorizer maintainer said that he will no longer support the extension because VSCode has it built-in)

OK, with other screenshots for comparison it looks more clear now.
So to clarify: you expect to see colored (pink) line for return's pair of (/) and regular (white) highlight for indentation guide (not tags pair) in JSX? At least this is what you see in BPC2, there is no special support for JSX, it's just white indentation line.
From first message it looked like you want JSX elements to have own colored lines for tags pair.

@IllusionMH :
"you expect to see colored (pink) line for return's pair of (/) and regular (white) highlight for indentation guide (not tags pair) in JSX" => yes, I just need it exactly like BPC2.
Because at the moment, I can not see which block of JSX tag that I'm selecting

/duplicate https://github.com/microsoft/vscode/issues/137190


reduce clones of LogicalPlan in planner

Rationale for this change
To reduce clone of the logical plan. This pr may have some relation with #5637
And the clone of input plan will be reduced after #4628 closed.
What changes are included in this PR?
Speedup the planner but make some tests slower than before because of some more clones.
Are these changes tested?
yes.
Are there any user-facing changes?
no.

I draft this pr because it seems that we need more thread stack space -- tpcds_physical_q54 meet the problem of  thread stack overflow.

One of the tensions is that if we wrapped the plan in Arc it is harder to match on it as I understand
match plan {
  LogicalPlan::Scan(..) => {..}
  LogicalPlan::Project(..) => {..}
  ...
}

One of the tensions is that if we wrapped the plan in Arc it is harder to match on it as I understand

Depends on how you want to match. You can use match plan.as_ref() {...} but then you need to manually clone all struct members if you want to construct a new LogicalPlan. However I would argue that the logical and phys. plan should not contain copies of any large data structures that are NOT wrapped into an Arc in the first place.

There are some functions taking borrow of plan and return a new plan like:
pub fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan>

If we wrap plan with Arc, we still cannot avoid some clones.
How about Arc<RefCell<LogicalPlan>>? We can return a new plan by changing the original plan by plan.borrow_mut().

How about Arc<RefCell<LogicalPlan>>? We can return a new plan by changing the original plan by plan.borrow_mut().

I think RefCell and interior mutability make code VERY hard to understand and debug. Rust has very clear API types that lets you pass by value, pass by ref or pass by mutable ref and they all mean different things. Hacking around it for such a fundamental type is IMHO a no-go. I think optimize should be:
pub fn optimize(&self, plan: Arc<LogicalPlan>) -> Result<Arc<LogicalPlan>>

If the plan stays the same, you can just pass through the Arc. If not, you can create a new one. All child nodes can easily be cloned (since they are Arced, at least after the change), and all other metadata that is attached to nodes should either be Arced as well or should be cheap to clone.

I think optimize should be:
pub fn optimize(&self, plan: Arc<LogicalPlan>) -> Result<Arc<LogicalPlan>>

I agree that sounds like a more sensible plan.

fyi @sadboy, @schulte-lukas and @wolfram-s

Hi, just saw this thread. FWIW we (SDF) recently changed all our internal use of LogicalPlan to Arc<LogicalPlan> (for reference, this was the change we made on the Datafusion side: https://github.com/sdf-labs/arrow-datafusion/pull/40), and saw no performance impact whatsoever on our semantic analysis workloads. My guess is that LogicalPlan::clone() is already a O(1) operation (in the size of the logical plan, because of the Arc pointer to parent plans), so saving that constant factor was negligible in the grand scheme of things.
What did turn out to have a huge perf impact on our workloads, was the asymptotic behavior of the logical plan constructors. Specifically, many methods in LogicalPlanBuilder, e.g. project and join, perform input sanitization which is (at least) O(n) in the size of the parent plan(s), and as a result using LogicalPlanBuilder to construct logical plans takes O(n^2) time in the size of the input query.
Anyway, tl;dr is that

Choice of LogicalPlan vs Arc<LogicalPlan> has minimal perf impact, and thus can be made based solely on API ergonomic considerations
Logical plan constructors do have large impact on overall perf, and thus should be careful in the operations they perform

What did turn out to have a huge perf impact on our workloads, was the asymptotic behavior of the logical plan constructors. Specifically, many methods in LogicalPlanBuilder, e.g. project and join, perform input sanitization which is (at least) O(n) in the size of the parent plan(s), and as a result using LogicalPlanBuilder to construct logical plans takes O(n^2) time in the size of the input query.

Thank you @sadboy  this is great feedback. I wonder if we could / should make "don't error check" type constructors for this kind of optimization
Perhaps something like

impl ProjectionExec {
  // Creates a new projection exec without any error checking. Use this only
  // if you know the correct arguments
  pub fn try_new_unchecked(
    expr: Vec<(Arc<dyn PhysicalExpr>, String)>,
    input: Arc<dyn ExecutionPlan>
  ) -> Result<ProjectionExec, DataFusionError> {
    ...
  }
}

we could / should make "don't error check" type constructors for this kind of optimization

As a quick and simple solution, that's what I would recommend, yes.
More fundamentally, I think the contention arises from the de-facto "dual
use" nature of Datafusion's LogicalPlan/Expr API, which serves two very
different use cases:

The DataFrame users, who use DataFusion API to programmtically compose
their queries. In this kind of scenario, you do want to perform eager
input validation and fail early.
The "analysis" users, who use LogicalPlan as an IR. Datafusion's own
internal use of LogicalPlan would mostly fall into this category as
well, including the SQL compiler, the analyzer/optimizers, logical plan
serializers, etc. In this kind of scenario, input sanitation on the plan
node constructors is wasteful as arguments are already known to be
well-formed.

As things currently stand, the constructor methods in LogicalPlanBuilder
are largely geared to serve the former use case, but widely shared in the
code paths of the latter. Not an issue when the input queries are small, but
would definitely cause scalability issues when processing large queries
(like we've been experiencing). Having unchecked "dumb" constructors would
be greatly beneficial for perf here, but only if used consistently through
the whole codebase (not exactly a trivial concern, as in general simply
having "unchecked" in the method name would discourage people from using
them).
Ideally, however, I believe these two use cases are different enough that it
would be beneficial to actually separate them statically at the type level.
i.e. have a separate type hierarchy for "DataFramePlan"/"DataFrameExpr",
parallel to LogicalPlan/Expr. The former would be exclusively used to
capture "end user" input through the DataFrame API, while the latter would
be used exclusively as an internal IR, never directly exposed to the end
user. There would need to be an explicit conversion between the two, but
that would mostly be mechanical and trivial (and where the input sanitation
could take place). The benefit is then you entirely eliminate concerns such
as "should I call the checked or unchecked version of the constructor" when
dealing with logical plan/exprs. In addition, you could "fine tune" each
type hierarchy to better fit its purpose. For example, just off the top of
my head:

Plan types such as Expr::Wildcard can be removed, as they don't serve
any purpose in an IR. The effect is that you can greatly cut down the
"invalid states" in the analyzer/optimizer pipeline, making it much easier
to perform tree transformations
Expr::Column can be changed to index-based rather than name-based (i.e.
Column { index: usize }), so you get guaranteed O(1) column resolution

Anyway, that's just my $0.02 🙂 (and as I just realized, probably way off topic for
this thread too, lol)

Anyway, that's just my $0.02 🙂 (and as I just realized, probably way off topic for
this thread too, lol)

I think it is a great discussion to have -- I filed https://github.com/apache/arrow-datafusion/issues/8556 to get it out of this thread (on a closed ticket) into a new issue for hopefully wider discussions


increase s3 object retention to one week

Issue #, if available:
Description of changes:
quick adjustment to ensure we're retaining test artifacts.
this will ensure we're retaining the binaries (reproducable executions) alongside artifacts like the support bundle.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: danbudris
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [danbudris]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/lgtm


Cannot read file '../tsconfig.json'

Have you experienced this bug with the latest version of the template?
Yes
Steps to Reproduce
npx create-remix --template remix-run/grunge-stack
Where would you like to create your app? remix-blog
Do you want me to run npm install? (Y/n) Y
TypeScript or JavaScript? JavaScript
Do you want to run the build/tests/etc to verify things are setup properly? Yes
error TS5083: Cannot read file '/Users/Siarhei_Liubimau/Documents/remix/remix-blog/tsconfig.json'.
Expected Behavior
The template should work out of the box.
Actual Behavior
The template is broken and unusable.

hey! do you have an empty tsconfig.json file in the parent directory by chance?

I found that going through the config files and changing the extensions from .ts to .js worked for me, the issue seems to be coming from cypress. I deleted the tsconfig file in the cypress folder, and removed the eslint export file that included the tsconfig file.
the vitest.config, remix.config and cypress.config files all had .ts file extensions listed. Deleting any mention of typescript files in the config files seemed to fix the issues. After doing that running "npm run dev" brings me to the default grunge stack homepage. It's a bit buggy but I wouldn't consider it unusable, just a bit of digging around to find the problem.

Closing this issue as no response was provided.
Feel free to re-open it if it's still a problem.


Can't see nvim-magic mappings

Describe the bug
I can't trigger any of the nvim-magic commands, and I can't see any of the mappings \mcs, \mss or \mds when running :vmap.
Running :verbose vmap \mcs yields "No mapping found".
When I set use_default_keymap = false and set manually xnoremap <Leader>mc <Plug>nvim-magic-append-completion (I also tried adding parenthesis, as in xnoremap <Leader>mc <Plug>(nvim-magic-append-completion)) I could see the mapping, but it had an x next to it.
As far as I can tell Iv'e set up nvim-magic correctly, including the right environment variable with my OpenAI key, and all requirements are installed correctly.
To Reproduce
Run :vmap \mcs
Expected behavior
Magic append completion to work.
Details (please complete the following information):

OS: macOS BigSure 11.6.1
Neovim version: v0.6.1
nvim-magic version: [e.g. v0.3.1, commit 6c04695c2f4a6d15dbb3d370328865878e6fbc29]

My config (inside packer.nvim setup):
	use({
		'jameshiew/nvim-magic',
		config = function()
			require('nvim-magic').setup({
				-- default backends setup; probably shouldnt touch this
				backends = {
					default = require('nvim-magic-openai').new(),
				},
				-- I set this to false to set my own mapping
				use_default_keymap = false,
            })
		end,
		requires = {
			'nvim-lua/plenary.nvim',
			'MunifTanjim/nui.nvim'
		}
	})

Thanks for the detailed report, I'm not sure what could be causing this. As a workaround, are you able to run the Lua commands directly?
e.g. highlight some text in Visual mode then run :'<,'>lua require('nvim-magic.flows').append_completion(require('nvim-magic').backends.default) as an alternative to pressing \mcs or mapping something to <Plug>nvim-magic-append-completion (the other Lua commands being mapped to are in lua/nvim-magic/_keymaps.lua). You can also turn on debug logging with the envvar export NVIM_MAGIC_LOGLEVEL='debug' which might provide some more info.

Thank you for the plugin!
I'm closing this for now as I've moved to using GitHub Copilot so I can't put time into walking through debugging this. Sorry. <3


Release Google.Cloud.Gaming.V1 version 2.1.0

Changes in this release:
This is primarily a promotion of the previous beta, which includes REST transport support. No API surface changes; just dependency updates.

Created release for Google.Cloud.Gaming.V1-2.1.0


[Bug] Bot won't log on when a token is provided using a string or a variable

So when I try to provide a token to login to the bot using a variable, it sends an error that define new bot named {@bot} doesn't exist, and when I try to provide the token without a string or a variable, it works.

The token is not meant to be stored anywhere, options and variables included.
That's why I disabled the expression parsing in the token entry, just put your plain token string and that's all.


Sound  volume

mrv2 don't memorize the sound volume

When i open the movies, the volume will be at maximum speed, this confuses me. Let's fix this. thank you for your attention

Added in v0.5.2.


Setting element of a tensor

We need to get rid of the following syntax
T.get_block_()[0,0,0]=1
It should be changed to
T[0,0,0]=1
or
T(0,0,0)=1

This can be done using UniTensor::at
However, to take BlockUniTensor into consideration, at function can only access element, not range


Overriding a native method does not display a warning for addons

Tested versions

Reproducible in v4.3.beta2.official [b75f0485b]

System information
Ubuntu 24.04 LTS
Issue description
In plugins, when overriding a native built-in method of a node in a derived class, no warning is displayed to indicate that this is not permitted and that the method will never be called.

Warnings are displayed in the terminal if you start godot from it, but not in the editor.
Steps to reproduce

Create a plugin.
Add a custom class that extends any node.
Override any native method of the base node: No warning is displayed.
Reload project: Warnings are displayed in the terminal if this is how you started godot, but not in the editor.

Minimal reproduction project (MRP)
mrp-overriding-native-method-no-warnings.zip

This is intentional. All warnings are not produced for addons if the exclude_addons setting is enabled. But we could add a setting for exceptions. See:

https://github.com/godotengine/godot/issues/92394#issuecomment-2132387905
#93889

It would be less confusing if, regardless of those settings and exceptions, warnings were always displayed for open files, or at least the file currently tabbed in the editor.

Seems odd to have that sort of thing disabled by default. Is there no way for add-ons to suppress warnings intentionally instead?

It would be less confusing if, regardless of those settings and exceptions, warnings were always displayed for open files, or at least the file currently tabbed in the editor.

I agree this is how it should work, but it might be nontrivial to implement. The GDScript compiler would need to emit warnings regardless of the file path (this is skipped right now), but implementations would have to selectively ignore the warning based on the file path.


Add support for part specific charsets. Charset is captured during pa…

…rt parsing and made available in FormData. The charset is then used in getSize() and getInputStream() to get the correct bytes for the encoded part.

Can one of the admins verify this patch?

This is ok to test


[SPARK-45735][PYTHON][CONNECT][TESTS] Reenable CatalogTests without Spark Connect

What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/39214 that restores the original Catalog tests in PySpark. That PR mistakenly disabled the tests without Spark Connect:
https://github.com/apache/spark/blob/fc6a5cca06cf15c4a952cb56720f627efdba7cce/python/pyspark/sql/tests/test_catalog.py#L489
Why are the changes needed?
To restore the test coverage.
Does this PR introduce any user-facing change?
No, test-only.
How was this patch tested?
Reenabled unittests.
Was this patch authored or co-authored using generative AI tooling?
No.

Has to be merged down to branch-3.4.

Test results: https://github.com/HyukjinKwon/spark/actions/runs/6701783863/job/18209761204

Merged to master, branch-3.5, and branch-3.4.


init list of maDMP endpoint

Also proposes a pundit-based method for scoping access to

the postgres test is failing and it looks like it's maybe due to an ordering issue (running migrate before setup).
I will have a look at that today and try to pull in some of the things I learned from the guithub conf


Manage dependencies

🗣 Description

Celery 5.0 introduces a new CLI that is not backwards-compatible. To avoid breaking changes, pin the versions of Celery which work with our implementation.
💭 Motivation and context

This change resolves Issue #7 and restores our ability to comply with Emergency Directive 19-01.
🧪 Testing

I followed the instructions in README.md to run system and unit tests with docker-compose -f docker-compose.yml run test. All passed.
Then I executed load_certs.py -v --skipto=youth.gov. (I skipped to the youth.gov domain for expediency.) After the script finished, I verified that changes were successfully recorded to my development database.
✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All new and existing tests pass.

@mcdonnnj, any idea why the lint and test actions aren't kicking off?

@king-alexander, before this PR gets merged we should rebase to remove the first two commits.  There is no reason they should clutter up the commit history.

Okay, rebasing took me a few tries but I figured it out! Thank you @jsf9k for the comments. I think linting and actions aren't kicking off yet because I marked the PR as a draft. I'll make it ready for review now.

Is the goal of this PR to get our CT log scanner working again or simply to ensure that the celery piece runs?  If it's the former, I'd like to see some attestation (e.g. in the "Testing" section of this PR) that the scanner is able to be run successfully.
Also, doesn't this PR contradict the goal specified in issue #6 to move to Celery 5.0?

Also, doesn't this PR contradict the goal specified in issue #6 to move to Celery 5.0?

I believe this PR represents just the baby step of getting the code to pass its unit tests again.  I don't think this PR is intended to address #6.
If this PR has high ambitions than that then I agree that it needs more testing than simply passing the unit tests.  Please chime in @king-alexander.

That's correct @jsf9k. I intended this PR as a baby step. Now that I can get unit tests to pass, I'll try to get the scanner to run again. I opened #6 to document an improvement we will eventually want to make. But I don't think it's work the effort yet.

That's correct @jsf9k. I intended this PR as a baby step. Now that I can get unit tests to pass, I'll try to get the scanner to run again. I opened #6 to document an improvement we will eventually want to make. But I don't think it's work the effort yet.

Makes sense, thanks for the clarification.  Can you please create an issue that describes getting the scanning running again?

That's correct @jsf9k. I intended this PR as a baby step. Now that I can get unit tests to pass, I'll try to get the scanner to run again. I opened #6 to document an improvement we will eventually want to make. But I don't think it's work the effort yet.

Makes sense, thanks for the clarification. Can you please create an issue that describes getting the scanning running again?

@king-alexander Just closing the loop here- it looks like you created #7 to address my concern above, correct?

That's correct!

@king-alexander, @mcdonnnj has some upstream updates (from cisagov/skeleton-python-library) that should make the GH Actions workflows work again.  When the time comes we'll rebase this branch on top of those changes and then we can look at merging.

@king-alexander, @mcdonnnj has some upstream updates (from cisagov/skeleton-python-library) that should make the GH Actions workflows work again. When the time comes we'll rebase this branch on top of those changes and then we can look at merging.

Sounds good 👍

@jsf9k @mcdonnnj Are y'all ready for me to rebase these changes onto #8?

No, let's wait until #8 gets merged.

I believe I have a new change that makes admiral compatible with the latest version of Celery (v5.0 Singularity). I am marking this PR as a draft again to do more comprehensive testing.

The new change isn't ready yet, so I am reopening.

The new change isn't ready yet, so I am reopening.

I was thinking that I'd prefer they be separate PRs anyway.


Action sequences return state in a wrong order.

Hello,
I have some problem with the call orders of Observable.
My case:
I have 2 components, Comp1 and Comp2.
Comp1 is a text search component.
Comp2 is a display of a text.
Comp1 and Comp2 share the same reducer, with the following state:
{ match: number, search_element: string }
Comp1 dispatches Action1 when user enter text in input. Payload is the text and updates search_element.
Comp2 subscribe to search_element. It dispatches Action2 with the number of match in the payload, updates math in the state.
Comp1 subscribe to match.
The problem is subscribe to march is called twice.
First with the value from Comp2 and second from the initial value coming from Action1.
Comp1 displays the wrong match.
I don't understand why subscribe to match is called first with "state2" and then with "state1".
I had to add another flag, search_text_updated, to update match only with state2 value.
Do you have any clue if this is a normal behaviour, for chaining actions?
I will try to create an example to reproduce the issue.
Thanks,
Pierre

After investigation, it seems to be linked to ng-if using the same state (from the same reducer).

To reproduce the issue:
https://github.com/pierre-hilt/ng2-redux-issue149
In App.ts, if I change order of component it works.
With the current order, if you set a break point in Counter.ts you will be able to see that subscribe is called twice.

Thanks for creating a repository that reproduces this issue, this is odd behavior. I can see the initial call to subscribe getting the correct value, then somehow the stale one gets pushed out again.
I'll try and investigate further and see if it's an issue on our end - but I agree with the intended expected behavior, and something weird is going on.

@pierre-hilt Trying to wrap my head around the source of the issue - I did notice that moving the code that fires a dispatch into ngAfterViewInit instead of ngOnInit seemed to get things working as expected.
Going to dig a bit more and see if I can better understand the why of this though - and see if it's something that can be fixed at the library level, or if just with the way the various lifecycle hooks get fired in angular - that ngAfterViewInit is the more appropriate spot for it.

 ngOnInit() {
        this.search$ = this.ngRedux.select(state => state.searchReducer.keyword);
    }
    ngAfterViewInit() {

        this.search$.subscribe((keyword) => {
            if (keyword != '') {
                this.actions.fetchResultDispatch(keyword.length)
            }
        });
    }

Hello @e-schultz
Thanks a lot helping me on that!
Your proposition doesn't solve the problem. I found that my problem depends on the order of the subscribe methods.
Doing the subscribe in ngAfterViewInit, search$.subscribe is done after counter$.subscribe and there is no problem.
If you add a setTimeout around counter$.subscribe, it is done after search$.subscribe and so the bug happens.

Counter.ts
ngOnInit() {
    this.counter$ = this.ngRedux.select(state => state.searchReducer.total);
    window.setTimeout(() => {
      this.counter$.subscribe(state =>
        this.counter = state)
    });
  }

CounterInfo.ts
ngOnInit() {
        this.search$ = this.ngRedux.select(state => state.searchReducer.keyword);
    }
    ngAfterViewInit() {
        this.search$.subscribe((keyword) => {
            if (keyword != "") {
                this.actions.fetchResultDispatch(keyword.length)
            }
        });
    }

Just adding this to help debug the problem. Simplifying things to just be one component.

    Counter: {{ counter }}

    Counter$ Async: {{ counter$ | async }}

    <input id='search-input' type="text" class="search"
    [(ngModel)]="keyword" (ngModelChange)="searchKeyword()"/>

search$ subscribed before $counter - counter in template displays correct value, counter$ displays wrong value.
this.counter$ = this.ngRedux.select(state => state.searchReducer.total);
    this.search$ = this.ngRedux.select(state => state.searchReducer.keyword);

    this.search$.subscribe((keyword) => {
      if (keyword != '') {
        this.actions.fetchResultDispatch(keyword.length)
      }
    });

    this.counter$.subscribe(state => {

      this.counter = state;
    });

search$ subscribed before $counter - counter in template displays correct value, counter$ displays wrong value.
this.counter$ = this.ngRedux.select(state => state.searchReducer.total);
this.search$ = this.ngRedux.select(state => state.searchReducer.keyword);

 this.counter$.subscribe(state => {

      this.counter = state;
    });

 this.search$.subscribe((keyword) => {
      if (keyword != '') {
        this.actions.fetchResultDispatch(keyword.length)
      }
    });

counter$ subscribed before $search - both template values display wrong value.
When using the redux dev tools, can see that the state has the correct value, also when looking at the logging - nextState is correct. However, for some reason the .select is getting re-triggered with the previous value.
.... weird.

@pierre-hilt I just published 3.2.1-beta.0 which should address the issue. Going to do a bit more testing before doing a non-beta release

Hey, OK thanks a lot. I will test it on Monday and let you know if I find any bug.


No url file available for plugin cabot_alert_*

Receiving these errors. Can someone point me in the right direction.
ERROR 2015-02-12 19:52:45,910 urls 8002<PHONE_NUMBER>93920 No url file available for plugin cabot_alert_hipchat
ERROR 2015-02-12 19:52:45,911 urls 8002<PHONE_NUMBER>93920 No url file available for plugin cabot_alert_email

Can you provide a little more info about how you're invoking Cabot to get that error?

@squareatom no URL file is supplied for either of those plugins however it should not be causing errors. Are these errors stopping you running cabot?

@packetcollision I managed to get cabot installed on a RHEL 6.5 (Python 2.6.x) local VM. I was able to do so mainly using https://gist.github.com/Gromph/5f4db73b0f38775bc2f0. So I've more than likely broken some things. Anything specific you'd like me to provide?
@bonniejools I can run cabot and it looks like everything need works except for sending emails. So I thought that might be the cause. Correct me if I'm wrong.

No this won't be the cause. We've switched to a plugin system in the last couple of days and there may be a couple of bugs laying around. The cabot-alert-email plugin may be causing problems so I'll take a look and see what I can find. I'll update you if I find any problems in the plugin.

I've fixed the bug which is causing your problems. Thankyou very much for pointing this out. It's been fixed. Either update your plugins on the server or redeploy a new instance. It should be working now.

Thanks prob something on my end but..
Still doesn't seem to work. Also it doesn't look like the checks are being run automatically. When I hit the refresh button, however I see that they run.

@squareatom Good that emails are working now. I'll see if I can fix that bug. As I've said before, there is no URL file for the email plugin however this shouldn't cause an error to be raised. I'll see what I can do.

@bonniejools The only emails I'm getting are the "ERROR: No url file..." ones. I'm not actually getting any for the alerts themselves. And what is this URL file? Thanks again for looking into this.

@bonniejools I have the same issue here, no alert emails but am receiving the "ERROR: No url file.."
/var/log/cabot/celery-1.log contains the following:
[2015-02-21 17:50:34,248: ERROR/Worker-11] Could not sent Email alert
Traceback (most recent call last):
  File "/home/ubuntu/2015-02-21-8362690/cabot/cabotapp/alert.py", line 50, in send_alert
    alert.send_alert(service, users, duty_officers)
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/cabot_alert_email/models.py", line 29, in send_alert
    emails = [u.user.email for u in users]
AttributeError: 'User' object has no attribute 'user'

Thanks for your time.

@jghward looks like https://github.com/bonniejools/cabot-alert-email/commit/12d8ad9c5f37c82e452b6f602ddb9f4f36d5e86a broke it - @bonniejools can you fix please?

Hi,
Is there a solution here ?
I'm having the same issue, no email alerts are being sent.

@bonniejools is this fixed yet?
It's possible to specify the plugin versions in the production.env file in normal requirements syntax but not sure if this is fixed upstream.

@dbuxton Yes this has been fixed in cabot-alert-email 1.3.1.
The 'No URL available' error has been fixed in #191 which also sets a plugin version in the default production.env.

@dbuxton should have mentioned it here but it slipped my mind.

As as update, I'm finally receiving the alert emails after doing a compete reinstall. So there was some issue with my install. The fix for No URL file will most likely work as I manually edited urls.py and did something similar to what's in your commit. Thanks for fixing this though. Next I think i will play around with the email template or work on my own plugin.


Dataview Remove Broken Links

When using dataview to list recently updated notes, it looks like non published notes are listed as well.
Is there any way to either

skip over unpublished notes
remove broken links

Dataview Example
TABLE dateformat(file.mtime, "dd.MM.yyyy - HH:mm") AS "Last modified"
FROM "mynotes"
SORT file.mtime DESC
LIMIT 10

What the Published site looks like

all broken links point to https://pywrite-garden.tawtaw.site/404/

Hi @wchorski, adding where dg-publish to your Dataview query would probably fix this.
TABLE dateformat(file.mtime, "dd.MM.yyyy - HH:mm") AS "Last modified"
FROM "mynotes"
WHERE dg-publish
SORT file.mtime DESC
LIMIT 10

If you would like to have all your notes listed in Obsidian, but only show the published notes in the dataview tables in your digital garden you can use the following "hack".
In your dataview queries, add a line containing WHERE file.mtime in a separate line, e.g.
TABLE dateformat(file.mtime, "dd.MM.yyyy - HH:mm") AS "Last modified"
FROM "mynotes"
WHERE file.mtime
SORT file.mtime DESC
LIMIT 10

(It doesn't need to be file.mtime, but choose something which matches all notes, but at the same time is not something you would ever add an actual where filter for).
Then you can use a Digital garden custom filter which replaces WHERE file.mtime with WHERE dg-publish 👇

Thank you. This is exactly what I needed. The flexibility of having my dataviews in my local vault vs my garden can be reflected or filtered on publish lets me do whatever I want per dataview.
Also, this gives me more ideas on how to use custom filters. (i'm gonna put this tip in my vault too)


bug(mat-select): Screen reader announce selected option twice

Is this a regression?

[ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
after selecting an option from the mat-select dropdown NVDA will announce the selection name twice
This happens with out of the box component or after adding the matSelectAccessibility class to the mat-select tag

Reproduction
Steps to reproduce:

Go to https://material.angular.io/components/select/overview using Chrome or Edge
Open NVDA or Narrator
Navigate to the dropdown with the keyboard
Activate dropdown with the keyboard
Select an element from the dropdown with the keyboard

Expected Behavior
It should announce the selected component only once
Actual Behavior
It announces the selected component 2 times
Environment

Angular: 14.1.1
CDK/Material: versions 13.2.3 and 15.1.3
Browser(s): Edge and Chrome
Operating System (e.g. Windows, macOS, Ubuntu): Windows

Hello,
Thank you for reporting this issue. I wouldn’t expect this issue to block users from completing a workflow. For that reason, I’m updating the priority to P3. Please let us know if you have further concerns concerns and feel free to react with “👍” if you are impacted.
Best,
Zach

Hello Zach,
Thanks for the feedback. Just FYI I'm impacted
Best,
Angel

Hello Zach,
Does this issue fixed?
Best,
Lumin

Any update on the issue fix?

Hello, this is on my radar, but I haven't gotten to it yet. I have a fix in progress that requires me to test it cross browser with our supported screen readers. That way we know the fix is safe.
-Zach


Implement v2 in existing transport

[x] VILLASnode (see https://github.com/VILLASframework/node/pull/627)
[ ] Jander
[x] LabLink

/cc @AIT-CES @ewidl @victoryprince @ogehrke

Hi all,
I have finished the implementation of a subset of the v2 features in VILLASnode.
Details are documented in our documentation here: https://villas.fein-aachen.org/docs/node/nodes/api/
Missing features are:

string data-type
Events

I am happy to announce the first version of the uAPI v2.0 in Lablink:
https://ait-lablink.readthedocs.io/projects/ait-lablink-universal-api-client/en/latest/index.html
This version implements all features of uAPI v2.0, including support for all data types as well as samples and events. There is also a small demo available:
https://ait-lablink.readthedocs.io/projects/ait-lablink-universal-api-client/en/latest/examples.html


Add ability to exclude OS version from snapshot file name

We run tests on multiple devices and use deviceAgnostic to get images specific for each device. We only ever test on the latest OS, and the current behaviour is that the OS version is included in the filename.
This presents a number of problems when we are updating tests to the latest OS. Namely, we end up with completely different images so we can't compare changes easily, and we also end up with orphaned images that we must remember to manually delete.
This PR adds a Boolean, includeOSVersionInFilename to FBSnapshotTestCase to control whether the version gets included in the filename when using deviceAgnostic = true. By default it is set to YES so that it doesn't break current users. If it is set to NO, you will get a snapshot file name that includes the device model, but not the OS version.

Yes, this makes sense!

Hi @nathanshox and @nscoding I've found that my PR #161 is actually extends that feature. What do you think?

@Antondomashnev yes, it's the same, I will need to go over both PR this week and see which one we should go ahead with. I was blocked because I wanted to cut a spec for 2.1.1 which I finally did.

@nscoding Hey, any news regarding this PR and #161 ?

This is similar to what I've proposed in #235. But this still couples deviceAgnostic and OS version together, which I think isn't the right approach. deviceAgnostic makes sense when a simulator is present, but OS version less so.
And the funny thing is, my problem is the inverse of #161. It is precisely that an OS update requires regenerating all the snapshots that I want to be able to have two versions of all the snapshots checked into master. If you're changing the Base SDK and conversely the default OS version of the simulator you use for snapshots (if you only use one), it's pretty beneficial to land all the new snapshots well in advance of adopting the new SDK.


add unit test for streaming aggregator

…unt,append only mode.
PR checklist:

Did you run ClangFormat ?
Did you separate headers to a different section in existing community code base ?
Did you surround proton: starts/ends for new code in existing community code base ?

Please write user-readable short description of the changes:

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Web console: allow stringly schemas in the data loader

This is a change to retain the ability to specify no dimensions without setting useSchemaDiscovery: true in the data loader.
This is needed if someone wants to ingest data in schemaless mode into a datasource made with Druid < 26 and retain the same dimension types.
Internally in the code there is an internal representation of how dimensions are read it used to have values: specific and auto-detect it now has values:

fixed (renamed from specific)
string-only-discovery - represents non useSchemaDiscovery: true schema-less where everything is string typed
type-aware-discovery - represents useSchemaDiscovery: true

Here is how the user selects it:

There is also a warning:

This is tagged as "26.0". There aren't currently docs for useSchemaDiscovery, so for overall consistency we should either add docs or have this feature be more hidden in the UI.

This is tagged as "26.0". There aren't currently docs for useSchemaDiscovery, so for overall consistency we should either add docs or have this feature be more hidden in the UI. Any thoughts on which way we'll go?

Docs are in #14065, which was missing the tag

I updated the PR and also added a warning. The links link to an anchor that will exist once https://github.com/apache/druid/pull/14065 is merged

Configure schema tab:
Prefer to be specific where possible if "this section" might be ambiguous or "any work". Suggestion:

Enabling schema auto detection resets all data transformations and schema configurations for this indexing task.

Prefer "Druid's string-only schema discovery feature" over "string-only schema discovery of Druid"
Configure schema warning:
Suggest:
You have enabled type-aware schema discovery {useSchemaDiscovery:true} to ingest data into the existing datasource {wikipedia}. If you used string-based schema discovery when first ingesting data to {wikipedia}, using type-aware schema discovery now can cause problems with the values multi-value string dimensions. For more information see the documentation.

Thank you for the feedback, I updated the copy (see screenshots)


go-eCharger V3 with 054.7 connecting using OCPP

Describe the bug
Since 054.0ff go-eCharger V3 and Gemini implement OCPP. After successfully playing around with cmd/ocpp and getting a config to work I tried using the go-e with OCPP and failed. There is not even output coming in the trace log.
Steps to reproduce

Configure evcc to use OCPP

  - name: go-eCharger
    type: template
#    template: go-e-v3
#    host: <IP_ADDRESS>
    template: ocpp
    meter: false
#    stationid: go-echarger-05XXXX
#    stationid: cp0001
    idtag: 1

Configure go-eCharger to use OCPP (-> Internet -> OCPP )
Save
Look at the output...

Configuration details
chargers:
  - name: go-eCharger
    type: template
#    template: go-e-v3
#    host: <IP_ADDRESS>
    template: ocpp
    meter: false
#    stationid: go-echarger-05XXXX
#    stationid: cp0001
    idtag: 1

Log details
root@raspberrypi:~# ./evcc
[main  ] INFO 2022/11/28 22:22:02 evcc 0.108.2
[main  ] INFO 2022/11/28 22:22:02 using config file: /root/evcc.yaml
[main  ] INFO 2022/11/28 22:22:02 starting ui and api at :7070
[db    ] TRACE 2022/11/28 22:22:02 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="settings" -1 <nil>
[db    ] TRACE 2022/11/28 22:22:02 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "settings" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2022/11/28 22:22:02 SELECT * FROM `settings` LIMIT 1 -1 <nil>
[db    ] TRACE 2022/11/28 22:22:02 SELECT * FROM `settings` 6 <nil>
[ocpp  ] DEBUG 2022/11/28 22:22:03 waiting for chargepoint: 10m0s

That's it...

I do have a tcpdump...

What type of operating system are you running?
Docker container
Version
evcc version 0.108.2

wireshark.zip

This might be completely wrong but:

[ocpp  ] DEBUG 2022/11/28 22:22:03 waiting for chargepoint: 10m0s

Did you wait 10 minutes? I don't know how OCPP works but at least this sounds to me like the Charger is supposed to do something and maybe the charger only does this initialization (or whatever it does) every now and then

Thanks for looking into it, but... ;-)

This was my first idea as well, so yes, I waited the first time for 10 minutes...
The tcpdump shows that the charger connects to the evcc and then receives a 404 not found response.

I used evcc's own OCPP test client in ./cmd/ocpp to try out my evcc config and also took a tcpdump from that - there the evcc does not respond with a 404 - but the request from the charger to me looks the same as from the test client...


Error stopping playlist

above is the screenshot when i try to stop downloading playlist...

I think I've already fixed this in 68baf1117b1b39502b9464769f490871ee91685f.
Just didn't upload it until now.

Can you confirm?

it works fine now after updating.


Remove Jansi

Jansi had been included in Embulk since v0.6.12 to "color" Logback logs even in Windows.
See commit: 34d238494e05231ecb5fe5e10910119035767492
We, however, do not see a big benefit to keep it. It is not critical, but taking a certain amount in Embulk's executable size. Let's remove it.
We may get it back if we receive many requests to do it again in the future.

Thanks!


feat(plugins): create Typedoc plugin for readme links

Description
Please describe the reason related to the changes:
Type
Please select the type related to the changes:

[ ] bugfix
[ ] build
[ ] continuous delivery (CD)
[ ] continuous integration (CI)
[ ] documentation
[ ] feature
[ ] formatting
[ ] refactoring
[ ] styling
[ ] other (please describe below):

Breaking Change
Does your changes introduce a breaking change?

[ ] no
[ ] yes

Behavior
Please describe the current behavior:
Changes
Please describe the new behavior:
Information (issue, links, logs, etc.)
Please list any other useful information:
Checklist
Please make sure this pull request follow the requirements:

[ ] commit guidelines @commitlint/config-conventional
[ ] 100% code coverage
[ ] tests passing

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
239

Relevant Lines:
239

💛  - Coveralls

/docs


Pull request to extend the functionality

Decoding scalars to scalars dictionary (eg. [String: String])
Sometimes, just key-value pair is included in json

Encode primitive type, eg. "hello, there".toJSONString()
JSONCompatible is JSONEncodable but toJSONString() is failed.

NSNull handling
NSJSONSerialization.JSONObjectWithData may include NSNull, which is not handled property

Thanks!


Use transaction id from error to print out explorer link for errors

Note that there is currently no good way to tell if a transaction got included in the chain, so sometimes this link will not be valid.
To reproduce error behavior, the easiest way is to try to send too much money to another account
e.g.

node bin\near send jane.betanet jane2.betanet 1000

This depends on https://github.com/near/near-api-js/pull/362

Can we get some steps on how to reproduce please?

there are some linting issues to address, please :)

Tested:
node bin\near send jane.betanet jane2.betanet 1000
Sending 1000 NEAR to jane2.betanet from jane.betanet
An error occured
NotEnoughBalance [Error]: Sender jane.betanet does not have enough balance<PHONE_NUMBER>1675913419670000 for operation costing<PHONE_NUMBER>060601875000000000
at Object.parseRpcError (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\utils\rpc_errors.js:38:19)
at JsonRpcProvider.sendJsonRpc (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\providers\json-rpc-provider.js:147:40)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Account.signAndSendTransaction (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\account.js:116:22)
at async exports.sendMoney (C:\Users\janed\near\near-shell\index.js:203:20)
at async Object.handler (C:\Users\janed\near\near-shell\utils\exit-on-error.js:39:9) {
[stack]: 'Error: Sender jane.betanet does not have enough balance<PHONE_NUMBER>1675913419670000 for operation costing<PHONE_NUMBER>060601875000000000\n' +
'    at Object.parseRpcError (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\utils\rpc_errors.js:38:19)\n' +
'    at JsonRpcProvider.sendJsonRpc (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\providers\json-rpc-provider.js:147:40)\n' +
'    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n' +
'    at async Account.signAndSendTransaction (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\account.js:116:22)\n' +
'    at async exports.sendMoney (C:\Users\janed\near\near-shell\index.js:203:20)\n' +
'    at async Object.handler (C:\Users\janed\near\near-shell\utils\exit-on-error.js:39:9)',
[message]: 'Sender jane.betanet does not have enough balance<PHONE_NUMBER>1675913419670000 for operation costing<PHONE_NUMBER>060601875000000000',
type: 'NotEnoughBalance',
context: ErrorContext {
transactionHash: '4G53DL72E4gZmDbeu74ajp5Q8N6vxzcoAwrMrQs7FeLp'
},
balance: '45000000521675913419670000',
cost: '1000000453060601875000000000',
signer_id: 'jane.betanet'
}
We attempted to send transaction 4G53DL72E4gZmDbeu74ajp5Q8N6vxzcoAwrMrQs7FeLp to NEAR, but something went wrong.
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.betanet.near.org/transactions/4G53DL72E4gZmDbeu74ajp5Q8N6vxzcoAwrMrQs7FeLp
Note: if the transaction was invalid (e.g. not enough balance), it will show as Not started/Finalizing.


MSAL how to store ID Token and Access Token in Secure Cookie

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Browser:

[x] Chrome version XX
[x] Firefox version XX
[ ] IE version XX
[x] Edge version XX
[ ] Safari version XX

Library version

Library version: X.Y.Z

## Current behavior

## Expected behavior

## Minimal reproduction of the problem with instructions

We have been observing MSAL is storing the Access Token and ID Token in the local storage.  Is there any way to make it get stored in a secure cookie.
Will the below flag help
storeAuthStateInCookie(Optional): This flag was introduced in MSAL.js v0.2.2 as a fix for the authentication loop issues on IE and Edge. Please enable the flag storeAuthStateInCookie to true to take advantage of this fix. When this is enabled, MSAL.js will store the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.

any updates on this?

Yes as in, storeAuthStateInCookie(Optional) is an additional option to the users (introduced for IE to resolve access across trusted zones) and can be used to store tokens in the cookies. Please try this if it helps your case.

We however see the session state (local storage) to still contain the access token and refresh token.  My expectation is they will be only stored in cookies and be secured .

I don't think it's currently possible to use just a cookie. Looking at the code in the UserAgentApplication shows this is how it handles the cacheLocation parameter:
this._cacheLocation = cacheLocation;
    if (!this._cacheLocations[cacheLocation]) {
      throw new Error("Cache Location is not valid. Provided value:" + this._cacheLocation + ".Possible values are: " + this._cacheLocations.localStorage + ", " + this._cacheLocations.sessionStorage);
    }
    this._cacheStorage = new Storage(this._cacheLocation); //cache keys msal

It forces the cacheLocation to either be "sessionStorage" or "localStorage".

@rsrinivasanhome  and @AndrewCraswell , Cookie is designed to be in addition to localstorage/sessionstorage, not as an alternative. It is introduced to solve an issue with IE TrustedZones. Exclusive cookie storage only is not something that we supported in the past.
@navyasric is this something we have scope to support in future?

It should allow HttpOnly cookies to be used and avoid localStorage and sessionStorage to avoid all the caveats regarding XSS. It's much easier to prevent CSRF with cookies then it is for HTML storage.

@Highspeed7 We are in middle of a major update for the library and would love to consider this once we release the current in the works changes. @navyasric to add this in our road map and update this thread as and when we plan to support this.

We are exploring other alternatives to in memory storage, will take this into account but closing for now.


Follow automatic-pancake

@helio-frota Can you be more specific about what items need to be changed, added or removed in order to be more compliant?


[bug] Handle default branch name with master

If fetching an old repo with the default branch is master, it will throw an API error, we need to handle this

Would you like to take a look at this issue? @leeeizhang : )

Sure, I can take over it! is there any methods to reproduce the issue? :)

try this: https://github.com/huangyz0918/AndroidWM


beforePaste 异步返回false后仍然可以粘贴

目前 beforePaste 可以拦截粘贴操作了，但是不满足我的使用场景。
我需要获取剪切板中的内容，然后根据我自己的规则判断是否允许粘贴，其中获取剪切板的内容是异步操作。 我异步返回false时 仍然会将数据粘贴进去。
示例代码：
<Workbook
    {...config}
    hooks={{
        beforePaste: async ()=>{
            const pasteText = await navigator.clipboard.readText();
            const allowPaste = pasteText === '123';
            return allowPaste
        }
    }}
/>

Current beforePaste can block paste operations, but it does not meet my usage scenario.
I need to get the contents of the clipboard and then decide whether to allow pasting according to my own rules, where getting the contents of the clipboard is an asynchronous operation. Even if false is returned, the data will still be pasted in.
Sample  code:
<Workbook
    {...config}
    hooks={{
        beforePaste: async ()=>{
            const pasteText = await navigator.clipboard.readText();
            const allowPaste = pasteText === '123';
            return allowPaste
        }
    }}
/>

我希望组件可以兼容异步返回的场景
I want the component to be compatible with asynchronously returned scenarios

Hey, I had a look at this request today. It is not possible to support async/await with this hook. But for your use case of deciding true/false based on contents being pasted, there is an inbuilt method to achieve this.
hooks={{
          beforePaste: (_, content) => {
            return content === "123";
          },
        }}

I believe this will serve your purpose.


cmd/compile: bounds check elimination for if len(x) > 32 { ...;  x = x[8:]; ... }

( From https://github.com/golang/go/issues/23354#issuecomment-365753223 )
In https://github.com/dgryski/go-metro/commit/1308eab584388b3f8f6050f027708891c4f4143a I got a major performance boost by changing the loop to remove the reassignments to ptr which, even though they were still within range, invalidated the bounds checks for that were valid for ptr before the assignment.
The bounds-check elimination prover should handle this common case.

This is already fixed on master by my prove CLs. I will add a specific testcase.

Sweet! Sorry I didn't check against tip.  I forgot about filing this issue and Austin's comments made it sound like it was unlikely to be done anytime soon.

And interesing thing I noticed when looking to fix this. Maybe it was obvious, but not to me. The bounds checks in question are not actually from the slicing operations, they are from the inlined encoding/binary methods. Within prove, the bounds check in the inlined method is actually doing some work in helping to pass information along about the length of the slice. For illistration, despite removing the bounds checks in the example for this issue, my CL above doesnt remove the IsSliceInBounds from this:
func decode(data []byte) (int, error) {
	if len(data) < 24 {
		return 0, nil
	}
	_ = binary.BigEndian.Uint32(data[0:])
	_ = binary.BigEndian.Uint32(data[4:])
	_ = binary.BigEndian.Uint64(data[8:])
	_ = binary.BigEndian.Uint64(data[16:])
	return 24, nil
}

The next CL in the chain will get these though.

Related https://github.com/golang/go/issues/28941.


Version 1.1.0 ready

Version 1.1.0 ready with:

ArangoClientSync renamed
Health Indicator accessor prototype
Client prototype inject support

Ready


[5.4] Fix route bindings

This is another approach to fix https://github.com/laravel/framework/pull/16926

This seems a lot more elegant than my solution in #16926, can't see any issues address in mine that haven't been addressed in this one (though haven't thought through too much the $values[$key - $instancesCount] maintaining the order of non object dependencies.)

How about applying this bug fix to the previous, supposedly still supported versions?

It's probably too controversial for earlier versions IMO.


[dmd-cxx] std.range.primitives: Fix static condition for X32 targets

Cherry-picked from #7447

ci/circleci: Build Error — Your tests failed on CircleCI

Hmm, should fix that... maybe.

#!/bin/sh -eo pipefail
# ERROR IN CONFIG FILE:
# [#] required key [jobs] not found

Looks like the config here needs an update.

https://github.com/dlang/phobos/pull/7448#issuecomment-614559838
Yes please :)

This is in druntime/dmd-cxx.
jobs:
  build:
    docker:
      - image: circleci/buildpack-deps:18.04
    parallelism: 1
    filters:
      branches:
        ignore: dmd-cxx
    steps:
      - run: echo pass


Enable x86_64-darwin, aarch64-darwin nix builds

Changelog
- description: |
    Enable x86_64-darwin, aarch64-darwin nix builds
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
   - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context
Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist

[ ] Commit sequence broadly makes sense and commits have useful messages
[ ] New tests are added if needed and existing tests are updated. See Running tests for more details
[ ] Self-reviewed the diff

We don't have native aarch64-Linux builders. This will go through qemu on x86_64-linux and be really slow.
We can do x86_64-linux -> aarch64-linux cross though.
I'd strongly suggest against asrch64-linux native.
If we do consider this a necessity, we need to get a native arch64 machine.

@angerman Thanks for the explanation and review! We're still evaluating if we need extra architectures built in CLI repo and is the extra build time worth it.

Cross compiling to aarch64-Linux works quite well.

@carbolymer> any plan to merge this one soon? We definitely want this one merged before the next release of the CLI.


No distutils.

Context:

9.20. distutils.sysconfig — System configuration information
Deprecated since version 3.10: distutils.sysconfig has been merged into sysconfig.

Description of the Change: Use sysconfig instead of distutils.sysconfig if it is not available.
Benefits: We can make wheels for python 3.12

I tested locally and succeeded. I will also add the require build wheels tag for this.

This PR has been superseded by #667, #669, #670, #671