Tracing support fails with NullPointerException when propagation information is missing

Using Spring Boot 3.0.0 and GraphQL 1.1.0 with MVC an NPE occurs.
When calling a controller, a trace-id is generated as expected. The trace shows up in Grafana (etc).
When calling the graphiql endpoint, an NPE is generated.
An example project can be found here: https://github.com/RutgerLubbers/graphql-observability
2022-11-25 16:11:17.504 ERROR 64991 [] --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] threw exception

java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map.get(Object)" is null
	at org.springframework.graphql.observation.ExecutionRequestObservationContext.lambda$new$0(ExecutionRequestObservationContext.java:35)
	at io.micrometer.tracing.handler.PropagatingReceiverTracingObservationHandler.lambda$onStart$0(PropagatingReceiverTracingObservationHandler.java:59)
	at io.micrometer.tracing.brave.bridge.W3CPropagation.lambda$extractor$1(W3CPropagation.java:249)
	at io.micrometer.tracing.brave.bridge.BravePropagator.extract(BravePropagator.java:59)
	at io.micrometer.tracing.handler.PropagatingReceiverTracingObservationHandler.onStart(PropagatingReceiverTracingObservationHandler.java:58)
	at io.micrometer.tracing.handler.PropagatingReceiverTracingObservationHandler.onStart(PropagatingReceiverTracingObservationHandler.java:35)
	at io.micrometer.observation.ObservationHandler$FirstMatchingCompositeObservationHandler.lambda$onStart$1(ObservationHandler.java:134)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at io.micrometer.observation.ObservationHandler$FirstMatchingCompositeObservationHandler.onStart(ObservationHandler.java:134)
	at io.micrometer.observation.SimpleObservation.lambda$notifyOnObservationStarted$2(SimpleObservation.java:188)
	at java.base/java.util.ArrayDeque.forEach(ArrayDeque.java:888)
	at io.micrometer.observation.SimpleObservation.notifyOnObservationStarted(SimpleObservation.java:188)
	at io.micrometer.observation.SimpleObservation.start(SimpleObservation.java:143)
	at org.springframework.graphql.observation.GraphQlObservationInstrumentation.beginExecution(GraphQlObservationInstrumentation.java:105)
	at graphql.execution.instrumentation.ChainedInstrumentation.lambda$beginExecution$0(ChainedInstrumentation.java:85)
	at graphql.collect.ImmutableKit.mapAndDropNulls(ImmutableKit.java:107)
	at graphql.execution.instrumentation.ChainedInstrumentation.beginExecution(ChainedInstrumentation.java:83)
	at graphql.GraphQL.executeAsync(GraphQL.java:522)
	at org.springframework.graphql.execution.DefaultExecutionGraphQlService.lambda$execute$2(DefaultExecutionGraphQlService.java:82)
	...

Thanks @RutgerLubbers for this issue. The instrumentation was not well tested here and we'll use this issue to revisit fix and improve tracing support in general.
This issue shows that when extracting the propagation information from inbound requests, we are only looking at the graphql request extension and failing with an NPE if the extensions map is null...
We should change the instrumentation to first look up the propagation information in the GraphQL context. Developers can use a transport specific interceptor to look up that information in the transport protocol and put it in the graphql context. This is the case if HTTP clients send this information as request headers. We should provide a WebGraphQlInterceptor interceptor that does just that.
If the propagation information is not available in the GraphQL context, we should then fall back to the request extensions and ensure that we don't fail if they are missing.
Since the tracing support is effectively broken, we will also change the contextual name of the observation to better align with other implementations, from graphQL to graphql. Without this change, the name of the observation can be normalized by collectors as graph-q-l and this is unfortunate.


add custom DNS Resolver configuration

In principle we could, but it seems more user friendly to have an explicit
default.
On Mon, Apr 12, 2021, 23:20 Steven Allen @.***> wrote:

@Stebalien commented on this pull request.
In dns.go
https://github.com/ipfs/go-ipfs-config/pull/126#discussion_r611927156:

DefaultResolver string json:",omitempty"

// CustomResolvers is a map of domains to URLs for custom DoH resolution.
CustomResolvers map[string]string json:",omitempty"

Do we need a default resolver? I'd assume that we could have a single
"." entry in a Resolvers map, right?
Also, let's briefly (very briefly) document the format (i.e., URL?
Multiaddr?).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/go-ipfs-config/pull/126#pullrequestreview-633931538,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAI4SXYPWOCWSG4M6QDR33TINIZFANCNFSM42ZBMCIA
.

and sure, i'll add some documentation.
On Mon, Apr 12, 2021, 23:20 Steven Allen @.***> wrote:

@Stebalien commented on this pull request.
In dns.go
https://github.com/ipfs/go-ipfs-config/pull/126#discussion_r611927156:

DefaultResolver string json:",omitempty"

// CustomResolvers is a map of domains to URLs for custom DoH resolution.
CustomResolvers map[string]string json:",omitempty"

Do we need a default resolver? I'd assume that we could have a single
"." entry in a Resolvers map, right?
Also, let's briefly (very briefly) document the format (i.e., URL?
Multiaddr?).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/go-ipfs-config/pull/126#pullrequestreview-633931538,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAI4SXYPWOCWSG4M6QDR33TINIZFANCNFSM42ZBMCIA
.

Both SGTM.


Add API && Plugin framework registry

Add API && Plugin framework registry. Please review the reasonableness of these definitions

3. Why Output named as BatchOutputEvents? Batch or no batch depends on filter works. You could have several inputs to one output, vice versa.

The Batch is pointed to the BatchBuffer context in the design doc.

2. Event in the doc should be the data of the processor. From my understanding, there should be no explicit boundary between input and output, because every output could be another filter's input. I am curious how you plan to use the InputEvent and OutputEvent.

Event is a global context, only event is allowed to transfer in Satellite. InputEvent is a smaller concept for Gatherer. Because  Gatherer would put the data in Queue, InputEvent guarantees that Queue can be replaced in different plug-ins.  It's up to the plug-in to decide whether to take the original look or serialize to bytes.

Could you consider to create project_structue.md doc, linked from readme? I think some of the comments are very suitable in the doc too.

Could you consider to create project_structue.md doc, linked from readme? I think some of the comments are very suitable in the doc too.

no problem would add it later

@wu-sheng @hanahmily @gxthrj @surlymo  thx for recheck again because some logic in Sender is changed.

@surlymo Could you recheck and confirm?

@surlymo Thx for review again. Both support pointer register and value register.

@wu-sheng Could I merge?

Why named package like defineclient? What does this mean?

move plugin API to plugin dir ? I do this to avoid packet conflicts ,Do you have any other naming suggestions?


Using Cucumber with Grape

Anyone ever done Cucumber scenarios to test an API built on Grape?
I see there is a gem for cucumber-sinatra
so unless there is something already, I might need to fork this one out?

Use the mailing list for questions, please. Looking forward to seeing a grape-cucumber library or something like that!

I forked cucumber-sinatra, which was a fork a cucumber-rails it self.
made few adjustments, already
https://github.com/mathieujobin/cucumber-grape
cheers

Make sure to add it to http://www.ruby-grape.org/projects/. And you need ... tests!


Bugfix #2

There was a parse error, i dont know why it worked at my home systen but not in my office system.

Haven't noticed it before. Okay, thank you!


Use typed Javascript

And also the opaque types trick: https://codemix.com/opaque-types-in-javascript/

I have been writing a PureScript port on the side and am currently halfway through.

An existence proof of something working nicely in purescript would certainly convince me - I look forward to it, and certainly won't be doing anything on this until your experiments have concluded.

Can close this now that we have switched to Elm for the frontend

Yep


Date filter does not work as expected - Reopen of #383

I am trying to filter a Windows Event Log using the Date filter. Sometimes it shows no results even though there are items in the date range. Sometimes it shows results outside of the specified date range. To reproduce, try date filtering an Event Log file on v<IP_ADDRESS>7.
Exhibit 1: Showing events before the specified time range

Exhibit 2: Showing events after the specified time range

Exhibit 3: Showing the same filter as in Exhibit 1 and 2, but after having disabled and re-enabled it. It now shows no events.

In the previous post, it was suggested that the UTC time zone for Event Log Expert may be causing an offset from my configured system time.
I tried setting Event Log Expert to my configured system time, but it still shows events outside of the time range.
Please do not close, this filter feature is broken.
Exhibit 4: Event Log Expert configured to show in my configured system time, but still showing events outside of time range.

This should be fixed on the preview build.
Enable "Pre-release Builds" in the settings menu and check for updates to get the latest preview build.

Thank you.


Supl is W O R K I N G

Supl is compliling now (we still need to integrate it to our code). But hey,

no way

work for now in this branch. Merge when supl is fully integrated.

tanco aixo, que ja no es fa servir


The arrows seem to be not working when capslock is on

Expected behavior
When pressing the arrows, the slide to jump to previous/next pages even when the capslock is turn on.
Actual behavior
The slide does not jump to previous/next pages when pressing the arrows with capslock is on.
Testing Environment

Operation System: macOS 10.14.4
Python 3.7.3

I haven't seen this one specifically, but it doesn't surprise me at all. I've definitely observed a similar problem with refresh requiring the shift (cmd-shift-R, not just cmd-r). I'm pretty sure it's due to the keyboard code scanning.
The problem will almost certainly stem from the on_key_press handling in deck.py/SlideDeck.

This problem seems to be caused by a typo in toga project.
src/cocoa/toga_cocoa/keys.py

Since the PR to toga is merged, it should work after toga is updated.
Close this issue.


