iam service account documentation discrepancy - service-accounts

There is a discrepancy between the documentation for an IAM V1 Service Account and the example shown in https://github.com/GoogleCloudPlatform/deploymentmanager-samples/blob/master/examples/v2/project_creation/service-accounts.py.
The document shows that the properties has a 'name' field, with a value that looks like projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}. The other properties that can be set are 'displayName' and 'description'.
The example does not have the name and description properties, but instead has 'accountId' and 'projectId'.
I am confused as to which is the correct usage.

Ecample on Github is old : Latest commit 81378b1 on Mar 4, 2017 and the documentation was updated more recently: Last updated 2020-08-18 UTC which means that some of the field names have changed and example is not correct.
To correct this you may file an issue on Google's Issue Tracker.
Always use whatever is in the official documentation - it's the best source of reference if in doubt.

Related

How can I use custom parameters in [permalinks] section in Hugo?

I am setting up the [permalinks] section of the config.toml in a Hugo website. I want to use more values than the ones provided here.
I've tried
[permalinks]
post = "/p/:year:month:day:hour:minute"
but it's throwing an error saying it's malformed probably because :hour and :minute aren't valid. I mainly wanted to use these two in the permalink
UPDATE: Hugo v0.60.0 has been released and with it (and later versions) you can use something like this to accomplish what you asked for:
[permalinks]
post = "/p/:year:month:day:15:04/"
In Go and Hugo, you can think of the reference datetime as:
01/02 15:04:05 2006 MST
This is why hour is :15 and minute is :04 in the permalink. Info about date and time in Go is at https://golang.org/pkg/time/.
Below is my original answer...
According to Notes release notes 0.60 · Issue #6490 · gohugoio/hugo · GitHub, this will be possible soon. Here's the relevant excerpt:
Permalink config an dates: 6489 [*]
I want this too!
[*] Support Go time format strings in permalinks by look · Pull Request #6489 · gohugoio/hugo · GitHub

Set default date for zul datebox

