Problem with absolute path appended after relative one

I have a test file that require a relative file (the file to test) https://github.com/MoOx/statinamic/blob/19fc8085ceb14a55a149feb330526f4275889cfa/src/PageContainer/tests/component.js#L8
But when I run test using nyc babel-tape-runner src/**/__tests__/*.js (or nyc --require babel-core/register tape src/**/__tests__/*.js) I got weird result that include the entire filename after the relative parent folder like this
...

1..23
# tests 23
# pass  23

# ok

-------------------------------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                                                |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-------------------------------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
 PageContainer/Users/MoOx/Sync/Development/statinamic/src/PageContainer/                                           |    73.33 |    71.88 |      100 |    73.33 |                |
  component.js                                                                                |    73.33 |    71.88 |      100 |    73.33 |... 79,80,84,87 |
 PageContainer/__tests__/Users/MoOx/Sync/Development/statinamic/src/PageContainer/__tests__/                       |      100 |      100 |       25 |      100 |                |
  component.js                                                                                |      100 |      100 |       25 |      100 |                |

When I check the report, I can clearly see the issue
$ nyc report --reporter=text-lcov
TN:
SF:./src/PageContainer/__tests__/Users/MoOx/Sync/Development/statinamic/src/PageContainer/__tests__/component.js
FN:15,noop
FN:16,Page
FN:17,PageError
FN:19,(anonymous_5)
FNF:4
FNH:1
...

Note that es6 import syntax is transpiled by babel to the same relative path
$ babel src/PageContainer/__tests__/component.js

...

var _react2 = _interopRequireDefault(_react);

var _reactAddonsTestUtils = require("react-addons-test-utils");

var _component = require("../component"); /// <- same relative path

What am I doing wrong to get this weird path?

I think I found a workaround.
  "config": {
    "nyc": {
      "exclude": [
        "**/__tests__/**/*.js"
      ]
    }
  }

That said, it's still very unclear to me: when I use a specific file that works, when I use a glob, that doesn't :(
~/Sync/Development/statinamic master*
❯ nyc babel-tape-runner ./src/PageContainer/__tests__/component.js
TAP version 13
# PageContainer is properly rendered
ok 1 should render a Page if page is ok
ok 2 should render a visible error if page is not ok and no PageError available
ok 3 should render a PageError if page is not ok and PageError is available

1..3
# tests 3
# pass  3

# ok

----------------|----------|----------|----------|----------|----------------|
File            |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------------|----------|----------|----------|----------|----------------|
 PageContainer/ |    73.33 |    71.88 |      100 |    73.33 |                |
  component.js  |    73.33 |    71.88 |      100 |    73.33 |... 79,80,84,87 |
----------------|----------|----------|----------|----------|----------------|
All files       |    73.33 |    71.88 |      100 |    73.33 |                |
----------------|----------|----------|----------|----------|----------------|

~/Sync/Development/statinamic master*
❯ nyc babel-tape-runner './src/**/__tests__/*.js'
TAP version 13
# statinamic/lib/configurator
ok 1 should return an 'baseUrl' object in the config
ok 2 should contain 'hostname' in 'baseUrl'
ok 3 should contain 'port' in 'baseUrl'
ok 4 should contain 'pathname' in 'baseUrl'
ok 5 should return an 'consts' object in the config
# statinamic/lib/enhance-collection
ok 6 should filter by object { key: string }
ok 7 should filter by object { key: regexp }
# statinamic/lib/filename-to-url
ok 8 should transform */index.md path to a simple url
ok 9 should transform *\index.md path to a simple url (windows compat)
ok 10 should transform */index.json path to a simple url
ok 11 should transform md path to a simple url
ok 12 should transform index.md path to a empty url
ok 13 should handle windows backslash
# statinamic/lib/md-collection-loader feed helper
ok 14 should generate a feed from a collection
# statinamic/lib/md-collection-loader
ok 15 doesn't give any error
ok 16 doesn't give any warning
ok 17 should create a json for an given md
# statinamic/lib/md-collection-loader/minify
ok 18 should create a minified collection (without body)
# PageContainer is properly rendered
ok 19 should render a Page if page is ok
ok 20 should render a visible error if page is not ok and no PageError available
ok 21 should render a PageError if page is not ok and PageError is available
# escape JSON for HTML
ok 22 function should escape all end of script tag
ok 23 result should not contain unescaped end of script tag

1..23
# tests 23
# pass  23

# ok

-----------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                                                |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-----------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
 PageContainer/Users/MoOx/Sync/Development/statinamic/src/PageContainer/                       |    73.33 |    71.88 |      100 |    73.33 |                |
  component.js                                                                                |    73.33 |    71.88 |      100 |    73.33 |... 79,80,84,87 |
 configurator/Users/MoOx/Sync/Development/statinamic/src/configurator/                         |     87.5 |    63.64 |      100 |     87.5 |                |
  index.js                                                                                |     87.5 |    63.64 |      100 |     87.5 |          18,26 |
 enhance-collection/Users/MoOx/Sync/Development/statinamic/src/enhance-collection/             |    38.98 |    28.57 |    45.45 |    42.59 |                |
  index.js                                                                                |    38.98 |    28.57 |    45.45 |    42.59 |... 112,113,114 |
 filename-to-url/Users/MoOx/Sync/Development/statinamic/src/filename-to-url/                   |       75 |       50 |      100 |       75 |                |
  index.js                                                                                |       75 |       50 |      100 |       75 |              5 |
 md-collection-loader/Users/MoOx/Sync/Development/statinamic/src/md-collection-loader/         |    83.33 |    65.63 |    66.67 |    83.33 |                |
  cache.js                                                                                |      100 |      100 |      100 |      100 |                |
  feed.js                                                                                |     87.5 |       60 |      100 |     87.5 |             16 |
  index.js                                                                                |    81.82 |    68.18 |       40 |    81.82 |... 7,91,98,112 |
  minify.js                                                                                |      100 |      100 |      100 |      100 |                |
 static/escapeJSONforHTML/Users/MoOx/Sync/Development/statinamic/src/static/escapeJSONforHTML/ |      100 |      100 |      100 |      100 |                |
  index.js                                                                                |      100 |      100 |      100 |      100 |                |
-----------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
All files                                                                                |    64.24 |    53.28 |       70 |    66.44 |                |
-----------------------------------------------------------------------------------------------|----------|----------|----------|----------|----------------|

As soon as I use two files, I got the issue.
~/Sync/Development/statinamic master*
❯ nyc babel-tape-runner ./src/PageContainer/__tests__/component.js ./src/configurator/__tests__/index.js
TAP version 13
# PageContainer is properly rendered
ok 1 should render a Page if page is ok
ok 2 should render a visible error if page is not ok and no PageError available
ok 3 should render a PageError if page is not ok and PageError is available
# statinamic/lib/configurator
ok 4 should return an 'baseUrl' object in the config
ok 5 should contain 'hostname' in 'baseUrl'
ok 6 should contain 'port' in 'baseUrl'
ok 7 should contain 'pathname' in 'baseUrl'
ok 8 should return an 'consts' object in the config

1..8
# tests 8
# pass  8

# ok

-------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                                     |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
 PageContainer/Users/MoOx/Sync/Development/statinamic/src/PageContainer/ |    73.33 |    71.88 |      100 |    73.33 |                |
  component.js                                                           |    73.33 |    71.88 |      100 |    73.33 |... 79,80,84,87 |
 configurator/Users/MoOx/Sync/Development/statinamic/src/configurator/   |     87.5 |    63.64 |      100 |     87.5 |                |
  index.js                                                               |     87.5 |    63.64 |      100 |     87.5 |          18,26 |
-------------------------------------------------------------------------|----------|----------|----------|----------|----------------|
All files                                                                |    78.26 |    68.52 |      100 |    78.26 |                |
-------------------------------------------------------------------------|----------|----------|----------|----------|----------------|

I am trying to play with exclude and include separately, and at the same time but don't get anything logic :/

@MoOx could you create and share a branch that causes this exception, then @jamestalmage can easily dig into the problem.
Sorry that you're running into issues.

$ git clone https://github.com/MoOx/statinamic.git
$ cd statinamic
$ git checkout coverage-failure
$ npm install
$ npm run test-with-coverage

The big failure should append and you should be able to run the command I showed above (with node_modules/.bin in your PATH)
I think it's related to tape being single process. I am currently upgrading to babel to switch to ava and hope that will help (but maybe I am doing this for nothing, you tell me ^^).
Here is the issue on travis where you can see the weird filenames https://travis-ci.org/MoOx/statinamic/builds/99982122#L640

I use tape, not tap. Can this be THE issue?

@MoOx I'd like nyc to work (within reason) with any test runner, we'll dig into this.

I successfully avoided the reported issue by replacing tape by tap.

I also successfully switched to tape without this issue
~/Sync/Development/statinamic dev*
❯ npm run test-with-coverage

><EMAIL_ADDRESS>test-with-coverage /Users/MoOx/Sync/Development/statinamic
> nyc npm run tests

><EMAIL_ADDRESS>tests /Users/MoOx/Sync/Development/statinamic
> ava src/**/__tests__/*.js

  7 passed

-----------------------|----------|----------|----------|----------|----------------|
File                   |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-----------------------|----------|----------|----------|----------|----------------|
 PageContainer/        |       75 |    70.59 |      100 |    74.19 |                |
  component.js         |       75 |    70.59 |      100 |    74.19 |... 79,80,84,87 |
 configurator/         |     87.5 |    63.64 |      100 |     87.5 |                |
  index.js             |     87.5 |    63.64 |      100 |     87.5 |          18,26 |
 enhance-collection/   |    38.98 |    29.41 |    45.45 |    42.59 |                |
  index.js             |    38.98 |    29.41 |    45.45 |    42.59 |... 112,113,114 |
 filename-to-url/      |       75 |       50 |      100 |       75 |                |
  index.js             |       75 |       50 |      100 |       75 |              5 |
 md-collection-loader/ |    72.34 |       50 |    55.56 |    73.91 |                |
  cache.js             |      100 |      100 |      100 |      100 |                |
  feed.js              |     87.5 |       60 |      100 |     87.5 |             16 |
  index.js             |    67.65 |       50 |       20 |     69.7 |... 109,110,112 |
  minify.js            |    66.67 |       25 |      100 |    66.67 |              3 |
-----------------------|----------|----------|----------|----------|----------------|
All files              |    62.03 |    49.66 |    58.33 |    64.24 |                |
-----------------------|----------|----------|----------|----------|----------------|

I mean from tape to ava

@MoOx, @novemberborn did some work to switch over to absolute paths. Give this a shot:
npm i nyc@next --save-dev

Hey,
I'm afraid I have the same problem with my setup. I use lerna to manage mutliple packages in the same repo and run my tests from the root directory.
I've got this output:
--------------------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                          |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
--------------------------------------------------------------|----------|----------|----------|----------|----------------|
 Users/ngryman/Projects/arbre/packages/arbre-convert/         |      100 |      100 |      100 |      100 |                |
  index.js                                                    |      100 |      100 |      100 |      100 |                |
 lib/Users/ngryman/Projects/arbre/packages/arbre-convert/lib/ |      100 |      100 |      100 |      100 |                |
  from-array.js                                               |      100 |      100 |      100 |      100 |                |
  from-json.js                                                |      100 |      100 |      100 |      100 |                |
  from-object.js                                              |      100 |      100 |      100 |      100 |                |
  to-array.js                                                 |      100 |      100 |      100 |      100 |                |
  to-json.js                                                  |      100 |      100 |      100 |      100 |                |
  to-object.js                                                |      100 |      100 |      100 |      100 |                |
--------------------------------------------------------------|----------|----------|----------|----------|----------------|
All files                                                     |      100 |      100 |      100 |      100 |                |
--------------------------------------------------------------|----------|----------|----------|----------|----------------|

I'm running npm test in the /Users/ngryman/Projects/arbre directory which executes the following command: nyc ava packages/*/test.
Here is the relevant part of my package.json:
"ava": {
    "concurrency": 4,
    "require": [
      "babel-register",
      "./test/helpers/seed"
    ]
  },
  "babel": {
    "presets": [
      "node5"
    ],
    "plugins": [
      "istanbul"
    ]
  },
  "nyc": {
    "include": [
      "packages/*/{,lib/}*.js"
    ],
    "sourceMap": false,
    "instrument": false
  }

Even if it's really a wip, here is my repo for reference: https://github.com/ngryman/arbre.
Perhaps it's a misconfiguration, but I can't find what I'm doing wrong...


Adds support for a pair argument.  Also addresses multibyte offset issue.

The Python encode allows the passing of two arguments - a sequence and a pair - that are subsequently combined and encoded.  This makes sense in certain prompt/completion or question/answer workflows.  This adds support for an optional pair.
Additionally, when I was looking at the Rust implementation, I noted a distinction between the code that the Python binding was calling (encode_char_offsets) and what the Ruby binding was calling (encode) on the underlying Rust tokenizer.  This leads to a difference in how offsets are calculated for strings that contain multibyte characters in the tokenizer vocabulary.  I updated the binding to call a function matching the Python version.
I added the pair argument as a positional argument to the Ruby code.  Please let me know if you'd rather it be a keyword argument.

Thanks @petergoldstein! Agree it's better as positional.

Just fyi, planning to make the next release 0.3.0, so changed the default value of add_special_tokens to true.


net/frr: fix route-maps with ipv6 prefix-lists

Closes #1598
While here also fix a bug where multiple sets would be possible

merged


Prevent excessive remove votes

Continuation of https://github.com/navcoin/navcoin-core/pull/805, this PR fixes a bug where the wallet would still add REMOVE votes if the entry expired.

A new build of 7e9ff3b0e1851fe1d53a801d71ce7a2f2f7e5f72 has completed succesfully!
Binaries available at https://build.nav.community/binaries/excessive-remove-votes


Correct approach for having a peripheral disconnect itself from central device?

Hi there Martijn!
Due to some client SDK issues for central devices, notably iOS, I need to have the peripheral disconnect itself. So far I've tried, in a specifically defined disconnect characteristic:

Disconnecting the central device, and then removing said device.
a. The main problem here is that in order to reconnect with the device, the user has to forget the bluetooth device, otherwise the reconnect fails. We have one specific flow where this is something we really don't want to have to do, and iOS doesn't enable applications to forget bluetooth devices.
b. Another issue, probably because I shouldn't be disconnecting this way, is that other centrals that were previously added to the peripheral are also forgotten. (I'm seeing No cache for <central MAC address> when looking in /var/log/messages)

    binc_device_disconnect(device);
    binc_adapter_remove_device(default_adapter, device);