Remove automatic save changes on closing DgnDb

This pull request introduces changes to the iModel closing mechanism. Now, closing an iModel file no longer automatically saves changes. Users must explicitly call the saveChanges function before closing the iModel. Additionally, the closeIModel API has been renamed to closeFile for improved clarity.
itwinjs-core: https://github.com/iTwin/itwinjs-core/pull/6232

/azp run imodel-native


Add smtp and test default account activation

Configured a docker container and use it in spring application to send emails


Expose run_result_t publicly

@0x00002a A typical consuming application of malloy::server would use start() to create a "session" and then destroys it when the server is supposed to be shutdown. In our examples we're currently just relying on the returned run_result_t object to go out of scope which will automatically shut down the malloy::server infrastructure.
Currently, unless I am missing something, there is no way for a consuming application to properly store the run_result_t object as a class member as we're not exposing the run_result_t type publicly.
Is there some caveat I'm currently not aware of or can we expose that type publicly so a consuming application could have a class member like std::optional<run_result_t> to control the state of the malloy server?

We could expose the alias certainly. The actual controller_run_result should stay private tho imo. Also we need to make it movable (as it currently isn't implicitly, since it has a custom dtor), it was an oversight on my part since if we're going to return a resource handle by value we at least need to allow some form of preserving its lifetime for the user.
Making it movable should be a simple case of adding = default to the move ctor and assignment and adding a check in the dtor for if m_io_ctx is nullptr (i.e. its been moved from). Also should add std::movableto the constraint on T in controller_run_result as its stored by value

I feel like I am really not okay with the naming of that controller_run_result type. But I also fail to come up with something better as previously discussed.
@0x00002a How would you feel about renaming this to malloy::server::session or something like that? Alternatively we could rename that class to be named controller and rename the current controller (which creates an object of that type) to factory. Somehow I think I like the latter approach more.

I've just finished implementing this so I'll open a pr and we can discuss it there? I like the idea of some kind of session naming, but for that I suggest we move more of client::controller into it, since currently it the controller is still used on the client side to make new connections even after its started running (unlike the server which cannot dynamically add routes after its started, at least currently - not sure if we want this?). We could do this in a similar manner to the websocket connection, where certain functions are disabled depending on if its server or client session

Ah, unfortunate timing. I just closed this and opened #107 :p
Shall we discuss over there?

@Tectu 5874a5a has a subtle bug

Uh-oh - what did I screw up?

We could do this in a similar manner to the websocket connection, where certain functions are disabled depending on if its server or client session.

I think that is a good approach.


Does this require a more recent version of ArgoCD?

Hello!
Trying this out in our sandbox environment with ArgoCD 2.11.2, the extension and CRDs install without any issues.
I've created some RoleTemplate and AccessBinding resources with my desired permissions. I can see the CURRENT PERMISSION block but not the interface to request elevated permissions.
Is there a requirement for 2.12 or a more recent version of Argo?

Correct. The extension requires Argo CD 2.13. I updated the documentation with more installation details.


Display VulnerabilityReports of the current revision of the selected Deployment

The Starboard Operator associates VulnerabilityReports with ReplicaSets controlled by the corresponding Deployment.
Currently the extension displays only VulnerabilityReports owned by the selected workload. However, we could lookup an active ReplicaSet and display it in the Deployment details.

I had a quick look at it while I was working on another issue - where is the logic that defines a pane to be visible within a info panel or not. For instance:

This is under Workloads -> Deployments -> VulnerabilityReports now I'm assuming there's some logic that "enables" VulnerabilityReport info to be show here. Is that correct?
Another example would be through this path: Workloads -> Pods -> ReplicaSet -> VulnerabilityReports as shown below:

I had a quick look at it while I was working on another issue - where is the logic that defines a pane to be visible within a info panel or not. For instance:

This is under Workloads -> Deployments -> VulnerabilityReports now I'm assuming there's some logic that "enables" VulnerabilityReport info to be show here. Is that correct?
Another example would be through this path: Workloads -> Pods -> ReplicaSet -> VulnerabilityReports as shown below:

We define those additional sections for each workload kind (Pod, Deployment, ReplicaSet, etc.) when we register extension's capabilities in https://github.com/aquasecurity/starboard-lens-extension/blob/main/renderer.tsx#L112. For example, here's how we add ConfigAuditReport and VulnerabilityReports sections to the Deployment details pane:
kubeObjectDetailItems = [
    {
        kind: "Deployment",
        apiVersions: ["apps/v1"],
        priority: 9,
        components: {
            Details: (props: Component.KubeObjectDetailsProps) =>
                <React.Fragment>
                    <WorkloadConfigAudit {...props} />
                    <WorkloadVulnerabilities {...props}/>
                </React.Fragment>
        }
    }
]

I'm closing it as stale issue.


Adding subtitle to ExpansionTile

Description
As per request to make ExpansionTile more flexible this PR is adding subtitle to ExpansionTile.
Related Issues
#15427
Tests
I added the following tests:

Added a subtitle to an existing test.

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I signed the [CLA].
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
[x] No, this is not a breaking change.

You seem to be failing a few analyzer tests. You can run the analyzer locally through flutter analyze --flutter-repo


FS-2371: Fix for duplicate ids in bulk-accounts endpoint

Change description
When making the request for bulk-accounts, we unnecessarily send the same ids lots of times, by putting it into a set then back to a list, we can ensure each id is only sent once.
list(set(['a', 'a', 'b'])) # ['b', 'a']

[ ] Unit tests and other appropriate tests added or updated
[ ] README and other documentation has been updated / added (if needed)
[x] Commit messages are meaningful and follow good commit message guidelines (e.g. "FS-XXXX: Add margin to nav items preventing overlapping of logo")

How to test
N/A - This is a quick tiny fix to delay the issue from re-occurring on from e2e tests, but in theory it could still happen if lots of unique users were to comment on the same application, so I think it would be good to change it from using query parameters based on that, although that's a lot less likely to occur after we de-duplicate the ids.   More info on the JIRA.

@tferns long-term we should use a POST request for this, as described in the JIRA ticket.


(branch next) Cannot prevent default on links and buttons with m.route

Hello,
I use the router and I define a button like this in my view:
return m('button', {
  onclick: function(e) { e.preventDefault(); e.stopPropagation(); return false; }
}, 'test');

When I click the button, the router just goes to the default view. It occurs also with links.
How can I attach a click handler on anything and prevent the router from handling the click?
Thank you!

Oh I think this has to do with the redraw strategy... I'll read about it and close this issue if this is really it.

Yup, this was my rendering function messing up :) baby steps


Display details for selected node

This is WIP to implement #86

Thanks! Could you add screenshots/screen recording of before and after the PR changes please? 🙏

There is nothing of interest yet. I have implemented reacting to node selection but bringing in actual additional info is a bit more tricky. The representation of the graph in the front only contains package names, not their outputPath. So for now it only displays the name of the selected node as proof of concept. This is why this PR is only a draft, not ready for review.
Before

After

Nice! One thought would be that if CystoscapeJs supports some form of vertex properties, we could potentially add UI support for those more generically first (even if that is just the name at the moment). Retrieving additional properties could potentially involve changes to the API (namely to ensure that it can return the property data in QueryResult.cyto) which is a mostly independent change that I think could be done separately from these updates.
https://github.com/tweag/nixpkgs-graph-explorer/blob/main/api/explorer/api/queries/query.py#L37

I agree. At the end of last week I tried to see how to bring the additional info (for now just the output path) in a nice way. In the end I figured that the most straightforward way would be to have an endpoint to query details of a specific package in the API (e.g. /package/[package_name]).
For now the graph (whose nodes are just package names without additional info) is built using a query that is not trivial to tweak in getGraph in api.ts. So the possibilities are:

storing all the info in the nodes of the graph but that would imply
querying the info after the node is focused

internally within the front (we have the info after fetching all packages with the /packages API endpoint but we need to keep it available in the right component and perform the lookup)
use a new endpoint of the API such as described above (/package/package_name)

I think the most lightweight and maintainable solution is the last.
If we agree on this, then this PR could indeed just become about selecting a node in the graph and, for now, just display the name.
It works well in the current state using handlers passed along as parameters but @jlesquembre suggested to try using a custom event approach that is more idiomatic with web components. This would bring more consistency in event handling in the front.  I will try to implement this.
As for the visual/UI aspects, since we don't know yet how much (and what kind) of details will be displayed eventually, after the API provides more, I think I will stick to a simple bottom pane for now.

Thanks @florentc 👍 I think this PR makes more sense if we at least display the "output path" of the selected node.
If this requires to edit the gremlin query, I'm sure @dorranh or @zz1874 can be of help 👌

Now multiselection is handled as well and the results are shown in a sidebar.

CSS wise, there remains an overflow bug to fix when too many results are selected at the same time.
Feature-wise, @GuillaumeDesforges, what do you think about having a new endpoint in the API to query details of a specific package as I described above? I feel like this would keep things simple in comparison to putting all the details in the graph and modifying the query that builds it. As for info beyond outputPath, the API will have to implement it beforehand because it is the only detail it gives about packages for now.

Sure, i don't mind the implementation details, what matters is that we get the details displayed, including most urgently the output path

Rendering issues are fixed.

Thanks @florentc !


Fix java8 build

The java8 version of javadoc runs a linter by default on the documentation. The RDKit docs fail this linting step, which causes the wrappers to fail to build.
The patch disables that linting process.
We should, at some point in the undetermined future, figure out how to fix the documentation so that this isn't necessary.

@bp-kelley : not sure if you get notifications about these or not. This is a "just-in-case not" message.