I inherited a legacy website written in old zul and have to add new datebox component for birthday datepicker.
Have added a constraint to accept dates before a given date but that triggers an error alertbox from start as the date presented/selected by default on the datepicker is today.
I wouldn't want to use a workaround but to all due respect it seems like this is something over the top feature I'm looking for in zk's reality:
The main showcase for zul does include a birthday datebox, but pretty lame as it doesn't contain any constrain on age.
There is zk fiddler to show how the before constrain works, but that just proves my point that it doesn't select the first proper date for default date at least, if there is no clean way of setting it.
There is forum post that proposes a workaround to set the default year, so Zk is most probably incapable of doing this without a workaround.
There is an open ZK Jira issue from 2017 that addresses somewhat this issue, with a proposed solution pretty much the same as the workaround mentioned in the above point - so the hope is kinda lost, have to go on the workaround route.
I did try that workaround (after the forum post, as that has default year), but the workaround doesn't work for me. It does execute the
this.setValue(initialDate);
And I see that the value is set into the datebox's _pop/_value and _pop/_end nodes but no difference is visible on the datepicker box, still today is preselected altough it is greyed out - so no effect.
Still, when I try it in a fiddle with version 6.5.8.1, the oldest engine that exists, it does work, but not locally with v5.0.11.
In the buglist for this version there is no mention of datebox. Tried to look into to some bugs that might be interfering but turns out it was just another episode of me wasting time with this.
Tried in the 5.0.11 sandbox and it doesnt work with that version. The structure of how I use it is imitated in the linked fiddler. Hints on a workaround that works on this version?
ZK 5.0.11 is a bit on the older side currently, so it might not accept exactly the same overrides as later versions. If I understand the issue correctly, it boils down to either
1 - setting a value before Datebox is rendered to have a "initial date" opened in calendar.
I'd say that's the easy way out, since you can use either composing or databinding to set the value of the datebox during page rendering. Here's a small sample using databinding and zscripts, but the same logic should apply from composer with setValue(). You mentioned that this doesn't work for you locally with 5.0.11 though. Can you share the code that you are using for this? Sample code here in fiddle I can run it on local 5.0.11, and it set the date before popup is opened.
or
2 - setting an initial date (which doesn't affect the selected value) but would be the target for the opened calendar.
This is not a default ZK 5 behavior for datebox. If you want that effect, you would need to customize it using an override script. Simplest way in can think of in ZK 5 is to use the open event of the datebox popup here's an example of what it would look like (package in a script tag in a single page for the example, would use a global js file for real deployement) example here

Azkaban runtime parameter for yesterday

According to official website, Azkaban only provides year-month-date for running time like:
${azkaban.flow.start.day}
Is it possible to add parameters for the day before?
You can define it with jexl by yourself.
e.g.
yesterday=$(new("org.joda.time.DateTime").minusDays(1).toString("yyyy-MM-dd"))
ref: https://github.com/azkaban/azkaban/pull/277

max-pool-size is invalid in combination with derive-size

For the last couple of days I’ve been battling with an issue which I believe is derived from a change in the source code in Thorntail and unfortunately this code doesn’t appear to be publically available.
The error I’ve been receiving is this:
"WFLYCTL0105: max-pool-size is invalid in combination with derive-size".
Previously you could just leave a “derive-size” out of the configuration and there wasn’t an issue however now anytime I’ve included the “max-pool-size” no matter what the combination with “derive-size” it fails with the above mentioned error.
From the latest Thorntail dococumentation:
Specifies if and what the max pool size should be derived from. An
undefined value (or the deprecated value 'none' which is converted to
undefined) indicates that the explicit value of max-pool-size should
be used.
This is what I had previously in WildFly project-defaults.yml which worked perfectly fine:
ejb3:
default-resource-adapter-name: activemq-rar.rar
default-mdb-instance-pool: mdb-strict-max-pool
strict-max-bean-instance-pools:
mdb-strict-max-pool:
max-pool-size: 1
Any ideas or examples would be greatly appreciated.
More information added in response to questions:
The project was updated from using WildFly Swarm 2018.4.1 to use Thorntail 2.2.0.Final.
The code that appears to have changed in Thorntail is below:
OLD code:
https://github.com/stuartwdouglas/wildfly-swarm-core/blob/master/ejb/api/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java
.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").maxPoolSize(20).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
New Code:
https://github.com/thorntail/thorntail/blob/802e785fdd515ecc1b52b22a64a6ff9338dace29/fractions/javaee/ejb/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java
.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").deriveSize(StrictMaxBeanInstancePool.DeriveSize.FROM_CPU_COUNT).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
If anyone has a link to the above source code that would be great. The only links I can find appear to be from JBOSS so the code looks like it was ported accross and not made publicly avaiable.
After the question update: the default configuration of a couple of fractions was changed to better align with default configuration in WildFly 11. You can configure derive-size: null and then the max-pool-size should take effect.
Something like:
ejb3:
default-resource-adapter-name: activemq-rar.rar
default-mdb-instance-pool: mdb-strict-max-pool
strict-max-bean-instance-pools:
mdb-strict-max-pool:
derive-size: null
max-pool-size: 1
(Note: previously, this answer recommended setting derive-size: none, but that doesn't work. After the discussion in comments, I changed the answer to recommend derive-size: null, which does work.)

What parameters are required to create an "Add to Google Calendar" link?

We can use this link to add a new event to Google Calendar by parameters
https://www.google.com/calendar/render?
action=TEMPLATE&
text=EventName&
dates=20131206T050000Z/20131208T060000Z
&location=EventLocation&
sprop=name:Name&
sprop=website:EventWebite&
details=EventDetail&
sf=true&
output=xml
But I can't find any documentation about these parameters.
Does anyone know where's it?
Explanation about the available parameters:
anchor address:
http://www.google.com/calendar/event?
This is the base of the address before the parameters below.
action:
action=TEMPLATE
A default required parameter.
src:
Example: src=default%40gmail.com
Format: src=text
This is not covered by Google help but is an optional parameter
in order to add an event to a shared calendar rather than a user's default.
text:
Example: text=Garden%20Waste%20Collection
Format: text=text
This is a required parameter giving the event title.
dates:
Example: dates=20090621T063000Z/20090621T080000Z
(i.e. an event on 21 June 2009 from 7.30am to 9.0am
British Summer Time (=GMT+1)).
Format: dates=YYYYMMDDToHHMMSSZ/YYYYMMDDToHHMMSSZ
This required parameter gives the start and end dates and times
(in Greenwich Mean Time) for the event.
location:
Example: location=Home
Format: location=text
The obvious location field.
trp:
Example: trp=false
Format: trp=true/false
Show event as busy (true) or available (false)
sprop:
Example: sprop=http%3A%2F%2Fwww.me.org
Example: sprop=name:Home%20Page
Format: sprop=website and/or sprop=name:website_name
add:
Example: add=default%40gmail.com
Format: add=guest email addresses
details: (extra)
Example: details=Event%20multiline%0Adetails
Format: details=description text (google also accepts html in this text)
http://useroffline.blogspot.com/2009/06/making-google-calendar-link.html
The link from snoopy_15's answer points to an old Google URL that is currently being redirected to the new Google support page. This new page does not explain how to generate the kind of link asked in this question.
However, thanks to the wonders of Internet Archive: Wayback Machine, the older pages are still archived and available!
The latest available version is from March 2012, and it includes a form with a simple JavaScript code that still works! Sure, this is not an official documentation (and I'm still looking for one), and this is not even a documentation (it is an interactive form with a script), but it is the closest I could get.
These are the parameters that I use when I create these links. There are other parameters that exist, but I don't find them useful and they are optional. The details about how the dates work are particularly vexing and were never sufficiently documented by google.
action=TEMPLATE (required)
text (url encoded name of the event)
dates (ISO date format, startdate/enddate - must have both start and end time or it won't work. The start and end date can be the same if appropriate.)
to use the user's timezone: 20161208T160000/20161208T180000
to use global time, convert to UTC, then use 20131208T160000Z/20131208T180000Z
all day events, you can use 20161208/20161209 - note that the old google documentation gets it wrong. You must use the following date as the end date for a one day all day event, or +1 day to whatever you want the end date to be.
details (url encoded event description/details)
location (url encoded location of the event - make sure it's an address google maps can read easily)
You have one more param for specifying Guests
Add:
Example: add=default%40gmail.com
Format: add=guest email addresses
Demo
https://productforums.google.com/forum/#!topic/calendar/Ovj6BNTQNL0

Resources