Add curried API for actions data

Some weeks ago, we were discussing about the magics behind Hyperapp and the ways to be more transparent. Here I made a proposition https://github.com/hyperapp/hyperapp/issues/380#issuecomment-330901225 now this on the way to be a real PR.
To sum up (a long long long war on slack), the proposition is about removing the comfusion regarding the actions you will write/define and the actions you will get/use.
At the moment, you are defining actions that way.
(state, actions, data) => function

But, when it will be time to use you action, you will use action with this signature
(data) => function

And I am pretty sure here is a lot of troubles here.
How many times have you answered a question about someone trying to use their actions that way ?
actions.myaction(state, actions, data)

This is why I am coming at you with this proposition :
(state, actions) => (data) => function

The following will be better on three points :

The api will look the same all arround the app/entries

(state, actions) => function

Users will understand more easily what they need to use

(data) => function

Actions are now able to use more than 1 argument

(foo, bar, baz, ... fizz) => function

in 11 bytes

app({
  state: {
    count: 0
  },
  view: (state, actions) =>

        {state.count}

      <button onclick={() => actions.subLater(1, 3000)} disabled={state.count <= 0}>ー (3 sec)</button>
      <button onclick={() => actions.sub(1)} disabled={state.count <= 0}>ー (now)</button>
      <button onclick={() => actions.add(1)}>＋ (now)</button>
      <button onclick={() => actions.addLater(1, 3000)}>＋ (3 sec)</button>
    ,
  actions: {
    sub: (state, actions) => (value) => ({ count: state.count - value }),
    add: (state, actions) => (value) => ({ count: state.count + value }),
    subLater: (state, actions) => (value, time) => update => {
      setTimeout(() => {
        update(state => state.count <= 0 ? {} : { count: state.count - value })
      }, time)
    },
    addLater: (state, actions) => (value, time) => update => {
      setTimeout(() => {
        update(state => ({ count: state.count + value }))
      }, time)
    }
  }
})

Now time for questions :smiley:

@Swizz Thanks! I am not sure if I am going to move forward with this, but I still need more time to come up with my own proposal.
Just to address one of your questions.

How many times have you answered a question about someone trying to use their actions that way ?

actions.myaction(state, actions, data)

I haven't, but I imagine not too few people must have found this a bit confusing, I admit that.
Now, does that mean the same people that found the above confusing would be calling actions like this now?
actions.myaction(state, actions)(data)

Just enforce destructuring. It is just fantastic language feature/tool which gives very big options. Once you have ({ state, actions }, ...args) you are ready to go everywhere, and currying won't be needed cuz it is small enough. Not to mention that it enforce conventions which is awesome. One more thing is that it leads to lower number of arguments (mAx-ParaAmMMMS MUSsST bEe 3! !1! ;d)

@Swizz In the original draft of Hyperapp, we had two app props reducers and effects instead of one app prop actions like now. So, it was not a big jump to think actions were more that just a copy of your reducers and effects in an object.
When the API changed to only actions, I was able to simplify things around, but created another problem, the one you are describing.
I agree that a way to deal with this is to use destructuring across the documentation. Another option is to call the actions we give you something else, for example: dispatch, send or call.

Hey @charlike-old, funny to bump into your here :)
Personal observation - whenever someone uses the word just in a sentence, I feel like there is hidden complexity that is just obscured by that word 🙃
In the case you described, ({ state, actions }, ...args) doesn't really address the issue that when you define your app, you have a signature of (state, actions, data) for your actions, and when you actually use them, the signature is just (data). Example:
app({
  state: { name: '' },
  actions: {
    setName: (state, actions, name) => ({ name }),

    // Contrived example, I know I could `return { name: theNewValue }` instead
    setNameToInputValue(state, actions, e) {
      // Wrong! But this is what I expected at first, and what TypeScript or Flow can infer at best
      actions.setName(state, actions, e.currentTarget.value); // Oops
      // That's right, the parameter signature was different than in the definition
      actions.setName(e.currentTarget.value);
    },
    clearName(state, actions) {
      // Wrong! But this is what I expected at first, and what TypeScript or Flow can infer at best
      actions.setName(state, actions, ''); // Oops
      // That's right, the parameter signature was different than in the definition
      actions.setName('');
    }
  },
  view: (state, actions) =>

      <input type="text" oninput={actions.setNameToInputValue} />
      <button type="button" oninput={actions.clearName}>Clear Name</button>

Hello {state.name}!

});

I'll now add in some points from discussions in Slack.
Renaming the actions argument of functions
One way we discussed we could address this is if we rename actions to something else when using them, for example dispatch:
app({
  state: { name: '' },
  actions: {
    setName: (state, dispatch, name) => ({ name }),

    setNameToInputValue(state, dispatch, e) {
      dispatch.setName(e.currentTarget.value);
    },
    clearName(state, dispatch) {
      dispatch.setName('');
    }
  },
  view: (state, dispatch) =>

      <input type="text" oninput={dispatch.setNameToInputValue} />
      <button type="button" oninput={dispatch.clearName}>Clear Name</button>

Hello {state.name}!

});

This way it would be clearer that the actions we're defining are somewhat different from what we get afterwards. We could also name the argument do, call or bamboozle (I think that one's going to be the community favorite 😆).
However, that alone isn't going to be enough to enable type safety in TypeScript or Flow - someone please correct me if I'm wrong, but we can't really map (state, dispatch, name: string): Partial<State> to (name: string): Partial<State>.
Destructuring the actions argument of functions
To avoid having to name that argument, we can also use destructuring (in a different way than @charlike-old meant):
app({
  state: { name: '' },
  actions: {
    // Except we don't need any actions here, so no destructuring,
    // and the question of what to name the second parameter remains
    setName: (state, _, name) => ({ name }),

    setNameToInputValue(state, { setName }, e) {
      setName(e.currentTarget.value);
    },
    clearName(state, { setName }) {
      setName('');
    }
  },
  view: (state, { setNameToInputValue, clearName }) =>

      <input type="text" oninput={setNameToInputValue} />
      <button type="button" oninput={clearName}>Clear Name</button>

Hello {state.name}!

});

Some observations here:

As you can see, this doesn't avoid the issue of naming the argument when an action is not used, like in setName
It doesn't really solve the issue that something that is only called setName has 2 different signatures - (state, actions, data) and (data). I think the distinction between actions.setName(state, actions, data) and dispatch.setName(data) is much clearer
Destructuring actions would prevent F2 -> Rename from working in TypeScript due to Microsoft/TypeScript#6312 and Microsoft/TypeScript#15787
It's still not type safe

@Swizz's proposal
Combining this PR's proposal with renaming the actions argument in functions would resolve the naming discrepancy and enable type safety for actions - in TypeScript after Microsoft/TypeScript#6606 is done, and in Flow using $Call. Example:
app({
  state: { name: '' },
  actions: {
    setName: (state, dispatch) => (name: string) => ({ name }),

    setNameToInputValue: (state, dispatch) => (e: Event) => {
      dispatch.setName(1);     // Oops, TypeScript error, `setName` expects a string
      dispatch.setName((e.currentTarget as HTMLInputElement).value);
    },
    clearName: (state, dispatch) => () => {
      dispatch.setName(null); // Oops, TypeScript error, `setName` expects a string
      dispatch.setName('');
    },
    // Potentially confusing that there are no args here? Worried someone might do this?
    // Well, then Hyperapp could throw an error if it doesn't get a function
    clearNameWrongDefinition: (state, dispatch) => {
      dispatch.setName('');
      // We're not returning a function, so Hyperapp throws an error
    }
  },
  view: ...
});

To conclude, this looks like the best of both worlds. So...I am @vdsabev and I support this PR 😄

@vdsabev Unfortunately, there is another issue. I want to distinguish reducers from effects, but I don't want to add a new app prop. The solution we've been discussing lately on Slack fixes #432 and involves not passing actions to actions, but to thunks.
actions: {
  // Reducers
  increment: state => ({ count: state.count + 1 }),
  incrementBy: (state, data) => ({ count: state.count + data })

  // Side Effects
  incrementLater: state => actions => setTimeout(() => actions.increment(), TIMELAPSE)
}

I think the separation of reducers and effects is also important and perhaps more than users getting confused about how to call actions which can be ameliorated in several ways as @vdsabev explains and better documentation.
Tough one.

@Swizz @vdsabev I have another issue with this proposal, that I hadn't noticed before.
const actions = {
  increment: state => ({ count: state.count + 1 }),
  incrementBy: state => data => ({ count: state.count + data }),
}

Leaving effects aside, there are apparently two kind of actions above. Why would it be obvious to anyone that increment is invoked actions.increment() and incrementBy actions.incrementBy(10).

@JorgeBucaran does (state, data) => (actions) enable some performance optimization vs (state, actions, data) or (state, actions) => (data)? Is there something other than conceptual separation of reducers and effects?
What I've noticed is I can still make pseudo reducers and pseudo side effects that don't really do anything:
actions: {
  // Pseudo reducer :)
  justLogIt: (state) => {
    console.log('Not a reducer, not doing anything to the state or calling actions');
  },

  // Pseudo side effect
  justLogItLater: (state) => (actions) => {
    console.log('Not a side effect, not doing anything to the state or calling actions');
  },

  // Maybe both reducer and side effect? Not really different from how we do things right now
  logAndIncrement: (state) => (actions) => {
    actions.justLogIt();
    return { count: state.count + 1 };
  }
}

Or would any of these be "forbidden" / discouraged?

@JorgeBucaran regarding your second point, I think with a (state, actions) => (data) signature, action definitions should always return a function. Еven if the action doesn't need data, we should define it like (state, actions) => (). As I said in my long-wall-of-text comment, Hyperapp can enforce this by checking whether the result of the function in actions is a function or not:
app({
  state: { name: '' },
  actions: {
    setName: (state, dispatch) => (name) => ({ name }),
    clearName: (state, dispatch) => () => ({ name: '' }),
    clearNameIncorrectly: (state, dispatch) => ({ name: '' }) // Hyperapp throws an error here
  },
  view: ...
});