I'm getting errors on ubuntu12 with java8 (java7 passed fine)
/home/vagrant/devel/rdkit/Code/JavaWrappers/gmwrapper/src/org/RDKit/Atom.java:116: error: tag not allowed here:
this makes no sense if we do not have an owning molecule

Looks to be resolved, I was in a state where java8 was being used with the java7 sdk so JAVA was reported as 1.7 but during some portion the java8 linter was being used.  If the tests pass on ubuntu tonight, I'll merge tomorrow morning.

great, thanks.

I think we should also have a java8 travis build as well:
https://blog.travis-ci.com/2013-11-26-test-your-java-libraries-on-java-8/


migrate cloud zafira instances to t2.large type

stage use t2.large successfully

Unfortunately stage has fewer replicas for DB, RabbitMQ, ES. Not sure that it will operate well under production load.


Access Violation Crash (Alpha 5.3.0)

Log: log.txt
Crash info: crashinfo.txt
CrashVideo.zip
(Sorry for bad quality video and low framerate)

Log: log.txt
Crash info: crashinfo.txt
CrashVideo.zip
(Sorry for bad quality video and low framerate)

i'm just looking into your logs now

why have you closed this?


docs: add a step in AQUMV doc and move doc dir

Add a step in AQUMV doc to use the postgres-based planner (according to feedback from a developer)
Move some zh docs in a performance directory to keep them consistent with the en docs. This can solve the problem of zh site displaying en docs.

Change logs

Describe your change clearly, including what problem is being solved or what document is being added or updated.

Contributor's checklist
Here are some reminders before you submit your pull request:

Make sure that your Pull Request has a clear title and commit message. You can take the Git commit template as a reference.
Sign the Contributor License Agreement as prompted for your first-time contribution (One-time setup).
Learn the code contribution and doc contribution guides for better collaboration.
Make sure that your changes deployment preview is successful.
List your communications in the GitHub Issues or Discussions (if has or needed).
Feel free to ask for the @cloudberrydb/doc team or other people to help review and approve.

Hi @TomShawn could you help update the links? They cannot be resolved. Thanks!
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpload.md" for version current
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpload.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpload.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-copy.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-file-protocol.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-gpload.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-from-web-services.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-copy.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-file-protocol.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-using-gpload.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/data-loading/load-data-from-web-services.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/data-loading/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpload.md" for version current
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpload.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpload.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/parallel-create-ao-refresh-mv.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-auto-materialized-view-to-answer-queries.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-incremental-materialized-view.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-unique-index-on-ao-tables.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/set-password-profile.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpfdist.md" for version current
Warning:  Docs markdown link couldn't be resolved: (./gpdemo.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (./gpshrink.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/parallel-create-ao-refresh-mv.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-auto-materialized-view-to-answer-queries.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-incremental-materialized-view.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/use-unique-index-on-ao-tables.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/i18n/zh/docusaurus-plugin-content-docs/current/set-password-profile.md) in "/home/runner/work/cloudberry-site/cloudberry-site/i18n/zh/docusaurus-plugin-content-docs/current/releases/release-1.5.0.md" for version current
Warning:  Docs markdown link couldn't be resolved: (../data-loading/load-data-using-gpfdist.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpfdist.md" for version current
Warning:  Docs markdown link couldn't be resolved: (./gpdemo.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (./gpshrink.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/index.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/start-and-stop-cbdb-database.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpinitsystem.md" for version current
Warning:  Docs markdown link couldn't be resolved: (/docs/start-and-stop-cbdb-database.md) in "/home/runner/work/cloudberry-site/cloudberry-site/docs/sys-utilities/gpinitsystem.md" for version current


Pressing Esc in mini find widget closes peek references

Does this issue occur when all extensions are disabled?: Yes!

VS Code Version:
OS Version:Version: 1.71.0 (user setup)
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-01T07:36:10.600Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Steps to Reproduce:

Open a Peek References with results in multiple files
Press Ctrl+F and type to search within results, it should look something like this

This seems pretty broken...
3 a Press Enter. (Expected: mini find widget closes? Actual: nothing happens)
3 b Press Esc (Expected: mini find widget closes. Actual: peek references closes! )
3 c Press Alt+C. The search settings show up all the way... over there! (Top right of the main editor instead of in the peek references zone)
Also, the settings (match case, whole word, regex) don't seem to apply to this search anyway.

/confirm

3 a Press Enter. (Expected: mini find widget closes? Actual: nothing happens)

What you call the "mini find widget" is the recently-added search/filter widget that is available in all trees and lists. Nothing is supposed to happen when you press Enter while focused in that widget's text field.

3 b Press Esc (Expected: mini find widget closes. Actual: peek references closes! )

I can repro this as a bug, even on Insiders. :bug:

3 c Press Alt+C. The search settings show up all the way... over there! (Top right of the main editor instead of in the peek references zone)
Also, the settings (match case, whole word, regex) don't seem to apply to this search anyway.

The tree/list search/filter widget doesn't offer those features. The Alt+C keybinding will only affect the editor Find widget. When that widget isn't shown, toggling one of its settings via a keybinding causes the toggle buttons to appear briefly as confirmation. #160627 captures a problem of sticky scroll headers masking this brief appearance.


Remove whitespace due to Liquid tags in generated HTML

Resolve #140
Using whitespace-control in Liquid I removed the whitespace due to Liquid tags in the generated HTML files.
The generated index.html file is 94 lines, whereas original index.html file from https://jekyll.github.io/minima is 180 lines long.

This pull request and/or build seems to have resulted in a page build fail.

Could this be due to the additional hyphens added in the default.html file?

Since this update, I haven't been able to update or post anything to my github personal pages.

The build was failing even before this pull request.

Also, the hypens are to remove the whitespace from the generated HTML and these are supported by Liquid. https://help.shopify.com/themes/liquid/basics/whitespace


Reuse terminals for tasks

Is your feature request related to a problem? Please describe.
Long coding sessions tends to imply many gradle tasks (builds and others). Currently each gradle task opens a new terminal.
This results in many terminals being open, making navigation between gradle tasks and other terminals difficult. While it is possible to delete unused terminals, it requires manual intervention for each one.
Describe the solution you'd like
VS code allows a number of customization for presentation behaviour : https://code.visualstudio.com/docs/editor/tasks#_output-behavior
Gradle tasks being volatile, it would be great to make use of these customization options to reuse terminals as much as possible to prevent too many being opened (presentation.panel property).
Additionally, consider using presentation.group property to allow users to customize terminal panels presentation.
Describe alternatives you've considered
Using the output panel doesn't seem to be a solution..

Thanks for the feature request. I agree the amount of opened terminals can be overwhelming. The reason it's done this way is to keep task execution history, but I agree there's room for improvement here.
I'm not entirely sure what the group property results in but I'll have a look.
Otherwise do you want all tasks to be executed in the same shared terminal, or only tasks with the same name executed in a shared terminal? What would be ideal for you?

Thank you for your great support.
Ideally I would like a single terminal for every gradle tasks as I never really run two gradle tasks at the same time in a single workspace (i don't think it is possible in a single project). But a terminal for each clean and build task would be a great starting point.
I am unsure if it is as simple as switching between presentation.panel=shared and presentation.panel=dedicated, if so moon shot would be to let users customize the terminal reuse behaviour via an extension property (and even better terminal clear behaviour).

Making it customizable via extension settings sounds like a good approach. I'll see what I can do :+1:

I have an initial PR for this here: https://github.com/badsyntax/vscode-gradle/pull/748
This wasn't as easy as using the task options as the task behaviour is different when using a custom vscode.CustomExecution, so i had to manually close previous terminals in the implementation. This means previous task output is lost, but i think this ok.

It's a bit late but I noticed the Rust extension reuse the same terminal for tasks. Maybe it's possible to look at their implementation.
It even has a message saying so

Terminal will be reused by tasks, press any key to close it.

Thanks for the link. That extension uses vscode.ShellExecution for the task exeuction, in which case the task terminals can be managed by vscode.
In my case i'm using vscode.CustomExecution with a custom terminal, so i guess vscode can't manage the terminal in the same way. Either way my implementation seems to work pretty well.  You can control the behaviour with:
1 terminal per gradle task:
"gradle.reuseTerminals": "task"

1 terminal for all gradle tasks:
"gradle.reuseTerminals": "all"

New terminal for every gradle task run:
"gradle.reuseTerminals": "off"

I'll release it sometime soon.

Released with 3.5.0. Can you try it out and let me know if there are any issues?
The default behaviour now is that only one terminal will be used per task.

I tested all 3 settings and they seem to behave as intended.
Great work. 👍🏻

Awesome. Thanks for verifying 👍


Support federated ingress

Is this a bug report or a feature request?:
Feature request
What happened:
MetalLB cannot be used as a federated ingress.
What you expected to happen:
Be able to manage an anycast service running on federated k8s clusters.

Thanks for the report! I didn't know about federated ingress until just now, so please forgive me if I'm misunderstanding :)
Looking at the documentation for federated ingress, afaict, it's kind of an abandoned feature. It looks like it was added in 1.4 as a GCP-only thing, with the promise of "more coming soon"... It's now Kubernetes 1.9, and there's still nothing more.
I'm not sure that MetalLB can do anything useful here. We're not doing anything with Ingress objects, we're just providing LoadBalancer Service objects. So in that sense, ingress and federated ingress is out of scope for MetalLB, and this is maybe a feature request for Istio, Contour, or one of the other projects that implement HTTP ingress controllers.
With that said, if k8s federated ingress ever supports more than GCP... MetalLB could be useful in the implementation. The key part is that the federated control plane has to set the same ingress IP on all clusters. MetalLB could definitely turn that into anycast BGP advertisements... But until SIG-Federation implements a generic form of federated ingress, we have no idea what the API looks like, so we can't make it work in MetalLB :(.
Does this make sense? Am I missing something about how federated ingress works?

