requirements.txt is out of date

Attempting to install the requirements, I get the error that mkl-random 1.1.1 cannot be found.
Attempting to change the requirements to mkl-random==1.2.1 leads to issues with tensorflow-gpu-estimator for which I cannot find a remedy for.

There are a few packages that are no longer available, making this not able to be installed.
I know mkl-random is one of them. I'm also having issues with

requirements.txt has been fixed now. Make a pull request to update your forked branch and then try it out.
In case you face another issue then try installing all packages in the req.txt file instead.


Can't add padding to top of bottomsheet

Describe the bug
When using material navigations ModalBottomSheetLayout you can't add padding to just the top of a bottomsheet. When you add padding it pushes all the contents down, which is problematic when you are using a transparent status bar in edge-to-edge mode. There should be a way to ONLY add a padding to bottom sheets and not the entire layout.
@jossiwolf said that this may be a material bug, but I'm posting here just to make sure it's tracked.

This is definitely a material bug as there seems to be no way of setting different padding values for the sheet and the content. This greatly affects the transparent navigation bar too as in landscape the sheet is drawn behind it and if you have rounded corners, they are also going to be behind the navbar. A workaround for now seems to be setting the sheet's background color to transparent and applying a surface to the sheet content directly where you can set the padding any way you want it.

Well, apparently my "Waiting on Dependency" stale-label-exclusion rule didn't work 🙈

I recently encountered this issue and a workaround was setting Modifier.fillMaxHeight(fraction = 0.9f) for sheet content, this way isn’t exactly what you wanted(padding) but neither messes with anything like elevations, etc…

Any new on this?
I looked at the code an it could be solved quite easily by exposing a sheetModifier, but the problem is to support that, there is also a minor change in the material library required,
This is the changes required in com.google.accompanist.navigation.material.BottomSheet:
public fun ModalBottomSheetLayout(
    bottomSheetNavigator: BottomSheetNavigator,
    modifier: Modifier = Modifier,
    **sheetModifier: Modifier = Modifier,**
    sheetShape: Shape = MaterialTheme.shapes.large,
    sheetElevation: Dp = ModalBottomSheetDefaults.Elevation,
    sheetBackgroundColor: Color = MaterialTheme.colors.surface,
    sheetContentColor: Color = contentColorFor(sheetBackgroundColor),
    scrimColor: Color = ModalBottomSheetDefaults.scrimColor,
    content: @Composable () -> Unit
) {
    ModalBottomSheetLayout(
        sheetState = bottomSheetNavigator.sheetState,
        sheetContent = bottomSheetNavigator.sheetContent,
        modifier = modifier,
        **sheetModifier = sheetModifier,**
        sheetShape = sheetShape,
        sheetElevation = sheetElevation,
        sheetBackgroundColor = sheetBackgroundColor,
        sheetContentColor = sheetContentColor,
        scrimColor = scrimColor,
        content = content
    )
}