@vdsabev Is there something other than conceptual separation of reducers and effects?

It's conceptual at this point. But a good foundation is built on good concepts.
In your code: justLogIt and justLogItLater are side effects because the first one returns undefined and the second one returns a function. The first one is just a "quirk" of JavaScript, which is not a FL and really a non-issue to everyone. The second one is how I think effects should be implemented from now on. It's a user friendly compromise between the JavaScript most people know and FP/Elm.
A more extreme way involves triggering effects more awkwardly:  [newState, actions.incrementBy, 100].
Finally, logAndIncrement is actually incorrect and does not work in the API described here.

@vdsabev To address your follow post, I feel enforcing that creates a new problem. It makes the API awkward.
app({
  actions: {
    incrementBy(state) {
      return data => ({
        count: state.count + data
      })
    }
  }
})

VS
app({
  actions: {
    incrementBy(state, data) {
      return {
        count: state.count + data
      }
    }
  }
})

What about the perception of the initial state versus the state you receive in the view and actions?
I have never heard anyone find fault in the fact the state that you pass to the app() is only the initial state and the state you receive inside the view and actions is the current state.

@JorgeBucaran I've been thinking about initialState vs state, but the difference is it's an object, not a function, so it doesn't have a different parameter signature, and you use state the exactly same way you would use initialState.
The only potential issue I see there is someone thinking they have to mutate the state to make actual changes. Which means they've completely missed the point of Hyperapp.

After some investigation, it looks like we won't be able to achieve perfect automatic typings, even if we had (s, a) => (d) and Microsoft/TypeScript#6606 was resolved.
If you take a look at this pen where I've tried writing Hyperapp's types from scratch, you'll see a couple of challenges that I couldn't overcome:

Action names can't be type checked (or reliably renamed with F2), so you could type actions.avadaKedavra() and the compiler can't detect it's an invalid action name
Additional action parameter types can't be type checked, so you could type actions.incrementBy('a') and the compiler can't detect it's an invalid parameter type

Perhaps someone with more TypeScript experience than me could resolve those issues, but I don't know how to right now. It's possible Microsoft/TypeScript#5453 could help to some extent, but then writing types for (s, a, d) would probably be just as easy as writing types for (s, a) => (d).
I still think (s, a) => (d) makes sense, and @lukejacksonn put it best:
   hyperapp          user
       v              v
(state, actions) => (data) => ({ ... })

But as far as types go, I don't see an advantage right now, or in the near future.

@vdsabev Дооооооооооооообре, just ме нави с първият си коментар. :D
Ahh, types. Is Flow have same problems as TS, cuz can't try now?

I think all of this reducers should work
const reducer = (state) => (actions) => (data) => {}

const reducer = (state) => (actions) => (data) => ({ foo: 123 + state.num })
const reducer = (state) => (actions) => ({ foo: 123 + state.num })
const reducer = (state) => ({ foo: 123 + state.num })

const reducer = (state) => (actions, data) => ({ foo: 123 + state.num })
const reducer = (state) => (actions) => ({ foo: 123 + state.num })

const reducer = (state, actions, data) => ({ foo: 123 + state.num })
const reducer = (state, actions) => ({ foo: 123 + state.num })

Really i still don't getting what's so hard to understand reducers/effect by the most of users.
Reducers for me:
1) absolutely pure functions;
2) absolutely synchronous;
3) must return an object;
4) it's good to assume that they return whole state (not partial/chunk) and give to user a helper that accept partial and merge it with the whole state - that's easier to implement and looks good too.
5) in rare cases you'll call another reducers, and never effects;
6) even to not have any access to effects.

rules
reducers
effects

update/replace state
:heavy_check_mark:
not directly

access to state
:heavy_check_mark:
:heavy_check_mark:

access to reducers
:heavy_check_mark:
:heavy_check_mark:

access to effects
:x:
:heavy_check_mark:

synchronous
:x:
:heavy_check_mark:

pure functions
:heavy_check_mark:
:x:

must return value
:heavy_check_mark:
:x:

must return object
:heavy_check_mark:
:x:

are callers
:x:
:heavy_check_mark:

are called
:heavy_check_mark:
:heavy_check_mark:

Reducers are folks that are called, not callers.
I have always been for reducers/effects approach instead of one single object actions and @JorgeBucaran nows that, imo. And i (still) think it was wrong move. I totally love that concept of sliced states and actions, but it is a bit harder - not so, but a bit bigger abstraction, user should think first and even more must realize that there are relation between the state keys and action keys and etc. It's brilliant idea, definitely.
If you have separate reducers and effects you don't need thunks too. Once you need the state to be updated you just call the specific reducer, this works for promises and everything. That way everything is absolutely clear and i don't see any possible problems.
We still can support nested reducers and nested effects so to have some namespaces.

Accepted! Thanks @Swizz! 🎉


Credentials

Hello, I was looking for Spring boot and React examples and came across your repo.
It looks like the file ez-Dashing/config/server.properties contains your username and password for https://issues.edelia.net. I am not sure if this non-prod or prod tracker for you. Though of letting you know if you committed them by mistake.

Thank you, I commited them by mistake :)


Having a wrapper / decorator function on every log message

I want every log message to pass through my own custom function before being logged, which takes in a message, and returns a modified version.
I don't want to call the log function from a custom class because that messes with my callerinfo details.
I'm looking for a wrapper option. Is there something like that?(I couldn't find one in the Wiki and Docs)

Normally one would just create a custom layoutrenderer (And use that in NLog.config):
https://github.com/NLog/NLog/wiki/How-to-write-a-custom-layout-renderer
Alternative you can override the default MessageFormatter  when creating a LogEventInfo:
var logevent = new LogEventInfo(LogLevel.Info, null, null, "Hello {0}", new [] { "world"}, exception);
logevent.MessageFormatter = MyCustomMethod;
logger.Log(logevent);

Thanks. I'm registering this at the start of my code flow,
LayoutRenderer.Register("formatted-message", (logevent) => myMethod(logEvent.FormattedMessage));

and trying to use ${formatted-message}, but I get the error ArgumentException: LayoutRenderer cannot be found: 'formatted-message'

Yes registration of custom layout-renderer AFTER having loaded NLog.config is not working. Guess you are waiting for #3557.
Either ensure that no NLog Logger-objects are created (that automatically loads NLog.config), before having performed registration of custom layoutrenderer.
Alternative reload the NLog.config after having performed the registration:
NLog.LogManager.Setup()
   .SetupExtensions(s => s.RegisterLayoutRenderer("myMessage", (logevent) => myMethod(logEvent.FormattedMessage)))
   .LoadConfigurationFromFile(optional: false);

Either ensure that no NLog Logger-objects are created (that automatically loads NLog.config), before having performed registration of custom layoutrenderer.

Thanks, I had missed this.
For anyone else to refer, adding this before any reference to NLog.config allows you to add a wrapper over your message
LayoutRenderer.Register("myMessage", (logevent) => myMethod(logEvent.FormattedMessage));


HBASE-24453 BackPort HBASE-20220 to branch-1

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 54s
Docker mode activated.

_ Prechecks _

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

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

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

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 2 new or modified test files.

_ branch-1 Compile Tests _

+0 :ok:
mvndep
2m 21s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
8m 18s
branch-1 passed

+1 :green_heart:
compile
0m 38s
branch-1 passed with JDK v1.8.0_252

+1 :green_heart:
compile
0m 49s
branch-1 passed with JDK v1.7.0_262

+1 :green_heart:
checkstyle
0m 42s
branch-1 passed

+1 :green_heart:
shadedjars
3m 37s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 37s
branch-1 passed with JDK v1.8.0_252

+1 :green_heart:
javadoc
0m 36s
branch-1 passed with JDK v1.7.0_262

+0 :ok:
spotbugs
1m 19s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
1m 14s
branch-1 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 19s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 23s
the patch passed

+1 :green_heart:
compile
0m 40s
the patch passed with JDK v1.8.0_252

+1 :green_heart:
javac
0m 40s
the patch passed

+1 :green_heart:
compile
0m 53s
the patch passed with JDK v1.7.0_262

+1 :green_heart:
javac
0m 53s
the patch passed

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

-1 :x:
rubocop
0m  5s
The patch generated 5 new + 59 unchanged - 4 fixed = 64 total (was 63)

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

+1 :green_heart:
shadedjars
3m 21s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
5m 33s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2.

+1 :green_heart:
javadoc
0m 28s
the patch passed with JDK v1.8.0_252

+1 :green_heart:
javadoc
0m 38s
the patch passed with JDK v1.7.0_262

+1 :green_heart:
findbugs
1m 11s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
11m 53s
hbase-rsgroup in the patch passed.

+1 :green_heart:
unit
9m 21s
hbase-shell in the patch passed.

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

61m 32s

Subsystem
Report/Notes

Docker
Client=19.03.9 Server=19.03.9 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/1/artifact/out/Dockerfile

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

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile rubocop

uname
Linux b47b30e43469 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1798/out/precommit/personality/provided.sh

git revision
branch-1 / 7df034a

Default Java
1.7.0_262

Multi-JDK versions
/usr/lib/jvm/zulu-8-amd64:1.8.0_252 /usr/lib/jvm/zulu-7-amd64:1.7.0_262

rubocop
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/1/artifact/out/diff-patch-rubocop.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/1/testReport/

Max. process+thread count
1688 (vs. ulimit of 10000)

modules
C: hbase-rsgroup hbase-shell U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/1/console

versions
git=1.9.1 maven=3.0.5 findbugs=3.0.1 rubocop=0.81.0

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

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 52s
Docker mode activated.

_ Prechecks _

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

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

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

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 2 new or modified test files.

_ branch-1 Compile Tests _

+0 :ok:
mvndep
2m 20s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
8m 19s
branch-1 passed

+1 :green_heart:
compile
0m 39s
branch-1 passed with JDK v1.8.0_252

+1 :green_heart:
compile
0m 48s
branch-1 passed with JDK v1.7.0_262

