Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
549daae
correction in vpc limit assignment (#13627)
GeanJair Jul 24, 2026
5328528
Add debug logging when storage pool has insufficient IOPS capacity (#…
nvazquez Aug 2, 2026
8a42d17
CLVM/ISO: Ensure volume is created on the same host as the VM being d…
Pearl1594 Aug 6, 2026
5a67f19
Update tools/build/build_asf.sh (#13812)
weizhouapache Aug 6, 2026
dd3427d
UI: fix cannot update physical network (#13810)
weizhouapache Aug 6, 2026
cced071
Add Dogface2k to the contributors list
DaanHoogland Aug 10, 2026
ebc5e64
[CI] Run `pre-commit autoupdate` to update the hooks (#12943)
jbampton Aug 11, 2026
e201213
markdown table format fixes (#13848)
DaanHoogland Aug 11, 2026
1ceb1d0
docs: fix broken star history chart by using a new provider (#13844)
Mubelotix Aug 12, 2026
659f675
README: add three more status buttons (#11650)
jbampton Aug 12, 2026
dbee809
Rotate Copilot tokens for the gh-aw agentic workflows (#13525)
vishesh92 Aug 14, 2026
5dcb8ab
Fix checkRoleEscalation performance and bugs in access checking (#12973)
nvazquez Aug 14, 2026
1cd2491
Update sonar-check.yml to manage coverage comments (#13878)
DaanHoogland Aug 15, 2026
f8a3762
do not send jetty version on failure to start (#13744)
DaanHoogland Aug 17, 2026
69fc541
server: ignore projectid=-1 for finding owner (#12695)
shwstppr Aug 17, 2026
1e5d534
guard against stopping stats background threads (#13659)
DaanHoogland Aug 17, 2026
2bc8d29
Don't allow adding of existing host to another zone, pod or cluster (…
vishesh92 Aug 17, 2026
5432a04
Ensure VM IP is removed from VR DHCP records in dnsmasq.leases after …
sureshanaparti Aug 17, 2026
121d931
oauth: api: add missing version since (#13890)
resmo Aug 18, 2026
64178ea
Add missing project cleanups while deleting/moving user (#13817)
winterhazel Aug 18, 2026
18c1a30
Allow only authorized users to add and list entity's annotations
Jul 24, 2026
30e6abb
Restrict domain admin access to project roles within their own domain…
Jul 17, 2026
4ae69bc
Restrict listHostTags to hosts dedicated to the caller's domain (incl…
Jul 15, 2026
e664080
webhook: improve deliveries access
shwstppr Jul 15, 2026
bbd3727
Validate URL before obtaining remote size
Jul 14, 2026
19d31cf
ldap: improve config access
shwstppr Jul 10, 2026
57a2b4d
server: fix access for disable user 2fa
shwstppr Jul 7, 2026
113ccb2
Upgrade axios to 0.31.1 which has the config merge fix
Jul 3, 2026
3eb928b
Escape HTML in username, VM display name and diagnostics output
Jul 3, 2026
07e09db
Fix issue in direct download and NFS templates
Jun 4, 2026
7c872a9
api,server: improve async job storage
shwstppr Jun 22, 2026
5b325dd
Prevent command injections in get/run diagnostics API
Jun 19, 2026
f320f55
oauth2: improve list providers api for access
shwstppr Jun 22, 2026
b17edb5
oauth2: improve google provider flow
shwstppr Jun 18, 2026
9781fb9
api,server,kvm: improve backup repository mount handling
shwstppr Jun 18, 2026
ea75dc3
Fix database connection leak
hsato03 Mar 26, 2026
2c7f13b
webhook: additional check for payload url
shwstppr Jun 8, 2026
0459833
saml: reject signed SAMLResponse when IdP has no signing certificate …
DaanHoogland May 22, 2026
8985a1f
add access validation for the deleteUserData, linkUserDataToTemplate …
bernardodemarco May 14, 2026
6136ac9
api: add ACL on ApiConstants.USER_DATA_ID
weizhouapache Jun 23, 2026
9b9d0cf
api,server: improve async job storage
shwstppr Jun 22, 2026
72bdf59
add access validation for the deleteUserData, linkUserDataToTemplate …
bernardodemarco May 14, 2026
d463cb4
api: add ACL on ApiConstants.USER_DATA_ID
weizhouapache Jun 23, 2026
a72f605
ldap: improve config access
shwstppr Jul 10, 2026
6b9fdd0
Add proper access check before proceeding with adding or removing nod…
Jul 9, 2026
56ad044
api,server,kvm: improve backup repository mount handling
shwstppr Jun 18, 2026
443f20b
Allow only authorized users to add and list entity's annotations
Jul 24, 2026
a40d068
Restrict domain admin access to project roles within their own domain…
Jul 17, 2026
8221f62
webhook: improve deliveries access
shwstppr Jul 15, 2026
fb758af
server: fix access for disable user 2fa
shwstppr Jul 7, 2026
6c0e152
Upgrade axios to 0.31.1 which has the config merge fix
Jul 3, 2026
53a7c29
Fix issue in direct download and NFS templates
Jun 4, 2026
f52f9da
Prevent command injections in get/run diagnostics API
Jun 19, 2026
aa77259
oauth2: improve list providers api for access
shwstppr Jun 22, 2026
b98e1f5
oauth2: improve google provider flow
shwstppr Jun 18, 2026
e8f200a
Fix database connection leak
hsato03 Mar 26, 2026
1790275
webhook: additional check for payload url
shwstppr Jun 8, 2026
f2df4d9
saml: reject signed SAMLResponse when IdP has no signing certificate …
DaanHoogland May 22, 2026
9c32086
Restrict listHostTags to hosts dedicated to the caller's domain (incl…
Jul 15, 2026
90f6b2a
Validate URL before obtaining remote size
Jul 14, 2026
2a02733
Escape HTML in username, VM display name and diagnostics output
Jul 3, 2026
7fd56e5
Merge remote-tracking branch 'apache/4.20' into 4.22
shwstppr Aug 18, 2026
7fc063e
build: fix after forward-merge
shwstppr Aug 18, 2026
85bcdb1
Fix NAS backup filename for legacy LINSTOR path (#13538)
WanzenBug Aug 19, 2026
efa58cc
Merge remote-tracking branch 'origin/4.22'
weizhouapache Aug 19, 2026
d7b4f35
fixes after forward-merge
weizhouapache Aug 19, 2026
cd486ac
kvm: execute "qemu-img convert" by Script.executeCommandForExitValue
weizhouapache Aug 19, 2026
cd801b8
usage: widen usage_volume unique key to include vm_id (#13909)
Alpha162 Aug 19, 2026
2b78432
Revert `registerUserKeys` back to a synchronous API (#13896)
winterhazel Aug 19, 2026
d45d481
Fix KBOSS backup creation edge case (#13880)
JoaoJandre Aug 19, 2026
4bfeb96
API key pair restructure follow-ups (#13828)
bernardodemarco Aug 20, 2026
02182a1
Merge branch '4.23.0-merge-4.22.1.1' into main
weizhouapache Aug 21, 2026
8b72a16
build: fixes after forward-merge
weizhouapache Aug 21, 2026
ba67a62
quota: skip usage records registering the period a volume has been at…
winterhazel Aug 21, 2026
5e5ae0c
Fix type parameter in listBackupServiceJobs API (#13940)
JoaoJandre Aug 22, 2026
4e4a26b
dns: prevent creation of cross-tenant conflicting DNS zones in the sa…
winterhazel Aug 24, 2026
7ea1dca
Add NULL check during restoreVM operation when host is removed (#13779)
nvazquez Aug 24, 2026
158fe4f
DNS Provider URL Validation (#13821)
DaanHoogland Aug 25, 2026
a7a293e
Update RAT plugin version from 0.12 to 0.18 (#12989)
DaanHoogland Aug 26, 2026
6764ca5
add prashanth
DaanHoogland Aug 27, 2026
77fbb0f
github: skip Copilot reviews for draft PRs (#13996)
andrijapanicsb Aug 29, 2026
8fb3ad4
Updating pom.xml version numbers for release 4.24.0.0-SNAPSHOT
weizhouapache Sep 1, 2026
5b49d6a
Errorprone static analysis tool integration and fixes of reported iss…
Pearl1594 Sep 2, 2026
7d45dcb
Migrations triggered by Maintenance (system) not reported on VM event…
abh1sar Sep 2, 2026
b09005f
UI: make serviceofferingid optional when add network offering (#13502)
weizhouapache Sep 2, 2026
3dc2305
server: fix lastpinged of hosts (#13030)
weizhouapache Sep 2, 2026
f2dec38
Merge branch '4.20' into 4.22
Sep 2, 2026
c760568
ui: label instance volume sizes as GiB (#13831)
Dogface2k Sep 2, 2026
a5954f9
fix domain cleanup when a removed account owns templates (#13630)
Damans227 Sep 2, 2026
167320e
Propagate StopAnswer error details up the call chain when stopping a …
Damans227 Sep 2, 2026
6434ff2
make sure virtual machine params exist (#12771)
DaanHoogland Sep 2, 2026
8d26cb3
Support for migration of system VMs with volumes in the GUI (#13144)
Tonitzpp Sep 2, 2026
042ec7e
UI: fix usage records end date with local timezone (#13769)
Dogface2k Sep 2, 2026
15dcfd3
Merge branch '4.22'
Sep 2, 2026
3d70ce4
doc: add API parameter syntax examples for nodeofferings and nodetemp…
chunkyen Sep 2, 2026
2cd8c5e
Create bridge on dest host during SSVM migration when using storage n…
Pearl1594 Sep 2, 2026
e3c7b76
Merge remote-tracking branch 'origin/4.20' into 4.22
Pearl1594 Sep 2, 2026
bef06d7
Merge remote-tracking branch 'origin/4.22'
Pearl1594 Sep 2, 2026
b7a834b
fix test failure - due to forward merge
Pearl1594 Sep 2, 2026
44ab7dd
api: replace \" with \' in CreateKubernetesClusterCmd.java‎ (#14044)
DaanHoogland Sep 3, 2026
2b3cca6
SAML SLO does not clear session cookies on logout (#14017)
DaanHoogland Sep 4, 2026
4875fde
Hide inactive offerings from User type accounts (#12865)
erikbocks Sep 7, 2026
2327e83
UI: Fix listing of resources for ASG belonging to a project (#13187)
vishesh92 Sep 7, 2026
c2c74c5
api: fix ProjectResponse.setVpcLimit assigning the network limit (#14…
rootnomad Sep 7, 2026
136ee82
UI support for the scaleSystemVm API (#13321)
gruckbit Sep 7, 2026
ac45be4
Change 2FA Field Type From Password to Text (#13723)
daviftorres Sep 7, 2026
2c03952
[CI] Auto add license headers to `conf` files with pre-commit (#12926)
jbampton Sep 7, 2026
d0a9cbe
pom: fix org.aspectj version drift (#13863)
resmo Sep 7, 2026
a723d44
Updating version numbers for release 24.0.0-SNAPSHOT (#14041)
wido Sep 7, 2026
3a79799
Make `domainid` optional in `assignVirtualMachine` (#13213)
winterhazel Sep 7, 2026
469fa7a
[CI] Add pre-commit hook to stop ZIP files being committed (#12930)
jbampton Sep 7, 2026
6ad0d75
volume: reset pool_id on failed volume create for zone-wide storage (…
nikolauseppinger Sep 8, 2026
719dbe9
Addition of type and VM filter in the backup listing API (#13644)
GeanJair Sep 8, 2026
e9dbb5e
security: run pre-commit autoupdate --freeze; Pin to sha all hooks (#…
jbampton Sep 8, 2026
f725211
fix label key for gpudisplay (#13272)
sudo87 Sep 8, 2026
53d6516
merge acs-api-commands project into tools (#11098)
pdion891 Sep 8, 2026
6a2e033
apply the restored volume max IOPS to the max IOPS field (#14024)
rootnomad Sep 8, 2026
cdbda0a
engine: key removeNic work job lookup on nic uuid to fix concurrent r…
Andr0human Sep 8, 2026
92946e1
improve test to read and set nas.backup.incremental.enabled for the t…
jmsperu Sep 8, 2026
bbf8c1a
server: do not NPE when a VPN provider returns no per-user result (#1…
rootnomad Sep 8, 2026
a53c5ae
server: treat a zero-capacity storage pool as full (#14052)
rootnomad Sep 8, 2026
5c97979
ui: show related settings when (main) config value is changed (#13965)
shwstppr Sep 8, 2026
c860e0c
kvm: fix RBD exclusive-lock leak that breaks revertSnapshot on Ceph (…
calvix Sep 8, 2026
f493d99
sharedfs: skip hypervisors without system templates (#13830)
Dogface2k Sep 8, 2026
d87c804
kvm: let libvirt remove RBD snapshots on volume delete (#13763)
wido Sep 8, 2026
223351c
Add VR's system offering to network listing (#12862)
erikbocks Sep 8, 2026
74e7105
ui: show selected template hypervisor in deploy form (#13813)
Dogface2k Sep 8, 2026
215ef98
Allow cleaning up of networks stuck in Implementing state (#12409)
Pearl1594 Sep 9, 2026
245bbd9
server: null-check public IP before the DNS/Source NAT guard in creat…
rootnomad Sep 9, 2026
bd35fb6
KVM: default x86 guests to vga video model when none is configured (#…
andrijapanicsb Sep 9, 2026
c7f2efa
kvm: fix restore-and-attach of a backed up volume (#14007)
abh1sar Sep 9, 2026
a9b2f33
ui: filter accessible pools on live migration with storage wizard (#1…
winterhazel Sep 9, 2026
068d393
allow update of ldap linked account (#13949)
DaanHoogland Sep 9, 2026
cddd2c6
Add timestamps to management, server and agent .err logs (#12967)
dheeraj12347 Sep 9, 2026
9c8bdf3
config: persist config subgroups with their name and group id (#14050)
rootnomad Sep 9, 2026
c77e16a
update comments and exception related to kvm.snapshot.enabled configu…
sudo87 Sep 9, 2026
10d3e11
KVM: fix UEFI disk-only instance snapshot NVRAM handling (#13020)
Kunalbehbud Sep 9, 2026
036493f
Fix backup type parameter version number in ListBackupsCmd (#14078)
DaanHoogland Sep 9, 2026
1f761f0
Update pmd config to make it pmd 7 compatible (#13168)
vishesh92 Sep 9, 2026
6e4413d
engine: do not stall the host command queue on a failed send in Agent…
rootnomad Sep 9, 2026
76b285b
ui: implement event auto-suggestion in webhook filter tab (#13227)
saurabhkushwaha438 Sep 10, 2026
e0f3006
Network: default egress policy Allow for Isolated networks on fresh i…
andrijapanicsb Sep 10, 2026
b93f603
api: fix inverted value comparison in ImageStoreDetailResponse.equals…
rootnomad Sep 10, 2026
c467686
[ConsoleProxy] Performance fixes on concurrency and closing console s…
nvazquez Sep 10, 2026
af8691c
Routed: get vm network statistics on Routed network (#13105)
weizhouapache Sep 10, 2026
17098c1
Fix lscpu speed checking order (#12190)
guillemtp Sep 10, 2026
8afd114
Revert "Network: default egress policy Allow for Isolated networks on…
DaanHoogland Sep 10, 2026
7516e53
Add the pre-commit ecosystem to Dependabot (#14110)
jbampton Sep 10, 2026
02da97d
Merge remote-tracking branch 'apache/4.20' into 4.22
shwstppr Sep 10, 2026
d0d49bc
ui: fix build
shwstppr Sep 10, 2026
4ce5291
Merge branch '4.22'
JoaoJandre Sep 10, 2026
b9a5977
fix: use auth_client_required instead of removed auth_supported for R…
waterWang Sep 10, 2026
72014a0
Fix KvmFileBasedStorageVmSnapshotStrategy unit test failures (#14135)
Pearl1594 Sep 10, 2026
9018034
Add basic `.editorconfig` file to help maintain consistent coding sty…
jbampton Sep 11, 2026
9030443
SharedFS: fix NPE when accessing systemvm templates for unsupported h…
abh1sar Sep 11, 2026
dc0ba1c
Packaging: accept normalized Marvin archive names (#13793)
Dogface2k Sep 11, 2026
2e450cb
marvin: use pycryptodome instead of PyCrypt (#13594)
weizhouapache Jul 13, 2026
a01fb0b
server: copy template details to vm instance details when import VM (…
weizhouapache Sep 14, 2026
e38b7a7
kvm: apply rbd_default_data_pool when creating volumes from templates…
bhouse-nexthop Sep 14, 2026
10037c8
Nas backup: Fix mount/unmount error handling and timeout in LibvirtRe…
abh1sar Sep 15, 2026
79189c8
backup: remove the powered-off precondition for all backup providers …
weizhouapache Sep 15, 2026
27722a5
storage: KVM - enable RBD/Ceph volume encryption support (#13556)
calvix Sep 16, 2026
cffa6e3
backport: Incremental NAS backup support for KVM (#13074) (#13877)
abh1sar Sep 17, 2026
a8c8c18
xenserver/xcpng: do not bypass secondary storage when copy volumes be…
weizhouapache Sep 17, 2026
5812290
Merge remote-tracking branch 'apache/4.22'
weizhouapache Sep 17, 2026
602d9ec
engine-schema: upgrade path for 24.0.0 (#14033)
shwstppr Sep 18, 2026
0a5bf30
VMware to KVM: cold (VDDK) and warm (CBT) migration into Ceph/RBD and…
andrijapanicsb Sep 24, 2026
510d0ec
Revert "VMware to KVM: cold (VDDK) and warm (CBT) migration into Ceph…
Sep 28, 2026
1a48a87
Add the ASF Allowlist check workflow (#14113)
jbampton Sep 30, 2026
7ed0cec
Add pre-commit hook to validate dependabot.yml (#14107)
jbampton Oct 5, 2026
e6cd123
virtual router: Add route-maps to BGP peers for Routed Mode (#9964)
wido Oct 7, 2026
ed1db53
.github: Upgrade docker/login-action to fix ASF Allowlist failure (#1…
jbampton Oct 7, 2026
17294ca
dont show unathorized notification for prelogin (#14054)
sudo87 Oct 8, 2026
f03cffc
feature: instance boot group and readiness rules (#13907)
shwstppr Oct 8, 2026
68cff97
Upgrade Netris SDK version to 1.1.0 since 24.0 (#14365)
nvazquez Oct 9, 2026
a945a7c
Develocity integration (#14394)
GutoVeronezi Oct 14, 2026
d3f0700
Restore VMware-to-KVM migration changes from #13656 (#14256)
andrijapanicsb Oct 14, 2026
9ccb632
Merge branch 'main' of https://github.com/apache/cloudstack into sync…
Oct 15, 2026
3eb3ce0
sync/apache-main-oct: fixed new MD060 table-pipe spacing as markdownl…
Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ github:
- jmsperu
- GaOrtiga
- bhouse-nexthop
- Dogface2k
- prashanthr2

rulesets:
- name: "Default Branch Protection"
Expand All @@ -72,7 +74,7 @@ github:

copilot_code_review:
enabled: true
review_drafts: true
review_drafts: false
review_on_push: true

notifications:
Expand Down
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

[codespell]
ignore-words = .github/linters/codespell.txt
skip = systemvm/agent/noVNC/*,ui/package.json,ui/package-lock.json,ui/public/js/less.min.js,ui/public/locales/*.json,server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java,test/integration/smoke/test_ssl_offloading.py
skip = systemvm/agent/noVNC/*,ui/package.json,ui/package-lock.json,ui/public/js/less.min.js,ui/public/locales/*.json,server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java,test/integration/smoke/test_ssl_offloading.py,tools/apidoc-versions-diff/*
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
root = true

[*]
charset = utf-8
end_of_line = lf
# indent_size = 4
indent_style = space
insert_final_newline = true
# max_line_length = 120
# tab_width = 4
90 changes: 90 additions & 0 deletions .github/COPILOT_TOKENS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Contributing a Copilot token for the agentic workflows

This repo runs scheduled [GitHub Agentic Workflows](https://github.github.com/gh-aw/) (the
`*.lock.yml` files compiled from `*.md` in `.github/workflows/`) that drive the GitHub Copilot
CLI. Each run needs a GitHub token from an account with an active Copilot license. So that no
single person's Copilot quota gets burned through, runs rotate day by day across a pool of
volunteer tokens.

If you have a Copilot license and want to help share the load, add your token to the pool.

## What kind of token

- A fine-grained personal access token. Classic PATs don't work with the Copilot CLI.
- Resource owner: your own personal account.
- Permission: Account permissions > "Copilot Requests" > Read. That's the only permission it
needs, no repo access.
- Your account must have an active Copilot seat.

Create it at <https://github.com/settings/personal-access-tokens/new>. Give it a sensible
expiration; when it lapses the health check (below) will flag it and you can re-add it.

## How to add it

1. Pick a short alias for yourself, e.g. `t1`, `t2`, `vol3`. The alias shows up in workflow logs,
so keep it non-identifying if you prefer.
2. Add your token as a repository secret named `COPILOT_GITHUB_TOKEN_<alias>`
(e.g. `COPILOT_GITHUB_TOKEN_t1`). Repo admins do this via
*Settings > Secrets and variables > Actions > New repository secret*, or:
```
gh secret set COPILOT_GITHUB_TOKEN_t1 --body "github_pat_xxx"
```
3. Ask a repo admin to register the alias by appending it to the repository variable
`GH_AW_COPILOT_TOKEN_NAMES`, which is a JSON array:
```
gh variable set GH_AW_COPILOT_TOKEN_NAMES --body '["t1","t2","t3"]'
```
The workflows can't enumerate secrets, so this variable is the source of truth for the pool.
A token isn't used until its alias is listed there.

## How rotation works (for maintainers)

Each agent workflow (`weekly-repo-status`, `daily-issue-triage`) defines a `pick_copilot_token`
job in its `.md` source. The job has to run outside the agent job because strict mode forbids
reading secrets there. It picks today's alias by day-of-year mod N, checks the token is live
(`GET /user` returns 200, otherwise it moves on to the next candidate) and outputs the chosen
alias. The token value itself never crosses jobs. The two workflows use different
`ROTATION_SLOT`s, which start them half the pool apart so they don't land on the same
volunteer on the same day (with at least two tokens in the pool).

The agent job resolves the secret itself via
`secrets[format('COPILOT_GITHUB_TOKEN_{0}', needs.pick_copilot_token.outputs.name)]` and falls
back to the base `COPILOT_GITHUB_TOKEN` when the pick job outputs an empty name. Keep the base
secret set to one reliable token.

`gh aw compile` doesn't know about this wiring, so after editing the `.md` sources run:

```
gh aw compile && bash .github/scripts/post-compile.sh
```

See the header of `.github/scripts/post-compile.sh` for what it patches.

To check the pool, trigger the "Copilot token health" workflow
(`.github/workflows/copilot-token-health.yml`) from the Actions tab. It prints an HTTP status
code per alias and nothing else, so no account identities end up in logs. Note it can't tell
when a token is live but has used up its monthly Copilot requests.

## Removing a token

Delete the `COPILOT_GITHUB_TOKEN_<alias>` secret and remove `<alias>` from
`GH_AW_COPILOT_TOKEN_NAMES`.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ updates:
interval: "daily"
cooldown:
default-days: 7
- package-ecosystem: "pre-commit"
directory: "/"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
groups:
pre-commit-hooks:
patterns:
- "*"
cooldown:
default-days: 7
2 changes: 2 additions & 0 deletions .github/linters/codespell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ environmnet
equivalant
erro
erronous
errorprone
everthing
everytime
excute
execept
Expand Down
148 changes: 148 additions & 0 deletions .github/scripts/post-compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Re-applies the token round-robin wiring to the gh-aw generated .lock.yml files,
# which `gh aw compile` doesn't know about. Run after every compile:
#
# gh aw compile && bash .github/scripts/post-compile.sh
#
# Three edits per lock file (see .github/COPILOT_TOKENS.md for the design):
# - point the agent execute step's COPILOT_GITHUB_TOKEN at the pick_copilot_token
# job's output, falling back to the base secret
# - point the agent job's "Redact secrets in logs" step at the same rotated token,
# so a volunteer token is scrubbed from uploaded artifacts, not just the base one
# - make the agent job depend on pick_copilot_token, and strip the self-reference
# gh-aw sometimes adds to pick_copilot_token's own needs (that would be a cycle)
#
# Safe to re-run; a second run is a no-op.

set -euo pipefail

cd "$(git rev-parse --show-toplevel)"

# Kept in an env var so perl doesn't try to interpolate the ${{ }} bits.
export NEWVAL='${{ needs.pick_copilot_token.outputs.name != '"'"''"'"' && secrets[format('"'"'COPILOT_GITHUB_TOKEN_{0}'"'"', needs.pick_copilot_token.outputs.name)] || secrets.COPILOT_GITHUB_TOKEN }}'

FILES=(
".github/workflows/weekly-repo-status.lock.yml"
".github/workflows/daily-issue-triage.lock.yml"
)

fail() { echo "ERROR: $1" >&2; exit 1; }

# Fixes up `needs:` for the agent and pick_copilot_token jobs only; gh-aw adds
# pick_copilot_token to several other jobs' needs and those must stay as-is.
# Reads stdin, writes stdout. gh-aw emits inline needs (needs: foo) for single
# dependencies and block form for lists; inline is fine unless it needs editing,
# in which case "INLINE_NEEDS:<job>" is printed to stderr and the caller bails.
normalise_needs() {
awk '
function isjob(l){ return (l ~ /^ [A-Za-z0-9_-]+:[ \t]*$/) }
BEGIN { job=""; inneeds=0; agentpick=0 }
{
line=$0
if (isjob(line)) {
if (inneeds && job=="agent" && !agentpick) print " - pick_copilot_token"
inneeds=0; agentpick=0
name=line; sub(/^ /,"",name); sub(/:[ \t]*$/,"",name); job=name
print line; next
}
if (line ~ /^ needs:[ \t]*[^ \t]/) {
if (job=="agent" && line !~ /pick_copilot_token/) print "INLINE_NEEDS:" job > "/dev/stderr"
if (job=="pick_copilot_token" && line ~ /pick_copilot_token/) print "INLINE_NEEDS:" job > "/dev/stderr"
print line; next
}
if (line ~ /^ needs:[ \t]*$/) { inneeds=1; agentpick=0; print line; next }
if (inneeds) {
if (line ~ /^ - /) {
item=line; sub(/^ - /,"",item); gsub(/[ \t\r]/,"",item)
if (job=="pick_copilot_token" && item=="pick_copilot_token") next
if (job=="agent" && item=="pick_copilot_token") agentpick=1
print line; next
} else {
if (job=="agent" && !agentpick) print " - pick_copilot_token"
inneeds=0
print line; next
}
}
print line
}
END { if (inneeds && job=="agent" && !agentpick) print " - pick_copilot_token" }
'
}

for f in "${FILES[@]}"; do
if [ ! -f "$f" ]; then
echo "WARN: $f not found, run 'gh aw compile' first? Skipping" >&2
continue
fi

# Repoint the agent execute step's token. The anchor is the GH_AW_PHASE: agent env
# var further down the same env block; the detection job's block has
# GH_AW_PHASE: detection so it doesn't match and keeps the base token.
before=$(grep -cF 'COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}' "$f" || true)
perl -0pi -e \
's/^([ \t]*)COPILOT_GITHUB_TOKEN:[ \t]*\$\{\{[ \t]*secrets\.COPILOT_GITHUB_TOKEN[ \t]*\}\}[ \t]*\n(?=(?:[ \t]+[A-Z][A-Za-z0-9_]*:[^\n]*\n)*?[ \t]+GH_AW_PHASE:[ \t]*agent[ \t]*\n)/$1."COPILOT_GITHUB_TOKEN: ".$ENV{NEWVAL}."\n"/me' \
"$f"
after=$(grep -cF 'COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}' "$f" || true)
removed=$(( before - after ))
if [ "$removed" -eq 1 ]; then token_edit="applied"
elif [ "$removed" -eq 0 ] && grep -qE '^[ \t]+COPILOT_GITHUB_TOKEN: \$\{\{ needs\.pick_copilot_token' "$f"; then token_edit="already"
else fail "$f: execute-step token line not patched as expected (removed=$removed), anchor drifted?"
fi

# Repoint the redact step's SECRET_COPILOT_GITHUB_TOKEN the same way; the line is
# unique to the agent job's "Redact secrets in logs" step.
before=$(grep -cF 'SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}' "$f" || true)
if [ "$before" -gt 1 ]; then
fail "$f: expected at most one redact-step SECRET_COPILOT_GITHUB_TOKEN line, found $before"
fi
perl -0pi -e \
's/^([ \t]*)SECRET_COPILOT_GITHUB_TOKEN:[ \t]*\$\{\{[ \t]*secrets\.COPILOT_GITHUB_TOKEN[ \t]*\}\}[ \t]*$/$1."SECRET_COPILOT_GITHUB_TOKEN: ".$ENV{NEWVAL}/me' \
"$f"
after=$(grep -cF 'SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}' "$f" || true)
if [ "$before" -eq 1 ] && [ "$after" -eq 0 ]; then redact_edit="applied"
elif [ "$before" -eq 0 ] && grep -qF 'SECRET_COPILOT_GITHUB_TOKEN: ${{ needs.pick_copilot_token.outputs.name' "$f"; then redact_edit="already"
else fail "$f: redact-step SECRET_COPILOT_GITHUB_TOKEN line not patched (before=$before after=$after)"
fi

errf="$(mktemp)"
normalise_needs < "$f" > "$f.tmp" 2>"$errf"
if grep -q '^INLINE_NEEDS:' "$errf"; then
rm -f "$f.tmp"; rm -f "$errf"
fail "$f: agent/pick_copilot_token have inline 'needs:' that would need editing, update normalise_needs"
fi
rm -f "$errf"
mv "$f.tmp" "$f"

# sanity checks
self_refs=$(awk '
/^ pick_copilot_token:[ \t]*$/{p=1;next}
/^ [A-Za-z0-9_-]+:[ \t]*$/{p=0}
p && /^ - pick_copilot_token[ \t]*$/{c++}
END{print c+0}' "$f")
[ "$self_refs" -eq 0 ] || fail "$f: pick_copilot_token still self-references (cycle)"
awk '/^ agent:[ \t]*$/{a=1} /^ [A-Za-z0-9_-]+:[ \t]*$/ && !/agent/{if(a&&!seen)exit 3} a && /^ - pick_copilot_token/{seen=1} END{exit (seen?0:3)}' "$f" \
|| fail "$f: agent job does not depend on pick_copilot_token"
grep -qF 'Validate COPILOT_GITHUB_TOKEN secret' "$f" || echo "WARN: validate-secret step missing in $f" >&2
grep -qE '^ pick_copilot_token:$' "$f" || echo "WARN: pick_copilot_token job missing in $f, did compile include the .md jobs: block?" >&2

echo "$f: token-ref=$token_edit, redact-ref=$redact_edit, needs=normalised (self-refs=0, agent->pick ok)"
done

echo "Done."
34 changes: 34 additions & 0 deletions .github/workflows/asf-allowlist-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
name: "ASF Allowlist Check"
"on":
pull_request:
paths: [".github/**"]
push:
branches: [main]
paths: [".github/**"]
permissions:
contents: read
jobs:
asf-allowlist-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: apache/infrastructure-actions/allowlist-check@61dcea11f19e2bbe1263f14d72235e8da17d3ad0 # allowlist-check/v1.0.0
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ jobs:
- name: Install Non-OSS
uses: ./.github/actions/install-nonoss
- name: Noredist Build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
git status
ipmitool -V
- name: Build with Maven
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
- name: Archive artifacts
Expand Down Expand Up @@ -307,6 +309,8 @@ jobs:
mkdir -p ~/.m2/repository
tar -xzf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository
- name: Setup Simulator Prerequisites
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
sudo python3 -m pip install --upgrade netaddr mysql-connector-python
python3 -m pip install --user --upgrade tools/marvin/dist/[mM]arvin-*.tar.gz
Expand All @@ -319,6 +323,8 @@ jobs:
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
- name: Start CloudStack Management Server with Simulator
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
export MAVEN_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
echo -e "\nStarting simulator"
Expand All @@ -329,6 +335,8 @@ jobs:
echo -e "\nStarting Advanced Zone DataCenter deployment"
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
- name: Run Integration Tests with Simulator
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
mkdir -p integration-test-results/smoke/misc
mkdir -p integration-test-results/component
Expand Down
Loading
Loading