For Ingress I guess it would have to be paired with something like Envoy based  https://github.com/heptio/contour, but I don't know enough about Kubernetes to say how possible that would. Anyway, that would be very interesting!

I've talked to people familiar with Kubernetes federation, and their response was unanimous: "Federated Ingress", in its current form, only works on GCP, and will never work anywhere else. That approach to federation is no longer preferred, and the new SIG-Multicluster is going in a different direction.
So, unfortunately, I think this is wontfix, because there is no such thing as "federated ingress" that I can support on bare metal. If SIG-Multicluster someday comes up with something like that, we can look at it then.


Doc Update with New description Feature and Cleanup/Clarification

This includes documentation update for description feature (PR #30),
and also clarification to some confusion with the new useLabels param. (#28)
Also, corrected new maxSelections which was showing a boolean type
whereas it requires an integer to be passed... (i.e. maxSelections=3)
Lastly, added some TOC links and generally normalized the structure. :smile:

Additional commits were intentional.  Fixed links and further expanded the TOC.


NEOGEO CD folder on MISTer

Recently has been moved to games/NeoGeo-CD, is there anything you could do to fix the shortcut?

we haven't supported neogeocd in our symlinks until it was added to testing earlier today with the correct naming, rerun the mister installer to create the new symlink

Hi sairuk, I've updated RetroNAS, rom's dir, extra and rerun MISTer CIFS installer but there is no NeoGeo-CD symlink that points to neogeocd folder on my storage...

are you on the testing branch?
Updates -> Branch then select testing from the menu
Alternatively if you don't want to run testing you can wait until we roll up the latest changes to the main branch

mistery solved, thank you very much!

hi saurik, do you know when this change will be included to main distribution? the new main mister with this new folder support is already live.


ENH: Run Jupyter notebooks in the tox testing step

Run Jupyter notebooks in the tox testing step.
Add nbconvert and nbclient to the dependencies of the test table in pyproject.toml so that the notebooks can be run.

@effigies @oesteban sorry to tag you. I'd be interested in knowing whether you'd add a separate step to tox.ini for this or whether you think this is OK.

What's the old and new runtime? If they're long running, I'd suggest a new tox environment. If it's not a significant addition, this seems fine.

What's the old and new runtime? If they're long running, I'd suggest a new tox environment. If it's not a significant addition, this seems fine.

I see; before it was around 6 minutes, but after reading your comment I believe that it is better to add a new environment event if the running time is not that long. I am missing something, though, as the notebook environment is not being run. In fact, none of the other environments are being run either.


sheet diff vs NMDC

MIxS 6 term updates vs NMDC copy of MIxS 6 term updates report

@turbomam Is this done? There is a merged tag.

Can this issue be closed?

NMDC will be responsible for doing our own diff against MIxS now. Thanks.


Trouble serving Configuration UI Bundle from SPIFFS.

I'm having trouble getting a Homie "Hello World" up and running. Using the Arduino IDE, I've downloaded from Git the dev branch. Compiling the broadcast sample app is successful, as is flashing the code to an ESP-12F. I then have downloaded the ui_bundle.gz and uploaded to SPIFFS. I'm using 512k/64k for my flash size.
When the ESP-12F reboots, I'm able to see the wifi AP and join it. However, when I try to access the configuration page on the device, all I get is the picture to load of the board (logo.png). There's no other interface to set wifi parameters. This is the same whether I'm using Chrome on Win10, Chrome on Android, or IE on Win10. Using the web app does work though, it's just the web configuration hosted on the device itself.
Am I doing something wrong? It feels like the ui_bundle.gz that's posted isn't working. Or maybe there's something I'm missing?

Can you monitor the serial output during the configuration? If so, what does it say?
AFAIK ther's only 1 ui_bundle.gz. So I'm mistaken or you should have the right one. Maybe you can look inside the package and see if it's all there.
You can find the file here: https://github.com/marvinroger/homie-esp8266-setup
FYI: on my side, it takes some time to see the webpage. And I have several timeouts before I get to see the page. But eventually it's working.

No changes if I just let the page sit, so I don't believe it's a delay issue. The UI bundle I downloaded came from here: http://setup.homie-esp8266.marvinroger.fr/ui_bundle.gz
On a Win10 machine if I open that file with 7-zip, all I see is another ui_bundle file. So, whatever is there might not be readable? Going to try downloading the UI files directly from GIT and creating a new ui_bundle.gz file. Maybe that'll work?
Will test the serial output here in a bit.

So I think I've fixed my issue, but in a different way than I expected. It seems the board type in Arduino was the issue? Before I was flashing my ESP-12F module as "Generic ESP8266 Module" using 512k/64k SPIFFS mode. That worked fine, except for the uploading of the UI bundle. When I switch to "NodeMCU 1.0 (ESP-12E Module)" using 4M/1M SPIFFS, everything works and I do get a functioning UI bundle. I previously used the Generic module because everything flashed quicker.
As a new user, I'm not understanding why what I thought was a generic ESP-12F module would need the board set to NodeMCU 1.0. I see a lot of different ESP boards... and it wasn't clear to me which is the right one. I bought my boards off Ali-Express, so maybe on the product page there's a better way to figure out what I need? https://www.aliexpress.com/item/10PCS-Esp8266-WiFi-series-of-model-ESP-12-ESP-12F-esp12F-esp12-authenticity-guaranteed/32474404740.html
Another question I have, which is really outside of this issue, is how to build the UI bundle myself. When I copy the files from Git, and try to run "npm run dev" or "npm start", that fails to build the UI bundle. Obviously my toolchain isn't set up. Is there a good resource showing how to get myself set up properly? Or should I get the toolchain set up on another OS for simplicity?

You can still use the "Generic ESP8266 Module" but you'll have to specify the correct flash (spiffs) size and other parameters.
As for your off-topic question: perhaps you can fork the repo and customize it from there. Builing is done automaticaly by wercker?

I know this is old but I ran into the same issue today and may have found the cause for this.
My module is a generic ESP-01 with 512k, so i chose 512/64k in the Arduino IDE.
After the (successful) SPIFFS upload I never got the UI to work.
So I decided to upload a simple SPIFFS directory listing sketch to see if the files are there.
The ui_bundle.gz file size was different. After some testing I'm pretty sure that the file gets silently truncated on SPIFFS upload and the rest of the 64k is being used by SPIFFS internals (metadata and reserved space for garbage collection)
If you look into this SPIFFS issue you will see that with 64k SPIFFS size you'll get about 40k of useable space which is just too small for the ui_bundle.gz
So it would be great to include a warning message in the wiki that the ui_bundle can not be used with just 64k SPIFFS size.
I already opened another issue for the SPIFFS upload tool.


,luci/admin/statistics/graphs,No RRD data found

Issue template:

Please make sure that the issue subject starts with <package-name>:
Issues related to end of life (EOL) releases are not supported or maintained and will be closed
Remove lines from top till here and fill in the following questions

Steps to reproduce:
Example: Replace the following lines and remove this

go to: Network → Interfaces → LAN (an interface with a static address) → DHCP server tab → IPv6 RA settings tab
set RA MTU and RA Hop Limit to arbitrary non-default value
Save & Apply
go to: IPv6 RA settings tab again

Actual behavior:
Example: Replace the following lines and remove this

option ra_mtu '1500' is set correctly in /etc/config/dhcp
In LuCI though, RA MTU and RA Hop Limit are still displaying the default values in light gray font color.

Expected behavior:
Example: Replace the following lines and remove this
RA MTU and RA Hop Limit are displaying the correct values found in /etc/config/dhcp in black font color.

Additional Information:
OpenWrt version information from system /etc/openwrt_release
Example: Replace the following lines and remove this
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='21.02.0-rc4'
DISTRIB_REVISION='r16256-2d5ee43dc6'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt 21.02.0-rc4 r16256-2d5ee43dc6'
DISTRIB_TAINTS=''

No RRD data found
There is no RRD data available yet to render graphs.
You need to configure collectd to gather data into .rrd files.

Sounds like you have not yet configured LuCI statistics properly. Either you have a non-standard data location configured, or something else is wrong in your settings.
(The statistics package itself works normally ok in 21.02, 22.03 and master.)
Note that you are using an ancient the pre-release version of the previous stable release.
You should use either 21.02.3 or 22.03.0.

OpenWrt 22.03.0, r19685-512e76967f
i am using this version,and the problem still going on

of course i have configured ,and have the collectd.conf file

BaseDir "/var/run/collectd"
Include "/etc/collectd/conf.d/*.conf"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
Interval 30
ReadThreads 2
LoadPlugin iwinfo
LoadPlugin ping

TTL 127
Interval 30
AddressFamily any
Host "<IP_ADDRESS>"
Host "<IP_ADDRESS>"
Host "<IP_ADDRESS>"
Host "<IP_ADDRESS>"
Host "www.bilibili.com"
Host "www.github.com"

LoadPlugin memory

ValuesPercentage false
ValuesAbsolute true

LoadPlugin cpu

ValuesPercentage true
ReportByCpu true
ReportByState true

LoadPlugin rrdtool

DataDir "/tmp/rrd"
RRARows 288
RRASingle true
RRATimespan 3600
RRATimespan 86400
RRATimespan 604800
RRATimespan 2678400
RRATimespan 31622400

LoadPlugin dns

IgnoreSource "<IP_ADDRESS>"

LoadPlugin load
LoadPlugin interface

Interface "br-lan"
Interface lan1
Interface lan2
Interface lan3
Interface lan4

I have the same problem with OpenWrt 22.03.3 r20028-43d71ad93e
I checked the installation. I checked the configuration. I checked the documentation.
I cannot find any mistake.
@chuyueye  If you have found the solution, could you please leave this here?

Here my solution:
In the config file there were entries of plugins which were not installed.
You can not see these entries in Luci.
You can only see these errors in systemlog after restarting collectd.
After installing the missing plugins collectd is running and is displaying  graphs.
Could it be possible, that there were plugins as a dependency and always installed with the packet and these dependencies changed, but the configfile not?


Allow bundle deploy from upstream container repo

Allow deployment from upstream container repo. Found this while testing
with --skip-tags per documentation, but fails to deploy bundles due to
hard-coded flags for authorized registries.

@csibbitt here is a kind of draft PR that allows testing bundle-based deployments from the upstream bundles since I didn't want to do the full setup for a downstream bundle.
From what I'm looking at, everything seems to be working as it should. The only issue I can see is around no longer installing the pre-provisioned items. I think this is fine once everything merges, because at that point you'd have properties.yaml in the bundle and it should do all the resolving (not verified, but see comment above about why I think that).
In the meantime, everything remains the same in stable-1.5, so for CVEs or other async releases in the meantime, the downstream release pipeline should be able to use the contents fron stable-1.5 branch. Once we import to stable-1.5, we'll be imminently looking to do a release and tagging/importing the properties.yaml changes, meaning I think this can all land now.
I can also do a full verification once this lands. I can trigger the release-automation branch GHA to create bundles, and then I can re-run this test to verify that properties.yaml does what I think it should. In the meantime, I can see if I can make this work by running from a bundle generated in the local environment through the local_build system.

Kind of a POC that allows deployment via bundles upstream (didn't want to go through the whole process of doing a downstream bundle test).
Needs additional logic when deploying from bundles directly to pre-deploy, although this might only need to wait for properties.yaml to land in a bundle, because it looks like bundles are deployed via a Subscription since bundles are created via a CatalogSource.
I didn't actually test this logic before, thinking it would have just kind of read the bundles and loaded the CSVs directly. The fact this runs via a CatalogSource and Subscription makes me think if properties.yaml was in the STO bundle, it would have requested the other Operator dependencies.

The logic here seems sound to me. What you describe matches my experience - seeing CatalogSource and Subscription objects that are handled by OLM, rather than evidence that operator-sdk itself rips open the bundle to do it's own installation.

I think this patch is fine and in fact I would rather see it merge directly to master since it isn't actually dependent on any of the other work in this chain.

Since I modified this against my other branch, it seems swapping to master does what I should have expected. I am going to open a separate PR with just the diff and have it land against master, and then I'll merge master back into #428
Expect to see this one close out shortly since I'm not sure it's worth doing an interactive rebase to get this back against master.

Closing this in favour of a different PR targeting master.


image/gif: bounds offset reversed when encoding

go 1.12.1 linux/amd64
What did you expect to see?
image shift not depending on saved format.
What did you see instead?
gif image shifted in the opposite direction to all other formats.
(several other image format generating libs tried and gif the only one in disagreement.)
demo example:
package main
import "image"
import "image/png"
import "image/jpeg"
import "image/gif"
import "os"

type offsetImage struct{
	image.Image
	Rect image.Rectangle
}

func (i offsetImage) Bounds() image.Rectangle{
	return i.Rect
}

func main() {
	img:=offsetImage{image.Rect(0,0,50,50),image.Rect(0,0,50,50) }
	w,_:= os.Create("1.png")
	png.Encode(w,img)
	w,_= os.Create("1.jpg")
	jpeg.Encode(w,img,nil)
	w,_= os.Create("1.gif")
	gif.Encode(w,img,nil)

	img.Rect=image.Rect(30,30,80,80)  // same size just offset

	w,_= os.Create("2.png")
	png.Encode(w,img)
	w,_= os.Create("2.jpg")
	jpeg.Encode(w,img,nil)
	w,_= os.Create("2.gif")
	gif.Encode(w,img,nil)

}

output
without shift:all white, all the same as expected

with shift:

(png image above not showing in github md?)

I was able to reproduce this, does seem that gif changes after the offset in a way that's different from the other image formats.
/cc @nigeltao for image/gif package

confirmed fixed. (with patch) demo now results in matching images and original code now works as expected. nice.


Touch Screen not working

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug
the touch screen doesn't work when working on a file, for example, I can not scroll down the lines of code.
However, the scroll bar does work when I scroll in the terminal.
VS Code version: Code 1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4 x 2496)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwareoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.93GB (1.79GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (18)

Extension
Author (truncated)
Version

better-comments
aar
2.0.5

vscode-browser-preview
auc
0.5.9

simple-react-snippets
bur
1.2.2

bracket-pair-colorizer
Coe
1.0.61

vscode-eslint
dba
1.9.1

vscode-npm-script
eg2
0.3.9

vscode-peacock
joh
3.1.5

chat
kar
0.22.1

vscode-gutter-preview
kis
0.23.0

mssql
ms-
1.6.0

vsliveshare
ms-
1.0.869

vsliveshare-audio
ms-
0.1.66

vsliveshare-pack
ms-
0.3.3

debugger-for-chrome
msj
4.12.0

polacode
pnp
0.3.4

LiveServer
rit
5.6.1

open-in-browser
tec
2.0.0

vscode-icons
vsc
9.4.0

any update on how to fix? none of the other threads provide a solution

I have just tested VS Code on a Surface Book and using touch to scroll the editor works fine.

Hello,
I tried again on my Surface Pro 4 and it worked again. Thanks for your help!
On Thu, Oct 10, 2019 at 9:59 AM Alexandru Dima<EMAIL_ADDRESS>wrote:

I have just tested VS Code on a Surface Book and using touch to scroll the
editor works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/81586?email_source=notifications&email_token=AL7MRNYQN55NQIMS6Y2OUNLQN47MNA5CNFSM4I3PIIXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA4UC4A#issuecomment-540623216,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL7MRNYG4MM7W5OAWE256ILQN47MNANCNFSM4I3PIIXA
.


[Power BI] Join cost/pricesheet to populate ListUnitPrice and ListCost when missing

⚠ Problem
Cost Management does not include x_ListUnitPrice and x_ListCost for all records.
🛠 Solution
Join the cost data with the public pricesheet and calculate the cost by multiplying the price by PricingQuantity.
ℹ Additional context
This workaround will slow down report generation. If you are faced with this issue, please file a support request to help raise the priority for the Cost Management team to resolve the underlying data issue.
🙋♀ Ask for the community

We could use your help:

Please vote this issue up (👍) to prioritize it.
Leave comments to help us solidify the vision.
File a support request with the Cost Management team to ensure these values are always populated correctly.

Please could you provide instructions how to "Join the cost data with the public pricesheet and calculate the cost by multiplying the price by PricingQuantity."? Also what do you mean by "File a support request with the Cost Management team" ? what is the contact channel for that team?

My observation is that ListUnitPrice and ListCost for reservations are always 0 while they seems to be correct for savings plan. Is this related to this issue or is this by design and I'm missing something?

What would be the join statement? MeterId and Region?

@Kibastola joining datasets requires pulling in the price data and joining them based on a few columns that depend on the account type. I don't have the exact columns today, but we will get them as part of this effort.
Filing a support request is about raising awareness with the Cost Management team that this is important to you. You can do this in the Azure portal. You can also escalate it with your account team.

My observation is that ListUnitPrice and ListCost for reservations are always 0 while they seems to be correct for savings plan. Is this related to this issue or is this by design and I'm missing something?

@RolandKrummenacher correct. This is a gap in Cost Management. The team is aware of the issue, but does not have an ETA for when it will be resolved. Doing the join in the toolkit is about implementing a workaround in the meantime.

Note for FTEs: The Cost Management team is tracking this with work item 17121858 internally.


Error when running the pnpm install command

I get this error when I run the pnpm install command

Just updated the code, can you check it again?


Wont Connect After Update[Bug]:

Consent

[X] I have searched the existing issues and verified that there is no open issue for the same subject.
[X] I understand that the YTMDesktop Elgato Plugin has NO affiliation with Google, YouTube or the YTMDesktop application.

Current Behavior
When clicking the Authorize button it will not connect to YouTube Music. Also with version 2.1.0 there isn't an option to input the password anymore. It try's to connect but it times out after a little while.
Expected Behavior
I expect it to connect to YouTube Music.
Steps To Reproduce
Click the Authorize button.
OS
Mac
OS Version
MacOS Ventura
Plugin Version
13.2.1
YTMDesktop Version
v2.1.0
How did you download the software?
Elgato Store
Anything else?
No response

Hey and thank you for your ticket!

You've switched up the "Plugin Version" and the "YTMDesktop Version".
v2.x of the Plugin only supports v2.x of YTMDesktop now. v1.x isn't supported anymore. Please install the latest YTMDestkop Version
In v2 of YTMDesktop there isn't a password anymore. The authorization process was completely changed.

For the new authorization/connection process of V2, please see the updated How to use it? section.
After upgrading your YTMDesktop Applicaton and following the "How to", everything should work as expected and you can have an improved (YT)Music (Desktop) Feeling. I'll /close this for now. Feel free to reopen it, if you've still trouble with connecting!


Zend\Ldap\Dn::isChildOf - should it be case insensitive?

Before I start, I should mention I'm connecting to AD.
I'm trying to get the children of a given Node retrieved via an LDAP connection but if there's even a slight discrepancy between any part of the child and parent node's Dn, in terms of case, it will throw an exception: "0x50 LDAP connection is not responsible for given node".
My question is: is this intended? I was under the impression the values were case insensitive. What am I missing?
I'd just like to mention I'm not referring to the attributes, 'dc' or 'DC' is fine; it's just their values.
Easily reproducible by changing the case of the baseDn in the config and attempting to call getChildren() from one of the Nodes retrieved via the connection and attach said connection to the nodes returned.

This issue has been closed as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Update EventToCommand param passing when community toolkit ships 1.4

x-ref: https://github.com/CommunityToolkit/Maui/issues/569 &  https://github.com/CommunityToolkit/Maui/pull/665

coming in 1.4.2

released in v1.4.2


Allow WSL to recognize Windows path names?

A useful feature of the windows command prompt is to be able to copy and paste the path from the file explorer into the command prompt and then change directories using cd. Right now, there doesn't seem to be a way to do this in WSL, besides manual entering. Could you maybe consider adding a feature for WSL to recognize windows paths and convert them to linux paths?

Definitely an interesting idea, I agree it'd be nice if there was a tool inside WSL that could translate a windows path.  I'd suggest filing a request on our User Voice page for this.

If anyone wants a workaround, here's a quick hack that achieves this purpose:
https://gist.github.com/aseering/a06219e74c7f96ccea5ec65d5b2483b5
Use as, for example:
$ ls "$(winpath.sh $'C:\Program Files\Windows NT')"
Accessories  TableTextService

The script treats the Windows path as case-sensitive; that wouldn't be especially hard to fix, but it'd take more than a simple sed one-liner :-)

hi @aseering I have very basic skills: how to apply your workaround and have the auto conversion from "C:\Users\me\Documents\GitHub" to "/mnt/c/Users/me/Documents/GitHub".
Thank you

Babun shell has such a helper built in, though it uses a different prefix (/cygdrive/).

Don't do this. It is one of my main issues with cygwin. Sometimes it works, sometimes it does not. Maybe some programm you are calling has some bugs or does not understand the unix or windows path format and you are never quite sure which one works.
Stay consistent. Stay with Ubuntu userland. Unix paths. Don't do some half baked compatibility layer in between that translates Windows paths.

I agree, don't make the terminal recognize Windows paths by default.
Instead I'd like to see a tool like cypath that can be used to convert Windows paths into the correct WSL counterparts. Maybe a fork of cygpath?
Using regular expression to replace slashes with backslashes and /mnt/x with x: won't be enough though. You also need to handle the special directories that are mounted within lxss:
LXSS = C:\Users\<WINUSER>\AppData\Local\lxss
/mnt/d -> D:
/mnt/D -> <LXSS>\mnt\D
/home/<NIXUSER> -> <LXSS>\home\<NIXUSER>
/root -> <LXSS>\root
/usr -> <LXSS>\rootfs\usr

Having a standard tool that always does the correct mapping would be the best option here. Then it can be used in a subshell to convert Windows path to WSL (or back) in the middle of the command, if and when needed.

Although a convert utility like cygpath.exe would be handsome, I'd like it much better if the WSL kernel functions (exec..., chdir, ...) could just accept valid windows paths (if there is no directory named C:, etc. in the current location) - cygwin allows this.
As this feature might add an ambiguity, it should be possible to enable or disable this behavior.
(Cygwin only allows to warn about Windows-style paths ((no)dosfilewarning), but I think it should be possible to disable the feature completely.)

This bugs for quite some time now. Strange that this is still open. I just tried out the new VS 2017 build linux command line tools feature using WSL itself as gdbserver and compiled this:
https://gist.github.com/larsonmars/bf9b691c359bbd4be31e1e1e36277bbf
worked for me, but there should be a better option...

An equivalent of cygpath is suggested on uservoice. Vote for it there!
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/19380883-small-collection-of-official-wsl-utilities-akin-to

Windows Insider Build 17046 contains new 'wslpath' functionality that supports path translations. See the release notes for more details.

how use wslpath to make WSL to recognize Windows path names?
Thank you

@aborruso , from the release notes mentioned above:
   wslpath usage:
     -a    force result to absolute path format
     -u    translate from a Windows path to a WSL path (default)
     -w    translate from a WSL path to a Windows path
     -m    translate from a WSL path to a Windows path, with ‘/’ instead of ‘\\’

     EX: wslpath ‘c:\users’

@aborruso, AFAIK there is no such utility yet. Issue #1501 may be of interest.

I know that issue, but it's closed.
Thank you for all

No, it's not closed sorry and thank you again

I hope wsl can support this feature:
I drag a file into wsl bash terminal (maybe it is running tmux), for example: c:\test\test.py, then wsl will automatically show /mnt/c/test/test.py
do not let wsl bash terminal support c:\test\test.py,  that could cause unknown security issue!

If you want to change to a directory using a #Windows10 style path in a #WSL console, you can define the following alias in your ~/.bashrc file:
alias cdw='f(){ cd  wslpath $1; unset -f f; }; f'
After restarting your terminal, you can do:
$ cdw "c:\the\windows\target\path"

@rcpacheco's alias fails with -bash: cd: too many arguments.  Markdown ate the backticks.  Fix:
alias cdw='f(){ cd `wslpath $1`; unset -f f; }; f'

Why go through all this trouble?
Declare it as a function in the first place

cdw() { cd "$(wslpath "$1")"; }

You can also do error handling like the normal cd; your alias is much more fragile

wslpath works only for C:\ and D:

How to make it work for other drives also??

$ wslpath 'F:\DCIM\Camera\20190725_091348.jpg'
/mnt/f/DCIM/Camera/20190725_091348.jpg

You obviously are not using the official wslpath (>= 17046, mine is [Version 10.0.18363.836]).
Or maybe your path does not exist (in my instance/version, the path does not exist)

It is an external hard drive and mounting it worked perfectly.
Thanks  !!


Fix code action diagnostics

Fix for https://github.com/TypeFox/monaco-languageclient/issues/351
also fix for https://github.com/TypeFox/monaco-languageclient/issues/293

@CGNonofr will do this tomorrow and then see that release gets out.

Thank you!


Herokuish switch broke several of my apps

       Traceback (most recent call last):
         File "/app/.heroku/python/bin/sentry", line 9, in <module>
           load_entry_point('sentry==7.7.0', 'console_scripts', 'sentry')()
         File "/app/.heroku/python/lib/python2.7/site-packages/sentry/utils/runner.py", line 448, in main
           initializer=initialize_app,
         File "/app/.heroku/python/lib/python2.7/site-packages/logan/runner.py", line 191, in run_app
           configure_app(config_path=config_path, **kwargs)
         File "/app/.heroku/python/lib/python2.7/site-packages/logan/runner.py", line 127, in configure_app
           allow_extras=allow_extras, callback=settings_callback)
         File "/app/.heroku/python/lib/python2.7/site-packages/logan/importer.py", line 37, in install
           sys.meta_path.append(LoganImporter(name, config_path, default_settings, **kwargs))
         File "/app/.heroku/python/lib/python2.7/site-packages/logan/importer.py", line 52, in __init__
           self.validate()
         File "/app/.heroku/python/lib/python2.7/site-packages/logan/importer.py", line 66, in validate
           raise ConfigurationError(unicode(e), exc_info[2])
       logan.importer.ConfigurationError: (u"[Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/app']", <traceback object at 0x7fe48e0f9320>)

Without a bit more information, we're not able to help debug your issue. Can you provide more the information we request in our CONTRIBUTING.md?

Unfortunately, I don't think we have enough to go on here. I can confirm that /tmp exists is and is world-writeable in the herokuish image
# dokku/node-js-app is a built out dokku app image based on gliderlabs/herokuish:latest
root@dokku:~# docker run -ti dokku/node-js-app bash
root@1fac915d934a:/# ls -lad /tmp /var/tmp /usr/tmp /app
ls: cannot access /usr/tmp: No such file or directory
drwxr-xr-x 12 u19030 u19030 4096 Sep 22 15:53 /app
drwxrwxrwt 10 root   root   4096 Sep 22 00:33 /tmp
drwxrwxrwt  2 root   root   4096 Apr 10  2014 /var/tmp
root@1fac915d934a:/# su - u19030
u19030@1fac915d934a:~$ touch /tmp/testfile && echo $?
0

A cursory googling points to permissions or disk space issues....

I spent some time digging around the image and couldn't figure out why it was reporting problems.  I ended up re-running make install for dokku and doing a git push to re-build all my images.  After the second time they came up without issues.


Date() does not work as expected

From @moserc on February 26, 2018 17:25
Issue
Date() does not return correct Timezone Offset unless the app is restarted in the new Timezone.
Creating the Issue
When I am running a Nativescript app in my local timezone, Date() correctly returns:
Mon Feb 26 2018 11:54:27 GMT-0500 (EST)

If I change to CST timezone without restarting the app, Date() returns the correct Timezone but incorrect Timezone Offset:
Mon Feb 26 2018 11:55:45 GMT-0500 (CST)

If I shut down the app and restart it (without changing from CST timezone), Date() correctly returns:
Mon Feb 26 2018 11:00:15 GMT-0600 (CST)

Can you please help us?
More info
Platform: Android
CLI: 3.2.1
-C
Copied from original issue: NativeScript/NativeScript#5469

From @EddyVerbruggen on February 26, 2018 19:6
Googling this a little, I wouldn't be surprised if this is a bug in V8 rather than NativeScript.

From @NathanaelA on February 26, 2018 21:32
An easy way to see would be to run the latest version of Chrome, and do the same JS test.
console.log("", new Date());
-- Change time zone
console.log("", new Date());
This would tell you if it is a bug in V8 vs a NativeScript issue.

Now to get you going; rather than use new Date() in NativeScript  you can call the native Java Date method and get it directly from the OS; rather than from JavaScript/NativeScript.

@moserc I am suspecting that the V8 caches the device locale upon initialization, and is not notified of time zone changes. Perhaps there is no such mechanism in V8. Node.js and Chrome would likely inhibit similar behavior.

@NickIliev your workaround is good for now but we are actually trying to use the momentjs library which seems to be broken in the same way......
@Pip3r4o We used Angular JS to test Date() with Chrome and it seems to work as expected both on my PC and Android device.
html:
<button (click)="refreshDate()" type="submit" >Refresh Date</button>
<label >{{date}}</label>

codebehind:
refreshDate() {
  this.date = Date();
}

Does this show that V8 is working correctly?
"You can tell when someone's been a programmer for a while because they develop a deep-seated fear of time zone problems." --Randall Munroe, xkcd 1883

@moserc
After closer inspection, it seems that there is a notification mechanism in V8 - static void DateTimeConfigurationChangeNotification(Isolate* isolate);.
In Android you can have an intent filter for a time-zone change, however, you'd have to register a broadcast receiver whose implementation will invoke the v8 notification.
I suppose what we could help with from our end is to expose the V8 time zone change notification statically to Java, which NativeScript developers will be able to call at their own discretion.
Right now we can't commit to any ETA on when that will be available.

@Pip3r4o In an effort to clarify, our app does not necessarily need to be notified of a timezone or DST change.  However, we would like the correct timestamp to be available whenever we call Date().  It seems to me that Date() should work the same if called from a webpage on Chrome or if called from a Nativescript app, and it does not.  It seems to work perfectly on a webpage.
Maybe this does not change anything since I do not know the underlying implementation of the Date() function on Nativescript but I wanted to make sure you understand the problem we are experiencing.

There are no underlying Nativescript specifics as far as the Date object is concerned - it comes straight from the V8 engine. I don’t see a straightforward way for us to implement the automatic time zone change notifier.
In the case of the Chrome browser - it’s coded in the Chrome implementation. Chrome being an app that embeds the V8 engine. Similarly, a NativeScript application will have to notify of the time zone change. The way to go is using a broadcast listener in Android, hence my proposal to expose the V8 notification API to Java.


[fix] Fix mem leak in Single API

Destroy ml_tensors_info_h in ml_single_close
Call gst_tensors_info_free

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #344. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


Cleanup static table definitions to be more concise and typesafe.

Summary of the changes / Why this improves CrateDB
Checklist

[ ] User relevant changes are recorded in CHANGES.txt
[x] Touched code is covered by tests
[x] Documentation has been updated if necessary
[x] CLA is signed
[x] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

retest this please


Assets publishing with 'forceCopy' => true causes redundant trailing characters

Environment: Windows 8 + Vagrant (Ubuntu 14.04)
Web-server: nginx 1.4.6 + php-fpm 5.5.9
When I have added to the main-local.php next config:
       'assetManager' => [
            'class' => 'yii\web\AssetManager',
            'forceCopy' => true,
        ],

and started to develop my JS asset. Before that, I removed web/assets/<hash> each time I wanted to check my code. At first force-copy after the config modification I found, that my JS was crashed with the error: Uncaught Syntax Error: Unexpected Token ILLEGAL
I opened the JS file in the new tab and found this:

The first what I checked in the original file was line breaks and encoding - and they was correct: LF
and UTF-8. Also, both of the files have the same MD5 hash:
$ md5sum assets/js/hiSelect2.js web/assets/5bb2af66/js/hiSelect2.js
f86602ecb7ca0fb06a0c68bd2c4648ff  assets/js/hiSelect2.js
f86602ecb7ca0fb06a0c68bd2c4648ff  web/assets/5bb2af66/js/hiSelect2.js

Here if the hexdump of the tail of the file (and it if the same with the original file):
$ hexdump -C web/assets/5bb2af66/js/hiSelect2.js | tail
00000b60  7d 2c 0a 09 09 09 6f 6e  43 68 61 6e 67 65 3a 20  |},....onChange: |
00000b70  66 75 6e 63 74 69 6f 6e  20 28 65 29 20 7b 0a 09  |function (e) {..|
00000b80  09 09 09 72 65 74 75 72  6e 20 66 61 6c 73 65 3b  |...return false;|
00000b90  0a 09 09 09 7d 2c 0a 09  09 09 73 6f 6d 65 54 65  |....},....someTe|
00000ba0  73 74 45 76 65 6e 74 3a  20 66 75 6e 63 74 69 6f  |stEvent: functio|
00000bb0  6e 20 28 65 29 20 7b 0a  09 09 09 09 63 6f 6e 73  |n (e) {.....cons|
00000bc0  6f 6c 65 2e 6c 6f 67 28  27 79 65 61 68 21 27 29  |ole.log('yeah!')|
00000bd0  3b 0a 09 09 09 7d 0a 09  09 7d 0a 09 7d 29 3b 0a  |;....}...}..});.|
00000be0  7d 29 3b 0a                                       |});.|
00000be4