+1 :green_heart:
checkstyle
0m 36s
branch-1 passed

+1 :green_heart:
shadedjars
3m 23s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 37s
branch-1 passed with JDK v1.8.0_252

+1 :green_heart:
javadoc
0m 35s
branch-1 passed with JDK v1.7.0_262

+0 :ok:
spotbugs
1m 13s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
1m 10s
branch-1 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 18s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 18s
the patch passed

+1 :green_heart:
compile
0m 42s
the patch passed with JDK v1.8.0_252

+1 :green_heart:
javac
0m 42s
the patch passed

+1 :green_heart:
compile
0m 47s
the patch passed with JDK v1.7.0_262

+1 :green_heart:
javac
0m 47s
the patch passed

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

-1 :x:
rubocop
0m  5s
The patch generated 5 new + 59 unchanged - 4 fixed = 64 total (was 63)

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

+1 :green_heart:
shadedjars
3m 11s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
5m 23s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2.

+1 :green_heart:
javadoc
0m 27s
the patch passed with JDK v1.8.0_252

+1 :green_heart:
javadoc
0m 38s
the patch passed with JDK v1.7.0_262

+1 :green_heart:
findbugs
1m  8s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
12m 57s
hbase-rsgroup in the patch passed.

+1 :green_heart:
unit
8m 13s
hbase-shell in the patch passed.

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

60m 26s

Subsystem
Report/Notes

Docker
Client=19.03.9 Server=19.03.9 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/2/artifact/out/Dockerfile

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

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile rubocop

uname
Linux 7413909de0f3 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1798/out/precommit/personality/provided.sh

git revision
branch-1 / 7df034a

Default Java
1.7.0_262

Multi-JDK versions
/usr/lib/jvm/zulu-8-amd64:1.8.0_252 /usr/lib/jvm/zulu-7-amd64:1.7.0_262

rubocop
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/2/artifact/out/diff-patch-rubocop.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/2/testReport/

Max. process+thread count
1659 (vs. ulimit of 10000)

modules
C: hbase-rsgroup hbase-shell U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1798/2/console

versions
git=1.9.1 maven=3.0.5 findbugs=3.0.1 rubocop=0.81.0

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

This message was automatically generated.


Discuss Experimental dbt DAG generator

Migrated from GitLab: https://gitlab.com/meltano/files-airflow/-/issues/7
Originally created by @pnadolny13 on 2022-03-25 18:50:59

I opened https://gitlab.com/meltano/files-airflow/-/merge_requests/8 with changes to add a new DAG generator, since its large and has lots of changes that we need to evaluate I ended up moving the code to a personal fork https://gitlab.com/pnadolny13/files-airflow-dbt for now.
I put the MR into draft for now while we discuss the next steps.

View 6 previous comments from the original issue on GitLab


Not listed yet: www.fool.com

The website at this url is unlisted: https://www.fool.com/investing/2018/07/09/why-did-google-invest-22-million-in-a-dumb-phone-o.aspx

This website is now in the support list and will be in the next release of the GCM web extension on addons.mozilla.org
Thanks!


Add created column to Fate Print command

From https://issues.apache.org/jira/browse/ACCUMULO-4161. An age/created column was added to the fate print  command in the shell.
Image below is what the timestamp looks like in its current state.

From a quick look, some general things you may want to consider:

Format the printed time in UTC with ISO-8601 format instead of java Date default.
Provide more descriptive naming in functions instead of timestamp, maybe topCreated() or timeTopCreated()?

The rational for a more descriptive function name than getTimestamp - there are multiple timestamps important in overall FATE transaction life cycle, some of which might be useful if additional FATE timing information was ever extended. If the function naming reflected the operation from an "external" perspective then it may be easier differentiate what time this is retrieving (FATE top creation) rather than some of the other possibilities.

Good ideas, especially on the naming convention. I wasn't sure on the time zone part which is why I stuck with the default. I will look into making that change.

I went ahead and added a format function people can use and also one that just returns the long value for it.


Fixes #30, dns and networking working

Generally, this project implements the CoreOS Manual Installation instructions [1].
I'm not entirely sure what the section I removed does, and unfortunately I don't really have time to look into it, but after removing it, pod dns seems to work again fixing #30.
[1] https://coreos.com/kubernetes/docs/1.5.4/getting-started.html

I've installed Kubernetes manually on CoreOS and I tried deleting the same parts as you of the master and worker configurations, but sadly my DNS is still broken, seemingly because the API server can't be reached on <IP_ADDRESS>.


Add "encoding" parameter to in_tail plugin

Currently, in_tail plugin emits strings with ASCII-8BIT encoding, which is resulted from IO#readpartial. This behavior entails inconvenience when filtering records. For example:

What do we write regex at filter-grep in Japanease? / Fluentd Google Group

This PR adds encoding parameter to in_tail plugin, leaving ASCII-8BIT as default for compatibility.

@repeatedly I have refined the tests.
It seems the failure on Travis CI (https://travis-ci.org/fluent/fluentd/jobs/122757775) is not related with this PR. Could you restart the job?

It seems ok for me.
@tagomoris @sonots How about this?

LGTM!!

Totally LGTM.

Thanks!


Generate monthly cost report

Hi,
I'm trying to use this tool to get the same cost-table available in console but I'm stuck once I get to the SKU level.
How can I get the monthly cost from that?
    const [accounts] = await client.listBillingAccounts({

    });
    for (const account of accounts) {
        console.info(`${account.name}: ${account.displayName}:`);
        const [projects] = await client.listProjectBillingInfo({name: account.name})

        for (const project of projects) {
            const catalogClient = new CloudCatalogClient({projectId: project.projectId});
            const [services, nextPageToken] = await catalogClient.listServices({});
            for (const service of services) {
                const [skus] = await catalogClient.listSkus({
                    parent: service.name,
                    startTime: {seconds: Math.round(+(Date.UTC(year, month, 1)) / 1000), nanos: 0},
                    endTime: {seconds: Math.round(+(Date.UTC(year, month + 1, 0)) / 1000), nanos: 0}
                })
                console.table(skus)
            }

        }
        console.table(projects)
    }

How can I modify this script to aggregate the monthly costs for each project (I don't care about the internal service/sku breakdown)?

If it's a solution for you I'm using the feature "export billing data to bigquery" to get the same cost table available on console.
Documentation: https://cloud.google.com/billing/docs/how-to/export-data-bigquery

Hi there! We are migrating this repo to googleapis/google-cloud-node. If this is still a question for you, please feel free to reopen there! Thank you!


Have to rebuild it

I have to rebuild it every time I wan't to use it.
If I lock my iPad or close the app, I have to rebuild the app using Xcode otherwise I will just get the message:
"Please connect this device ti your Mac and start TouchBarServer..."

You don't have to rebuild the app. If it's not working, you can also quit the app using the multitasking control (double click the home button and swipe the Touch Bar app upwards). Then it will restart completely and the app will work again.
The issue with locking the iPad has been resolved recently. Please pull the latest version of this repo and rebuild/reinstall the iOS app. After this, locking and unlocking your iPad should function properly.
Please let us know if this works for you, so we can close the issue.

Ok Now it works correctly.
Sorry I missed V1.3 😂


doesn't work on IOS

Hello,
Do you know why it doesn'twork on IOS , I mean it is not possible to login to https://domfarolino.com/angular2-login-seed/ using an IPAD !
Thanks ;-)

I have no problem on my iPhone 6+ on either Safari or Chrome. Can you post a screenshot of what you see and or console output my hooking iPad up to a computer with safari so you can debug mobile?

Hi Dom,
I can't see what's happening on my Ipad2 mini because I don't have a Mac to debug it. However I have just installed chrome on my Ipad (just to see if it comes from safari..) but I got the same problem I got with safari. A screenshot wouldn't help because nothing happens it stucks on login page. I'll try to find a Mac to debug it and give the error messages.
Thanks

What version of Safari is it on your iPad
On Sun, Dec 25, 2016 at 7:43 PM cissecedric<EMAIL_ADDRESS>wrote:

Hi Dom,
I can't see what's happening on my Ipad2 mini because I don't have a Mac
to debug it. However I have just installed chrome on my Ipad (just to see
if it comes from safari..) but I got the same problem I got with safari. A
screenshot wouldn't help because nothing happens it stucks on login page.
I'll try to find a Mac to debug it and give the error messages.
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/domfarolino/angular2-login-seed/issues/19#issuecomment-269143922,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJOKqVEEHP5iiW9cPQCkb7HF7YR6xa-xks5rLw3HgaJpZM4LVeQy
.

--
Sent from my iPhone

version/9.0 Mobile/13G36 Safari/601.1
ios 9.3.5
Thanks,


Please Add Support for StratifiedGroupKFold

Looks like GroupKFold is supported, but not StratifiedGroupKFold. Would you consider adding?
See #616

Do you mean allowing split_type to be like "group_stratified", instead of a custom StratifiedGroupKFold object? Or do you mean the latter doesn't work?

The latter doesn't work.

What's a minimal example to reproduce the issue?

Here's an example:
from flaml import AutoML
from sklearn.model_selection import StratifiedGroupKFold, GroupKFold
from flaml.data import load_openml_dataset

# Get data
X_train, X_test, y_train, y_test = load_openml_dataset(dataset_id=1169, data_dir='./')

# cross validation instance
cv = StratifiedGroupKFold(n_splits=5, shuffle=True, random_state=0)

# Initialize an AutoML instance
automl = AutoML()
# Specify automl goal and constraint

settings = {
    "time_budget": 600,  # in seconds
    "metric": 'ap',
    "task": 'classification',
    'eval_method': 'cv',
    'split_type': cv,
    'groups': X_train['Airline'],
    'seed': 0
}

automl.fit(X_train=X_train, y_train=y_train, **settings)

Thanks. I can make a PR if you are willing to review it.

Sure


Rewrite MB vaccination time series

See issue in Covid19CanadaETL.

Verify MB vaccine data again: it seems that today (2021-12-17) additional doses increased by a greater amount (13180) than total doses (10735), which shouldn't happen.
Ensure that total dose value is including boosters properly (i.e., that daily values for the 3 quantities sum as they should).

As suspected, this is just the result of extensive historical modifications. For example, see the following for the cumulative number of additional doses in 2021-12-15, one day apart:
library(magrittr)
library(dplyr)
x <- Covid19CanadaDataProcess::process_dataset(
  "a5801472-42ae-409e-aedd-9bf92831434a",
  "vaccine_additional_doses",
  "prov_ts",
  Covid19CanadaData::dl_archive(
    "a5801472-42ae-409e-aedd-9bf92831434a",
    date = "2021-12-16")[[1]]
) %>% filter(date == "2021-12-15")
y <- Covid19CanadaDataProcess::process_dataset(
  "a5801472-42ae-409e-aedd-9bf92831434a",
  "vaccine_additional_doses",
  "prov_ts",
  Covid19CanadaData::dl_archive(
    "a5801472-42ae-409e-aedd-9bf92831434a",
    date = "2021-12-17")[[1]]
) %>% filter(date == "2021-12-15")

The result shows significant differences:
> x
                      name province       date  value
1 vaccine_additional_doses       MB 2021-12-15 148310
> y
                      name province       date  value
1 vaccine_additional_doses       MB 2021-12-15 151943

Probably best to note it for now and explain if necessary. The version of the dataset for Covid19CanadaTimeline will be rewritten every day, so this will not be an issue.


[fix] glitches during brush drawing

save touches and original RLE to drafts, it's much faster
don't autosave during drawing

Closes #1241


Custom element doesn't exist: sankey-chart

Checklist:

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Release with the issue:
1.9.0
Last working release (if known):
1.8.2
Browser and Operating System:
Chrome and Safari on MacOS
Description of problem:
Upgraded to 1.9.0 and now see this.
Custom element doesn't exist: sankey-chart
Downgrading to 1.8.2 fixed the issue
Additional information:

same issue here even downgrading to 1.8.2 needs a full restart of the RPi to work

fixed but cache seems to be very aggressive so it can take some time for the changes to take effect


Test the entire solution (integration) by performing a GraphQL query and analysing the response

Description
Test the entire solution (integration) by performing a GraphQL query and analysing the response.
Subtasks

[ ] Start the server in a test (setup function perhaps)
[ ] Perform a query
[ ] Analyse the response and make sure the entire solution works

I believe this can be done without starting the server by simply resolving the resolvers -- as that is essentially much of the same.

We can assume the GraphQL server itself works, and further assume that all errors are introduced by ourselves in the resolvers.


[Bug]: Loan form addresses not rendering correctly

Steps to reproduce the bug
1. When I add addresses with line breaks to a loan.
2. And they show as formatted correctly in Browse Loan.
3. Then I generate a "Recipient Loan Form"
4. And they are not formatted correctly.

Also, recipient is included twice. Should only be once.

Screenshot
Correctly formatted in Browse Loan:

Weird line breaks (ignored?) in Recipient loan form:

Expected behavior
Should format with line breaks as included in Browse Loan.
Additional Screenshots
No response
Environment
Production
Sandbox Used
No response
Version
0.35.3
Browser Used
Chrome

Does this have closed duplicates, I think it might?

Kinda: #2641 is similar but not exactly the same.


Crossplat

Changed to a mono compatible way for port detection
Moved the search into MongoBinaryLocator this
Made the runner accept a mongoBinSearchPattern to find the appropriate one, this because I don't know if you like to include all tree platform specific mongo binaries in the nuget package.

Found some issues on my other branch :)