And the changes required in androidx.compose.material.ModalBottomSheet:
fun ModalBottomSheetLayout(
    sheetContent: @Composable ColumnScope.() -> Unit,
    modifier: Modifier = Modifier,
    **sheetModifier: Modifier = Modifier,**
    sheetState: ModalBottomSheetState =
        rememberModalBottomSheetState(Hidden),
    sheetGesturesEnabled: Boolean = true,
    sheetShape: Shape = MaterialTheme.shapes.large,
    sheetElevation: Dp = ModalBottomSheetDefaults.Elevation,
    sheetBackgroundColor: Color = MaterialTheme.colors.surface,
    sheetContentColor: Color = contentColorFor(sheetBackgroundColor),
    scrimColor: Color = ModalBottomSheetDefaults.scrimColor,
    content: @Composable () -> Unit
) {
    // b/278692145 Remove this once deprecated methods without density are removed
    val density = LocalDensity.current
    SideEffect {
        sheetState.density = density
    }
    val scope = rememberCoroutineScope()
    val orientation = Orientation.Vertical
    BoxWithConstraints(modifier) {
        val fullHeight = constraints.maxHeight.toFloat()
        Box(Modifier.fillMaxSize()) {
            content()
            Scrim(
                color = scrimColor,
                onDismiss = {
                    if (sheetState.anchoredDraggableState.confirmValueChange(Hidden)) {
                        scope.launch { sheetState.hide() }
                    }
                },
                visible = sheetState.anchoredDraggableState.targetValue != Hidden
            )
        }
        Surface(
            **sheetModifier**
                .align(Alignment.TopCenter) // We offset from the top so we'll center from there
                .widthIn(max = MaxModalBottomSheetWidth)
                .fillMaxWidth()
....

The changes needed are marked with ** as I could not make it bold in a code block.

With the release of Compose Material 1.7.0-alpha04, the Material team has added a new artifact: androidx.compose.material:material-navigation, which fully replaces Accompanist Navigation Material.
As such, we are closing all issues here on Accompanist and will be fully deprecating Accompanist Navigation Material in an upcoming release.
A number of issues were fixed as part of the migration, but if you're still seeing an issue, please file an issue with a sample project that reproduces your issue and the Material team will take a look.


Create builder_cache repo before first build

The code works throwing warning if we do not create one, as pushing cache after the first build automatically creates one, but would be safer to build before using a small script.

Todo : mark as good first issue

Todo : mark as good first issue

Done.

Hey @ashpect! Should I give this a try?

Is this related to this: https://github.com/metacall/builder/pull/38 ?

@viferga I am not sure, is this the reason why the CI is failing in #38 ? @ashpect can you please elaborate this issue a bit more or maybe point me out to some resource to look into to better understand this

no this is not related to #38. the idea here is simple , basically when you initiate the registry, it doesn't have any repo inside obviously, now this isn't a issue if you push a image to a repo not existing (a repo is created by default when you push and it doesn't exist), the issue comes if you pull, it will throw error obviously.
Now if you look at builder.sh, to make things generic we have added both export and import registry https://github.com/metacall/builder/blob/f4b524da6a7ac18a7a66cbc1f9e36d7c19c736a4/scripts/builder.sh#L28
Now take a look at test.sh, the startup tests don't need to pull anything as it's the startup when we push everything, but we still give some import registry cause we need to parse into Dockerfile.
And it isn't a breaking change and ci works fine anyways, it just throws an error that cache import from this repo failed an continues with the command and etc.
So it will be good and overall solid code  if we have some way to either add a repo initialisation command which can then be triggered after setup and takes both export and import registry as arguments cause even if it doesn't break now, in future it might if buildkit decides to makes this error as major terminated error and its anyways good to write a whole clean flow without errors.

It's a standalone minor issue, nothing breaking so you can try it if you want and let me know if you have any further questions. @SaranshBaniyal

should I modify setupRegistry() in test.sh to initialize the import registry for builder_startup so that it doesn't throw the cache warning?

@ashpect should I call the initialize function from within the setupRegistry() function or should I call it in startupTests(). Which one would make more sense?

Since buildkit takes import reg in all arguments, it would be better to iniialize it when you create registry, inside setupRegistry

@SaranshBaniyal Since buildkit takes import reg in all arguments, it would be better to iniialize it when you create registry, inside setupRegistry

Get "https://registry:5000/v2/": dial tcp: lookup registry on <IP_ADDRESS>:53: server misbehaving```
I am getting this while testing with my solution, do you have any idea what might be causing this.
Here is a snippet of my solution:

setupRegistry(){
${DOCKER_CMD} up -d registry

while [ ! "$(docker inspect --format '{{json .State.Health.Status }}' metacall_builder_registry)" = "\"healthy\"" ]; do
	sleep 5
done

# To Pre-initialize Import and Export Registry
initializeRegistry "registry:5000" "metacall/builder_startup"
initializeRegistry "registry:5000" "metacall/builder_cache"

}
initializeRegistry() {
local registry=$1
local repo_name=$2
docker pull busybox
docker tag busybox ${registry}/${repo_name}:dummy
docker push ${registry}/${repo_name}:dummy

}


Accessing annotation state in headless mode

I am sorry I am probably missing something very basic but nevertheless here is my problem.
I am experimenting with annotorious-openseadragon in headless mode. How do I get annotation's new coordinates after moving selection to a new position or changing it's shape by dragging one of the corners? Simply using something like the snippet below  returns coordinates the annotation was initially loaded with. How do I get updated position?
annotations= anno.getAnnotations()
coords_string = annotations[0].target.selector.value
console.log(coords_string)

getAnnotations() will return the updated state only after the annotation was 'saved', which is after the user has de-selected it. If you want to track the live state of the current selection:

The changeSelectionTarget event will fire if the user moves/changes the shape
I'd need to double-check myself, but: I believe anno.getSelected() will also return the live state of the current selection.

Thank you very much.  I am now able to successfully track selection box's current state with changeSelectionTarget event.
Allow me to ask your advice on one more problem. One of the tasks I am trying to accomplish is to prevent users from dragging selection box corners outside of actual image. For that purpose I'm trying to determine a moment when for instance x-axis coordinate for selection's top-left hits zero. To test my idea I attached experimental function (see below) to the event, but it doesn't work, that is I never get expected log output in case my test condition is formulated like this  if (parseInt(tl_x)==0), though if I change the condition to  if (parseInt(tl_x)<0) it does work. Does it mean that at no point in time the x-coordinate that gets picked up by changeSelectionTarget is actually equal to zero (i.e. the exact moment of crossing the image border can't be determined)?
anno.on("changeSelectionTarget", function(target) {
	coords_string = target.selector.value.replace("xywh=pixel:","")
	coords=coords_string.split(",")
	tl_x=coords[0]
	tl_y=coords[1]
	width=coords[2]
	height=coords[3]
        if (parseInt(tl_x)==0){
	   console.log("Hitting border!")
	 }
 });`

That's probably because of rounding issues. SVG uses float coordinates, and the coordinate is unlikely to be 0 exactly. You could either compare by <=, or do a Math.round(tl_x).

I amended my test code according to your suggestion like this
 anno.on("changeSelectionTarget", function(target) {
		  coords_string = target.selector.value.replace("xywh=pixel:","")
		  coords=coords_string.split(",")
		  tl_x=Math.round(parseInt(coords[0]))
		  tl_y=Math.round(parseInt(coords[1]))
		  width=Math.round(parseInt(coords[2]))
		  height=Math.round(parseInt(coords[3]))
          if (Math.round(parseInt(tl_x))==0){
		  console.log("Hitting border")
		  }
      });

It still doesn't work as expected, I don't get console output when I drag selection corner across image border. Also there is a discrepancy in annotorious-openseadragon behaviour I can't understand at this point. It turns out that it is already impossible to move selection box outside of image borders if I try to reposition it as a whole with crosshairs cursor (and in that case my test condition actually does get triggered  when selection box hits the border), but it is possible to move the box outside the image by changing it's shape, i.e. dragging at the corners. Is it intentional? If so what is the logic behind such discrepancy?

That's right. Moving the box is constrained to the image area. The feature didn't get fully implemented though. Therefore you can still drag box corners off the image I believe.

PS: what are you seeing when you just log the coordinates? (Not just log if 0.)

Ah - of course. Yes, that's how mouse events work after all. You'd never get exact (or continuous) values. Clear in hindsight, really. Here's the code that handles the box constraint:
https://github.com/annotorious/annotorious/blob/2.x/src/tools/rectangle/EditableRect.js#L182-L183


slice in query value

Hi,
I'd like some help with the following:
qry := "SELECT COUNT(*) FROM customers WHERE id IN {id}"
values := []any{sql.Named("id", []int{1})}
cnt, err := sq.FetchOneContext(context.Background(), sq.Log(db), sq.Postgres.Queryf(qry, values...), rowToCount)

Result:
SELECT COUNT(*) FROM customers WHERE id IN 1; err={pq: syntax error at or near "$1"}
I'd expect adding parentheses. If I have multiple values in that param, I get very similar:
SELECT COUNT(*) FROM customers WHERE id IN 1, 2; err={pq: syntax error at or near "$1"}

This is actually the correct behaviour, placeholder values are expanded in the query string according to the following logic:

If the value implements the SQLWriter interface, its WriteSQL method is called.
Else if the value is a slice, the slice is expanded into a comma separated list. <-- (this is what is happening)
Otherwise, a dialect-appropriate placeholder is appended to the query string and the value itself is appended to the args.

So you can reliably count on slices expanding into a comma separated list, and the query should be rewritten with the enclosing parentheses:
qry := "SELECT COUNT(*) FROM customers WHERE id IN ({id})"
values := []any{sql.Named("id", []int{1, 2})}
cnt, err := sq.FetchOneContext(context.Background(), sq.Log(db), sq.Postgres.Queryf(qry, values...), rowToCount)

SELECT COUNT(*) FROM customers WHERE id IN (1, 2)

It works like this because slices becoming comma separated lists is useful in more situations:
Selecting a list of fields
sq.Postgres.Queryf(
    "SELECT {fields} from {table}",
    sql.Named("fields", []any{sq.Expr("f1"), sq.Expr("f2"), sq.Expr("f3")}),
    sql.Named("table", sq.Expr("tbl")),
)

SELECT f1, f2, f3 FROM tbl

IN values
sq.Postgres.Queryf(
    "SELECT * from tbl WHERE field IN ({values})",
    sq.Named("values", []int{1, 2, 3}),
)

SELECT * FROM tbl WHERE field IN (1, 2, 3)

Function arguments
sq.Postgres.Queryf(
    "SELECT concat({args})",
    sql.Named("args", []string{"a", "b", "c"}),
)

SELECT concat('a', 'b', 'c')

If want to omit the enclosing parentheses, you can pass in something that implements the SQLWriter interface and includes enclosing parantheses, like sq.RowValue.
sq.Postgres.Queryf(
    "SELECT * from tbl WHERE field IN {rowvalue}",
    sq.Named("rowvalue", sq.RowValue{1, 2, 3}),
)

SELECT * FROM tbl WHERE field IN (1, 2, 3)

Thanks, sounds reasonable.


Hl 1132 ahjo versionid

Description :sparkles:
Includes both HL-1132 and HL-1081
The callback received from AHJO:
  "message": "Success",
  "requestId": "{123e4567-e89b-12d3-a456-426614174000}",
  "caseId": "HEL 2023-999999",
  "caseGuid": "{123e4567-e89b-12d3-a456-426614174000}",
  "records": [
    {
      "fileURI": "https://othersystem.hel.fi/file1.pdf",
      "status": "Success",
      "hashValue": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "versionSeriesId": "{123e4567-e89b-12d3-a456-426614174000}"
    },
    {
      "fileURI": "https://othersystem.hel.fi/file2.pdf",
      "status": "Success",
      "hashValue": "deadbeefabbaacdcdeadbeefabbaacdcdeadbeefabbaacdcdeadbeefabbaacdc",
      "versionSeriesId": "{321e4567-e89b-12d3-a456-426614174000}"
    }
  ]
}

which is received after a open case request was not saving the VersionSeriesIds of the records/attachments of the sent applications. VersionSeriesId is required when updating a record to match the attachment of an application to a record in AHJO.
This PR adds two new Attachment attributes, ahjo_version_series_id (for the VersionSeriesId)and ahjo_hash_value (for storing the SHA256 hash of the attachment at time when it is sent to AHJO), which are used in the callback endpoint to match the attachment and the record and save the VersionSeriesId when the endpoint is called by the callback.
The failure  callback messsage:
{
  "message": "Failure",
  "requestId": "{123e4567-e89b-12d3-a456-426614174000}",
  "records": [
    {
      "fileURI": "https://othersystem.hel.fi/file.pdf",
      "status": "Failure",
      "hashValue": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    {
      "fileURI": "https://othersystem.hel.fi/file2.pdf",
      "status": "Success",
      "hashValue": "deadbeefabbaacdcdeadbeefabbaacdcdeadbeefabbaacdcdeadbeefabbaacdc"
    }
  ]
}

is also handled by logging the failing records.
Issues :bug:
Testing :alembic:
pytest applications/tests/ahjo_integration.py::test_ahjo_callback_success
pytest applications/tests/ahjo_integration.py::test_ahjo_callback_failure
Screenshots :camera_flash:
Additional notes :spiral_notepad:

API branch is deployed to platta: https://helsinkilisa-pr2789.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2789.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://helsinkilisa-ui-pr2789.dev.hel.ninja :laughing::tada::tada::tada:

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2789.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://helsinkilisa-ui-handler-pr2789.dev.hel.ninja :laughing::tada::tada::tada:

API branch is deployed to platta: https://helsinkilisa-pr2789.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2789.dev.hel.ninja :rocket::rocket::rocket:

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2789.dev.hel.ninja :rocket::rocket::rocket:

TestCafe handler result is failed for https://helsinkilisa-ui-handler-pr2789.dev.hel.ninja :crying_cat_face::anger::boom::boom:

API branch is deployed to platta: https://helsinkilisa-pr2789.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2789.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://helsinkilisa-ui-pr2789.dev.hel.ninja :laughing::tada::tada::tada:

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2789.dev.hel.ninja :rocket::rocket::rocket:


log-viewer-webui: Update yscope-log-viewer to the latest version.

Description

Update submodule yscope-log-viewer commit id to the latest.
Update the commit id in deps-tasks.yml.
Change search parameter name logEventIdx -> logEventNum to match the schema in the updated yscope-log-viewer.
Update LOCAL_STORAGE_KEY.THEME to match the one in the updated yscope-log-viewer.

Validation performed

Referred to the validation steps at #489 , built and started the CLP package, compressed sample log files, and searched with search string "1" in the WebUI and observed file links shown for each result.
Clicked any file links and observed the log viewer opened in a new tab, loaded the file, and positioned the cursor at the desired log event.
In the log viewer, changed the theme setting to "Light". Back in the WebUI, clicked any file links and observed the in the log viewer "extracting IR" loading page, the theme changed to "Light".
Repeated step 3 for theme setting "System" and "Dark" and observed the loading page's got updated accordingly.

Rebuilt package. Compressed README. Then searched and opened log viewer. All seemed to work correctly.

Thanks for quickly reviewing this! Do you agree with the PR title?

Maybe log-viewer-webui: Update yscope-log-viewer to new implementation using clp-ffi-js ??

How about:
log-viewer-webui: Update `yscope-log-viewer` to the latest version (which uses `clp-ffi-js`).


add all contributors

chore: add all-contributors-cli
docs: add @talohana as a contributor
docs: add @Guysh9 as a contributor
docs: add contributors header

Codecov Report

Merging #20 (15d8136) into master (3d94af3) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            6         6
  Lines           61        61
  Branches         7         7
=========================================
  Hits            61        61

Continue to review full report at Codecov.

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


Layout/DotPosition auto correct failed with Infinite loop detected, also selects heredocs?

Expected behavior
When trying to auto correct a Rubocop error with Layout/DotPosition I would expect it to be fixed as it's a correctable problem. In addition I'm not sure heredocs allow the dot to be on the next line.
Actual behavior
It selects the heredocs as errors.
When running the autocorrect it corrects two cases then fails with "infinite loop detected".
Command / stack trace below:

Projects/service [dependabot/bundler/rubocop-1.22.0] » bundle exec rubocop --debug -A
For /Users/andrewmorton/Projects/service: configuration from /Users/andrewmorton/Projects/service/.rubocop.yml
Inheriting configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/gc_ruboconfig-2.28.0/rubocop.yml
configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-rspec-2.5.0/config/default.yml
configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-rspec-2.5.0/config/default.yml
Default configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/config/default.yml
configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-performance-1.11.5/config/default.yml
configuration from /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-performance-1.11.5/config/default.yml
Inspecting 322 files
... Skipping scan of 321 other files ...
Scanning /Users/andrewmorton/Projects/abacus/.pryrc
/Users/andrewmorton/.cache/rubocop_cache/6dd46ebe8c7a02683e489e4c8aa0c910f8413621/a787bfe2a02a843b5735436d51733fbf12391c24/a200cfa1c5b604bf3920cede30a3a7f1f36e80c5
.Scanning /Users/andrewmorton/Projects/service/app/business_logic/reprocess_dropped_messages.rb
C
Offenses:
app/business_logic/reprocess_dropped_messages.rb:12:40: C: [Corrected] Layout/DotPosition: Place the . on the previous line, together with the method call receiver. (https://rubystyle.guide#consistent-multi-line-chains)
LONG_STRING_AS_A_HEREDOC = <<~SQL.squish.strip_heredoc.freeze
^
app/business_logic/reprocess_dropped_messages.rb:35:41: C: [Corrected] Layout/DotPosition: Place the . on the previous line, together with the method call receiver. (https://rubystyle.guide#consistent-multi-line-chains)
ANOTHER_LONG_STRING_AS_A_HEREDOC = <<~SQL.squish.strip_heredoc.freeze
^
50 files inspected, 2 offenses detected, 2 offenses corrected
Infinite loop detected in /Users/andrewmorton/Projects/abacus/app/business_logic/reprocess_dropped_messages.rb and caused by Layout/DotPosition
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:298:in check_for_infinite_loop' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:281:in block in iterate_until_no_changes'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:280:in loop' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:280:in iterate_until_no_changes'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:249:in do_inspection_loop' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:130:in block in file_offenses'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:155:in file_offense_cache' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:129:in file_offenses'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:120:in process_file' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:101:in block in each_inspected_file'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:100:in each' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:100:in reduce'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:100:in each_inspected_file' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:86:in inspect_files'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:47:in run' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:26:in block in execute_runner'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:52:in with_redirect' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:25:in execute_runner'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:17:in run' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/command.rb:11:in run'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli/environment.rb:18:in run' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:71:in run_command'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:78:in execute_runners' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:47:in run'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/exe/rubocop:12:in block in <top (required)>' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/benchmark.rb:308:in realtime'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rubocop-1.22.0/exe/rubocop:12:in <top (required)>' /Users/andrewmorton/.rbenv/versions/2.7.2/bin/rubocop:23:in load'
/Users/andrewmorton/.rbenv/versions/2.7.2/bin/rubocop:23:in <top (required)>' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in load'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in kernel_load' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in run'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:476:in exec' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in run'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in dispatch'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:30:in dispatch' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in start'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:24:in start' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in block in <top (required)>'
/Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in with_friendly_errors' /Users/andrewmorton/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in <top (required)>'
/Users/andrewmorton/.rbenv/versions/2.7.2/bin/bundle:23:in load' /Users/andrewmorton/.rbenv/versions/2.7.2/bin/bundle:23:in '
Finished in 0.7263179998844862 seconds

Steps to reproduce the problem
With this new rule enabled I have 12 offenses of the cop above detected across multiple files. The autocorrect appears to fail after correcting all the items in the first file.
RuboCop version
Projects/service [dependabot/bundler/rubocop-1.22.0] » bundle exec rubocop -V
1.22.0 (using Parser <IP_ADDRESS>, rubocop-ast 1.12.0, running on ruby 2.7.2 x86_64-darwin20)
  - rubocop-performance 1.11.5
  - rubocop-rspec 2.5.0

This issue is a dup with #10140 and resolved by #10141. Thank you for your feedback!

And I pinned the issue #10140 until the next new version will be released.


Attribute parsing of dates isn't anchored and can't handle nil. Fails on certain dates and nil values.

If a value contains a date that isn't completely parsable by Date it still triggers the regex and then fails. It also fails if the value is nil. Looking at where it's called in Flexirest::Request#new_object that regex is reparsed and called on every non-Hash/Array object which has to be non-optimal. Date parsing is also sensitive to timezone and other localizations that would affect the outcome.
Attribute parsing should be optional on a route so the caller can handle special cases.

In Request#new_object:
      attributes.each do |k,v|
        k = k.to_sym
        overridden_name = select_name(k, overridden_name)
        if @method[:options][:lazy].include?(k)
            ...
        elsif v.is_a? Hash
            ...
        elsif v.is_a? Array
            ...
        else
          object._attributes[k] = parse_attribute_value(v)
        end
      end
      object.clean! unless object_is_class?
      object
    end

This appears to use a complex regex to test every attribute to see if it could be a date? Given how expensive regular expressions can be I think this should be an option.

You're right, I agree.  I'll change it so that it maintains the current functionality, but is easily disabled with an option, but then re-enabled with an option per mapping.

Sweet!

All done and released as 1.3.16. Documented at https://github.com/andyjeffries/flexirest#automatic-conversion-of-fields-to-datedatetime (at some point I must break the documentation down more - it's crazy long now!)

This works like a champ, btw. Thanks for fixing this so quickly!

This works like a champ, btw. Thanks a lot for making the fix so quickly!

You're welcome. Glad it works for you.


Limits not respected when authentication type is scitoken

Describe the bug
The production CERN factory crashed when the entry type was changed to auth_type="scitoken". The reason for that is that the factory does not see the idle pilots and keep submitting until the machine runs out of memory.
To Reproduce
Enable auth_type="scitoken" on one of the entry and then submit using a frontend that has both proxy and scitoken. You should see the schedd status becoming all 0 in the entry logs after the change:
Before the change:
[2023-06-13 17:00:30,179] INFO: Client CMSG-v1_0.main-arc (secid: CMSG-v1_0_cmspilot) requesting 100 glideins, max running 1713, idle lifetime 82800, remove excess 'IDLE', remove_excess_margin 5
[2023-06-13 17:00:30,182] INFO: Client CMSG-v1_0.main-arc (secid: CMSG-v1_0_cmspilot) schedd status {2: 291, 1002: 100, 1: 100}

and after the change:
[2023-06-13 17:41:54,831] INFO: Client CMSG-v1_0.main-arc (secid: CMSG-v1_0_cmspilot) requesting 100 glideins, max running 1703, idle lifetime 82800, remove excess 'IDLE', remove_excess_margin 5
[2023-06-13 17:41:54,838] INFO: Client CMSG-v1_0.main-arc (secid: CMSG-v1_0_cmspilot) schedd status {1: 0}

Expected behavior
The schedd information should be detected and the frontend limit of 100 should be applied

GlideinWMS version: 3.9.2
HTCondor version: 10.0.4 (probably not relevant)
Priority: high
Stakeholders: CMS, FactoryOps, OSG
Components: factory

I did some initial investigation but I could not figure out the root cause. I might need more time to debug, possibly tomorrow morning. I want to check if something changes when these constraint are applied here:
https://github.com/glideinWMS/glideinwms/blob/master/factory/glideFactoryLib.py#L278-L285
The function is called here:
https://github.com/glideinWMS/glideinwms/blob/master/factory/glideFactoryEntry.py#L1686
I plan to put a breakpoint before and after the call and check if the idle pilots gets filtered out (maybe the credential id of the proxy is used to submit and the filter is done based on the credential id of the scitoken?).

@mmascher I see you use v3.9.6. Did you check if PR #242 is fixing this? The symptoms are similar.

I do confirm that fixed the issue. Thanks @mambelli !


SocketException after long time POST

If i make a long time post with MultipartRequest class i get a SocketException after 70 seconds
Setting timeouts have no effect.
Steps to Reproduce
Codesnippet:
Uint8List data = .....
int contentLength = ...

DefaultHttpClientAdapter httpClientAdapter = new DefaultHttpClientAdapter();
httpClientAdapter.onHttpClientCreate = (client) {
  HttpClient client = new HttpClient();
  client.connectionTimeout = Duration(minutes: 5);
  client.idleTimeout = Duration(minutes: 5);
  return client;
};
Dio dio = Dio();
dio.httpClientAdapter = httpClientAdapter;

try {
     FormData formData = _dio_imp.FormData.from({
      "file": new _dio_imp.UploadFileInfo.fromBytes(data, "filename"),
});

final String url = ............;

var response = await dio.post(url,
         data: formData,
         options: _dio_imp.Options(
         connectTimeout: 600000,
         sendTimeout: 600000,
         receiveTimeout: 600000,
         headers: {
              HttpHeaders.contentLengthHeader: contentLength,
              "Expect": "100-continue",
          },
       ),
    );
      return response;
    } catch (error) {
      print(error.toString());
    }

The POST with curl is successful.
$ curl -v -F filenmae=@filexyz http://<IP_ADDRESS>/upload.cgi
*   Trying <IP_ADDRESS>...
* TCP_NODELAY set
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 80 (#0)
> POST /upload.cgi HTTP/1.1
> Host: <IP_ADDRESS>
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 7602006
> Content-Type: multipart/form-data; boundary=------------------------db58954d11f68cd8
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< Server: xyz/0.0.8
< Content-Length: 0
< Connection: keep-alive
* Done waiting for 100-continue
< HTTP/1.1 102 Processing
< Server: xyz/0.0.8
< Content-Length: 0
< Connection: keep-alive
< HTTP/1.1 201 Created
< Server: xyz/0.0.8
< Content-Length: 0
< Connection: close
* Closing connection 0

Logs
Exception:
SocketException: OS Error: Software caused connection abort, errno = 103, address = <IP_ADDRESS>, port = 54136

@plake876 I have the same issue, did you fix that?

No, unfortunately not.
We use the standard http packet package: http / http.dart and have a workaround for the long request
Von: Dawid Tomkalski<EMAIL_ADDRESS>Gesendet: Freitag, 21. Februar 2020 00:41
An: flutterchina/dio<EMAIL_ADDRESS>Cc: Lakemper, Peter<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Betreff: (EXT) Re: [flutterchina/dio] SocketException after long time POST (#229)
@plake876https://github.com/plake876 I have the same issue, did you fix that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/flutterchina/dio/issues/229?email_source=notifications&email_token=AKDC4BAX6BMDGRVC554G2C3RD4IHHA5CNFSM4HAO5O52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMQ36ZA#issuecomment-589414244, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKDC4BD6SJDIL2HXNXLOO2DRD4IHHANCNFSM4HAO5O5Q.


feat: support for horizontally sliced sprite sheets

Status
READY
Description
Adds support for horizontally sliced sprite sheets such as those produced by tools like the open source Goxel editor.
I haven't included any changes to the example code, but I could provide a sample horizontal sprite sheet to use in the example app if required.
Type of Change

[x] ✨ New feature (non-breaking change which adds functionality)
[ ] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 Code refactor
[ ] ✅ Build configuration change
[ ] 📝 Documentation
[ ] 🗑 Chore

Fixes: #19

sorry @wolfenrain I must admit I completely forgot to come back to this in the last year, but I'm hoping you would be ok to review this when you get a chance?


False username missing error when downloading from Lynda.com

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.11.26. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

[x] I've verified and I assure that I'm running youtube-dl 2017.11.26

Before submitting an issue make sure you have:

[x] At least skimmed through the README, most notably the FAQ and BUGS sections
[x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

[x] Bug report (encountered problems with youtube-dl)
[ ] Site support request (request for adding support for a new site)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-o', '--username', 'PRIVATE', '--password', 'PRIVATE', '%(uploader)s/%(playlist)s/(Lynda) %(playlist)s - %(playlist_index)s - %(title)s.%(ext)s', 'https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html', '-v']
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

Description of your issue, suggested solution and other information
SYSTEM

Windows 10 64-bit
CMD (cmd.exe)
youtube-dl 2017.11.26

ISSUE
Yesterday I downloaded youtube-dl and spent some time learning the command line switches and output templates. I was very happy that downloading YouTube playlists was a cinch, so I decided to see if it would work for downloading Lynda.com courses, which are essentially video playlists.
I have a personal (not corporate or 'organizational') Lynda account and was very happy to see that I was able to successfully download Lynda.com videos ... That is until I realized that it only downloaded 18 of 132 videos :(
But, there was still a bright side. The youtube-dl command line (Windows 10 CMD) output gave me this "Warning" message:

WARNING: 114 videos are only available for members (or paid members) and will not be downloaded. Use --username and --password options to provide lynda.com account credentials."

I researched the documentation here to find out examples of how to implement --username and --password. On this aspect the readme was very sparse. This is the extent of the what the help document had to say about providing credentials:

Authentication Options:
-u, --username USERNAME          Login with this account ID
-p, --password PASSWORD          Account password. If this option is left
out, youtube-dl will ask interactively.
-2, --twofactor TWOFACTOR        Two-factor authentication code
-n, --netrc                      Use .netrc authentication data
--video-password PASSWORD        Video password (vimeo, smotri, youku)

As a test, this is an example playlist I used:

https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html

I then tried to use this command, incorporating the --username and --password switches (the actual username and password have been changed for posting):
youtube-dl -o --username<EMAIL_ADDRESS>--password private.something "%(uploader)s/%(playlist)s/(Lynda) %(playlist)s - %(playlist_index)s - %(title)s.%(ext)s" https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html

But, it was to no avail. Though I no longer get "members only" warning, now I get an error that says:

Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: account username missing

Huh? WTF? What do you mean missing?? Obviously, I have indeed included the account username (my email) in the options before the URL, as indicated in the usage. So, what is going on here?? Why am I getting this seemingly false and invalid error message?
LINKS THAT I'VE RESEARCHED BUT THAT HAVE NOT SOLVED THE ISSUE
After carefully reading all the helpful check-offs and boilerplate messages before composing my post, I followed the advice given and searched through the links provided for help, to little avail. Following are the links I found useful. Unfortunately, the two that appeared most promising were closed prematurely or never followed-up on by the poster. Some were about "organization logins" (which I can only assume means like your company subscribes to Lynda and you use the company login?), which doesn't apply to my situation, but I read them anyway to see if I could glean anything useful. All found was references to a solution that was supposed to work with "cookies", but didn't. I also referred to the Vimeo links that looked like they might offer some insight:
GitHub Posts

https://gist.github.com/DonRichards/6c3f4d553c2384eca87b6dfc9f5c5826
https://github.com/rg3/youtube-dl/issues/5926
https://github.com/rg3/youtube-dl/blob/master/README.md#readme
https://github.com/rg3/youtube-dl#bugs
https://github.com/rg3/youtube-dl#faq
https://github.com/rg3/youtube-dl/issues/769
https://github.com/rg3/youtube-dl/pull/889

Non-GitHub Posts
NOTE: Many of these links recommend using youtube-dl

https://melearningweb.wordpress.com/2015/08/19/how-to-download-entire-lynda-com-courses-in-one-go/
https://stackoverflow.com/questions/28377271/youtube-dl-with-lynda-com-through-organization-login
https://www.quora.com/How-can-I-download-videos-from-lynda
https://www.npmjs.com/package/lynda-dl
https://www.drgeeky.com/download-lynda-video-courses-free-computer/
https://www.reddit.com/r/DataHoarder/comments/6ucad8/youtubedl_lynda_output_template/
https://github.com/EnesCakir/lynder

MY QUESTIONS

WHY AM I GETTING AN ERROR SAYING USERNAME IS MISSING WHEN IT ISN'T?

How can I download the complete video set for a Lynda.com course using youtube-dl?

Any help is appreciated.

you're command line is incorrect, the -o should be followed by an output template:
youtube-dl --username<EMAIL_ADDRESS>--password "private.something" -o "%(uploader)s/%(playlist)s/(Lynda) %(playlist)s - %(playlist_index)s - %(title)s.%(ext)s" https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html

Thanks @remitamine! I am replying confirming that your reworking of the command I was using was indeed successful. Thanks so much for your help.


Update book about TS

Hey there,
I just released a book about TypeScript, and it would be such an honor for me if you could publish the link to my book on your repository. Thank you so much for considering my request, and keep up the fantastic work!

Thanks!


Add support for is defined

This implementation would be at best strongly limited to one level: the current struct fields and the declared variables in the template.
It would also need https://github.com/rinja-rs/rinja/issues/47 to be implemented, so that in case the variable/field is not declared, the inner block is not generated, preventing compilation errors.

Ah, yes, I see the appeal! One big template that contains all the logic for all corner cases, but if e.g. the field footer: Footer is missing, then don't fail to compile if the access is guarded.
So, it's not actually an if, but more of #[cfg(has_footer)] { … }. So, I would say: Let's make it a new keyword instead of an expression:
{% ifdef footer %}
   <footer>{{footer}}</footer>
{% endifdef %}

This way it should be much easier to implement and the usage would feel much less magical.

Can it be combined with an else or any else if blocks? Also, how to check if it's not defined? :)

My implementation works just like the inside of #[cfg(…)]:

{% ifdef a %} ← field a is present
{% ifdef not(a) %} ← field a is not present
{% ifdef all(a, b) %} ← fields a and b are present
{% ifdef any(a, b) %} ← fields a or b are present
any nesting like {% ifdef any(a, not(b)) %} ← a but not b present

I wasn't sure if an else-case is needed, but yeah, it can probably come in handy. I added {% elifdef … %} and {% else %}.

I'm really not fond of the syntax. It means we can't mix it with "normal" if conditions. Also the endifdef keyword is really not great to read imo. :sweat_smile:
Maybe let's agree on a syntax before you update your PR.
But before that, what don't you like in the original jinja syntax? For reference:
{% if x is defined && y is not defined && x == "12" %}
{% endif %}

I don't think we should muddle the meaning of {% if %} nodes: The condition is evaluated at run time and only at run time. is defined is the exact opposite: The condition is evaluated at compile time and only at compile time.
What rust code would {% if x is defined && x == "12" && y is not defined %} produce? (I reodered the operands from your example.) In rust, you can write if cfg!(cond) {} else {}, and the compiler will know at compile time which branch it can cull, but both branches have to be valid. Valid syntax and also valid semantics.
Exactly that is not what we what to achieve with is defined, because a branch that is not taken has to have valid syntax, but we don't care about the semantics, e.g. that fields that were referenced even exist. That's the same as rust's #[cfg(…)] {} (valid syntax, but semantics are ignored), which is quite distinct from an if.
I hope I made my thinking clear why I'd choose to use another syntax than {% if a is defined %}. :)

Except in rust you can definitely have if cfg!(cond) && is_true {} else {}. In here, in all conditions we'd go through them to check if there is a compile-time check and if any of the compile-time conditions is not satisfied, to remove the whole condition. Mixing both of them doesn't sound that crazy to me. We can even add errors in case we have conditions like if x == "true" && x is defined because we check for the existence of x after checking it.
For the syntax itself, it's need to be something that cannot be confused with a rust function/macro, hence why I think is (not?) defined does the job well. It also allows to reduce the amount of work required to switch from an official jinja2 template.

Except in rust you can definitely have if cfg!(cond) && is_true {} else {}.

Please see https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ebdbb9cb4279948e24d1b50195a0080d. That's what I meant with "valid semantics". There is no the_semantics_are_checked_in_here() function in the scope, so the compilation fails.
Jinja2 adopts to the semantics of Python. In there ↓ will work just fine. NameErrors are only thrown at runtime, only if the line was hit:
def example():
    if False:
        the_semantics_arent_checked_in_here()

example()

What if a user writes {% if (a is define || b) && c %}? I wouldn't want to write a CNF/DNF converter just to make this feature work. It would work to allow {% if X is defined %} as a special syntax, but it would become a hassle to parse a is def || b is def && c is def.
And do you really think someone needs to write {% if x is defined && y is not defined && x == "12" %} in an actual project?

Don't you need to write one for all(any(a, b), not(d))?

No, we can simply "execute" the expression:
https://github.com/rinja-rs/rinja/blob/efdb597bba3be973e2467fb89eb0eed25cb1797b/rinja_derive/src/input.rs#L232-L239

No but it would allow to write {% if x is defined && x == "12" %}, which allows to save one condition (lazyness++).

Hehe, lazyness is a good thing in programmers in most cases. But in my opinion allowing this feature would hurt maintainability. And also, I am too lazy to make it work, but I'd be happy to review your implementation. :D

If you can make it work, then I'm okay with the syntax. :) It could be useful for expressions, too:
<script>
var has_footer = {{ footer is defined }};
</script>

A case I need to keep in mind. :+1:


Follow Qt docs when implementing rowCount and columnCount

QAbstractItemModel::rowCount:

Note: When implementing a table based model, rowCount() should return 0 when the parent is valid.

QAbstractItemModel::columnCount:

Note: When implementing a table based model, columnCount() should return 0 when the parent is valid.

Tested ACK 195fcb53a09e9b852544778a077727f81d31303e. Compiled and ran on macOS (Big Sur 11.1 and Catalina 10.15.7), Arch Linux, and FreeBSD. visually verified no weird effects with the Address, Ban, Peer, and Transaction tables. As already stated, the code change brings us inline with what the QT Docs recommend.

Tested ACK 195fcb53a09e9b852544778a077727f81d31303e. Compiled and ran on macOS (Big Sur 11.1 and Catalina 10.15.7), Arch Linux, and FreeBSD. visually verified no weird effects with the Address, Ban, Peer, and Transaction tables. As already stated, the code change brings us inline with what the QT Docs recommend.


Add bytebase/bytebase as a user

What problem does this PR solve?
What is changed and how it works?
Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Code changes

Has exported function/method change
Has exported variable/fields change
Has interface methods change

Side effects

Possible performance regression
Increased code complexity
Breaking backward compatibility

Related changes

Need to cherry-pick to the release branch
Need to update the documentation
Need to be included in the release note

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

@tianzhou Could you sign the CLA so that we can merge your PR?
https://cla-assistant.io/pingcap/parser?pullRequest=1360

Ping?

@xhebox IIUC this repo is merged into pingcap/tidb so that we shouldn't merge it here but create a duplicate on pingcap/tidb?

@xhebox IIUC this repo is merged into pingcap/tidb so that we shouldn't merge it here but create a duplicate on pingcap/tidb?

Yeah, I will do that later.


Test docker builds

With sweeping changes with the changes to the authentication to make sure things work.

Verify if the docker build needs to skip.

Resolved with #42


bugs in sync task name and schedule name

Hi,
I pushed a patch fixing some bugs introduced by your last commit that broke some checks in Sync tasks
I also fixed that renaming sync tasks and schedules could be done using invalid chars, duplicates or empty names
Before:

Schedule 1 has empty name !

Two tasks with same name possible !

Sync task 1 has empty name !

After:

notify of errors in sync tasks

do not allow saving existing tasks by editing them

fix renaming of schedule and task names

Last commit fixes: (Fix main tabs notification message for schedule errors …)
Before:

After:

Detailed log with all schedules and tasks having an error:

all invalid tasks in editor

generic message in main tabs

Commit: Fix schedule error message not always refreshed
Notif error is refreshed when schedules are disabled individually or globally

It is now proper and bug free
Remains only the decision:
1- Hide top sync button if a selected task name is invalid (or if one of the tasks in Auto is invalid)
or
2- Add a new parm[xx] setting to update sti.isSyncTaskError on sync task name error

Commit: properly set Sync Tasks with invalid name as erroring:

This completes all the fixes properly, without needing to save to settings files
If task name is not valid (duplicate, invalid char...), sync task is now error and will not be started by Top Sync button (in AUto or Select modes), by schedules, external scripts...
Let me know if any bugs are present
Best regards

Thank you.
We have applied your changes and made some modifications.
Best regards.

Thank you, I missed the meaning of "EDIT"
Best regards


Information about caches

Hi Ben
Would you be able to describe what these folders are for / doing exactly in Code?
On my machine:

Each folder has thousands of json files  - I assume they are generated and transversed everytime in VS Code to provide InteliSense functionality?
Out of interest:

Is there a more efficient way to store data from these files, maybe in a proper database or grouping common / certain files so there aren't so many to transverse? I haven't done any benchmarks but I'd imagine going through and decoding 10,000 json files each time would be time consuming?

Do the files ever get "cleansed" - for example, I have deleted some files in my project yet the various references / json files relating to those files still remain there

Is it possible to turn off tracking certain files, paths or globs? Some kind of whitelist/blacklist type functionality would be good. For example, there is a package called "aws/aws-sdk-php" which has a large number of data files in PHP, these I would never want to have IntelliSense for, so it seems wasteful to scan/generate files for them.

As the point above, could files be intelligently scanned to determine if they are something that is likely to be a good / bad candidate for InteliSense? You probably don't want config / json-in-php files added, or anything under the "tests" directory / anything inside the vendors "autoload-dev" mappings.

Hi @garygreen , the json files are cached symbol and reference information from the workspace. They are not usually created each time vscode starts up but rather on the first time the workspace is opened. Symbol files are read on each startup to load symbol info into memory. References files are read on demand.

Is there a more efficient way to store data from these files
Possibly, though a lot of the startup time is spent rebuilding the symbol index which is not cached atm. I'm considering using levelup to cache data.

Do the files ever get "cleansed"
File watcher events are handled, and file mod times are checked on startup. Cached data should be getting removed if files are deleted.

Is it possible to turn off tracking certain files, paths or globs?
You can use the vscode files.exclude setting

could files be intelligently scanned to determine if they are something that is likely to be a good / bad candidate for InteliSense?
Some default excludes could probably be added. I'm open to any suggestions on how to improve this. For now user's are responsible for what files in the workspace should be indexed.

Symbol files are read on each startup to load symbol info into memory.

Is it possible to turn this off? I assume these are used when doing the Symbol palette (CTRL + SHIFT + O)? Personally I barely use that feature so the thought of 10,000 json files being thrashed on SSD for a feature that's barely used makes me anxious 🐧
Alternatively, maybe the symbol information could be read on demand for when you actually go to open the palette, or am I misunderstanding what this feature is used for?

Possibly, though a lot of the startup time is spent rebuilding the symbol index which is not cached atm. I'm considering using levelup to cache data.

That's great, levelup looks very interesting. Does VS Code not use it's own database engine of some kind? Surprised there isn't a standard database / query language used for plugins. As Levelup is a key-value store rather than JSON, how would you envisage the storage of the keys, would they just be compressed down in "dot" format?

You can use the vscode files.exclude setting

This isn't quite what I was looking for. I've never really been much a fan of the files.exclude option in VS Code because it's usage is mixed - for example it's used to determine what files are visible in the sidebar tree - I want ALL vendor to be visible always in the sidebar, however I sometimes don't want certain vendors to appear when searching CTRL + P, etc. So Intelephense could use this option but it's not ideal, should really have custom options like intelephense.excludeFiles.

Is it possible to turn this off?
Unfortunately not, but I have been giving this some thought and I think this caching mechanism can be removed altogether. Parsing and symbol reading is fast enough that the original src files can be read on demand and index cached only. I'm looking at this now as part of the next release.

An intelephense.excludeFiles makes sense. There was a similar request in #108 . I'm in the process of moving the workspace scanning out of the vscode client and into the server so this can form part of that work. VSCode files.exclude was chosen at the time because all the file finding/excluding was available via the vscode API.

There's been some progress. Unfortunately I don't get paid for this so I don't get to work on it as much as I'd like to.

@bmewburn would you be able to point me in the right direction to disable the symbol lookups / json files? Looking to fork and maybe will send a PR. Whenever I launch vscode my hard drive get's thrashed with all the json lookups and it seems to be originating from this extension so if I could disable it that would be great 😄

So only after a few months the size has gone up considerably and all the JSON files are taking up over 2GB of space now.
Something doesn't seem right with this. Are they definitely getting cleaned up? If you could point me in the right direction to disable the symbol group caching I can fork and do this. I assume it'll just be a case of adding a return statement to disable entering into the function altogether

v1.0.0 is out, in which there is only 6 cache files written to disk in a binary format. Closing as I believe this solves the issue.


Revert "Revert "Slight changes to spawners""

Reverts space-wizards/space-station-14#3624

Bless you snivy-man


Migrate maven repository from jcenter to mavenCentral

@avioli Hi there! This is a very important change, not to say urgent.
Is there anything we can do to make this release happen faster?

We're using this branch for months now in a released project.
Sadly, it seems that this lib is abandoned...

@sezabass I did create a new repository for this (https://github.com/adelarsq/uni_links3), since I am also using this. PRs are welcome

Thank you for this contribution, but I don't have any time to maintain this package, so it is now marked as discontinued and app_links recommended replacement.


template.json is registering template but when used only created empty solution

I'm reporting an issue related to the VS template. Probably this is not the biggest feature of this repo. But I have found this article about VS templating. As you explained here: https://damienbod.com/2022/08/15/creating-dotnet-solution-and-project-templates/
I want to create my own template. So checking this project template.json Pulled down this repo and locally installed the template dotnet new install ./
All works fine, template installed, it is shown up in VS. I can select it to create new project, etc.. Only issue is when new project is opened up it has only a Solution. NO project nothing created.
What could be the problem? Thanks for the help in advance.

Actually turned out with the local command install template content is not copied or something. Only the template definition is registered. So during the application creating nothing happens... I'm packaging it first even locally and then install the Nuget package then all fine...
Just some help in your template.json insert this and you will get intelligence help during editing.
"$schema": "http://json.schemastore.org/template"


Bug: can't assign argument to assistant role

The bug
I can't assign hidden=True to assistant role
To Reproduce
Give a full working code snippet that can be pasted into a notebook cell or python file. Make sure to include the LLM load step so we know which model you are using.
Case 01:
llm = guidance.llms.OpenAI("gpt-3.5-turbo")
# Clear the same arguments created data
guidance.llms.OpenAI.cache.clear()

x = guidance('''
{{#system~}}
you are helpful chatbot
{{~/system}}

{{#user~}}
{{query}}
{{/user}}

{{#assistant hidden=True}}
{{gen 'output'}}
{{~/assistant}}
''', llm)
x(query='hello!')

Error Message
AssertionError: When calling OpenAI chat models you must generate only directly inside the assistant role! The
OpenAI API does not currently support partial assistant prompting.

Case 02:
llm = guidance.llms.OpenAI("gpt-3.5-turbo")
# Clear the same arguments created data
guidance.llms.OpenAI.cache.clear()

x = guidance('''
{{#system~}}
you are helpful chatbot
{{~/system}}

{{#user~}}
{{query}}
{{/user}}

{{#assistant hidden=True ~}}
{{gen 'output'}}
{{~/assistant}}
''', llm)
x(query='hello!')

Error Message
IncompleteParseError: Rule 'template' matched in its entirety, but it didn't consume all the text. The non-matching
portion of the text begins with '{{#assistant hidden=' (line 19, column 1).

Case 03
llm = guidance.llms.OpenAI("gpt-3.5-turbo")
# Clear the same arguments created data
guidance.llms.OpenAI.cache.clear()

x = guidance('''
{{#system~}}
you are helpful chatbot
{{~/system}}

{{#user~}}
{{query}}
{{/user}}

{{#role 'assistant' hidden=True}}
{{gen 'output'}}
{{~/role}}
''', llm)
x(query='hello!')

Error Message
AssertionError: When calling OpenAI chat models you must generate only directly inside the assistant role! The
OpenAI API does not currently support partial assistant prompting.

System info (please complete the following information):

OS (e.g. Ubuntu, Windows 11, Mac OS, etc.): Google Colab
Guidance Version (guidance.__version__): 0.0.54

Case 02: Has the solution but contains typo error
llm = guidance.llms.OpenAI("gpt-3.5-turbo")
# Clear the same arguments created data
guidance.llms.OpenAI.cache.clear()

x = guidance('''
{{#system~}}
you are helpful chatbot
{{~/system}}

{{#user~}}
{{query}}
{{/user}}

{{#assistant hidden=True~}}
{{gen 'output'}}
{{~/assistant}}
''', llm)
x(query='hello!')


[FEATURE] Protocol Option in BTP Subaccount Trust Config

What area do you want to see improved?
terraform provider
Is your feature request related to a problem? Please describe.
While doing the trust configuration with Terrafrom, default protocol is OpenID Connect. But can the Protocol option be enabled while establishing trust.
We are preferring SAML as an organization.
Describe the solution you would like
Enable Protocol field as input in the resource BTP_SUBACCOUNT_TRUST_CONFIGURATION
Describe alternatives you have considered
Do it manually
Additional context
No response

Thanks for the feature request. We evaluate it and update the issue accordingly.
Community Note
Voting for Prioritization

Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.

Analysis:

The BTP CLI commands that we rely on do not allow the setting of the protocol (OIDC, SAML) - see btp create security/trust and btp update security/trust.
To make this feature available we would need enhancements of the BTP CLI to support the type exposed by the platform API (see https://api.sap.com/api/TrustConfigurationAPI/path/createIdentityProviderUsingPOST) which support OIDC and SAML

From the perspective of SAP Authorization and Trust Management Service we do not intend to support SAML for trust establishment in btp CLI.
The recommendation is to use Identity Authentication as identity provider and connect corporate identity providers to it, if required. See documentation:

We recommend that you always use SAP Cloud Identity Services - Identity Authentication as single identity provider for SAP BTP. If you use corporate identity providers, connect them to your Identity Authentication tenant, which then acts as a hub. We especially recommend this if you are using multiple corporate identity providers. For platform users, the use of SAP Cloud Identity Services - Identity Authentication is mandatory.

@torsten-sap  thanks for the clarification.
@brahammittal : As stated by Torsten, there will be no support for SAML in context of the BTP CLI. As we rely on the BTP CLI as backend, we will not be able to support this feature. Torsten also referenced the official recommendation.
I will therefore close this request.


Keybinding doesn't work with amVim or vscodevim

Hi, amazing extension!
I can't make the keybinding work if amVim or vscodevim are installed.
When I press Ctrl+; I get a notification saying:
Running the contributed command: 'findJump.activate' failed.
The issue only appears if I use it with the keyboard, if I use it from the Command Palette it works as expected.
I disabled Am Vim: Bind Ctrl Commands but the problem persists.
I think the problem is not related with the "Ctrl", because it doesn't work with any shortcut.

My mistake!, I was using findThenJump. activate  instead of findThenJump.initiate - it works!


Enhancement: Extend or override prompt behavior on options.

When thinking about the m365 identity set command we discussed that it should be possible on that command to prompt the user with a list of available identities to choose from.
However, that is a nice idea, but currently not supported. In the current situation, the CLI prompts for required values or for optionSet values using default text-input prompt. Which means manual typing...
💡 Idea
I'd like us to help the user by overriding option prompts in this and other scenario's.

In the scenario of m365 identity set, we'd much rather prompt the user to SELECT one of the available identities (instead of manually typing the emailaddress or user ID.

Another example that comes to mind is the --password option on the m365 login command. That option could be prompted when the --authType is password, the prompt override could use inquirers password input to mask the values that the user types in.

This must be configurable on an option by option basis. But the CLI engine should call the prompts, just like it's doing now with the required options and optionSet prompts.
⚙ Implementation
My idea on how to do this would be to add an extra optional property to the optionslist that can be used to override prompt behavior on such an option. In the below example, you can see how I'd override the prompts on the id and name options to make it possible to prompt based on a list of identities, instead of a free input prompt.
#initOptions(): void {
    this.options.unshift(
      {
        option: '-n, --name [name]',
        whenPrompted: () => prompt.forInput({ type: 'select', message: 'Please select one of the available identities', choices: this.getIdentitiesAsOptions() });
      },
      {
        option: '-i, --id [id]',
        whenPrompted: () => prompt.forInput({ type: 'select', message: 'Please select one of the available identities', choices: this.getIdentitiesAsOptions() });
      }
  }

We'd need to update the following code:
// File: /workspaces/cli-microsoft365/src/cli/Cli.ts
private static getCommandOptions(command: Command): CommandOptionInfo[];

// File: /workspaces/cli-microsoft365/src/cli/CommandOptionInfo.ts
// Add the prompt override to this interface ass well:
interface CommandOptionInfo

And then implement the actual prompting from within Cli.ts / Command.ts.

@Adam-it, you'll probably like this 😊

@martinlingstuyl I like the idea. Let's wait for the original issue to move forward and then I think we may focus on this enhancement 👍.
As of now, I don't have any comment. I would rather go with the first option to select one of the available identities

This is definitely phase 2 yes.
But what do mean with the first option?

This is definitely phase 2 yes.
But what do mean with the first option? @Adam-it

It means I more feel this option

In the scenario of m365 identity set, we'd much rather prompt the user to SELECT one of the available identities (instead of manually typing the emailaddress or user ID.

I don't quite feel/see, at least as of now this one

Another example that comes to mind is the --password option on the m365 login command. That option could be prompted when the --authType is password, the prompt override could use inquirers password input to mask the values that the user types in.

I don't quite feel/see, at least as of now this one

Why? Do you know of password prompts without mask anywhere? 😂

Any other comments on this one @pnp/cli-for-microsoft-365-maintainers?

Any other comments on this one https://github.com/orgs/pnp/teams/cli-for-microsoft-365-maintainers?

The specs look quite clear to me. It's a good idea to add masking to the credentials prompting.

Thanks for the response @Jwaegebaert, let's get this in...

I've created a draft PR in which I solved both this challenge and the optional required fields challenge. Check out my PR @pnp/cli-for-microsoft-365-maintainers

Sorry for late reply. I'd prefer us to choose for an approach where we can express option configuration declaratively rather than imperatively through functions. Doing it declaratively lowers maintenance effort and ensures consistency, because the logic to handle the functionality is implemented in just one place. In contrast, when we start to define behavior using functions, then it can result in inconsistencies and a lot of extra work when we decide to change the functionality.

@waldekmastykarz, would you like to draft what you're saying into a concrete spec?
The problem with declarative here is that we may want to use it in any way. It seems to me that we'd need to build in a new feature into this declarative syntax for every custom prompt we'd like to use.
For example, in the two examples I've used in the specs, the one with masked password prompt would be OK to implement declaratively, but the one with the identities selection would be less easy to fit in.

Yes, this is similar to what I had in mind. I'd caveat this with a few things:

I think we've already got generic messages for properties so we don't need to add to each property Please fill in xyz.
For selections, we can infer the available options from autocomplete which we already have defined, so there's no need to repeat it yet again on the option definition

Imagine that we wanted to change the tone of voice or formatting. If the message is centralized, it's a simple change in one place. If each command has its own message, then the amount of work would depend on how consistent the message strings are across all commands - something that's hard to enforce and easy to create unnecessary effort and inconsistencies.

Another example where such a custom prompt would be helpful: the --value option of cli config set, after you've selected the key.
That would allow for a very quick and dynamic configuration experience.
Not sure how we should configure it declaratively though.

However, for the identityName and identityId prompts, this would not solve it, as the list of identities is built dynamically somewhere.

We could build the array dynamically and pass it to autocomplete as well. After all: autocomplete is defined in code rather than in a static JSON file, so we do have the ability to execute code. The only caveat is that if you build command completion for your machine, those identities would end up in the completion too. That could be both good and bad

those identities would end up in the completion too

It would be okay, but it would not be consistent. If you sign in to another account and you would not execute cli completion update, that new identity would not be available for completion... that's not a bad thing as well... but it's not consistent, which I find a bad thing. The other way around would be true as well: you could sign out from an account, and it could still be available as completion.
Anyway, we could also rename autocomplete to allowedValues, and use an extra property to define if the allowedValues should end up in completion.
That way we could use your idea of dynamically retrieving the allowedValues while still not passing them on for completion.
That an idea?

Is this a good example for that scenario?
#initOptions(): void {
    this.options.unshift(
      {
        option: '-k, --key <key>',
        allowedValues: CliConfigSetCommand.optionNames,
        enableCompletion: true
      },
      {
        option: '-v, --value <value>',
        allowedValues: (args) => this.getAllowedValues(args.options.key)
      }
    );
  }

I wonder if identity isn't a single exceptional case and we're trying to solve something that's a non-issue. It seems like a lot of refactoring an unnecessary complexity to solve one specific issue

I don't think so. Let's get back to the main point, which is that some commands would benefit by some extra flexibility on the prompt.
Some prompt-challenges (for example masked input) may be solved by a schema we still have to think of. The list prompt poses a challenge.
We currently have two examples:

cli config set: the value option
identity set: both identity options

But other examples can be thought up, like:

util accesstoken get: a list prompt for resource selection.

...and who knows what else may come up.
Some extra flexibility in this case could be a dynamic autocomplete. Aka autocomplete: string[] | (args:any)=>void;
That's not a big refactor, it's a small change. We could make it so that only static autocompletes get compiled in the completion file. I think this may be a couple of lines of code to change, and it offers nice enhancements in terms of usability.

cli config set works a fixed list because it's tied to the settings that we allow to configure, so I don't see any blockers here.
util accesstoken get is more complex. On one hand, we've got the resources that we use in our commands, these are fixed and we could expose them in a list. But, you can use the command to get a token for any resource, and there's no way we could provide you with a list. So I think considering offering a list choice for the resource is not the right thing to do, because it would block you from providing your own (unless we offer a choice + other, but then we're still good with fixed values).
So identity set is still the only exception imho.
One more thought that occurred to me is that we need to be mindful of the inconsistency this would create between command completion and the values we'd show on a prompt. If they're based off of different logic and values, then it would mean that they might show two different thing which in my opinion is undesirable.

util accesstoken get is more complex.

I see what you mean here, a static list would be best in this scenario.

cli config set works a fixed list

But here I'm talking about the --value option, for which autocomplete is dependant on the --key option. It would need to autocomplete true/false for one option and stderr / stdout for another. I don't see how we would do that in the current state of the code. It would need to be a bit more flexible for that.

One more thought that occurred to me is that we need to be mindful of the inconsistency this would create between command completion and the values we'd show on a prompt.

I agree with you here. Which is why I suggested to make the prompt dynamic (aka use whenPrompted), instead of the autocomplete options.
How would you suggest we go on here? I personally think these prompt additions (identity set and cli config set --value) would really be helpful for productivity while working interactively with the CLI. Spoken from my own perspective as a user: currently I find I often open the CLI docs site to know the value to configure. And I know already that switching between identities is something I'll do often and that I'd not want to type my emailaddress all the time.

I agree with you here. Which is why I suggested to make the prompt dynamic (aka use whenPrompted), instead of the autocomplete options.

Unfortunately, there's no way for us to plug that in the current completion that we've got for bash, cmder and PowerShell, because they're based off of static lists. While it's not impossible to make them dynamic, it would mean fully revising their implementation. Bash completions are particularly arcane.
From the productivity point of view, I'd rather offer the ability for users to write:

m365 id
TAB
m365 identity s
TAB
m365 identity set -i s
TAB
m365 identity set -i<EMAIL_ADDRESS>
Rather than:

m365 id
TAB
m365 identity s
TAB
m365 identity set
Enter
Choose identity
down, Enter

Thinking of it, if I were using two identities a lot, I'd considering creating shell aliases like i1 = m365 identity set -i<EMAIL_ADDRESS>Also, I'd want to have the ability to see my current identity on the prompt (integration with oh-my-zsh/posh)
Whatever solution we end up with, I'd like us to offer the same completion behavior through interactive prompts and args. I'd hate us to confuse users offering one set of options in args and another in prompts.

Thinking of dynamic options' values, another one is file system (when you're using an option that points to a local file). I believe they're natively supported in bash completion and is also something that would increase productivity when using the CLI.

I had a look at omelette, which we use for completion and it seems like it's got hooks: https://www.npmjs.com/package/omelette. This could an opportunity for us to offer dynamic completions resolved on runtime. The only caveat is how to make it flexible to accommodate all our commands while keeping it fast (it cannot take a second to load the available values).


test: Disable kill when create.

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
create table as is also not atomic in our system, so we should avoid killing in determined test.
Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

We still need to verify the correctness of other create DDLs like CREATE TABLE/MATERIALIZED VIEW etc. Let's disable kill only for CREATE TABLE AS.

We still need to verify the correctness of other create DDLs like CREATE TABLE/MATERIALIZED VIEW etc. Let's disable kill only for CREATE TABLE AS.

+1. Disable killing on all creates decreases the coverage a lot.

We still need to verify the correctness of other create DDLs like CREATE TABLE/MATERIALIZED VIEW etc. Let's disable kill only for CREATE TABLE AS.

+1. Disable killing on all creates decreases the coverage a lot.

Yes, I've updated to disable create table as only.


Hello, does this framework support the extraction of author details in PDF

If yes, how can I use to save the author's details in PDF. thanks

Grobid can extract author name, email, affiliation from PDF. Try it in https://cloud.science-miner.com/grobid/

Here the overview: https://grobid.readthedocs.io/en/latest/Principles/
@xurent You can take the output XML and parse it, by extracting the information you need.


[WIP] Use pytest for running integration tests

Small change and attempt for integration tests to also use pytest for running the tests.

Codecov Report

Merging #1579 (0d3d2c9) into trunk (38693a4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            trunk    #1579   +/-   ##
=======================================
  Coverage   83.00%   83.00%
=======================================
  Files         394      394
  Lines       84990    84990
  Branches     9038     9038
=======================================
  Hits        70550    70550
  Misses      11373    11373
  Partials     3067     3067

Continue to review full report at Codecov.

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

I will also try to get external action (skip duplicate jobs) to work again by cloning 3d party action as part of the GHA workflow since ASF doesn't allow to directly utilize other external actions, but this cloning a specific revision seems to be accepted workaroud (https://github.com/apache/calcite/pull/2318/files).
And since GHA still doesn't allow us to only re-run specific jobs on failure, I will probably move integration tests in a separate workflow (this way we can re run just the unit tests / integration tests, depending on what has failed instead of everything).
@c-w wdyt?


[dictionaries] Indonesian dictionaries to support new config

Halo libpostal maintainer,
I have added words in Indonesian to match newer config for libportal. Basically, I copied all contents inside 'en' dictionary to 'id' then change all contents within each file according to our language. Please review it. Thank you.
Best,
Yanuar

Hi @bbraunay, thanks for contributing to the 🇮🇩 dictionaries!
So, I know that both English and Indonesian are used in addresses there (this was true with the Malay dictionaries in #122 as well), but for the purposes of language classification, it's preferable to separate out words that are truly from the Indonesian language and let the rest remain in the English dictionaries. Libpostal will use the English abbreviations as well if the address is in mixed language. Would you be able to remove the English words/abbreviations that do not have translations? It's ok to keep transliterations like "apartmen". Mostly just want to remove things like "ground floor", etc. where it's exactly the same as English.

Halo @thatdatabaseguy , you are welcome.
I will remove those entries and get back to you ASAP. BTW, thanks for your advise there.


Cody Ignore: Check reference violations at I/O boundaries

Part of https://github.com/sourcegraph/cody/issues/3642
This PR adds a "last-line-of-defense" that will throw when attempting to run an LLM query for cody-ignored files. I've added checks for references to all I/O boundaries (it should be close as close to the fetch() or http/https calls as possible so we never accidentally forget one if we copy-paste in the future.).
@valerybugakov I had to move some of your cody ignore work to lib/shared to make this work. Two notes:

We make the git extension specific stuff dependency injectable so there's no hard requirement on vscode in lib/shared
We need to validate that the WASM regex library actually works in the agent since it's loaded based on static data in the bundler. For now I kept the re2-wasm dependency in vscode too so the copy script has access to it. Let's add this as a todo item to check inside agent builds.

Test plan

CI
This PR disables the context filter provider so it has no runtime impact

Heads up @philipp-spiess, I just rebased my changes on top of this PR: https://github.com/sourcegraph/cody/pull/3869

Hey @philipp-spiess, I just merged my changes into this PR. It should not introduce any extra work or conflicts because I rebased on top of your work.

(Quickly fixing up something; looks like we changed the API to async 😓  and need to add a unit test)

@valerybugakov @dominiccooney may I ask for a review once more? The PR is starting to diverge from main quite a bit 😬

One thing that worries me is that we still depend on our discipline to avoid accidentally passing the excluded context snippet through the I/O boundary. We can think about how to make it stricter in a follow-up.
One idea from looking at vscode/src/completions/client.ts: if we want to ensure that unfiltered strings are not used as fetch bodies, the default toString could add a special [CODY_UNFILTERED] suffix to the return value. We can create a fetch wrapper that checks if body includes it and throws. It would ensure we always use toFilteredString (which deletes the suffix) before sending it over the network. Potentially, we can also monitor it on the Cody Gateway side and error.
The bad part is that it modifies the string value until it's sent. It has multiple annoying side effects. E.g., we will need to account for the redundant suffix length when we calculate the chars remaining in the context window. Is there a better way?

What if we change all PromptString.from* methods to require the ContextFilters and to perform a check on the ignored path before we even construct the prompt string in the first place? This way we know that the final prompt string must also be of valid references.
The issue this has is that:

The policy could be outdated by the time toString is called

Potentially fixable PromptString can be notified about policy changes?

All callsites that use PrompString.from have to be made async (seems reasonable TBH)

So:

All PrompString.from* methods return a Promise and require the ContextFilterService to be passed-in.
Whenever we construct a prompt string from references, we check the references are valid. This pre-warms the cache
Whenever toString is called, we check all references again (should be fast since the cache is warm?)

cc @dominiccooney

BTW since I see @valerybugakov and me putting up more and more PRs against this branch, I'll go ahead and merge this. Let's continue the discussion on how to prevent issues of forgetting checks though.

I'll go ahead and merge this.

YES!


Add optional hide folder names setting

Hi again, I added a setting so that you can hide the folder names shown in tabs.
E.g. "script-ide/plugin.gd" would become "plugin.gd"
This nets you quite a lot of real estate when you have long folder names and don't have a need for them being displayed.
I did some guesswork on how your new editor settings code works, but I think what I did works fine. It should correctly display in the script-ide editor settings tab and checking/unchecking the new hide_folder_names setting should be immediately reflected in the editor.

Also, I don't know why there are so many empty lines that count as modified ¯_(ツ)_/¯

You probably have turned on this editor setting?

I actually didn't know that this settting exists.
Will probably enable it as well.

Regarding your PR: Isn't this already an editor setting?
I found this one:

For me, paths are only shown when I have multiple tabs with the same name:

and:

Yea, you are right, I didn't know that setting existed. And it was set to Parent Directory and Name for me, so it always was showing the folder names. Thank you for telling me, will close the PR.


Do I have to use end() method of connection?

I'm require'ing this db.js module from other modules.
var mysql      = require('mysql')

var db_config = {
  host     : '<IP_ADDRESS>',
  user     : 'root',
  database : '',
  password : ''
}

var connection
	connection = mysql.createConnection(db_config)
	connection.connect(function(err) {
		if(err) {
			console.log('Database connection error:', err)
		}
	})

/* to prevent losing connection */
setInterval(function () {
    connection.query('SELECT 1', [], function () {})
}, 10000)

module.exports = connection

But in other examples I'm seeing like this. They are connecting mysql before query and ending connection after query:
conn.connect()
conn.query(...., funciton(err, result) {
    conn.end()
})

I'd like to know if my approach is wrong.

You're approach is OK. You only need to call conn.end() if you want to close the connection. Based on you using setInterval, it looks like you are not intending to close the connection, so you don't need to call .end().


oai.content_dm.pepperdine validation results (base OAI mapper request)

[x] alternative_title: missing alternative title; map <dcterms:alternative> to alternative title

Please address this at the base oai mapper. (omeka.omeka and oai.samvera both need have "alternative_title" requests)

If you provide me with a collection to validate, I can confirm that this is working as expected in either Chapman or Samvera branches.

Lucas checked the base oai mapper work addresses the alternative title issue.


Version number

Hi Cosmo,
May I suggest to include the version number in the file name? It may lead to accidents when all are called virtue.
Gabor Szots
CCRL testing group

I will do that! additionally, I'm probably going to remove the Linux binaries, because they have proven highly nonportable, and will instead recommend building from source on Linux.

okay, that's done. binaries will be in the format viridithasX.X.X.exe going forward.


Only 50 Videos at once?

I've looked a bit through the code and it appeared that the amount of videos you can add at once is hardcoded at 50 for now.
At least trying to edit the config didn't change anything, the max limit of added videos is 50.
Is there a way around? I have several music playlists with 50+ songs and it would come in handy since it's only adding the first 50 of those playlists.

{"youtubePlaylistLimit": 200} in user/config.json should do the job. You also can be interested to set personal youtubeApiKey property here, if default key quota will be exceeded.

I've tried adjusting the config and it's working perfectly fine values like 20 or 40, just everything above 50 though is not working at all. I edited the default-config.json as well as the user/config.json.
I've also added my own personal YouTube API key.

Overconfidence is insidious killer. Check latest commit.

Updating it wasn't working for me yet.
I tried reinstalling it again, now I sadly get and uncaughtException when I try to build the server.

If you get local ip in console and exception on next line: i think this happens when you try to run synctube on already used port (like if port already in use by synctube or other server app). Can you check is this true and try to kill node process?

ahhh yeah that was the mistake, everything's working perfect now, I can finally add more than 50 videos. Thank you a lot!

No problem. Also added warning + port increment instead of crash for this case.


Data Loss in Partition Gaps

Hi!
I've discovered a problem with the "partition-index" command, which is used to create index partitions. It works well for the most part, but occasionally, gaps in the partitions result in some actual data being omitted.
I initially thought the gaps between partitions were intended to prevent filtering for a date where there is no data. However, that's not the case. There have been instances where data exists in my index within those gaps, but it's not retrieved.
The partition JSON file always reflects accurate counts, but the data retrieved doesn't align with the expected count.

Thanks for reporting! We'll try to reproduce this

#8  should help - @FarzamMohammadi  please let me know if you can try again

Thanks @mattgotteiner. I forked it and refined the features to suit my team's needs. Hopefully, the next users will benefit from your changes.

Thanks @mattgotteiner, awesome work! Unfortunately, I won't be trying this again. I forked this a while ago and refined the features to suit my team's needs. Hopefully, the next users will benefit from your changes.

It sounds like the issue is resolved.  I'm going to close this, but please reopen if there is further action required.


pull request for e2e test at 01/20/2017 14:15:14

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


Spatial interpolation

Work in progress.
We are testing these spatial interpolation settings as an alternative for the ABoVE reanalysis.  The previous configurations left a few polygonal artifacts in the shortest wavelengths, even after PR #206.  This PR is an extreme remedy, with size 40 superpixels and 400 nearest neighbors in each interpolation.  It seems to work in every case, but the computational cost is pretty high.

Additional confirmation from Daryl Yang (Brookhaven National Labs), reprinted with permission, who finds that the denser spatial interpolation and view-dependent geometry both improve the reflectance estimates:  "Just want to give you confirmation that the reprocessed version have largely removed the blurs that I ever identified. I am pretty satisfied with the 400 neighbors with view geometry version [...] I think I am going to use the 400 neighbors + view geometry."

That's a result!


Set up automated testing with GitHub workflows

Likely need a docker image to save build times

closed by #41


add a quic.Config option to enable / disable connection migration

Until we properly handle the address verification, it'll probably be a good idea to disable migration by default.

Connection migration was disabled #963.


Leaking file handle / file lock issue - unable to delete temp file

Hello,
I am giving this plugin a test. I am running into a file lock failure below. Note oc and jenkins are running in windows. Even after the job completes the file cannot be deleted because it is in use by the jenkins process.
Pipeline script (directly in job):
openshift.withCluster('Sandbox') {
    openshift.withProject( 'dev-myuser' ) {
        println openshift.selector('route', 'helloworld-rte-act').object()
    }
}

[Pipeline] echo
[Pipeline] node
Running on master in C:\Users\myuser.jenkins\workspace\openshift_deploy2
[Pipeline] {
[Pipeline] _OcContextInit
[Pipeline] _OcContextInit
[Pipeline] _OcAction
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: Unable to delete 'C:\Users\myuser\AppData\Local\Temp\ocstdout3566475073744801110.txt'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
at hudson.Util.deleteFile(Util.java:257)
at hudson.FilePath$19.invoke(FilePath.java:1453)
at hudson.FilePath$19.invoke(FilePath.java:1450)
at hudson.FilePath.act(FilePath.java:1018)
at hudson.FilePath.act(FilePath.java:996)
at hudson.FilePath.delete(FilePath.java:1450)
at com.openshift.jenkins.plugins.pipeline.OcAction$Execution.run(OcAction.java:222)
at com.openshift.jenkins.plugins.pipeline.OcAction$Execution.run(OcAction.java:119)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:213)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.file.FileSystemException: C:\Users\myuser\AppData\Local\Temp\ocstdout3566475073744801110.txt: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at hudson.Util.tryOnceDeleteFile(Util.java:296)
at hudson.Util.deleteFile(Util.java:252)
... 15 more
Finished: FAILURE

@MarkRx this would be the first ever run on Windows, so thanks for that :) . As the Windows user running Jenkins, can you try to delete this file from a command console? This exception is either a simple permissions issue or a file locking issue. Your help would be invaluable in directing my investigation.

I am only able to delete the file after shutting down Jenkins. ProcExplorer shows that the jenkins process is holding on to the file. I don't think it would be a permissions issue since C:\Users\myuser\AppData\Local\Temp\ is the standard Windows temp dir.

Perfect, thank you. I'll see if I can get a Windows environment running.

If you want to try to get further and don't mind the temporary files that will be left behind, removing these lines should be functionally harmless:
https://github.com/jupierce/openshift-jenkins-pipeline-dsl/blob/master/src/main/java/com/openshift/jenkins/plugins/pipeline/OcAction.java#L222-L223

There are input streams that are never closed. Windows is not as forgiving as linux is with file handles.
Example:
byte[] newOutput = IOUtils.toByteArray( stdoutTmp.readFromOffset( stdOut.size() ) );
This can be fixed by closing the input stream when done with it:
byte[] newOutput;
try (InputStream is = stdoutTmp.readFromOffset( stdOut.size() )) {
    newOutput = IOUtils.toByteArray( is );
}

Looks like OcAction and OcWatch have this issue.

Fix pushed. @MarkRx I owe you a beer.

You missed one :)
stdErr.write( IOUtils.toByteArray( stderrTmp.read() ) );

Amended. PTAL.

That fixed it. Thanks!


feat(navigation): rework selected state style for better a11y

Moved to https://github.com/lumapps/design-system/pull/1219


Fixed text overflow for CD names

It works the same as for Host and FQDN fields.
Fixes: https://github.com/oVirt/ovirt-web-ui/issues/916

ci build please

lgtm