I found, that the � characters appears at the end only if I am adding the text to the JS file.
I've found the only way to fix this:
in the yii\helpers\BaseFileHelper.php:279 before copy($from, $to) add this:
                    if (is_file($to)) {
                        unlink($to);
                    }

I have found, that this bug reproduces only in the shared with Windows folders!
If i move the project out of shared with the host folder, the problem does not appears.
So, the way to reproduce:

start the Vagrant WM with the web-server and shared with the host folder;
put the gist https://gist.github.com/SilverFire/1ee2fa3734571153cb1c
put the file test.js near to the php file;
run the app, check in the web-browser, if the JS in test_copy.js is OK;
add some lines to the test.js;
run the app again, find the � characters at the end.

WTF?!

Maybe post this to the https://github.com/mitchellh/vagrant/issues ?

Or even this:
vim test.js (add some lines)
cp test.js test2.js
vim test.js (add some lines again)
cp test.js test2.js

Will result in a fail!

This issue is out of framework scope. We can not bypass it.

The solution was found and added to the vagrant docs: https://docs.vagrantup.com/v2/synced-folders/virtualbox.html


improving dataset_query to add several metadata information

The dataset_query can already be helpful for the creation of dataset json files including the filling of metadata
Cross-section is a caveat since the information doesn't exist in one place.