Ok. Please don't stop the work! :-)


[P0]tcp network add tcp4 or tcp6 support

When use the gtcp or ghttp, it create socket or bind socket use argument such as "tcp" just like this:

But if you not use tcp4, it will use AF_INET6 to create socket or bind socket.

then you will bind a port which had been bind by other application without any error。(You can write a c++ application for test use raw socket.)
just like this:

if you use tcp4 just like this:

Then bind a binded port(which create by other application used AF_INET), it can be error just like this:

Can GF support a function that we can choose "tcp4" or "tcp6" for this problem?
Thanks Dalao!
英语too poor..请多包涵

@NinthKnight Why you closed this issue?

@NinthKnight Why you closed this issue?

点错了 - -！


High contrast theme causes GUI to disappear

Hello,
I have a laptop running Windows 8.1 with a customised high contrast theme.  When using high contrast mode the interface to control playback and settings disappears (or possibly goes black).

hi!
can you save&upload your custom theme so i can use the same for testing?

This is the theme I use mostly (I find it easier to look at than white) however, I recently discovered that this problem could be due to my graphics driver.  I have an HP 250 G4, which apparently uses a custom version of Intel's HD Graphics driver, and there have been others with similar issues caused by using high contrast or classic themes with other programs.
Still, I've zipped up the "save for sharing" file in case you can reproduce it.
Grey.zip

hi!
thanks for the zip!

do you the intel hd variant? (the laptop also exists with an amd card).
does the software work when you have your high contrast theme off?

but yea, the some older versions of intel HD have been a nightmare to handle.

There is an icon for Intel HD in the tray and accompanying control panel program.
It works perfectly with the standard theme.
For reference, the driver version according to the settings is <IP_ADDRESS>12 and the graphics processor is an HD Graphics 5500.

closing because it's too long ago (in the hopes some driver update fixed this)


implementing uniform doc page id for all documentation

Actual Behaviour
The page id is not uniform for any of the documentations present in website
Expected Behaviour
There should be a uniformity in id for all docs of our sub projects.

you can see here in screenshots that id is random for every page
having uniform id's are very useful for developers to play with the DOM and implementing new features

Screenshots of the issue

Proposed solution
Making uniform subheadings to every documentation.
Would you like to work on the issue?
Yes i would like to work on it
@juzhiyuan @Yiyiyimu please share your opinion

I have used subheading id as get selector to Manipulate DOM in naming the doc dropdown

Go to:

Apisix website
Choose apisix helm chart from doc dropdown
You will see that docs is no longer renamed to what it was supposed to be.
@juzhiyuan

Oh yes, I see what happens.

Just do it

I am fixing this please reopen it

@iamayushdas
First of all, you should discuss this in the mail list<EMAIL_ADDRESS>before sending a bunch of PRs. It seems only a few people know this purpose.
Secondly, please modify the doc in a repo first, and evaluate the effect. Don't change a lot of things. Change it step by step.
Thirdly, it is not a good idea to put a visible mark on an obvious place. I just spend some time on this issue and get an idea:
Since the doc is pulled from other repo before building it on the website, we can introduce a preprocessor that converts the invisible mark to the mark that can be recognized by the render.
I am not sure if it works but at least there is way to achieve the goal with a better solution.

 It seems only a few people know this purpose.
Secondly, please modify the doc in a repo first, and evaluate the effect. Don't change a lot of things. Change it step by step.
Thirdly, it is not a good idea to put a visible mark on an obvious place. I just spend some time on this issue and get an idea:
Since the doc is pulled from other repo before building it on the website, we can introduce a preprocessor that converts the invisible mark to the mark that can be recognized by the render.
I am not sure if it works but at least there is way to achieve the goal with a better solution.

I understood sir, thank you for making me understand

Thirdly, it is not a good idea to put a visible mark on an obvious place. I just spend some time on this issue and get an idea:

As for this, because I haven't experienced this case, then it's ok for me to do this (is Docusarus using this? @iamayushdas) Waiting for more suggestions :)
cc @liuxiran @bzp2010 @lilien1010 @tokers @Yiyiyimu

Thirdly, it is not a good idea to put a visible mark on an obvious place. I just spend some time on this issue and get an idea:

As for this, because I haven't experienced this case, then it's ok for me to do this (is Docusarus using this? @iamayushdas) Waiting for more suggestions :)
cc @liuxiran @bzp2010 @lilien1010 @tokers @Yiyiyimu

yes docusaurus is using this now on

Are we discussing the "invisible mark way"? We should use a better way to solve the issue. A visible scar is unacceptable.

If we change the subtitle with the name of sub-project then, then that name will automatically become the id
For example- if i name the sub title
APISIX-dashboard
This will automatically attach an id
to the subtitle
apisix-dashboard

Thirdly, it is not a good idea to put a visible mark on an obvious place. I just spend some time on this issue and get an idea:

As for this, because I haven't experienced this case, then it's ok for me to do this (is Docusarus using this? @iamayushdas) Waiting for more suggestions :)
cc @liuxiran @bzp2010 @lilien1010 @tokers @Yiyiyimu @gxthrj


Query Pinot through MyBatis

Hello,
I'm trying to access Pinot through Spring-MyBatis but having some trouble.
Came up with workaround for several steps, but having hard time redirecting execute() to executeQuery().
While MyBatis Handler calls method execute() of prepared statement, Pinot only uses method executeQuery();
execute(), execute(sql) and other calls throw exception.
https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/executor/statement/PreparedStatementHandler.java#L64
I'm curious about the reason behind this behavior of pinot prepared statement.
Intentionally blocked those access due to limited functionality of current jdbc client?
And any suggestion on workaround would be appreciated - tried to wrap prepared statement, connection and driver, but found out that constructor of PinotConnection is not public.
Thanks

@KKcorps
Have you tried the pinot-jdbc-client?
https://github.com/apache/incubator-pinot/tree/master/pinot-clients/pinot-jdbc-client
https://mvnrepository.com/artifact/org.apache.pinot/pinot-jdbc-client

@KKcorps
Have you tried the pinot-jdbc-client?
https://github.com/apache/incubator-pinot/tree/master/pinot-clients/pinot-jdbc-client
https://mvnrepository.com/artifact/org.apache.pinot/pinot-jdbc-client

Thanks for your comment,
yes I just solved it using jdbc client :)

Thanks for your comment,
yes I just solved it using jdbc client :)


Build Failures (Maven Profiles)

If you don't have GPG installed, you get a build failure.  Most people won't have this, so make it a maven profile.  Document this in the release steps.

If you are not running on the open internet, you'll also get a build failure, as it won't be able to report the build to the develop pod.    This should also be a maven profile.  Set this on travis only.