Disconnecting the central device, and then advertising again. The problem here is that the disconnect call on its own is flaky, and that means that I need to occasionally call the disconnect multiple times.  Then because its already advertising, I get an error saying the advertisement already exists.

    binc_device_disconnect(device);
    binc_adapter_start_advertising(default_adapter, advertisement);

Am I on the right track? Is there a different disconnect command or order of operations I should use?  Also, is there a callback I can set for when the peripheral connection state changes? The central state change callback isn't called when just calling binc_device_disconnect.
I appreciate any input you may have, and I hope you're having a good day!
Liz

Not really sure if I fully understand what you are doing exactly. Please change some relevant code....
What I can say in general is that binc_device_disconnect is an async method. You have to wait for the disconnect to complete before doing anything else. You should certainly not remove that device before the disconnect is completed. If you do that you will not receive the callback because you erased the device from the internal 'administration'.....

ok so I changed my logic to the following:
// main
// ....
    // Setup callback for device connection state changes
    binc_adapter_set_remote_central_cb(default_adapter,
                                       &on_central_state_changed);
// ...
const char *on_local_char_write(const Application *application,
                                const char *address, const char *service_uuid,
                                const char *char_uuid, GByteArray *byte_array) {

  if ((g_str_equal(char_uuid, DISCONNECT_CHAR_UUID))) {
    LOGI("Disconnect requested: disconnecting from central device");
    Device *device =
        binc_adapter_get_device_by_address(default_adapter, address);
    LOGI("Device is %s", binc_device_get_path(device));
    if (device == NULL) {
      LOGE("Failed to get device by address");
      return BLUEZ_ERROR_FAILED;
    }
    binc_device_disconnect(device);

    return NULL; // This command will always fail
  }
}

void on_central_state_changed(Adapter *adapter, Device *device) {
  LOGI("device '%s' is now %s", binc_device_get_name(device),
       binc_device_get_connection_state_name(device));
  ConnectionState state = binc_device_get_connection_state(device);
  if (state == CONNECTED) {
    binc_adapter_stop_advertising(adapter, advertisement);
  } else if (state == DISCONNECTED) {
    // remove the device from the adapter
    binc_adapter_remove_device(adapter, device);
    // restart advertising
    binc_adapter_start_advertising(adapter, advertisement);
  }
}

But I'm never reaching the callback. Is this the right callback to use when disconnecting from the central device, as the peripheral? Interestingly though, I no longer need to forget the device, which is ideal! I just need to make sure I can resume advertising on disconnect.

Actually, it does hit it occasionally now - I just needed to reboot my device to see the benefit of not removing it except in the callback. thanks for the guidance!


How to train it as  semi-supervised model

Hi,
I have allx but i do not have ally (tagged labels) in this case how to make model train in semi-supervised (inductive learning) as mentioned in https://github.com/kimiyoung/planetoid way. Please help me on where all to make changes.
Thanks

The current setup of this code release is optimized for transductive learning. For inductive learning, have a look at this recent paper: https://arxiv.org/abs/1706.02216
Nonetheless you can do inductive learning with our code as well, but it requires a few minor adjustments (exclude unlabeled test set nodes from training set).

Thanks for the quick reply.
You mean remove the nodes/feature vectors from allx matrix which does not have one-hot labels i.e, in ally.
Just in case restating the problem:
I have allx - the feature vectors of both labeled and unlabeled training instances (a superset of x),
But i do not have one-hot labels for all the nodes/feature vectors of allx  i.e, ally - the one-hot labels for instances in allx.
so now in this case what should i do?
I do have x(training instances feature vectors) and y (one-hot label for training instances) this is very small number 10% of allx.

What you describe sounds like a transductive learning problem, i.e. you should be able to use our code 'out of the box' with no or only minor modifications. Just make sure to mask out all unlabeled nodes in the loss function (should you train in full-batch mode, i.e. not using mini batches).

Yes -- and for the unlabeled data you can just provide 0-vectors as labels (i.e. all 0s).

Hi，Sorry to keep asking questions(i am new in this area), but i still have two questions:

i can't understand why we can use the loss of the labeled data to represent for the whole loss when use GCN?
And for my problem, i have some spatial-temporal point-distributed  sequence data(observed data by some ground observation station, and for data at each time, a small number of them are labeled, while the others are not), i want to predict the unlabeled data, do you have some idea about that topic?
Thanks very much and sorry again for disturbing you

We simply leave unlabeled data points out of the sum (the total loss is a sum of per-node losses), thereby these do not contribute to the gradient.
For temporal data, you have a few options: i) Simply use an RNN in conjunction with the GCN to model the time component (either at the beginning of the model before the GCN layers or even intermixed with them), ii) If the sequence length is always the same and non-stationary, then it might make sense to concatenate the feature vectors over the sequence and directly feed them into the unmodified GCN model.

Thanks a lot for your so rapid reply!
Your suggestions really enlightened me and I will try to integrate your suggestions with my work.
But for the 1st question, I am so sorry for describing my question unclearly. Actually, what i am confused at is about the reason why it is reasonable to do so. Why we don't need to consider the unlabeled data when we calculate the losses?
Thanks again