Additional dictionary class added in parameters which includes a large number of cross-sections used for BTV commissioning
Suggestions are welcome if yaml is more suitable for cross-section (easier to import it in dataset_query if it is dictionary)

To Do:

[ ] Preparing documentation on how to use the dataset_query
[x] Test out in different conditions
[x] Populate xsection.py with cross-section jsons from 2016, 2017 and 2018 MC samples. At the moment, only 13.6 TeV cross-sections exists

This PR is now ready to be reviewed and merged.
Plans for future:

Try to read cross-section from a metadata

Thanks @uttiyasarkar this looks good to me!


new(ci): added gha workflow.

What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
What this PR does / why we need it:
Porting of CI to gha.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:

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

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

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

Running tests on arm64 is a bit cumbersome and fails because of: https://github.com/golang/go/issues/29948.
I will skip tests on arm (perhaps we could also skip build since it takes so long?)

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

Needs approval from an approver in each of these files:

OWNERS [FedeDP,leogr]

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


DateTime serialization/deserialization issue

Current automated serialization/deserialization of the DateTime object is severely broken. What causes inability to serialize and deserialize an object. What causes trouble with different internal mechanisms of PHP like sessions, etc.

This ticket has revealed the problem with JSON serialization mechanics


Commit build status not updating (intermittent)