Fixed with profiles in 4.59.6-SNAPSHOT


Order Plans by name in ADO UI

Any chance the plans dropdown could be ordered?
We can have multiple plans of the same resource with a stage number at the end and this would make it much easier too find the correct one.
EG
Plan-StageA-1
Plan-StageA-2
Plan-StageB-1
I think it could be done here but not worked with pipeline UI's before so not 100%!
https://github.com/charleszipp/azure-pipelines-tasks-terraform/blob/05b63e3915bacfe4f0ed39781bf6a68bc2ea43d9/views/terraform-plan/src/plan-summary-tab/plan-summary-tab.tsx#L43

That is one way that it could be ordered. The attachments that populate could also be ordered ahead of mapping to plan types here. If @shep1987 or anyone else would be interested in submitting a PR, I can help get this merged in.

No responses for multiple years so closing for now.  It may be revisited in future during additional feature adding.


Syntax update

Nice. Good initiaive on taking the project further. The added syntax looks good. However, since you have created your own version you had to change the name under package.json#name, but why change the name of the files (syntax and snippet files)?

Can you rename the files to what they were before so that the the diff is not a complete delete and add of files but just line changes?
The changes to the readme is unnecessary in this repo.
The changes to the changelog is good but the version will be wrong for this repo.
The changes to package.json is unnecessary in this repo (except the added file extension .db).

 That way you can rebase your master of this repos master when this repo changes without conflict. Remember to rename the files in your versions branch on your fork to be the same as in this repo.
Now you can create a branch based of your master branch (which is synced to mine) when you want to create pull request to this repo. Here you can now cherrypick changes to the syntax and snippet files from your version, and then create the pullrequest to this repo. This way you are able to maintain both versions at once without breaking the package.json and file references of the project.

Should be update to date now. And I've done as you suggested with the branching.


Introspection fix

I copied get_constraints from django.db.backends.postgres.introspection (https://github.com/django/django/blob/1.11.4/django/db/backends/postgresql/introspection.py#L151-L248).
This was because migrate_schemas threw error about missing 'type' key in a constraint dict.
This shouldn't break earlier versions of Django as they just added a couple of keys to the dict.
I moved get_constraints function into _constraints.py file and versioned it according to Django 1.11 or earlier. Basically we are migrating to 1.11 so this version is more important to us than older ones :)

Thanks for that. I will do a PyPi release tomorrow.


 I recommend reviewing commit-by-commit.

just needs rebase

Rebased!


Does this work now?

    Thanks guys! It's really nice to know about this. I'm still working v5 version that will the a biggest change in this project. In this case, you will resolve this using a single SQL query (or Linq query) like:

SELECT MAX(_id) FROM your_col
or
col.Query().Max(x => x.Id)
Originally posted by @mbdavid in https://github.com/mbdavid/LiteDB/issues/1128#issuecomment-442554881

I think it works.
        [Fact]
        public void TestLinqMax()
        {
#if NET5_0_OR_GREATER
            var random = Random.Shared;
#else
            var random = new Random();
#endif

            using var ms = new MemoryStream();
            using var litedb = new LiteDatabase(ms);

            var list = new List<TestModel>();
            for (var a = 0; a < 100; ++a)
            {
                list.Add(new TestModel() { Count = random.Next() });
            }
            var max = list.Max(a => a.Count);

            var collection = litedb.GetCollection<TestModel>();
            collection.InsertBulk(list);

            var maxFromCollection = collection.Max(a => a.Count);
            Assert.Equal(max, maxFromCollection);
        }

        private class TestModel
        {
            public int Count { get; set; }
        }
    }


Trying to get in touch regarding a security issue

Hi there,
I couldn't find a SECURITY.md in your repository and am not sure how to best contact you privately to disclose a security issue.
Can you add a SECURITY.md file with an e-mail to your repository, so that our system can send you the vulnerability details? GitHub suggests that a security policy is the best way to make sure security issues are responsibly disclosed.
Once you've done that, you should receive an e-mail within the next hour with more info.
Thanks! (cc @huntr-helper)

OK, done. Security policy is there.

Hey @ttessarolo
Thank you for adding a SECURITY.md!
Would there be an email we could reach you on? Our system produces a magic-link that give you privileges to view and validate the vulnerability on our advisory page, but I understand you may prefer for the issue to disclosed in public instead. Kindly let me know and I'll sort it for you.
Our security researchers may provide fixes too.  Simply ask via comments on our advisory page.
Let me know if you have further questions. Happy to help!


Update matlab cs grid scripts

What changes does this PR introduce?

Update some basic matlab-scripts for CS-grid to also work with compact-format input.
New script to generate broken-lines (for computing meridional transport stream-function), simpler than the previous version in matlab/cs_grid/bk_line/.
update rR, nG, nB dims in 2 latloncap/ scripts to be consistent with pkg/exch2 convention.

What is the current behaviour?
matlab scripts in cs_grid/ only accept "old/original format" input (facets packed in X dir, default W2_mapIO = -1).
And current script to generate broken-lines (in bk_line/ dir) is not that easy to use, involving 2 stages and multiple matlab-scripts.
What is the new behavior
basic scripts (all 3 split_*_cub.m, rotate_uv2uvEN.m and grph_CS*.m in bk_line/) now also accept "compact format" input (facets packed one after the other, "W2_mapIO = 1").
Does this PR introduce a breaking change?
To enable to use both formats, when a 2-D field is stored in a "long-vector" (e.g. grid-cell corner variable with the 2 missing corners included), always assumes data is stored  one facet after the other (consistent with "compact-format" style).
Other information:
Suggested addition to tag-index
o utils/matlab/cs_grid:

update some basic matlab-scripts for CS-grid (split_*_cub.m, rotate_uv2uvEN.m
mk_psiLine_CS.m & use_psiLine.m) to also work with compact-format input;
new script to generate broken-lines (for computing meridional transport
stream-function), simpler than the previous version in cs_grid/bk_line/;
update RGB-dims in 2 latloncap/ scripts to match pkg/exch2 convention.

Some comments regarding the alternative method to find broken-lines for meridional transp. stream-fct, in this PR, matlab script: mk_isoLat_bkl.m (+ use_bk_line.m) in utils/matlab/cs_grid/.
The older method, matlab script gener_bk_line.m and gen_bk_line.m (+ use_bk_line.m) in
cs_grid/bk_line/ finds the position of consecutive grid-cell corner points that form a line as close as possible to target latitude "yLat". And from there, record grid-cell edge (i.e., velocity component location) that joins 2 consecutive corner-points.
The alternative method (similar to @gaelforget "gcmfaces") is based on tagging grid-cell center point
according to their latitude position relative to target "yLat". And from there, the location of
grid-cell edges (i.e., velocity component location) between 2 grid-centers with the appropriate
"jump" in tag value across "yLat" value is recorded as corresponding broken-line.
When the target latitude vector "yLat" is coarse enough relative to model-grid resolution,
a single velocity component will not contribute to more than 1 broken-line. This case is
preferable (no artificially enhanced resolution), and also simplify the broken-line search
(tag value jump is never larger than one). The new script print a message if this is not the
case (i.e., too fine "yLat" resolution).
The advantages of this alternative method:

simpler (so need to find consecutive grid-cell corner points), all in one (shorter) script;
inform directly if target resolution is "too fine";
easier to refine to basin stream-function (Atlantic, Pacific ...) based on a grid-cell center mask for each basin.

The 2 methods do not necessary produce the same broken-lines, because, in one case, the latitude
criteria applies to grid-cell center latitude whereas, in the other case, it applies to grid-cell
corner latitude (relative to yLat mid-point value). As an example, with CS-32 grid
and yLat=[-87:3:87], broken-line differences are found around "yLat=+/- 57" due to few grid points
like the one shown in the plot below (cell-center latitude is > 57 but the S-W corner latitude
is < 55.5 = (54+57)/2 ).

@jm-c  feel free to edit/move that comment I added to the README

Hi,
@jm-c , I have found several bugs with the new and old routines. Therefore, I think @jrscott should reopen before merging.

The script mk_isoLat_bkl  has a new function called grph_CS_2t (line 245). This function is not defined. I am not sure if this is a bug or a future graphic function.
sep_API_basins.m uses the old output and terminology from bk_lines. More specifically, the script uses some variables from gen_bk_Zon and gener_bk_line.

There are some nice routines in cs_grid (authored by @jm-c @dfer22 and D.Enderton) needing the broken line .mat definitions; we should see if these can  work using the new method/output file from this PR. (Note these routines are not mentioned in the README, will be opening an issue about broader suggested improvements related to these cs and llc Matlab routine)

@dramauh Thanks fro reporting these 2 issues.
Regarding the first one, I made a little adjustment to the matlab script mk_isoLat_bkl.m so that it does not use anymore a script that cannot be found anywhere (but was in my matlab path, so I did not notice earlier).
Regarding the second issue, you are right, sep_API_basins.m has not been updated but still works with "broken-line" file as generated by local gener_bk_line.m + gen_bk_Zon.m (both in cs_grid/bk_line/). I am going to change/update the bk_line/README file to clarify this to reduce confusion.

@jm-c , I tried to use gener_bk_line.m + gen_bk_Zon.m. There  is an issue in gener_bk_line.m regarding the epsilon (see below). I did not report it because I thought this branch was an upgrade to solve that problem.
dyImx,dyJmx =  90.000 131.981 ; ==> select dylat= 186.649815
date change line is poorly defined : dd1= 0.153793 , dd2= 0.153793
needs to be +/-180 (+/- esilon= 1.866e-08) ==> Stop here