You can think the GCN as a method of creating node embeddings (the representation just before the classification layer at the last layer of the model). To get a node embedding for a node in the training set, we aggregate feature information from neighboring nodes (these can be labeled or unlabeled nodes, that doesn’t matter as we only care about node features at this point). In the end, we can use the classification layer to predict a label for one of our nodes. For nodes where we know the labels, we would like the predicted label to be closer to the ground truth, so we define a loss function and optimize the model parameters. We do this for all training set nodes (since these are the only ones that we have labels for). I think in this picture it becomes clearer why this is a reasonable thing to do. Hope this helps!

On 24 Apr 2018, at 15:09, whuqyl<EMAIL_ADDRESS>wrote:
Thanks a lot for your so rapid reply!
Your suggestions really enlightened me and I will try to integrate your suggestions with my work.
But for the 1st question, I am so sorry for describing my question unclearly. Actually, what i am confused at is about the reason why it is reasonable to do so. Why we don't need to consider the unlabeled data when we calculate the losses?
Thanks again
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/tkipf/gcn/issues/16#issuecomment-383923979, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAcYErHd4Gsd1TzoF1zcEV0UMJyvMCaks5tryQDgaJpZM4PUo8z.

thanks very very much for your patient reply!!!
Sorry to ask the last question(really sorry for that =_=):  is it right that we can not evaluate the prediction accuracy on the unlabeled data when we perform transductive learning?(if my main purpose is to predict the class of unlabeled data as accurately as possible)
So sorry for keeping disturbing you with so many questions!

Even if you perform transductive learning with a GCN model the model will be able to predict in an inductive setting. The model generally has a favorable inductive bias that allows it to do that (plus we don't require knowledge of test set nodes to predict). This is only the case if you have node features other than unique one-hot vectors.

Hello Thomas,
I want to use GCN for the segmentation of the cerebral cortex using fMRI images. For each voxel, has its time series representing the functional activity across time.
I looked at the comment above and you mentioned to @whuqyl to that:
For temporal data, you have a few options: i) Simply use an RNN in conjunction with the GCN to model the time component (either at the beginning of the model before the GCN layers or even intermixed with them)

Is there any publication you can point me to then I get more insights about this please ?

My understanding is that one way I can approach the problem is by using the correlation matrix (between time series of voxels) which can be seen as the Adjacency matrix and used to identify embeddings in the graph, then a classification layer can simply identify clusters. According to the feature matrix, I understood that it is possible to use the identity matrix (in the case of their absence) and the model is still performing well. Am I missing something in this ?

Hi, Thanks for your question.

Here's a paper that summarizes this idea nicely: https://arxiv.org/abs/1704.06199
Yes, this is correct.

Hi @tkipf ,
Is there any function in your GCN code so that we could directly get the embedding model. I'm quite struggling in removing the last layer to get embedding model.


Problem compiling 1.16

error: cannot find derive macro `Sync` in this scope
  --> /home/patrick/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rhai-1.16.3/src/ast/ast.rs:21:17
   |
21 | #[derive(Clone, Sync)]
   |                 ^^^^
   |
note: unsafe traits like `Sync` should be implemented explicitly
  --> /home/patrick/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rhai-1.16.3/src/ast/ast.rs:21:17
   |
21 | #[derive(Clone, Sync)]
   |                 ^^^^

Can you show me the features you used?

I'm using only sync

This is quite strange as I can't seem to find that line of code ...

OK, closing this for now.  Feel free to reopen when your problem recurs.


Interop Cloud-to-Prod Tests (build_docker_dart)

build_docker_dart error seen on https://github.com/grpc/grpc/pull/23053 error -
https://source.cloud.google.com/results/invocations/a1314158-9b5d-4860-8eb0-e96e3263c4f0/log

@sigurdm PTAL

I don't see any errors printed in the log. Does this look like a flake?

yes, it looks like a flake, and you are right that the logs do not mention any errors. I was hoping that it was some kind of known issue with a known workaround. In this case, it looks like the starting step would be to have a way to atleast know what kind of issue it was.
I'm going to close this issue for now, but if it flares up again, we should spend some time to figure out why it failed.

well, turns out we are seeing it more often.

@jtattermusch any suggestions?

Getting some more verbose debug after #23496.
Here's one new build_docker_dart failure: https://source.cloud.google.com/results/invocations/7453503d-dbb3-4ff7-a214-778b6afea212/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log
FINE: Exception type: ClientException
FINE: package:http/src/io_client.dart 65:7        IOClient.send
    | ===== asynchronous gap ===========================
    | dart:async                                  Future.catchError
    | package:pub/src/utils.dart 109:52           captureErrors.<fn>
    | package:stack_trace                         Chain.capture
    | package:pub/src/utils.dart 122:11           captureErrors
    | package:pub/src/command_runner.dart 171:13  PubCommandRunner.runCommand

2020-07-16 16:12:07,242 FAILED: build_docker_dart [ret=69, pid=21383, time=137.6sec]

... although it's unclear to me what that means.

I also don't understand it, but I think pretty likely it's a download error. Ideally our interop test build wouldn't require any downloads but for some languages that's basically an impossible standard.
I think just pub get || pub get would help (I don't think the sleep is necessary).

btw, based on our historical data, we should be able query which interop builds fail the most often (java, dart or something else..) and tackle them first (fixing only the most important ones improves experience but saves time - we likely won't be able to make all our builds really 100.0% flake proof).


readme updated, BC compliance check fixed

what

BridgeCrew compliance checks fix
readme updated
code clean up
Skipping Encrypt SNS Topic Data in example/test modules
Container Insights Enabled in example/test modules

why

To be able to position our modules as standards compliant
Providing explicit note about policy attached directly to user
removed unnecessary providers dependencies
To comply BridgeCrew check

references

https://docs.bridgecrew.io/docs/general_15

/test all

/test all

/test all

/test all

/test all

/test all


rails 7.2-beta3 error

getting the following error on /login with rails 7.2beta3
 NoMethodError - undefined method `parameter_filter' for nil: 00:25:32 web.1  |   app/misc/rodauth_app.rb:13:in `block in <class:RodauthApp>'
and my rodauth_app.rb
class RodauthApp < Rodauth::Rails::App
  # primary configuration
  configure RodauthMain

  # secondary configuration
  # configure RodauthAdmin, :admin

  route do |r|
    rodauth.load_memory # autologin remembered users

    r.rodauth # route rodauth requests

    # ==> Authenticating requests
    # Call `rodauth.require_account` for requests that you want to
    # require authentication for. For example:
    #
    # # authenticate /dashboard/* and /account/* requests
    # if r.path.start_with?("/dashboard") || r.path.start_with?("/account")
    #   rodauth.require_account
    # end

    # ==> Secondary configurations
    # r.rodauth(:admin) # route admin rodauth requests
  end
end

I think something in the new rails is calling .parameter_filter on r.rodauth which returns nil

seems like the problem is no more.. false alarm i think

actually i discovered this happens on my alpha testing site.. is there a way to configure rodauth on multiple domains? So I'm receiving this error on the alpha.botflip.com domain but not on my primary botflip.com domain
e.g. in app/misc/rodauth_main.rb
domain "botflip.com"
v/s something like
domain ["botfip.com", "alpha.botflip.com"]

I'm using one auth database across multiple domains. I guess I should have checked if this is possible with rodauth-rails first?

If you don't set the domain and just let Rodauth generate URLs from the current hostname, shouldn't everything work fine? At which point to domains get crossed, what specifically do you think rodauth-rails doesn't handle? I'm not sure I can do anything without a backtrace or a reproduction app, currently I have little to go on.

actually just trying that exact thing! removing the domain as well as base_url.. Hoping it works! will report back..

i removed those two config variables but im still getting the same error on my alpha.botflip.com domain..
Heres a trace..
[11127f4a-8649-46bb-9fcb-b2b0ed13f876] Processing by Rails::HealthController#show as */*
[11127f4a-8649-46bb-9fcb-b2b0ed13f876] [ahoy] Visit excluded
[11127f4a-8649-46bb-9fcb-b2b0ed13f876]   Rendering html template
[11127f4a-8649-46bb-9fcb-b2b0ed13f876]   Rendered html template (Duration: 0.1ms | GC: 0.0ms)
[11127f4a-8649-46bb-9fcb-b2b0ed13f876] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] Started POST "/login" for <IP_ADDRESS> at 2024-07-24 08:21:13 +0000
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] Processing by RodauthController#login as HTML
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   Parameters: {"authenticity_token"=>"[FILTERED]"<EMAIL_ADDRESS>"password"=>"[FILTERED]", "commit"=>"Login"}
"INSIDE CAPTCHA CHECK HERE - generic"
nil
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   Sequel (189.1ms)  SELECT * FROM "accounts" WHERE (("email" =<EMAIL_ADDRESS>AND ("status" IN (1, 2))) LIMIT 1
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   TRANSACTION (189.1ms)  BEGIN
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   Sequel (189.2ms)  DELETE FROM "account_email_auth_keys" WHERE ("id" = 2)
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   Sequel (186.7ms)  SELECT "key" FROM "account_remember_keys" WHERE (("id" = 2) AND ("deadline" > CURRENT_TIMESTAMP)) LIMIT 1
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   Sequel (186.3ms)  SELECT "deadline" FROM "account_remember_keys" WHERE (("id" = 2) AND ("deadline" > CURRENT_TIMESTAMP)) LIMIT 1
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]   TRANSACTION (185.3ms)  COMMIT
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] Redirected to
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] Completed 302 Found in 1532ms (ActiveRecord: 1125.5ms (4 queries, 0 cached) | GC: 0.0ms)
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] NoMethodError (undefined method `parameter_filter' for nil):
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc]
[f71f6b74-9960-4a7c-a6d9-2541df58d4cc] app/misc/rodauth_app.rb:11:in `block in <class:RodauthApp>'
[d8d3df6a-d769-4466-b7c3-938f8ce97943] Started GET "/up" for <IP_ADDRESS> at 2024-07-24 08:21:22 +0000
[d8d3df6a-d769-4466-b7c3-938f8ce97943] Processing by Rails::HealthController#show as */*
[d8d3df6a-d769-4466-b7c3-938f8ce97943] [ahoy] Visit excluded
[d8d3df6a-d769-4466-b7c3-938f8ce97943]   Rendering html template
[d8d3df6a-d769-4466-b7c3-938f8ce97943]   Rendered html template (Duration: 0.0ms | GC: 0.0ms)
[d8d3df6a-d769-4466-b7c3-938f8ce97943] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5] Started GET "/up" for <IP_ADDRESS> at 2024-07-24 08:21:32 +0000
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5] Processing by Rails::HealthController#show as */*
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5] [ahoy] Visit excluded
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5]   Rendering html template
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5]   Rendered html template (Duration: 0.0ms | GC: 0.0ms)
[183c74b2-66ac-4cd5-ab21-24c6e443f6c5] Completed 200 OK in 580ms (Views: 0.8ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 200.9ms)
[eda14a2f-38f7-4492-baf9-550fb4f091b4] Started GET "/up" for <IP_ADDRESS> at 2024-07-24 08:21:43 +0000
[eda14a2f-38f7-4492-baf9-550fb4f091b4] Processing by Rails::HealthController#show as */*