Gitea version (or commit ref): 1.14.0+dev-414-g4ef751215
Git version: 2.20.1
Operating system: Debian based
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Description
Occasionally one of my Drone builds will not update it's status properly, leaving the commit as "Build in progress" with the yellow circle, when actually checking Drone it shows "Successful", or "Failed".
This only happens occasionally, the only pattern I can see is its only been for PR's so far, and also when the server is under heavy load. I first noticed when I ran "update branch" on 4 PR's at the same time, each calls 2 builds, so I have many builds queued.
From the logs, the error seems to be a SQL duplicate value in the unique index.
[17/Dec/2020:09:27:30 +0000] "GET /api/v1/repos/xxxx/xxxx/raw/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8/.drone.yml HTTP/1.1" 200 2553 "-" "Go-http-client/1.1"
[17/Dec/2020:09:27:30 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 201 638 "-" "Go-http-client/1.1"
[17/Dec/2020:09:27:31 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 201 636 "-" "Go-http-client/1.1"
[17/Dec/2020:09:45:09 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 201 638 "-" "Go-http-client/1.1"
[17/Dec/2020:09:45:22 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 201 636 "-" "Go-http-client/1.1"
[17/Dec/2020:09:50:59 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 201 636 "-" "Go-http-client/1.1"
[17/Dec/2020:09:50:59 +0000] "POST /api/v1/repos/xxxx/xxxx/statuses/a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8 HTTP/1.1" 500 375 "-" "Go-http-client/1.1"

2020/12/17 09:50:59 ...pi/v1/repo/status.go:64:NewCommitStatus() [E] CreateCommitStatus: NewCommitStatus[repo_id: 1, user_id: 1, sha: a12437fc1f5b4153a3e25f9b8d82a39d
20b7e7e8]: Insert CommitStatus[/home/git/gitea-repositories/xxxx/xxxx.git, a12437fc1f5b4153a3e25f9b8d82a39d20b7e7e8]: Error 1062: Duplicate entry '5-1-a12437fc1f5b
4153a3e25f9b8d82a39d20b7e7e8' for key 'UQE_commit_status_repo_sha_index'

Looking at how the index is generated, I'm guessing two status updates came in simultaneously and both generated the same value? Maybe a lock on the db table is needed during index increment?
https://github.com/go-gitea/gitea/blob/4aabbacdfe2830e3b3808e42d6d89d6688754089/models/commit_status.go#L220-L240
I notice that file has been updated yesterday, but looking at the code it looks like the index is still generated the same way. I will update my gitea anyway and keep an eye on things. Just happened again on latest master. I've updated Gitea version above.

I've managed to recreate this on my dev instance using a script to fire simultaneous commit updates at the API.
Interestingly it didn't trigger the error when using sqlite3, however when I switch to mariadb10.3 it happens.
I used bash script:
n="test" c=0 ; while [ "$c" -lt 10 ] ; do ((c=c+1)) ; (curl -X POST "http://localhost:3000/api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"context\": \"test\",  \"description\": \"$n $c\",  \"state\": \"pending\",  \"target_url\": \"http://localhost\"}" &) ; done

Which gives:
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33530
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33540
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33536
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33550
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33546
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33570
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33554
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33558
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33562
gitea_1         | 2020/12/24 17:53:33 Started POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b for <IP_ADDRESS>:33566
gitea_1         | 2020/12/24 17:53:34 ...pi/v1/repo/status.go:64:NewCommitStatus() [E] CreateCommitStatus: NewCommitStatus[repo_id: 1, user_id: 1, sha: 11616565f5b0d4491a0e06140b070215f53643e7]: Insert CommitStatus[/src/data/git/gitea-repositories/test/test3.git, 11616565f5b0d4491a0e06140b070215f53643e7]: Error 1062: Duplicate entry '62-1-11616565f5b0d4491a0e06140b070215f53643e7' for key 'UQE_commit_status_repo_sha_index'
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 342.516088ms
gitea_1         | 2020/12/24 17:53:34 ...pi/v1/repo/status.go:64:NewCommitStatus() [E] CreateCommitStatus: NewCommitStatus[repo_id: 1, user_id: 1, sha: 11616565f5b0d4491a0e06140b070215f53643e7]: Insert CommitStatus[/src/data/git/gitea-repositories/test/test3.git, 11616565f5b0d4491a0e06140b070215f53643e7]: Error 1062: Duplicate entry '62-1-11616565f5b0d4491a0e06140b070215f53643e7' for key 'UQE_commit_status_repo_sha_index'
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 447.751879ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 323.652796ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 351.012977ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 370.496669ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 383.056226ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 498.687752ms
gitea_1         | 2020/12/24 17:53:34 ...pi/v1/repo/status.go:64:NewCommitStatus() [E] CreateCommitStatus: NewCommitStatus[repo_id: 1, user_id: 1, sha: 11616565f5b0d4491a0e06140b070215f53643e7]: Insert CommitStatus[/src/data/git/gitea-repositories/test/test3.git, 11616565f5b0d4491a0e06140b070215f53643e7]: Error 1062: Duplicate entry '66-1-11616565f5b0d4491a0e06140b070215f53643e7' for key 'UQE_commit_status_repo_sha_index'
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 501.800019ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 415.291119ms
gitea_1         | 2020/12/24 17:53:34 Completed POST /api/v1/repos/test/test3/statuses/11616565f5b0d4491a0e06140b070215f53643e7?access_token=513b2ed758ca2ba520dd0209beb6ab594317880b 0  in 425.528454ms

I'm still thinking a lock on the db table would solve this.
Or maybe the index field could be auto increment? I'm not sure why there is an index field?
Looking at the xorm docs it looks like sess.ForUpdate() https://gitea.com/xorm/xorm/src/branch/master/session.go#L243 may be the solution but I'm not sure how I specify the table to lock or would it lock the whole db? I will have a play with this now and report back.

So with sess.forUpdate() called soon after sess is created, it changes the error from Error 1062: Duplicate entry to Error 1213: Deadlock found
gitea_1         | 2020/12/24 18:15:06 ...pi/v1/repo/status.go:64:NewCommitStatus() [E] CreateCommitStatus: NewCommitStatus[repo_id: 1, user_id: 1, sha: 11616565f5b0d4491a0e06140b070215f53643e7]: NewCommitStatus[/src/data/git/gitea-repositories/test/test3.git, 11616565f5b0d4491a0e06140b070215f53643e7]: Error 1213: Deadlock found when trying to get lock; try restarting transaction

I guess I could catch that error and recall the NewCommitStatus function? Though why not just catch duplicate entry error and retry.
It doens't look like x.ForUpdate() is uses anywhere else in Gitea codebase? I fear using it here might make deadlock errors start appearing elsewhere!?
Not sure I know what I'm doing enough to solve this one.
Maybe using an autoincrement index may be better?

It looks like the index field is just used to get the first/last or order the commit statuses for a specific commit? But I'm not sure.
If this is the case, then we could do this using the id field which is already autoincrement. Doesn't matter if its not contiguous or starts from 1.
We could remove the index field then.  Probably break all sorts! :/

sess.ForUpdate() only support MySQL but not all databases Gitea supported.

OK, so sess.ForUpdate() is out of the question then.
So I think maybe the solution is to check for Error 1062: Duplicate entry and if so retry?
How would I test for that error, err.code==1062 or err=='Error 1062: Duplicate entry' or something? Sorry excuse my poor Go.

But this is only for mysql, for other database it will return different error. Maybe we could just retry serval times one returned error as a temporary solution.

OK. I think I would be able to make a retry loop, say 3 to 5 times perhaps? maybe with a couple hundred miliseconds delay between retries?
Though as you say it feels like a temporary workaround.
I'm tempted to remove that index column, and refactor the sorting to use the id column.

The index column could be used to know the sequence for commit statuses of one commit. Maybe we should not remove it.

Yes.  But the same sequence can also be known by ordering by the id field.
MariaDB [git]> select id,`index`,sha,state from commit_status where sha='f0e325d9a81450c3f5a81249d19149a74d5e85c9' order by `index`;
+------+-------+------------------------------------------+---------+
| id   | index | sha                                      | state   |
+------+-------+------------------------------------------+---------+
| 1905 |     1 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1906 |     2 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1907 |     3 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | failure |
| 1912 |     4 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1913 |     5 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1914 |     6 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | error   |
+------+-------+------------------------------------------+---------+
6 rows in set (0.000 sec)

MariaDB [git]> select id,`index`,sha,state from commit_status where sha='f0e325d9a81450c3f5a81249d19149a74d5e85c9' order by `id`;
+------+-------+------------------------------------------+---------+
| id   | index | sha                                      | state   |
+------+-------+------------------------------------------+---------+
| 1905 |     1 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1906 |     2 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1907 |     3 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | failure |
| 1912 |     4 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1913 |     5 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | pending |
| 1914 |     6 | f0e325d9a81450c3f5a81249d19149a74d5e85c9 | error   |
+------+-------+------------------------------------------+---------+
6 rows in set (0.001 sec)

If this is its only use then I could refactor to use id. If there needs to be a contiguous counter starting from 1 then this could be calculated when looping through the results.

If there is another reason for the index field then this of course is not feasible.
It gives me another idea though. We could insert the record with a null index, then select all records for that sha order by id, loop through counting and update any with null index to the correct index count.
Again seems a bit of a kludge. There is a possibility the table will be queried from elsewhere while a row has a null index.

I've removed index and refactored accordingly, everything builds and drone integration still works fine :) I will create PR so we can review there.

We are running into this issue as well on our postgres-backed Gitea. Thanks for working on a solution, @bobemoe! For now, our calling script has baked in delayed retries to try and avoid this.
Sorting by ID does seem like a good workaround. There's also already timestamps for created/updated which could be guaranteed to be sortable, regardless of the backing database server type.

We are running into this issue as well on our postgres-backed Gitea. Thanks for working on a solution, @bobemoe! For now, our calling script has baked in delayed retries to try and avoid this.
Sorting by ID does seem like a good workaround. There's also already timestamps for created/updated which could be guaranteed to be sortable, regardless of the backing database server type.


Fixed #28674 -- Removed unused check in QuerySet._batched_insert().

https://code.djangoproject.com/ticket/28674

Not sure if we have tests for this but one subtle difference here is that the bool(objs) check performed in bulk_create is done before the objs is converted to a list. This can change the behavior a bit when passing a generator to bulk_create.

e.g.
Author.objects.bulk_create(
    Author(name=f"name-{index}") for index in range(100)
)

Would pass the if objs in bulk_create. I suggest we move the if objs check there after the objs = list(objs) call.

I'm not understanding your point. As far as I can see, the relevant checks are if objs_with_pk and if objs_without_pk which couldn't be generators. https://github.com/django/django/blob/27193aea0088b238e3ee0f0f235364a34a09265c/django/db/models/query.py#L451-L464

@timgraham I missed the if objs_with_pk and if objs_without_pk checks, please ignore my comment.


feat(draft2019-09): upgrading jsonschema to support draft2019-09

WIP, just added the basline test data so we can start on the actual implementation.

Added note, will split this up between adding the updated tests and then the implementation as a separate PR.

Obliterating this PR in favor of the saner ones.