@jrscott I see 5 matlab scripts that might be affected by changes here:
calcBolusPsiCube.m, 'calcEulerPsiCube.m', 'calcHeatTransDirect.m', 'calcHeatTransFluxes.m',
and 'calcHorizPsiCube.m'
I could try to change some of them to work with both the previous "broken-line" file (as generated form scripts in bk_line/) and the new "broken_line" file (as generated by 'mk_isoLat_bkl.m`) but do you have a simple example that uses thoses ? I always get confused about the name of the variables in the grid-matlab-structure.

@jrscott I updated the script to compute the barotropic stream-function. I could also update one of the 4 others
or we could leave these to an other cleaning PR.
My preference would be to merge this PR and sort out which other script to maintain (and update) in an other PR.

@dramauh Did you get this error when trying to work with CS-510 grid output files ? It might be due to the longitude jump around +/-180.
Note that the "new" method (mk_isoLat_bkl.m with use_isoLat_bkl.m) is, with this respect, more robust since does not use the longitude location.

@jm-c , I have just checked it. You are right, it happens in 179.8462

@dramauh  I found an old script that I used to read-in CS-510 longitude, and it has these 2 lines:

xc=rem(xc+180,360)-180;
xg=rem(xg+180,360)-180; xg(find(xg==-180))=180;

May be you could try this to see it it helps ?

LGTM let's merge

Ok, will merge this PR soon (like tomorrow) unless someone wants to ad something


Upgrade jUnit dependency to version 5

Currently, we have version 4. I would like to upgrade to version 5, as it supports parametrized tests, i.e., you can specify a single test as parametrized and treat other tests as standard test. In theories you can freely mix standard @Test and @Theory.
As we would like to migrate from @Theories to @Parametrized, it would be nice to have this feature so that we can mix single @Test with @ParametrizedTest in a single suite.

Since jUnit 4 is sufficient for the vast majority of our use cases, let's stay with that.


Native Editor - allow user to override all keyboard shortcuts

Might do this with VS code commands (although not sure how to get 'dd' to work).
This would require routing all of these commands into the webview from the extension and having the shortcuts still work even when the webview has focus (not sure if this would happen)

Undecided on the direction we'll go here. It may not be necessary to support overriding main jupyter commands. Just be able to add new ones,.


Configure Finch pools

Change description
This adds a finch_pools key to the Grafana config, to be passed as the pools key to Finch.start_link/1.
What problem does this solve?
We connect to our Grafana instance over an HTTP proxy. Configuring a proxy in Finch requires passing connection opts to the underlying Mint library.
Example usage
config :our_app, OurApp.PromEx,
  disabled: false,
  grafana: [
    host: System.fetch_env!("GRAFANA_HOST"),
    auth_token: System.fetch_env!("GRAFANA_API_KEY"),
    finch_pools: %{
      default: [
        conn_opts: [
          proxy: {:http, "localhost", 8080, []}
        ]
      ]
    }
  ],

Additional details and screenshots
This bumps the Finch dependency, because v0.12.0 adds "support for Mint.UnsafeProxy connections". I opted to bump to the latest 0.13.0.
Checklist

[x] I have added unit tests to cover my changes.
[x] I have added documentation to cover my changes.
[x] My changes have passed unit tests and have been tested E2E in an example project.

Coverage increased (+0.1%) to 79.431% when pulling 2e4c64600f3b2f210c0008f2eafbb140320797a8 on patmaddox:finch_pools into c2e092408879af7b83a81f2ef4ace0b3160d42bd on akoutmos:master.


Gridlines can't be displayed if xAxis and yAxis display set to false.

I am creating a graph without x or y-axis labels so it fits within a closed structure; however, I still want the gridlines to display. Is there a way to enable the gridlines even if the x/y-axis label's display attribute is set to false? I have included the options object. I am also using angular-chartjs and my data is the line chart example they have if you scroll down to the line chart example. Any help would be appreciated. Thank you ChartJS for the great work.
self.options = {
  	maintainAspectRatio: false,
    scales: {
      	yAxes: [
        {
          	id: 'y-axis-1',
          	type: 'linear',
          	display: false,
          	position: 'left',
          	gridLines: {
	            display:true,
	            color: "rgba(0, 0, 0, 1)",
	        }
        },
        {
          	id: 'y-axis-2',
          	type: 'linear',
          	display: false,
          	position: 'right',
          	gridLines: {
	            display:false,
	            color: "rgba(0, 0, 0, 1)",
	        }
        }
      	],
      	xAxes: [{
      		display: false,
      		gridLines: {
	            display:true,
	            color: "rgba(0, 0, 0, 1)",
	        }
      	}],

    },
    elements: {
    	line: {

    		fill: false,
    		tension: 0,
    		borderWidth: 5,
    	},
    	point: {
    		radius: 6,
    		backgroundColor: 'rgba(255,255,255,1)',
    		borderWidth: 2,
    		borderColor: 'rgba(0,0,0,0.1)'
    	}
    }
  };

I think this is as designed. The axis is the thing that draws grid lines so hiding it also hides the grid lines.
If you want to hide the ticks, I would use
options: {
  scales: {
    xAxes: [{
      ticks: {
        display: false
      }
    }]
  }
}

Thank you so much for your guidance. I did find this in the documentation after your submission. I did not quite realize the ties between ticks, labels, gridLines and the scales within the options object.
This is exactly what I was trying to accomplish. I really do appreciate your assistance.

Options object:
self.options = {
  	maintainAspectRatio: false,
    scales: {
      	yAxes: [
        {
          	id: 'y-axis-1',
          	type: 'linear',
          	position: 'left',
	        ticks: {
		        display: false,
		        beginAtZero: true,
		        min: 0,
		        max:100,
		    },
		    gridLines: {
				tickMarkLength: 1,
				color: '#CFCFCF',
				zeroLineColor: '#CFCFCF'
		    }
        },
        {
          	id: 'y-axis-2',
          	type: 'linear',
          	position: 'right',
	        ticks: {
		        display: false,
		        beginAtZero: true,
		        min: 0,
		    },
		    gridLines: {
		    	tickMarkLength: 1,
		    	color: '#CFCFCF',
		    	zeroLineColor: '#CFCFCF'
		    }
        }
      	],
      	xAxes: [{
	        ticks: {
		        display: false,
		    },
		    gridLines: {
		    	tickMarkLength: 1,
		    	color: '#CFCFCF',
		    	zeroLineColor: '#CFCFCF'
		    }
      	}]
    },
    elements: {
    	line: {
    		fill: false,
    		tension: 0,
    		borderWidth: 5,
    	},
    	point: {
    		radius: 6,
    		borderWidth: 2,
    	},
    }
  };

Again, thank you for your time etimberg.


Examples on using expressions

Will be good to see how some expressions can be used in a few use cases to see the power of this plugin. Thanks!

I have since updated the README with a more detailed explanation of the plugin and examples of how one might use it.


Add logic in master service to optimize performance and retain detailed logging for critical cluster operations.

Description
Add logic in master service to optimize performance and retain detailed logging for critical cluster operations.
Related Issues
Resolves https://github.com/opensearch-project/OpenSearch/pull/14795#pullrequestreview-2363701033
Testing
Modified the check for generating short summary from 1000 to 1 in local environment to test the logging.
[2024-10-22T13:44:32,280][DEBUG][o.o.c.s.MasterService    ] [runTask-0] took [0s] to notify listeners on successful publication of cluster state (version: 6, uuid: _4hvlyf0RA2ulV2jtjIsKg) for [Tasks batched with key: org.opensearch.cluster.action.shard.ShardStateAction, count:2 and sample tasks: shard-started StartedShardEntry{shardId [[sample-index2][1]], allocationId [wZdnPxXmTQ-87FSRVNA8CQ], primary term [1], message [master {runTask-0}{d12XZzhcSiG1aGyfi-eUpw}{s36FgDsCS6Git2YUlAXRzw}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dimr}{testattr=test, shard_indexing_pressure_enabled=true} marked shard as initializing, but shard state is [POST_RECOVERY], mark shard as started]}[StartedShardEntry{shardId [[sample-index2][1]], allocationId [wZdnPxXmTQ-87FSRVNA8CQ], primary term [1], message [master {runTask-0}{d12XZzhcSiG1aGyfi-eUpw}{s36FgDsCS6Git2YUlAXRzw}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dimr}{testattr=test, shard_indexing_pressure_enabled=true} marked shard as initializing, but shard state is [POST_RECOVERY], mark shard as started]}], shard-started StartedShardEntry{shardId [[sample-index2][1]], allocationId [wZdnPxXmTQ-87FSRVNA8CQ], primary term [1], message [after new shard recovery]}[StartedShardEntry{shardId [[sample-index2][1]], allocationId [wZdnPxXmTQ-87FSRVNA8CQ], primary term [1], message [after new shard recovery]}]]
[2024-10-22T13:44:32,057][DEBUG][o.o.c.s.MasterService    ] [runTask-0] took [0s] to notify listeners on successful publication of cluster state (version: 4, uuid: FeOWukKcR5qoPMRZMIlqKA) for [Tasks batched with key: org.opensearch.cluster.metadata.MetadataCreateIndexService, count:1 and sample tasks: create-index [sample-index2], cause [api]]
[2024-10-22T13:44:32,282][DEBUG][o.o.c.s.MasterService    ] [runTask-0] took [2ms] to compute cluster state update for [Tasks batched with key: org.opensearch.cluster.routing.BatchedRerouteService, count:1 and sample tasks: cluster_reroute(reroute after starting shards)]
Node Join
[2024-10-25T12:51:37,680][INFO ][o.o.c.s.MasterService ] [data1] Tasks batched with key: org.opensearch.cluster.coordination.JoinHelper, count:1 and sample tasks: node-join[{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true} join existing leader], term: 2, version: 7, delta: added {{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true}}
Node Left
[2024-10-25T12:52:05,089][INFO ][o.o.c.s.MasterService ] [data1] Tasks batched with key: org.opensearch.cluster.coordination.NodeRemovalClusterStateTaskExecutor@78a30062, count:1 and sample tasks: node-left[{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true} reason: disconnected], term: 2, version: 8, delta: removed {{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true}}
Check List

[x] Functionality includes testing.
[ ] API changes companion pull request created, if applicable.
[ ] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Thanks can we add a test for node-left logs please