I'm on rails 7.2beta3 btw

This is not a backtrace of the exception, it's just logging around it. If you're able to receive this error in the browser, the error page should allow you to see the full trace. What's currently shown is just that it's coming from the r.rodauth call, which I already guessed.

Thanks for the quick response! here's the full trace in development.
[actionpack (7.2.0.beta3) lib/action_dispatch/http/filter_redirect.rb:41:in `block in parameter_filtered_location'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/http/filter_redirect.rb:40:in `gsub!'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/http/filter_redirect.rb:40:in `parameter_filtered_location'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/http/filter_redirect.rb:14:in `filtered_location'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:71:in `block in rails_instrument_redirection'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/hooks/active_support_notifications.rb:19:in `block in instrument'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/notifications/instrumenter.rb:58:in `instrument'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/hooks/active_support_notifications.rb:18:in `instrument'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:66:in `rails_instrument_redirection'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/internal_request.rb:38:in `rails_instrument_redirection'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:14:in `redirect'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/login.rb:149:in `_login_response'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/base.rb:873:in `require_response'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/login.rb:94:in `login'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/login.rb:74:in `block (4 levels) in <module:Rodauth>'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/base.rb:636:in `catch'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/base.rb:636:in `catch_error'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/login.rb:47:in `block (3 levels) in <module:Rodauth>'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/request.rb:536:in `always'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:32:in `block in always'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:32:in `catch'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:32:in `always'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/request.rb:527:in `_verb'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/request.rb:273:in `post'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/login.rb:43:in `block (2 levels) in <module:Rodauth>'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth.rb:145:in `block (3 levels) in route'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/base.rb:538:in `_around_rodauth'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:12:in `block in _around_rodauth'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:21:in `block (3 levels) in rails_controller_around'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:21:in `catch'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:21:in `block (2 levels) in rails_controller_around'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/csrf.rb:41:in `block in rails_controller_callbacks'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:121:in `block in run_callbacks'](http://localhost:3002/login#)
[turbo-rails (2.0.6) lib/turbo-rails.rb:24:in `with_request_id'](http://localhost:3002/login#)
[turbo-rails (2.0.6) app/controllers/concerns/turbo/request_id_tracking.rb:10:in `turbo_tracking_request_id'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:130:in `block in run_callbacks'](http://localhost:3002/login#)
[ahoy_matey (5.1.0) lib/ahoy/controller.rb:50:in `set_ahoy_request_store'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:130:in `block in run_callbacks'](http://localhost:3002/login#)
[actiontext (7.2.0.beta3) lib/action_text/rendering.rb:25:in `with_renderer'](http://localhost:3002/login#)
[actiontext (7.2.0.beta3) lib/action_text/engine.rb:71:in `block (4 levels) in <class:Engine>'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:130:in `instance_exec'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:130:in `block in run_callbacks'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:141:in `run_callbacks'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:32:in `rails_controller_callbacks'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/csrf.rb:38:in `rails_controller_callbacks'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:20:in `block in rails_controller_around'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:37:in `rails_controller_rescue'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:19:in `rails_controller_around'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/internal_request.rb:28:in `rails_controller_around'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/callbacks.rb:12:in `_around_rodauth'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:10:in `block in _around_rodauth'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:50:in `block (2 levels) in rails_instrument_request'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:50:in `catch'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:50:in `block in rails_instrument_request'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/hooks/active_support_notifications.rb:19:in `block in instrument'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/notifications/instrumenter.rb:58:in `instrument'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/hooks/active_support_notifications.rb:18:in `instrument'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:49:in `rails_instrument_request'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/internal_request.rb:33:in `rails_instrument_request'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/feature/instrumentation.rb:10:in `_around_rodauth'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth.rb:143:in `block (2 levels) in route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/request.rb:603:in `if_match'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:38:in `block in if_match'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:38:in `catch'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/pass.rb:38:in `if_match'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/request.rb:199:in `is'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth.rb:140:in `block in route'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth/features/base.rb:169:in `route!'](http://localhost:3002/login#)
[rodauth-omniauth (0.3.4) lib/rodauth/features/omniauth_base.rb:44:in `route!'](http://localhost:3002/login#)
[rodauth (2.36.0) lib/rodauth.rb:444:in `rodauth'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/app.rb:70:in `rodauth'](http://localhost:3002/login#)
[app/misc/rodauth_app.rb:11:in `block in <class:RodauthApp>'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:522:in `_roda_run_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/middleware.rb:207:in `_roda_run_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/_before_hook.rb:27:in `_roda_run_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:500:in `block in _roda_handle_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:498:in `catch'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:498:in `_roda_handle_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/error_handler.rb:88:in `_roda_handle_main_route'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:384:in `block in base_rack_app_callable'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda.rb:53:in `call'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/middleware.rb:159:in `block in call'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/middleware.rb:157:in `catch'](http://localhost:3002/login#)
[roda (3.82.0) lib/roda/plugins/middleware.rb:157:in `call'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/middleware.rb:18:in `block in call'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/middleware.rb:17:in `catch'](http://localhost:3002/login#)
[rodauth-rails (1.14.1) lib/rodauth/rails/middleware.rb:17:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/static.rb:161:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/tempfile_reaper.rb:20:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/etag.rb:29:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/conditional_get.rb:43:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/head.rb:15:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/http/permissions_policy.rb:38:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/http/content_security_policy.rb:36:in `call'](http://localhost:3002/login#)
[rack-session (2.0.0) lib/rack/session/abstract/id.rb:272:in `context'](http://localhost:3002/login#)
[rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/cookies.rb:704:in `call'](http://localhost:3002/login#)
[activerecord (7.2.0.beta3) lib/active_record/migration.rb:674:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/callbacks.rb:101:in `run_callbacks'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/callbacks.rb:30:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/executor.rb:16:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/rack/abstract_middleware.rb:92:in `call_app'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/rack/abstract_middleware.rb:87:in `instrument_app_call'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/rack/abstract_middleware.rb:111:in `instrument_app_call_with_exception_handling'](http://localhost:3002/login#)
[appsignal (3.12.0) lib/appsignal/rack/abstract_middleware.rb:52:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'](http://localhost:3002/login#)
[web-console (4.2.1) lib/web_console/middleware.rb:132:in `call_app'](http://localhost:3002/login#)
[web-console (4.2.1) lib/web_console/middleware.rb:28:in `block in call'](http://localhost:3002/login#)
[web-console (4.2.1) lib/web_console/middleware.rb:17:in `catch'](http://localhost:3002/login#)
[web-console (4.2.1) lib/web_console/middleware.rb:17:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'](http://localhost:3002/login#)
[railties (7.2.0.beta3) lib/rails/rack/logger.rb:41:in `call_app'](http://localhost:3002/login#)
[railties (7.2.0.beta3) lib/rails/rack/logger.rb:29:in `call'](http://localhost:3002/login#)
[ahoy_matey (5.1.0) lib/ahoy/engine.rb:22:in `call_with_quiet_ahoy'](http://localhost:3002/login#)
[propshaft (af557fbd10dc) lib/propshaft/quiet_assets.rb:11:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/remote_ip.rb:96:in `call'](http://localhost:3002/login#)
[request_store (1.7.0) lib/request_store/middleware.rb:19:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/request_id.rb:33:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/method_override.rb:28:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/runtime.rb:24:in `call'](http://localhost:3002/login#)
[activesupport (7.2.0.beta3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/server_timing.rb:61:in `block in call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/server_timing.rb:26:in `collect_events'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/server_timing.rb:60:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/executor.rb:16:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/static.rb:27:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/sendfile.rb:114:in `call'](http://localhost:3002/login#)
[actionpack (7.2.0.beta3) lib/action_dispatch/middleware/host_authorization.rb:143:in `call'](http://localhost:3002/login#)
[rack (3.1.7) lib/rack/events.rb:116:in `call'](http://localhost:3002/login#)
[railties (7.2.0.beta3) lib/rails/engine.rb:535:in `call'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/configuration.rb:272:in `call'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/request.rb:100:in `block in handle_request'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/thread_pool.rb:378:in `with_force_shutdown'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/request.rb:99:in `handle_request'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/server.rb:464:in `process_client'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/server.rb:245:in `block in run'](http://localhost:3002/login#)
[puma (6.4.2) lib/puma/thread_pool.rb:155:in `block in spawn_thread'](http://localhost:3002/login#)
Request
Parameters:

{"authenticity_token"=>"[FILTERED]"<EMAIL_ADDRESS>"password"=>"[FILTERED]", "commit"=>"Login"}```

Thanks, I appreciate the backtrace 🙏🏻
The error is odd, it seems like ActionDispatch::Response#request is nil, but rodauth-rails is setting it. I tried upgrading to 7.2.0.beta3 on the rodauth-demo-rails app, adding <IP_ADDRESS> foo.example.test to /etc/hosts, adding config.hosts << "foo.example.test" to config/application.rb, but I was able to successfully login while on foo.example.test.
Any chance you could reproduce it in the official demo app?

Found it, it's not about subdomains, but about query parameters. rodauth-rails instrumentation doesn't initialize the response correctly (it doesn't set the #request), so if Rodauth redirects to a route with query parameters, it hits a code path inside Action Pack that requires #request to be set.
I'll push a fix shortly.

Thank you!


runtime/coverage: coverage from other binaries is not collected in tests

What version of Go are you using (go version)?

$ go version
go version go1.20.4 darwin/arm64

Does this issue reproduce with the latest release?
Yes, with devel go1.21-91b8cc0d.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/filippo/Library/Caches/go-build"
GOENV="/Users/filippo/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/filippo/pkg/mod"
GONOPROXY="github.com/FiloSottile/*,filippo.io/*"
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/filippo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/opt/homebrew/Cellar/go/1.20.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.20.4/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.4"
GCCGO="gccgo"
AR="ar"
CC="cc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/Users/filippo/src/filippo.io/litetlog/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_j/hq4ytn1n4b94fhrpvvb9tktr0000gn/T/go-build1323402631=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
Within a Go test, built a binary from a different package in the same module with -cover and executed it.
Ran the test with -coverpkg=./....
What did you expect to see?
Coverage of the command invocation included in the test summary.
What did you see instead?
coverage: 0.0% of statements in ./...

I expected this to work because there is explicit support for it in the testing package, which propagates the temporary GOCOVERDIR to the environment.
https://github.com/golang/go/blob/91b8cc0dfaae12af1a89e2b7ad3da10728883ee1/src/cmd/go/internal/test/test.go#L1326-L1330
Indeed, rogpeppe/go-internal#201 takes advantage of this to run the test binary as a subprocess and collect coverage from that invocation with the coverage of the main test run.
However, there is then code to exclude coverage from other binaries, introduced for #57924.
https://github.com/golang/go/blob/91b8cc0dfaae12af1a89e2b7ad3da10728883ee1/src/runtime/coverage/testsupport.go#L84-L96
I think running integration tests within a Go test is a more idiomatic way to do it than rigging a script with go tool covdata invocations, and it's nice that GOCOVERDIR gets already set up and propagated automatically, but the pattern then breaks when the coverage data is not collected.
As an aside, it should be documented somewhere how test coverage is propagated and collected.

cc @thanm

@seankhliao @thanm My use case is that I need to generate the code-coverage from a containerised Go application running inside Kubernetes Pod after running the integration test. This application (server) is long running and doesn't terminate.
I need a way to emit the coverage out after running my integration test.
Currently, with Go 1.20.4 which I tried, I can see covmeta file is getting generated inside the GOCOVERDIR directory but covcounters files are not getting generated. Is there any cmdline option to emit the coverage out or any workaround available?

@ankitjain1510  collecting snapshots of coverage from server binaries is a bit different as @FiloSottile mentioned.  We have APIs for doing this, but the documentation for them is not written/published (please bear with me on that). Thanks.

Hi @FiloSottile
Thanks for the report. It might be helpful for me to understand your high-level goals here in a bit more detail.
From your description it sounds like you have a module with that has a package P with tests, and in the test code you use "go build -cover" to build some sort of auxiliary binary (which might import P), then you would like to see the coverage effects of running the binary reflected in the coverage percentage numbers for P, something like that?
Is your main item of interest the coverage percentages or are you looking at text profiles as well?
It seems important to ensure that when a "-cover" test binary executes and writes out coverage stats or profiles, the raw material for that report comes only from running the test.
So for example, if you were to do something like
$ mkdir /tmp/xyz
$ go build -o myapp.exe -cover myapp
$ GOCOVERDIR=/tmp/xyz ./myapp.exe
$ GOCOVERDIR=/tmp/xyz go test -cover somePackage
...
$

it is important that the coverage numbers reported for "somePackage" don't incorporate any of the data files that might be in /tmp/xyz. These sorts of concerns are what motivated  the testsupport.go code that you hlghlighted.

@ankitjain1510 collecting snapshots of coverage from server binaries is a bit different as @FiloSottile mentioned. We have APIs for doing this, but the documentation for them is not written/published (please bear with me on that). Thanks.

Thanks for the response @thanm. Do we have any timeline available by when the documentation will be available?

@seankhliao @thanm My use case is that I need to generate the code-coverage from a containerised Go application running inside Kubernetes Pod after running the integration test. This application (server) is long running and doesn't terminate. I need a way to emit the coverage out after running my integration test.
Currently, with Go 1.20.4 which I tried, I can see covmeta file is getting generated inside the GOCOVERDIR directory but covcounters files are not getting generated. Is there any cmdline option to emit the coverage out or any workaround available?

We have the same need, and at the moment we are using the same trick of pre-1.20 version. Our server is checking the GOCOVERDIR env var, if set we are adding a /exit route that will be used to quit the server.

From your description it sounds like you have a module with that has a package P with tests, and in the test code you use "go build -cover" to build some sort of auxiliary binary (which might import P), then you would like to see the coverage effects of running the binary reflected in the coverage percentage numbers for P, something like that?
Is your main item of interest the coverage percentages or are you looking at text profiles as well?

Yep pretty much. I have testscript tests that build a set of commands from my module and use them all together in test scripts (for example, use foo-keygen to make a key and then run a server with that key and then use fooctl to inspec tthe database) and I would like to get aggregate coverage profiles.
I understand wanting to ignore spurious entries in GOCOVERDIR. Maybe that can be achieved by taking a snapshot of existing files before executing the test and then only aggregating new ones?
Anyway it's weirdly inconsistent that sub-invocations of the same test binary leads to profiles that get aggregated but sub-invocations of other binaries doesn't. Even invocations of the same test binary might be from separate test runs that shouldn't be aggregated, too.

Currently, with Go 1.20.4 which I tried, I can see covmeta file is getting generated inside the GOCOVERDIR directory but covcounters files are not getting generated. Is there any cmdline option to emit the coverage out or any workaround available?

@ankitjain1510 did you find solution to this problem?

Thanks for the prompt response Ankit.
Regards
Savita Juyal
On Tue, 11 Jul 2023 at 2:41 PM, Ankit Jain @.***> wrote:

Currently, with Go 1.20.4 which I tried, I can see covmeta file is
getting generated inside the GOCOVERDIR directory but covcounters files
are not getting generated. Is there any cmdline option to emit the coverage
out or any workaround available?
@ankitjain1510 https://github.com/ankitjain1510 did you find solution
to this problem?
@sjuyal5 https://github.com/sjuyal5 No. I am also stuck at the same
place with the same issue. I started using the alternative tool i.e.
https://github.com/qiniu/goc
—
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/60182#issuecomment-1630453047, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BADQKOZHISRONVQJCAOGVQTXPUKEPANCNFSM6AAAAAAYBBJITE
.
You are receiving this because you were mentioned.Message ID:
@.***>

I have a very similar use case which led me to create an issue that was closed as duplicate https://github.com/golang/go/issues/63660
To sum it up, I wrote a package that handles context cancelation around signals. Signals cannot be tested as a unit test, and so I created a small testing acceptance binary in my tests that I can run, send signals to, and assert the correct output.
When I detect that a -test.gocoverdir flag is set because the go test command is being run in -cover , I build the acceptance binary with the -cover flag.
However, only the coverage of unit tests is reported using the go test command. If I however set the gocoverdir to some local non-temporary folder, I can see that all of the covdata has been emitted into it and that if I run the go tool covdata percent command that I have 100% coverage and everything is there.
This seems like a bug. I have noticed that go test -cover creates a new temporary directory for coverage on each run, and that the directory is removed before exiting. If that's the case, why aren't we taking into account all of the coverage that go test creates including the subprocesses that the tests execute? Why are we only reporting the covdata that go test -cover creates within its own process rather than all the coverage that was triggered by it?
As of today to get full coverage of you application you need to:

run go test with a local gocoverdir

go test -cover -test.gocoverdir=./coverage ./...

view an incorrect report of your coverage
run covdata percentage yourself
go tool covdata percent -i ./coverage
run cvdata to create your coverage profile

go tool covdata textfmt -i ./coverage -o ./coverage.out
go tool cover -html ./coverage.out

When really it should just work:

go test -coverprofile ./coverage.out
go tool cover -html ./coverage.out

I hit the same issue. In fact, I didn't know that GOCOVERDIR is magically set. So I was running my tests with:
GOCOVERDIR=coverage go test ./... -race -timeout 10m -cover -covermode atomic -args -test.gocoverdir=coverage

It took me quite some time to figure out why things do not work. Why when I then internally call go run from a test, coverage output does not end up in coverage dir. I checked and GOCOVERDIR was present. Only when I checked the value I realized something is strange.
So my proposal would be (and or or):

GOCOVERDIR should not be set automatically if it is already set.
All content from temporary gocovedir should be copied to original gocoverdir.

GOCOVERDIR should not be set automatically if it is already set.
All content from temporary gocovedir should be copied to original gocoverdir.

Or it should be merged into the cover profile provided with -coverprofile.
Anything but discarding my data would be acceptable... I just ran into this as well. Very frustrating as it took me a few days to figure out this is why my data was missing.

Can we get alignment on a preferred path here? I'd like to see a solution make it into 1.24.

1.24 has entered the code freeze stage of the release process, so this will not be making into 1.24.

I would love if we could align for 1.25 then? I am not a contributor to the Go project. But it seems to me that the coverage reporting needs to be lazy and allow subprocesses to write coverage reports to the same report location, and then join all reports. In a nutshell.
It would be a big boon to folks trying to write acceptance/blackbox tests, and the testing of production-like binaries / entrypoints.

I’m just a minor contributor, I only have the member role to help with issue triage so I’m not involved in that kind of decision.


Quick addition of extra dimension for inducing points in spatial covariance function

Hi, based on initial testing this appears to be working. There is certainly a bit of a hit in efficiency from how I implemented this. I suppose that there is a more elegant way to get this to scale to higher dims but I'm not entirely sure how without fully refactoring the code.
Please excuse the early commits in the PR, they were in place to make the repo importable to a Colab environment. I've amended those changes so as not to disturb the base code that you've written.

I've updated the code with your suggestions with the most recent commit.

Thanks for the changes. I've now merged.


[BUG] Getting The pipeline is not valid error

Release version
v<IP_ADDRESS>
Describe the bug
I am not able to authorized newly service connection to publisher pipeline. As it got deleted accidently.
I am getting below error.
There was a resource authorization issue: "The pipeline is not valid. Job push_changes_to_Prod_APIM: Step input azureSubscription references service connection  which could not be found. The service connection does not exist, has been disabled or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz."
Expected behavior
It should have authorized newly created service connection.
Actual behavior

Reproduction Steps
Go to the Service Connections section and create a new service connection
Edit the variable group to replace the old service connection name with the new service connection name.
Delete old service connection name

This is an issue with your own azure devops environment. Nothing related to apiops.
Here is a potential resolution for your error. Again none apiops related.
Service connection could not be found: The pipeline is unable to locate the specified service connection.
Possible reasons:
The service connection does not exist: The service connection referenced might not have been created, or the ID/name of the connection is incorrect.
The service connection has been disabled: The service connection could have been disabled, either manually or due to expiration of credentials (like expired Azure service principal or expired tokens).
The service connection has not been authorized for use: The pipeline may not have the necessary permissions to use the service connection. The project or pipeline might not have been authorized to access the service connection.
How to fix it:
Check if the service connection exists:
In Azure DevOps, go to Project Settings → Service connections and verify if the service connection specified in the pipeline exists.
Verify the service connection’s status:
Make sure the connection is enabled and that any credentials (e.g., Azure service principal) associated with it are still valid.
Authorize the service connection for the pipeline:
Ensure the service connection has been properly authorized for use in the project or pipeline. Some service connections require manual authorization for each pipeline.
Verify permissions:
Ensure that the account running the pipeline has the necessary permissions to access and use the service connection.


DalliError: No server available

we are facing DalliError: No server available
please check following configuration for app
app using gem 'dalli', '~> 2.3.0'
application.rb config.cache_store = :dalli_store
production.rb config.action_controller.perform_caching = true
2015-05-05T17:04:23.370459+00:00 app[web.1]: Cache read: https://survey-web-stgng.herokuapp.com/surveys/12/responses/9?
2015-05-05T17:04:23.370573+00:00 app[web.1]: Dalli::Server#connect <IP_ADDRESS>:11211
2015-05-05T17:04:23.370818+00:00 app[web.1]: <IP_ADDRESS>:11211 failed (count: 5)
2015-05-05T17:04:23.370914+00:00 app[web.1]: <IP_ADDRESS>:11211 is still down (for 152.533 seconds now)
2015-05-05T17:04:23.371024+00:00 app[web.1]: DalliError: No server available

This is pretty clearly a configuration error.  The application is being deployed on Heroku, but the memcache configuration is using the default (<IP_ADDRESS>:11211 - localhost).  You will need to set up a Memcache server or use a Memcache service and configure appropriately.


Update project/repo name

Ok, as requested in this post, I updated pom.xml and readme.MD, etc. Thank you.

I will leave the branch open and will update the package names in IntelliJ now -- one sec

Ah ok, I am sorry about package names. My eclipse was somehow screwed and the package names were not updated at all. Thank you.


Update kamon-bundle to 2.1.9

Updates io.kamon:kamon-bundle from 2.1.8 to 2.1.9.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "io.kamon", artifactId = "kamon-bundle" } ]

labels: library-update, semver-patch

Codecov Report

Merging #730 (52eeb06) into master (1407759) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #730      +/-   ##
==========================================
- Coverage   81.40%   81.33%   -0.08%
==========================================
  Files         114      114
  Lines        3986     3986
  Branches       93       93
==========================================
- Hits         3245     3242       -3
- Misses        741      744       +3

Impacted Files
Coverage Δ

...e/akka/actor/process_index/ProcessIndexProto.scala
98.01% <0.00%> (-1.49%)
:arrow_down:

...pes/src/main/scala/com/ing/baker/types/Value.scala
69.41% <0.00%> (-1.18%)
:arrow_down:

...rcontroller/controllers/ControllerOperations.scala
79.24% <0.00%> (+1.88%)
:arrow_up:

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 1407759...52eeb06. Read the comment docs.


Add pseudo random traversal of set as animation

Because we need all the tricks from the books in this game!
GameCodingComplete 4 page 87

Done https://github.com/JordyMoos/elm-pixel-boulder-game/pull/97


ARROW-16815: [Packaging][RPM] Don't use too many parallel jobs

13371

 Quality gate: Passed
 Everything looks good
Details


Update hello_world example

added missing types
updated variable names and log messages
addressed inconsistencies between the documentation and the code
ran deno fmt

thanks


ACL examples YAML error

Bug Report
For the official document, but there was an unexpected error.
The error was caused by the wrong information configured by yaml. Port should be a number instead of a string.
What did you do?
kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha2
metadata:
  name: whatever
  namespace: whoami
spec:
  destination:
    kind: ServiceAccount
    name: whoami-server
    namespace: whoami
    port: "80"
  rules:
    - kind: HTTPRouteGroup
      name: http-everything
      matches:
        - everything
  sources:
    - kind: ServiceAccount
      name: whoami-client
      namespace: whoami

Output of controller log: (What version of Traefik Mesh are you using?)
The TrafficTarget "whatever" is invalid: spec.destination.port: Invalid value: "string": spec.destination.port in body must be of type number: "string"
What is your environment & configuration (arguments, provider, platform, ...)?
https://doc.traefik.io/traefik-mesh/examples/#acl-example

Correct
kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha2
metadata:
  name: whatever
  namespace: whoami
spec:
  destination:
    kind: ServiceAccount
    name: whoami-server
    namespace: whoami
    port: 80
  rules:
    - kind: HTTPRouteGroup
      name: http-everything
      matches:
        - everything
  sources:
    - kind: ServiceAccount
      name: whoami-client
      namespace: whoami

Closed by #780.


Incomplete inference of generic union type over array

🔎 Search Terms
generic, array, union, inference
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about generics

⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.7.2#code/C4TwDgpgBAaghgGwK7QLxQHZILYCMIBOUAPlAM7AECWGA5gNwCwAUC6JFAEID2AHhABN4yCAB4AKlAi9gEDALKxEKAHxR0AbxZQoAN2UQAXFHFNmAXzNtw0AAoFuYMhKky5CpSLWbtUXHwgyAH5jAgg4AW4MBBAuAKEDCRUAbQBdMx0yCAQIAGNZAWMAOW4ASQwAM0Iks3MWFlyoiigomKKcfAIefkV0ZN8NPQNjAEYocwAaAaGRYwAmcZZUqDhFRowKK2Z15uwqfgFuwPUofuYdQf1ZqDHJ6auUYwAiOafF5mXVqB3gLZ+oCoYE4uaSyeSKYSqAAUg38PQm5GyeQK42M9kcznEKgAlOo1Fpzt8mtwcgA6BDcWhQuGBBFZHL5QTY2r1ZiAmF+AJkYytEDtPCEI5kOlIxmFG7jZlQAD00qgAHkANIIyRURQAAzGpDm6pY7NhXOMewOQpFDIKo0l9BlcoAogQHAQVTYoAByF5PV1QNWYbjAFZkMhUWgYOC4HJQYDcSMu10jV16jCiKHsCDcCpQY2CIXY5JYAUEVLJJ4PCBPVIqDk07mZ-bZrlm5GCS3mKWyhXKkzejVaqAe9VAA
💻 Code
type Value = number | string;

type BoxedValue<T extends Value> = {
  value: T;
};

type Props<T extends Value> = {
  boxes?: readonly BoxedValue<T>[];
  selected: NoInfer<T>;
}

const onlyNumberBoxes = [
  { value: 1 },
  { value: 2 }
] as const;

const mixedBoxes = [
  { value: 1 },
  { value: "2" }
] as const;

const fn = <T extends Value>({ boxes, selected }: Props<T>) => {
  console.log(boxes, selected);
}

fn({ boxes: onlyNumberBoxes, selected: 1 }); // OK, T is `1 | 2`
fn({ boxes: mixedBoxes, selected: 1 }); // Error, Type '"2"' is not assignable to type '1'
fn<(typeof mixedBoxes)[number]["value"]>({ boxes: mixedBoxes, selected: 1 }); // OK, T is `1 | "2"`

🙁 Actual behavior
Typescript can't infer the type T in the second call to fn. Instead the following error occurs:
Type 'readonly [{ readonly value: 1; }, { readonly value: "2"; }]' is not assignable to type 'readonly BoxedValue<1>[]'.
  Type '{ readonly value: 1; } | { readonly value: "2"; }' is not assignable to type 'BoxedValue<1>'.
    Type '{ readonly value: "2"; }' is not assignable to type 'BoxedValue<1>'.
      Types of property 'value' are incompatible.
        Type '"2"' is not assignable to type '1'.(2322)

Even though T can be either a number or a string, the compiler seems hung up on the base type of the first value it finds. The fact that the compiler can correctly infer 1 | 2 in the first call, and is fine with the explicit annotation of (typeof mixedBoxes)[number]["value"] in the third call, makes me feel like the error for the second call is unexpected behavior. The intended code is valid (e.g. the third call), but compiler can't get there on inference alone. The same issue occurs if you remove the as const, the error just references number and string instead.
🙂 Expected behavior
No error on the second call to fn; the type T is correctly inferred as 1 | "2".
Additional information about the issue
Perhaps I am encountering a limitation on generic inference? I suppose union types could be arbitrarily large.
My goal in the example above is to restrict the accepted type for selected to the actual types given in the boxed values. I came up with a workaround that exhibits the correct behavior, but is not as intuitive: https://www.typescriptlang.org/play/?#code/C4TwDgpgBAaghgGwK7QLxQHZILYCMIBOUAPlAM7AECWGA5gNwCwAUC6JFAEID2AHhABN4yNFADeLKFABuiFAC5YciE2YBfVW3DQe-MlHQEIcAdwwIQXPoOEoA2gF1NzdtACSGAGaEjQ5QB4AFSgIXmAIDAF9XQgyAD4DKEC7LDxCBzsAIlkRTKcWLQ4ABQJuMDIgkLCIqKs9BPQJZilcazIAfkVA1SkyCAQIAGNwgUUPbwJfWwgguNU1AuZBswooMwsAORx8Ahj9dDtJcRllRQBGKDUAGiOxE5FFACZLlgcoOH1ljApnL9XsKj8AR7RKHZrHHIKKAXa63e5QzKPTIvZhvD5QP7AX4rYBQTwYRKVULhSLRNpxAAUd1aeiu5H6QxGl0UJTKFUCcQAlAYEk0pH9uAMAHQIbi0Ck02J0voDYaCTnzRb4qlQSVkRTrEBbNK7NrShly0bQy4KqAAejNUAA8gBpOnBKj6AAGF1IjydLGV1LaigBQL2+tlI3OJvo5stFutdqSUEdUBdJCgiMyHuY+P8FNc3E8UD9gj2nMp3r0vsB+b19KDghDalNkdt9tjztdSaRTqAA
If there is a limitation here around generic inference, maybe the error message can be improved? Again, since T extends number | string, it's not clear why the error occurs.

It's a feature, not a bug. You're looking for something like #44312.

It's a feature, not a bug. You're looking for something like #44312.

Thanks for the links, you've addressed my issue.


Runtime error with Ivy

and this is the sidebar-container.component.js

I don't know what else to say, just post the screens

I'm experiencing this problem as well. Had to turn off ivy in order to run the application.

Sure, but I would like to use Ivy

I'm facing the same issue.
To fix this just need to add "decoratorsAs": "static fields" in your angularCompilerOptions (tsconfig.json) and rebuild your library ;)
(on the ng-sidebar side of course)

PRs are welcome. :)

Angular 9 will be available in few days. It would be a shame to have to give up this library if build with Ivy will not fix

Still not work

I'm doing some tests. If I enable Ivy on Angular 8 this lib doesn't work. But with Angular 9 rc4 it works

Hi @arkon ,
I am getting below error with Angular 9.1 (Ivy enabled).
Below Error with forRoot().

>     ERROR in node_modules/ng-sidebar/lib/sidebar.module.d.ts:3:23 - error NG6005: SidebarModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type
> argument to the ModuleWithProviders type. If this occurrence is in library code you don't control,
> please contact the library authors.
>
>     3     static forRoot(): ModuleWithProviders;
>                             ~~~~~~~~~~~~~~~~~~~
>     src/app/layout/layout.module.ts:21:14 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
>

Below Error Without forRoot()

This likely means that the library (ng-sidebar) which declares SidebarModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Hi @arkon ,
I am getting below error with Angular 9.1 (Ivy enabled).
Below Error with forRoot().

>     ERROR in node_modules/ng-sidebar/lib/sidebar.module.d.ts:3:23 - error NG6005: SidebarModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type
> argument to the ModuleWithProviders type. If this occurrence is in library code you don't control,
> please contact the library authors.
>
>     3     static forRoot(): ModuleWithProviders;
>                             ~~~~~~~~~~~~~~~~~~~
>     src/app/layout/layout.module.ts:21:14 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
>

Below Error Without forRoot()

This likely means that the library (ng-sidebar) which declares SidebarModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

I am also getting same error.
@arkon Any solution for this? This functionality is very important for us. Any quick solution is appreciated.
Thanks in advance.

I am also experiancing same problem any update is really appriciatable.


ci-skip on initial commits to prevent automatic workflows

this branch has the desired local effect and starts up stable
jdietz@lithium kubefirst % k get pods -A
NAMESPACE                   NAME                                                              READY   STATUS      RESTARTS   AGE
kube-system                 local-path-provisioner-7b7dc8d6f5-kn7j4                           1/1     Running     0          16m
kube-system                 coredns-b96499967-p7sfw                                           1/1     Running     0          16m
kube-system                 svclb-traefik-c68804b0-2x5ml                                      2/2     Running     0          15m
kube-system                 helm-install-traefik-crd-mzzd5                                    0/1     Completed   0          16m
kube-system                 helm-install-traefik-sndzc                                        0/1     Completed   1          16m
kube-system                 svclb-traefik-c68804b0-th6tv                                      2/2     Running     0          15m
kube-system                 svclb-traefik-c68804b0-s6tmt                                      2/2     Running     0          15m
kube-system                 svclb-traefik-c68804b0-ktv7p                                      2/2     Running     0          15m
kube-system                 metrics-server-668d979685-mw7pl                                   1/1     Running     0          16m
kube-system                 traefik-7cd4fcff68-zlxlx                                          1/1     Running     0          15m
argocd                      argocd-redis-7df94749bb-zzknk                                     1/1     Running     0          15m
argocd                      argocd-applicationset-controller-77445749f4-kw6ll                 1/1     Running     0          15m
argocd                      argocd-notifications-controller-d7879d8f8-8nzzt                   1/1     Running     0          15m
argocd                      argocd-dex-server-58fdd67bb-clsmz                                 1/1     Running     0          15m
argocd                      argocd-server-67bb46b8bf-b5zq4                                    1/1     Running     0          15m
argocd                      argocd-repo-server-d778c56c6-2fhs2                                1/1     Running     0          15m
argocd                      argocd-application-controller-0                                   1/1     Running     0          15m
cert-manager                cert-manager-877fd747c-wdkbh                                      1/1     Running     0          14m
cert-manager                cert-manager-cainjector-bbdb88874-7nd5n                           1/1     Running     0          14m
argo                        argo-workflow-controller-6fdfd5dbc-5zrf9                          1/1     Running     0          14m
vault                       vault-agent-injector-59775cb565-f6wjm                             1/1     Running     0          14m
minio                       minio-5c749ff764-9zwwm                                            1/1     Running     0          14m
cert-manager                cert-manager-webhook-5774d5d8f7-c7s64                             1/1     Running     0          14m
external-secrets-operator   external-secrets-operator-64d5cd995d-5nlj7                        1/1     Running     0          13m
argo                        argo-server-678dfd9865-5z24f                                      1/1     Running     0          14m
vault                       vault-0                                                           1/1     Running     0          14m
external-secrets-operator   external-secrets-operator-webhook-7487f9fcd-l8mct                 1/1     Running     0          13m
external-secrets-operator   external-secrets-operator-cert-controller-55f94bb578-49dr5        1/1     Running     0          13m
chartmuseum                 chartmuseum-6f5965d54b-s2h9x                                      1/1     Running     0          14m
github-runner               actions-runner-contoller-actions-runner-controller-86c4b4dt5zp6   2/2     Running     0          13m
kubefirst                   kubefirst-console-6fbbff79f-872kq                                 1/1     Running     0          13m
atlantis                    atlantis-0                                                        1/1     Running     0          14m
github-runner               actions-runner-metaphor-go-4mphf-4vw5m                            1/1     Running     0          11m
github-runner               actions-runner-metaphor-frontend-6ndbp-r79mt                      1/1     Running     0          11m
github-runner               actions-runner-metaphor-nqpq7-222rv                               1/1     Running     0          11m


Failed verification passes with "Response: OK"

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (42fb694 2023-07-04T00:04:51.760418000Z)
What command(s) is the bug in?
forge verify-contract
Operating System
macOS (Apple Silicon)
Describe the bug
Steps to reproduce:

Write a contract (any contract)
Enable the optimizer and set it to any number of runs, e.g. 500 runs
Run verify-contract with a different number of optimizer runs, e.g. 2,000 runs
The command will print a message like this:

Submitting verification for [src/Contract.sol:Contract] <ADDR>.
Submitted contract for verification:
	Response: `OK`
	GUID: `vhszijnisxwyxaysfinpdewnec1gfta9jp4dvuc2kw1jtrfu4u`
	URL: <UDR>

I think this 'OK' response indicates that request for verification submission was succesful. But the result of request processing may still be different. You can wait for verification processing and see real status via --watch flag

Oh, I didn't know about the --watch flag - thanks for the tip!
After adding it, I started seeing messages like this:
Details: `Pending in queue`

So all good now.


Some Documentation fixes

Hi,
I am thinking about taking a look at the documentation and making fixes as I find them.
But I have a question about which commit ID I should base from.
Should I use main or e9850b2c2 as the base of any changes I want to submit?

Thanks, @Bas-Man. I thinks you can just based on main branch. BTW, e9850b2c2 is 404.


Cleanup of build warnings

I added XML comments and tweaked a few method definitions to eliminate build warnings. One of them is unrelated - about a deprecated Consul method. I put it in a separate commit.
I see a couple of build breaks in the vNext build. But I don't have the .NET Core tooling and VS 2017 RC properly installed yet to fix that. The errors I'm getting don't match the .NET Core docs. We'll need to fix that before merging, so that we don't break the vNext solution.

Thanks @sergeybykov - I think the .NET Core issues are when we construct the SystemTargets using reflection. Perhaps that is not supported in Core?
I'm happy to do the tidy ups, if we can get feedback from your guys around Configuration. I don't think its optimal to require an XML config for setting up the GrainServices, but the GrainServiceClient is set by Startup DI config.


Support personal repositories not only GitHub organization

Terraform Version
v0.9.5
Affected Resource(s)

github_repository

Terraform Configuration Files
provider "github" {
  token        = "${var.github_token}"
}

resource "github_repository" "otus-devops-terraform" {
  name        = "otus-devops-terraform"
  description = "Repository for public terraform code using in Otus DevOps course"
}

resource "github_repository" "practice-git-1" {
  name        = "practice-git-1"
  description = "Repository for practicing Git in Otus DevOps course"
}

resource "github_repository" "practice-git-2" {
  name        = "practice-git-2"
  has_issues  = true
  description = "Repository for practicing Git in Otus DevOps course"
}

Debug Output
terraform.tfstate
{
    "version": 3,
    "terraform_version": "0.9.5",
    "serial": 2,
    "lineage": "753781c3-ade7-4b8d-9723-2f7f9bbdb08b",
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {},
            "resources": {},
            "depends_on": []
        }
    ]
}

Expected Behavior
It should create repository under personal account and write state in terraform.tfstate
Actual Behavior
terraform asks Github oraganization when running with terraform apply. Also it returns 422 when running twice. So it isn't idempotent.
Steps to Reproduce
terraform apply

https://github.com/jugatsu/otus-devops-terraform

Any updates on this?

Related to #77

I have a feeling this isn't going to happen for commercial reasons, but I'd love to be surprised.
I'm working on a blog post showing how to use Terraform along with GitHub and Hugo to create a static blog, but as soon as I tried terraform apply in my personal account ($7/mo) everything fails.
Can someone from GitHub either close this as "won't do" or let us know if this will be supported? If someone submits a PR enabling personal account will you accept it? cc @benbalter

Having the possibilty to create and manage persona repos from TF would be amazing, especially for demos. Any updated down the line?

Hello there,
Meanwhile waiting for a fix into GitHub Terraform provider. I have just released a Terraform module for anyone interested to  set GitHup personal repositories. It's a bit raw, though.
https://github.com/p0bailey/terraform-github-personal-repositories

i am using github_provider version 2.4.1 and it works for individual repos
provider "github" {
  version = "> 2.4"
  token = var.token
  individual = false
  organization = var.organization
}

where organization is the username

this worked for me. With version 2.4.1 configured for my individual account as above I was at least able to:

import state
add a collaborator to a repo
mark a repo as archived

I am unable to confirm @mrtazz's success when importing:
provider "github" {
    version    = "~> 2.4"
    individual = true
}

resource "github_repository" "test" {
    name = "go-travis-testing"
}

$ terraform init

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "github" (hashicorp/github) 2.4.1...
...snip...

$ terraform import github_repository.test cornfeedhobo:go-travis-testing
github_repository.test: Importing from ID "cornfeedhobo:go-travis-testing"...
github_repository.test: Import prepared!
  Prepared github_repository for import
github_repository.test: Refreshing state... [id=cornfeedhobo:go-travis-testing]

Error: This resource requires GitHub organization to be set on the provider.

@shoekstra @jcudit pinging you because I stumbled into this while attempting to test importing with github_branch.

Hah. This is also broken when just applying normally.
provider "github" {
    individual = true
}

resource "github_repository" "test" {
    name = "terraform-github_branch-test"
}

$ terraform apply
...snip...
github_repository.test: Creating...

Error: This resource requires GitHub organization to be set on the provider.

  on main.tf line 5, in resource "github_repository" "test":
   5: resource "github_repository" "test" {

@cornfeedhobo you need to set individual = false in the provider config. That's kinda the weird thing here. The provider then treats your individual account as an org, so there will definitely be edge cases that don't work.

@mrtazz I tried that as well and it fails too.
provider "github" {
    individual   = false
    organization = "cornfeedhobo"
}

resource "github_repository" "test" {
    name = "terraform-github_branch-test"
}

Error: GET https://api.github.com/orgs/cornfeedhobo: 404 Not Found []

Like others point out above, it's impossible because the APIs /org` endpoint won't respond to usernames.

hmm that's curious. My provider config looks like this
provider "github" {
  version      = "> 2.4"
  individual   = false
  organization = "mrtazz"
}

And with that I was able to import all of my repos as well as set some things as mentioned in https://github.com/terraform-providers/terraform-provider-github/issues/45#issuecomment-603794145.

Strange indeed! Every combination in the provider has failed for me
Error: This resource requires GitHub organization to be set on the provider.
Error: GET https://api.github.com/orgs/cornfeedhobo: 404 Not Found []
Error: If `individual` is true, `organization` cannot be set.

@mrtazz are you exporting anything other than GITHUB_TOKEN?

For Personal repos this works. It only works with 2.4.0 though, 2.4.1 and 2.5.0 break it.
# Configure the GitHub Provider.
# token from GITHUB_TOKEN env var (required by codepipline)
provider "github" {
  version    = "2.4.0"
  individual = false
  organization = "MyPersonalUserName"
}

Interesting. As I sit here and finish a PR, I can already see how big of a fix this could end up being. I'll have to think about this a little. Maybe it would be best to fix a one or a few resources at a time. Limit the blast radius of each PR.

To add some wider context, a 3.x release of this provider was discussed over in https://github.com/terraform-providers/terraform-provider-github/pull/316 to solve a similar underlying problem for user identifiers.  If a 3.x release helps to get this feature shipped, that can be arranged.
I initially thought GraphQL support would be a cause for a major version bump as well.  However, there is a plan to incrementally add support.  If we are to take a similar approach, comprehensive acceptance testing and state migration coverage will be needed to 🚢 this feature incrementally.

@mrtazz are you exporting anything other than GITHUB_TOKEN?

@cornfeedhobo I don't have any other environment variables set.
@ozthegreat oh that's weird. I'm definitely running 2.4.1
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "github" (hashicorp/github) 2.4.1...

this doesn't work in 2.6.0 either

Doesn't work for me with a personal repo either. Hopefully this information helps get this resolved.
I've tried 2.4 and 2.6. The issue with 2.4 is different to 2.6 it seem and might be caused by the GH API changing.
With provider version 2.4.0
Error: GET https://api.github.com/repos/janaka/aws-app-mesh-example: 404 Not Found []
With provider version 2.6.0
Error: GET https://api.github.com/orgs/janaka: 404 Not Found []
Here are the two relevant fragments of my Terraform
    name = "Source"

    action {
      name             = "SourceCode"
      category         = "Source"
      owner            = "ThirdParty"
      provider         = "GitHub"
      version          = "1"
      output_artifacts = ["SourceCodeArtifact"]

      configuration = {
        Owner  = "janaka"
        Repo   = "aws-app-mesh-example"
        Branch = "master"
      }
    }
}```

```provider "github" {
  version = "2.4.0"
  token        = local.webhook_secret
  individual = false
  organization = "janaka"
}```

```data "github_repository" "repo" {
  full_name = "janaka/aws-app-mesh-example"
}

resource "aws_codepipeline_webhook" "hello-world-api_webhook" {
  name            = "hello-world-api-webhook-github"
  authentication  = "GITHUB_HMAC"
  target_action   = "Source"
  target_pipeline = aws_codepipeline.codepipeline.name

  authentication_configuration {
    secret_token = local.webhook_secret
  }

  filter {
    json_path    = "$.commits[*]"
    match_equals = "hello-world-api/(src/.*|version)"
  }
}

# Wire the CodePipeline webhook into a GitHub repository.
resource "github_repository_webhook" "hello-world-api" {
  repository = data.github_repository.repo.name

  configuration {
    url          = aws_codepipeline_webhook.hello-world-api_webhook.url
    content_type = "json"
    insecure_ssl = false
    secret       = local.webhook_secret
  }

  events = ["push"]
}```

@janaka Did you check to make sure your token has the right permissions? you'll need repo admin when create you personal access token. This is using with provider version 2.4.0.

Pretty sure perms are good. I'll need to double check as it's been some days.

FYI - I moved the repo from my personal to an Org (the personal account owns) and all is now working. Same token with no perms changes. Provider 2.6.1.

@jcudit can you add this to https://github.com/terraform-providers/terraform-provider-github/milestone/8?closed=1 milestone.

Sorry, what is the fix here for the github_repository data source?  Nothing I see described above seems to work. I'm on provider.github v2.9.2 and getting

Error: GET https://api.github.com/orgs/clebio: 404 Not Found []

@clebio pretty sure this was reverted

Given orgs became free around the same time, I just created one and moved my repo there.

I'm now having the issue - @cornfeedhobo - how do you know it was reverted? I cannot easily create an organization because I'm part of a few already.

@josjaf https://github.com/terraform-providers/terraform-provider-github/compare/v2.9.0...v2.9.1

Any idea what the workaround is for personal repositories for now?

@josjaf there is none that I know of right now. Sounds like most people have created orgs for the meantime.

@josjaf I moved to GitLab.

This issue is now resolved now as per the provider version v4.1.0, you can create a github repo in your personal profile as
provider "github" {
  owner = "<GITHUB_USERNAME>"
  token = "<GITHUB_TOKEN>"
}

resource "github_repository" "terraformed" {
  name        = "terraformed"
  description = "A repository created by Terraform"
  visibility  = "private"
}

Thanks Community for fixing this issue.