Node Join
[2024-10-25T12:51:37,680][INFO ][o.o.c.s.MasterService    ] [data1] Tasks batched with key: org.opensearch.cluster.coordination.JoinHelper, count:1 and sample tasks: node-join[{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true} join existing leader], term: 2, version: 7, delta: added {{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true}}
Node Left
[2024-10-25T12:52:05,089][INFO ][o.o.c.s.MasterService    ] [data1] Tasks batched with key: org.opensearch.cluster.coordination.NodeRemovalClusterStateTaskExecutor@78a30062, count:1 and sample tasks: node-left[{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true} reason: disconnected], term: 2, version: 8, delta: removed {{data1}{bUKIJ8aDR6yJftPHtNrMVg}{-chi7PdPRjS2TwqxUnTkLQ}{<IP_ADDRESS>}{<IP_ADDRESS>:9301}{dmr}{shard_indexing_pressure_enabled=true}}

Tasks batched with key: org.opensearch.cluster.coordination.JoinHelper, count:1 and
@sumitasr should we append this test in the end?

Tasks batched with key: org.opensearch.cluster.coordination.JoinHelper, count:1 and
@sumitasr should we append this test in the end?

I think it will be hard to understand the log when lets say we have 100 tasks. This key kind of groups them together. I think it is helpful to have this in beginning.

The backport to 2.x failed:
The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:
# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16421-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6f1b59e54bec41d40772f8571c7b65d4b523f8b1
# Push it to GitHub
git push --set-upstream origin backport/backport-16421-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-16421-to-2.x.

Raised backport PR https://github.com/opensearch-project/OpenSearch/pull/16493


Update data.csv

Changed our event's address to the new Venue.

Looks like this already got fixed.  Closing!

Great! Thanks


Working Null-Safety

Pass all test except resolve transaction id & resolve forward test in sep0002_test.dart, need to be resolve later.
For EventSource package using null-safety version from https://github.com/mehcode/dart-eventsource, waiting to be merge to https://github.com/stevenroose/dart-eventsource.

Hey @hasToDev, thank you for adding this PR. I will review and merge it asap.


Reactive docs suggestions

@inoxx03 I found a few terminology inconsistencies in the current Spring Reactive doc.

Can one of the admins verify this patch?

[test]


new internals/fallback_test

Add fallback test into internals/

tests scales deployment replicas to 5 (max) -> ms-deployment replicas is updated to 0 (to envoke fallback) -> scale deployment replicas to 3 (fallback) -> restore MS server to verify replicas are updated to 5 (max)

Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #4129

/run-e2e fallback*

/run-e2e fallback*


Turborepo 1.12.x stopped passing command input to Vite dev server

Verify canary release

[X] I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue
https://github.com/vercel/turbo/tree/main/examples/with-vite
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
<EMAIL_ADDRESS>Describe the Bug
Vite's dev server is interactive. It accepts commands to perform operations like open the browser (o) and restart the server (r).
Turborepo 1.11.3 passes terminal input along to a dev server that was started through turbo dev.
Turborepo 1.12.3 however no longer seems to pass the terminal input along to the dev server instance. The keyboard input is echoed to the terminal, but does not seem to be passed along to the persistent task. This is a unfortunate disruption to a convenient workflow.
Expected Behavior
After starting the vite dev server via turbo, pressing o, then Enter opens the browser.
To Reproduce
Install the vite example and run yarn dev; once the servers start, hit o and press Enter. Notice that nothing happens.
Next run
yarn add<EMAIL_ADDRESS>-W

... or whatever the appropriate command to downgrade the workspace root dependency in your preferred package manager is.
Then repeat the yarn dev followed by o and Enter. Notice that the browser opens to the dev server.
Additional context
No response

Turbo 1.11 unintentionally spawned all tasks with inherited stdin. This was fixed in 1.12 and now that turbo is spawning tasks hooked up to a psuedoterminals we cannot spawn tasks that inherit turbo's stdin.
Proper support for interactive tasks is coming with 1.13.

Bump

With 1.13 this is now fixed with the new UI: https://turbo.build/blog/turbo-1-13-0#new-terminal-ui


Inefficient loop structurization (unnecessarily converts do-while to while).

There's this comment I left in the structurizer (and the do-while->while conversion that follows it): https://github.com/EmbarkStudios/rust-gpu/blob/03f89e8ba6f236218b3c5f9b18fe03c25a4d6a5c/crates/rustc_codegen_spirv/src/linker/structurizer.rs#L307-L310
Which seemed reasonable until I realized that do-while makes more sense for structured control-flow, and SPIR-V special-cases while-like CFGs to even allow them, e.g. RVSDG only has do-while (called θ/"theta").
And another look at OpLoopMerge's docs does confirm it can be applied to an unconditional OpBranch, and combined with conditional breaks out of loops (which SPIR-V also supports), that implies do-while is possible.
As another data point, I looked at what glslang outputs for a simple do-while loop:
               OpBranch %6

          %6 = OpLabel ; loop header
               OpLoopMerge %8 %9 None
               OpBranch %7

          %7 = OpLabel ; loop body
         ; ...
               OpBranch %9

          %9 = OpLabel ; loop condition / "continue" merge
         ; ...
               OpBranchConditional ... %6 %8

          %8 = OpLabel ; loop exit / "break" merge

So that definitely is the kind of do-while-like CFG shape I would've wanted to use when I wrote the structurizer, but I must've assumed the wrong limitation without double-checking.
Cleaning this up should be possible, but I'm not sure what edge cases have to be taken into account (e.g. the whole idea of a "continue" merge is useful for emitting SPIR-V from GLSL, but gets in the way of structured reasoning).
It might be possible that roundtripping through SPIR-T's structured encoding of control-flow will end up replacing the existing structurizer before we get to do any more cleanups like this.

this is still a GPU performance problem, @VZout has a good example of a conversion to while loop instead of for loop for our depth-of-field shader with major speedup as result.
internal PR for that which is a good example:

https://github.com/EmbarkStudios/ark/pull/7677

To be clear this affects all loops equally, whereas for loops may have further issues, like the mouse-shader example is currently broken because naga silently miscompiles the SPIR-V for the for loop (and changing it to a while loop unbreaks it).

SPIR-T's structurizer always does do-while directly (i.e. it only has "tail-controlled loops"), and:

#1052

just landed, so this is no longer relevant.


Checking lengths beforehand; using while rather than for to return early

This would be my version. Rationale:

If the lengths differ, there's no point in iterating over the buffer contents.
As soon as a byte (or unit or whatever) differs, we can stop looping and return false.

The exact same logic applies to strings.

If the lengths differ, there's no point in iterating over the buffer contents.
As soon as a byte (or unit or whatever) differs, we can stop looping and return false.

That's actually the whole point of this module. Otherwise you can just use buffer-equals.

I do need to improve the readme though :)

// @dcousens

Let's continue this conversation here instead of on Twitter. :-)
To summarize: I should've created the PR under buffer-equals rather than here. I'll close this one.

Created #2 under buffer-equals. Sorry about the mixup here.

@sindresorhus technically it should be fine to do a.length !== b.length,  if they differ,  the information is already leaking based on the time it takes to compare anyway.


Add post build action

WHY are these changes introduced?
We want to support post build actions with the introduction of Flow extensions since as part of their DevX we want to supply developers with a "payload preview" which will help them interact with Flow's API.
WHAT is this pull request doing?

Adding a postBuildAction method to the local extension specification which is trigger after the extension build is completed.
Adding logic to support the Flow payload previews.

How to test your changes?
Create a Flow extension and use either deploy or dev to trigger the postBuildAction and the payload preview.
Checklist

[x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
[x] I've considered possible documentation changes
[] I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

We made the decision to ship Flow extensions without the payload preview feature and instead work on making our API friendlier for developers. Ok if I close this @isaacroldan ?


Added link to vuemeetups.org to the ecosystem drop-down menu on website.

This Pull Request is related to the following issue: #1678
Basically, I added one line of HTML to the /themes/vue/layout/partials/ecosystem_dropdown.ejs file.
The line is a link to the vuemeetups.org website.
Thanks for your time.

Looks great! Thank you 🤘
cc @bencodezen


adapt the flist for mount to work

Codecov Report

Merging #135 into development will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           development     #135   +/-   ##
============================================
  Coverage        21.77%   21.77%
============================================
  Files               45       45
  Lines             3936     3936
============================================
  Hits               857      857
  Misses            3006     3006
  Partials            73       73

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edb4dc7...02093b3. Read the comment docs.

Codecov Report

Merging #135 into development will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           development     #135   +/-   ##
============================================
  Coverage        21.77%   21.77%
============================================
  Files               45       45
  Lines             3936     3936
============================================
  Hits               857      857
  Misses            3006     3006
  Partials            73       73

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edb4dc7...02093b3. Read the comment docs.


siteRoot removing the TLD (i.,e. '.com' etc) part if having a trailing slash

after the update to 5.5 from 5.2, siteRoot now seems to remove the '.com' part as well if trailing slash is present.
for eg: if siteRoot: 'https://example.com/, then the paths are all based on https://example/ instead
whereas siteRoot: 'https://example.com generates the routes properly.

Buggggg. I think I'm missing a replacement parameter here.
https://github.com/nozzle/react-static/blob/master/src/static/getConfig.js#L50


An 5083 -- fix github asset metadata, which is introducing dupes

1. Fix token registry path (bronze_api__github_asset_metadata)
Osmosis Labs publishes a token registry (json) through Github. At some point, the location of this registry changed; this has been corrected.
2. Limit extraction from token registry (silver__asset_metadata)
I cannot be certain, but at some point in the past it's possible that Osmosis Labs only shared one contract and denomination pair (USDC) per token. But now, it appears that they publish two, the second coming from the Token Factory module. These contracts are denominated in the native asset, and you can see an example of both for WIHA here (see Contracts section).
You can also see this in silver__github_asset_metadata with this query:
select * from osmosis_dev.silver.github_asset_metadata where display = 'WIHA';

result set:
[
  {
    "denom": "factory/osmo1q77cw0mmlluxu0wr29fcdd0tdnh78gzhkvhe4n6ulal9qvrtu43qtd0nh8/wiha",
    "exponent": 0
  },
  {
    "denom": "WIHA",
    "exponent": 6
  }
]

This creates dupes in silver__asset_metadata as seen here:
select * from osmosis.silver.asset_metadata where project_name = 'WIHA';

As such, the union all between bronze and existing silver tables are limited to the first list item ([0]) in each json base/denom attribute.
This is likely why there are situations downstream, like Blockaid reported in core__dim_prices, where prices ~1.0. They're being calculated as WIHA/WIHA:
select * from osmosis.price.dim_prices where symbol = 'WIHA' limit 1;

3. For further consideration
It's interesting that price__ez_prices filters out swap prices (line 33), as those are actually the correct prices as reported in Coin Market Cap and other sources. We have the correct data from swaps, but are not using them:
select * from osmosis.price.dim_prices where symbol = 'WIHA' and recorded_at = '2024-07-02 15:00:00.000' limit 2;

One quick solution for Blockaid is to rely on price__dim_prices instead of price__ez_prices, filtering to where provider = 'swaps'.

the swap based pricing may have some valid prices but for the most part we excluded it since the were many pairs with low volume and that skewed pricing. Ultimately this is a metadata mapping issue.


Question: renderToHardwareTextureAndroid needed?

Is renderToHardwareTextureAndroid needed? Does it have any side effect on the memory if not using it?
https://github.com/ascoders/react-native-image-zoom/blob/master/src/image-zoom/image-zoom.component.tsx#L668
I'm asking this because I've seen out of memory errors on some devices when trying to load a picture with this component. I can't consistently reproduce it as it seems very specific to some devices, but it was related to this and using a placeholder png image.

I seem to face these memory errors on Android 7. Anything above that works fine.

closed with #112


signatureHelp help labels don't accept a language for syntax highlighting like hover

The Hover interface allows us to pass the "cpp" language to the MarkedString to show it with C++ syntax colorization, but the signatureHelp API doesn't support this so the string is all gray. Can this be added?

@Rieken have you received a comparable request for VS Code. Any thinking about how we would like to implement this. Having a colored signature help is IMO a fair request.

It's this one on my side: https://github.com/Microsoft/vscode/issues/11877. There are some API comp challenges with it. Nothing decided yet, we can discuss an idea

@jrieken cool.

This got implemented this week. Closing.


Week 2 Step 2

+Add getHello function to fetch "Hello Ana!" from the servlet
+Add the button to get hello
+Style the button in the webpage

Can you add a screenshot to this PR with the final result of this change?

Can you add a screenshot to this PR with the final result of this change?

Fixed!


Document the processs of raising a PR for TestNG

With recent changes in TestNG's project structure and all the new plugins being added, its better that we create a document that tells a contributor as to what all steps are to be followed so that the PR can pass through all the checks that we have.
Also some steps/instructions on how we can configure the IDE (IntelliJ for e.g.,) to take care of these things would also help
@vlsi - Can you please help share the instructions so that we can include them in our contributing instructions ?

@juherr - If you know of the steps, please share them so that we can include them in the contributing markdown file.

Running ./gradlew autostyleApply triggers the formatting from the command line.

I suggest adding the following:
Importing the project to IntelliJ IDEA
Please use the recent IDEA version like 2021.1+, both Community and Ultimate versions are fine.

Import /build.gradle.kts as Project.
IDEA might ask you if you trust the project, and it does so for a good reason: a malicious project might steal your credentials, so take your time and verify if you take the sources from https://github.com/cbeust/testng or an authentic mirror.

Configure IDEA to avoid import *. Open File -> Preferences.. -> Editor -> CodeStyle -> Java -> Imports, and adjust Class count to use import with '*' to 999, and Names count to use import with '*' to 999. Click OK.

That is it. You should be able to navigate around the code, launch tests, and so on.

Formatting the code
The project follows Google Java Style Guide, and the preferred way to configure code style is .editorconfig file.
You can check if the files align with the style by running ./gradlew autostyleCheck, and you can apply auto-correctable deviations by running ./gradlew autostyleApply.

There should probably be something on the naming of the test classes, packages, the style of asserts, and so on, however, I do not know what are the conventions.
For instance, it looks like you prefer adding test classes to the global test suite, however, I find no reason to keep suite for unrelated tests.
Suites have two major problems:

The global suite file is prone to merge conflicts (different people might add unrelated tests to the same place in the suite file), so I would rather avoid using suites.
One can forget to include the newly added test to the suite, so the test won't get executed at all.

That is why I configured the new modules to use plain test classes, and make Gradle discover them.

@vlsi - Here's what i experienced.

I pulled the latest changes from master branch
I deleted my .idea folder
I deleted all the *.iml files
I imported the project into Intellij from command line by using idea .
I added the changes that were part of the PR https://github.com/cbeust/testng/pull/2573
I ran ./gradlew clean test
After the tests passed I raised a PR which failed due to codestyle check failure.
After this I had to run ./gradlew autostyleApply by referring here

So I wanted to know, what can we do such that, these codestyle issues etc., can be caught at the time of building the test itself. Earlier we used to have a shell script build-with-gradle which could be run by the contributor and this would run the test.
Can we have something like that, which would ensure that a user is able to apply all the checks (that our CI currently checks) on a user's machine itself, so that they can work on fixing them and incorporating them into their changeset.
Asking a user to fix the validation checks later, kind of deters contributions and I was hoping we can avoid that.

There should probably be something on the naming of the test classes, packages, the style of asserts, and so on, however, I do not know what are the conventions.

I dont think we have any of that convention yet in the codebase.
Basically there are two types of tests.

Tests that are automatically eligible for running which when run can vet out a particular functionality. These are the regular TestNG tests without any extra requirement.
Tests that need to use the TestNG apis and which extend the test.SimpleBaseTest (this is like a helper base class that provides a lot of convenient functions for creating testng suite, testng test (<test> tag) etc., and which internally uses test classes (that look like test classes in point (1) but should not be run on their own but only via the test class (see org.testng.DryRunTest as an example

The testng suite basically refers to both these types of classes alone and as part of the review we check to ensure that the contributor has added a reference to src/test/resources/testng.xml
We have historically relied on the suite file as the one place to have all the tests run.
The problem of merge conflict happening in suites is applicable even to CHANGES.txt (which is usually the area that I have seen PRs having merge conflicts). So the suite file is no exception to that as well.

That is why I configured the new modules to use plain test classes, and make Gradle discover them.

Can you please point me to that ? I think we need to start documenting a lot of these things so that new contributors dont face difficulties in giving their contributions. As it is we have very less contributors and I dont want to deter any enthusiastic contributors from coming forward with their contributions, because we dont have documentation that clearly explains to them how to go about with their contributions. That is what I am trying to capture as part of this issue.

You can check if the files align with the style by running ./gradlew autostyleCheck, and you can apply auto-correctable deviations by running ./gradlew autostyleApply.

Is there a way wherein we can have the editor automatically apply this when a user saves code ? We can document that with screenshots if needed so that this gets auto applied.
For e.g., the codecheck fails if I have an empty method that looks like
public void fun() {
}

and expects that the formatting should be
public void fun() {}

But intellij by default formats even an empty method as the first variant and not the second variant (This was one of the reasons of failure in my PR that I mentioned above and I had to run that gradle task to get that sorted out and add an additional commit.

Configure IDEA to avoid import . Open File -> Preferences.. -> Editor -> CodeStyle -> Java -> Imports, and adjust Class count to use import with '' to 999, and Names count to use import with '*' to 999. Click OK.

Is it possible to configure this via the editorConfig ? If yes, then maybe we can consider doing that. If its not possible, then atleast we need to have some way wherein we can flag a failure when the user runs tests via some shell script/batch file, so that it can be fixed easily.
I am happy to document all of this, but I need some help with information so that i can collate all of them.

I imported the project into Intellij from command line by using idea .

That must never be used. IDEA's import should be used instead.

I ran ./gradlew clean test

First of all, ./gradlew tasks should produce meaningful output.
Then, clean is not needed here.
There might be several usable Gradle tasks, and different developers have their own habits.
There's no point in having "a single command for everyone".
For instance, some of the developers do not like when tools mess up with their code, and they prefer to make the needed changes manually, so ./gradlew autostyleCheck would be great for them.
Most of the verifications would be covered by ./gradlew build.
The missing bits would include tasks like "publish to Central", "sign artifacts".
Publishing tasks can be approximated by ./gradlew publishAllPublicationsToLocalRepository

Can you please point me to that ?

Check testng-asserts module: https://github.com/cbeust/testng/tree/2c3f38c074c9002f6280eb1e61530e2fcf9a8776/testng-asserts
The tests are located in testng-asserts/src/test/java folder, and there is no suite file.
If you launch ./gradlew :testng-asserts:test, then it would run all tests for the asserts module.

But intellij by default formats even an empty method as the first variant and not the second variant

Frankly speaking, I would prefer the first variant, and I would prefer the formatting that can be configured in IDEA rather than some "technically correct, yet the one that needs to be applied afterwards"

Configure IDEA to avoid import *
Is it possible to configure this via the editorConfig ?

Please check .editorconfig file. I believe I documented the exact reason there: https://github.com/cbeust/testng/blob/2c3f38c074c9002f6280eb1e61530e2fcf9a8776/.editorconfig#L29-L30

@krmahadevan Do you have all the needed elements for updating the process documentation?

@juherr - I think so. Let me start compiling this information into a markdown file and then come back here in case i have more questions.


docs: fix css and util links, update Readme, Contribution, prettier

Rationale
Why is this PR necessary?

lack of cross platform code styling
wrong utils links
update prettier + apply
update markdown docs + contribution

Added a comment about renderRoot but otherwise LGTM. I'll merge like this and we can discuss that later if need be.


[FEATURE]:will ilogtail support grok？

https://github.com/logstash-plugins/logstash-patterns-core/blob/main/patterns/ecs-v1/grok-patterns

I'm going to dev it

https://github.com/alibaba/ilogtail/pull/360/files