mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-28 22:56:19 +00:00
+1








badceec12a
* fix(hdfs): clean up temporary file when an atomic write fails (#9483) * fix(hdfs): clean up temporary file when an atomic write fails Signed-off-by: fengyue-xve <1759519137@qq.com> * style: apply rustfmt to hdfs layer test Signed-off-by: fengyue-xve <1759519137@qq.com> * fix(hdfs): report earlier write failures and log cleanup failures - Later `write`/`close` calls on a writer whose failed write was cleaned up now mention the original failure instead of the bare "unavailable after close or abort" message. - `abort_and_delete` logs abort and deletion failures with the temporary path instead of discarding them; the original write error is still returned to the caller. - The temporary-file cleanup test now lists the directory holding the temporary file, so it fails if the cleanup is reverted. Signed-off-by: 风月 <1759519137@qq.com> Signed-off-by: fengyue-xve <1759519137@qq.com> --------- Signed-off-by: fengyue-xve <1759519137@qq.com> Signed-off-by: 风月 <1759519137@qq.com> (cherry picked from commita35661d69c) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(jaeger): return the most recent traces when a search hits its limit (#9595) * fix(jaeger): return the most recent traces when a search hits its limit Trace search applied LIMIT to an unordered DISTINCT trace_id, so a search matching more traces than the limit returned an arbitrary subset that changed between identical requests. Order traces by their latest matching span before applying the limit. Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * refactor(jaeger): name the trace dataframe builder with a verb and document execution Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com> (cherry picked from commitcf16c7313b) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(pprof): initialize framehop before signal sampling (#9612) fix(pprof): pin upstream framehop initialization fix Pin pprof workspace-wide to 01cff82d containing tikv/pprof-rs#282. Initialize framehop before sampling instead of allocating and discovering shared libraries in the first SIGPROF handler. Regenerate the lockfile without unrelated dependency changes. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> (cherry picked from commit0dc81777e3) Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: bump rustls to 0.23.46 (#9614) rustls 0.23.46 fixes rustls/rustls#3301: on TLS 1.2 with AES-GCM, reaching the 2^24 record limit dropped a fragment while reporting the write as complete, then kept sending records after close_notify. This stalled Kafka WAL produce requests until the request timeout. (cherry picked from commit33879b07c8) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(prom): return empty remote read results for missing metrics (#9613) * fix: return empty remote read results for missing metrics Signed-off-by: fys <fengys1996@gmail.com> * test(prom): cover empty reads for missing databases Signed-off-by: fys <fengys1996@gmail.com> * test(prom): simplify remote read regression cases Signed-off-by: fys <fengys1996@gmail.com> * fix(prom): log missing tables during remote read Signed-off-by: fys <fengys1996@gmail.com> --------- Signed-off-by: fys <fengys1996@gmail.com> (cherry picked from commitcf0f6c308a) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(ci): compare release validation against the previous stable version (#9636) Ancestry-based tag selection skips stable tags that live only on older release branches. Signed-off-by: paomian <xpaomian@gmail.com> (cherry picked from commit3de8610e2e) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): keep processing bulk requests after one fails to encode (#9638) * fix(mito2): keep processing bulk requests after one fails to encode When `push_bulk` fails to build the WAL entry of a bulk request, it answers that request with the error. `process_bulk_requests` then returned from the loop, so the remaining requests of the drained batch were dropped without an answer and their callers only saw a receive error. Skip the failed request and continue with the rest of the batch instead. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(mito2): keep bulk install barriers independent per target The bulk install test barrier was a single process-wide slot, so tests that arm it while running in the same process replaced each other's barrier. Keep one barrier per armed target instead. Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com> (cherry picked from commit88bdab0f66) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(promql): honor @ modifier on subqueries (#9446) * fix(promql): honor @ modifier on subqueries `prom_subquery_expr_to_plan` never read the `at` field of a subquery, so `sum_over_time(m[20s:10s] @ 60)` was evaluated like `m[20s:10s]` and followed the outer evaluation grid. Handle `@` the way Prometheus does: fold the anchor into the subquery offset (`offset + (eval_start - anchor)`, as `setOffsetForAtModifier` does), evaluate the subquery once at the start of the evaluation, and replay the folded window over the outer grid, reusing the anchored range selector machinery. A call whose range argument is an anchored subquery is promoted as step-invariant, like one over an anchored range selector. `@ start()`/`@ end()` and `offset` combine as for selectors, and an unrepresentable anchor is rejected with the existing error. Closes #9411 Signed-off-by: Aarav <aaravsjadav@gmail.com> * test(promql): add sqlness cases for @ on subqueries Cover the #9411 reproducer end to end: `@ <ts>`, `@ start()`/`@ end()`, `@` combined with `offset` in either order, an instant query away from the anchor, `*_over_time` functions and `rate` over an anchored subquery, a computed inner expression, and an aggregation above the anchored call. Two series per table so a dropped or merged series shows up as a wrong row. Refs #9411 Signed-off-by: Aarav <aaravsjadav@gmail.com> --------- Signed-off-by: Aarav <aaravsjadav@gmail.com> (cherry picked from commit095c288f16) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): validate bulk insert batches against the region schema (#9698) * fix(mito2): validate bulk insert batches against the region schema Bulk inserts were only checked for the time index column, unlike row writes, which WriteRequest::check_schema checks against the region schema. A batch with columns of another type, nulls in the time index or in non-nullable columns, duplicate or unknown columns reached the region worker: a time index that is not a timestamp or holds only nulls made the worker fail, and other mismatches failed after the WAL append or were stored as written, depending on the SST format. Move the column checks of check_schema into a core shared by row writes and bulk inserts, and check bulk insert batches at the same points as rows: when the engine builds the worker request, and again in the worker if the region schema changed since. check_schema keeps its behavior. Bulk insert columns must have the column's Arrow type, except that tags may use any string encoding, as the memtables already convert them. Sparse batches must carry one encoded primary key column of binary without nulls. A batch that misses columns gets them filled by the worker even if it claims to match the current schema. The metric engine checks logical bulk inserts against the logical region before rewriting them into the physical region, as the rewrite copies columns without checking them and would encode a duplicated tag into the primary key twice. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix(mito2): report an error when a write is interrupted by a panic WriteNotify answers its waiter when it is dropped and reported success unless an error had been set, also when it was dropped while unwinding from a panic in the middle of the write. Report an error in that case. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix(mito2): tolerate a poisoned series lock when dropping a series map SeriesMap::drop reads every series to update the memtable metrics and unwrapped the lock, so dropping the map while unwinding from a panic that poisoned a series lock panicked again. Read through the poisoned lock instead. Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com> (cherry picked from commit791f429246) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): fence writes before a graceful downgrade (#9716) * test(mito2): cover graceful role changes racing with writes A graceful role change flips the region state in a background task while the worker keeps handling writes. Add bulk and row write tests that check a write handled after the role change request is either rejected or covered by the returned last_entry_id. Add tests for DowngradingLeader while an ALTER keeps the region in Altering, alone and in the downgrade sequence the datanode runs (DowngradingLeader, Flush, Follower) with a migration candidate on its own local WAL. Add a test that the downgrade sequence covers a write in flight when a lease renewal sets Downgrading. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix(mito2): fence writes before a graceful downgrade set_region_role_state_gracefully hands the role change to a background task that waits for the manifest lock. The worker keeps handling writes until the task flips the state, so a write could be acknowledged with an entry id above the returned last_entry_id. Set Downgrading in the worker before spawning the task for Follower and DowngradingLeader requests, as lease renewal already does, so every write the worker handles afterwards is rejected. DowngradingLeader also did nothing and returned success when the region was in another leader state such as Altering. The region became writable again when the operation finished, and the datanode then flushed and turned it into a follower in one step. Return a retryable error instead, so metasrv retries the downgrade. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(mito2): assert the retryable downgrade error during ALTER Check that DowngradingLeader during an ALTER returns a retryable error, and release the paused ALTER on that path. The local WAL test now retries the downgrade after the ALTER, as metasrv does. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(mito2): write before the retried downgrade in the local WAL test Rows written before an ALTER were already flushed, so the candidate check did not depend on the downgrade's final flush. Write rows after the ALTER and before the downgrade is retried, which only that flush can carry to the candidate. Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com> (cherry picked from commit660c4efe1f) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(meta): validate persisted partition bounds before altering regions (#9487) * fix(meta): validate persisted partition bounds before altering regions A partition bound is persisted with the type of the column at the time it was written. When an ALTER TABLE changes the type of a column referenced by a partition expression (widening the time index unit is the common case), each region rewrites the bound literal to the new type while building its scan predicate. A millisecond bound like year 3000 fits milliseconds but overflows nanoseconds, so every scan of the region fails once the table schema is updated -- and some regions may already be altered when the failure surfaces. Validate every region's persisted expression on prepare, before any region is modified: parse the persisted JSON (mirrored types, since common-meta cannot depend on the partition crate which depends on it), replay the same value -> ScalarValue conversion and checked cast the region performs, and reject the ALTER naming the offending region when a bound cannot be represented with the new column type. Incompatible changes are rejected atomically; compatible widening proceeds unchanged. Adds meta-level tests (multi-region rejection naming the second region, compatible widening completing) and an end-to-end sqlness case. Fixes #9454 Signed-off-by: fengyue-xve <1759519137@qq.com> * fix: access ColumnSchema fields directly and use plain format args ColumnSchema exposes name and data_type as public fields, not methods, and the telemetry macros only accept a format string after the error. Signed-off-by: fengyue-xve <1759519137@qq.com> * test: access ColumnSchema data_type field in alter table tests Same fix as the previous commit: data_type is a public field on ColumnSchema, not a method. Signed-off-by: fengyue-xve <1759519137@qq.com> * test: drop borrows now that data_type is read as a field Signed-off-by: fengyue-xve <1759519137@qq.com> * test: drop useless format! in nested expression test Signed-off-by: fengyue-xve <1759519137@qq.com> * test: cover the partition tail in change_col_type sqlness case Signed-off-by: fengyue-xve <1759519137@qq.com> * test: drop spurious blank line in change_col_type result Signed-off-by: fengyue-xve <1759519137@qq.com> * fix(meta): compare partition bounds with the scan comparison coercion The preflight validator cast the persisted bound directly to the altered column type, which rejected ALTERs the scan itself accepts: the region coerces both the column and the bound to the common comparison type (ExprSimplifier::coerce in PredicateGroup::new), so narrowing a field column with an out-of-range bound still scans. Compare through comparison_coercion(target_type, bound_type) instead and only require the bound to be castable to the common type. Also add a round-trip test in the partition crate that serializes real PartitionExprs and runs them through the validator, so drift between the Persisted* mirror and the partition types fails CI, and fix the error message to match the comparison semantics. Signed-off-by: fengyue-xve <1759519137@qq.com> * test: update the sqlness fixture for the new incompatibility message The error message now reflects the comparison semantics: the persisted bound can no longer be compared with the new column type. Signed-off-by: fengyue-xve <1759519137@qq.com> * build(deps): refresh Cargo.lock for the common-meta datafusion-expr dependency common-meta gained a datafusion-expr dependency inff9c3f4but the lock file was not refreshed, so cargo check --locked refused to run on CI. Signed-off-by: fengyue-xve <1759519137@qq.com> * fix(meta): reject every non-widening type change of a partitioned column The region routes rows on write through `MultiDimPartitionRule::find_region`, which compares the persisted bound against row values directly: `Value::cmp` panics on mismatched variants and equality misroutes silently. After a column partitioned at `v < 3000000000` is altered from BIGINT to INT, every INSERT compares `Value::Int32` rows against the persisted `Value::Int64` bound and panics in the frontend, even though the scan-side coercion this check mirrors still works. Reject any type change of a column referenced by a persisted partition expression unless it is a timestamp unit widening, which keeps the bound and the rows comparable because `Timestamp` comparisons convert units first; the widening keeps the scan cast check unchanged. Signed-off-by: fengyue-xve <1759519137@qq.com> --------- Signed-off-by: fengyue-xve <1759519137@qq.com> (cherry picked from commit1e29e8d4b6) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(partition): route NULLs like row inserts and accept signed-minimum bounds (#9697) * fix(partition): route NULLs like row inserts and accept signed-minimum bounds Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix(partition): keep equality two-valued for NULL rows and accept unsigned -0 Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix(partition): treat NULL masks as false in batch routing and keep comparisons bare Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test(compat): update partition filter in analyze verbose expected output Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com> (cherry picked from commitda88ff8653) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): re-check a filled write as sent after a schema change (#9701) * fix(mito2): re-check a filled write as sent after a schema change The engine fills the columns a write leaves out with their defaults when it accepts the write, appending them to the rows without adding them to `name_to_index` and `has_null`. If the region schema changes before the worker handles the write, the worker checks the request again and `check_schema` looks up a filled column in `name_to_index`, which panics and stops the region worker. If the filled column was dropped, the write fails with an unknown column that the client never sent. Remove the filled columns before checking, so the request is checked as sent and filled again for the current schema. Nothing is filled yet when the engine checks the request, so that check does no extra work. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(mito2): rename put_request helper to build_put_request Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com> (cherry picked from commit93c3b116da) Signed-off-by: WenyXu <wenymedia@gmail.com> * perf(mito2): gather last rows with one take per input batch (#9737) * perf(mito2): gather last rows with one take per input batch FlatLastTimestampSelector buffered a single-row slice per series and concatenated up to 8192 of them. Concatenating slices with dictionary columns merges the dictionaries once per slice, which made high-cardinality instant PromQL queries using the LastRow scan path (#9034) slower. Select the rows of series that end inside a batch with one take instead. Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test(mito2): cover duplicate last timestamps in the take path Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix(mito2): group last rows by primary key bytes Flat batches may assign different dictionary keys to the same primary key, for example when binary keys are wrapped with identity keys. Merge adjacent ranges with equal key bytes before selecting last rows. Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com> (cherry picked from commit4645ab9ed7) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): apply SST internal column encodings to bulk-encoded parts (#9735) * fix(mito2): apply SST internal column encodings to bulk-encoded parts Bulk memtable parts are encoded to parquet and flushed as SSTs as-is, but the bulk encoder did not apply the time index / __sequence DELTA_BINARY_PACKED encoding (with dictionary disabled) and the uncompressed op_type setting that the regular SST writer uses. Share these settings through one helper. Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore(mito2): drop the answered bulk encoder compression TODO Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com> (cherry picked from commit977e76d0a4) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: avoid exact scan row counts for SSTs with unknown counts (#9759) fix: avoid exact scan row counts for legacy SSTs Treat selected SSTs with unknown row counts as non-exact before checking region partition visibility. Preserve exact statistics for known counts and cover legacy metadata mixed with known-count files. Fixes GreptimeTeam/greptimedb#9718 Signed-off-by: Aumnertic <hznuzc@gmail.com> (cherry picked from commit6f53d57d15) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: avoid duplicate keys in update flow metadata txn (#9816) CREATE OR REPLACE FLOW deleted and then put the same flow route, flownode flow and table flow keys in a single txn when the replacement kept the partitions, flownodes or source tables, which etcd rejects with "duplicate key given in txn request". Only delete the old keys that are not put again. Closes #9810. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> (cherry picked from commita1b2362e58) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(ci): increase release integration test stack size (#9817) Signed-off-by: evenyag <realevenyag@gmail.com> (cherry picked from commite6fa1a0b21) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(datanode): release region map guard before awaiting role changes (#9824) Signed-off-by: WenyXu <wenymedia@gmail.com> (cherry picked from commit0dc649e028) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(ci): align nightly Windows and macOS artifact test stack sizes (#9860) * fix(ci): increase Windows nightly test stack size Signed-off-by: evenyag <realevenyag@gmail.com> * fix(ci): align optional macOS artifact test stack size Signed-off-by: evenyag <realevenyag@gmail.com> --------- Signed-off-by: evenyag <realevenyag@gmail.com> (cherry picked from commit8b1d68369b) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(mito2): keep SSTs when a manifest save ends with RateLimited or PermissionDenied (#9898) * fix(mito2): keep SSTs when a manifest save ends with RateLimited The object store's retry layer retries temporary errors and returns the last attempt's error. A manifest delta PUT can be stored by the server while the client sees a timeout, reset or 5xx, and the retries that follow can be throttled, so the save ends with RateLimited even though the delta exists. may_have_persisted_manifest_update treated RateLimited as proof that nothing was written, so flush and compaction deleted the SSTs the stored delta references. A later open or follower sync replays the delta and reads fail on the missing files. Treat RateLimited like other ambiguous errors: the SSTs are kept and become orphans when the save really failed. Fixes #9897 Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix(mito2): keep SSTs when a manifest save ends with PermissionDenied The retry layer returns the last attempt's error, so a 403 from a revoked key, a changed bucket policy or clock skew can follow a delta PUT that the server already stored. Like RateLimited, PermissionDenied does not prove that nothing was written, so it no longer lets flush or compaction delete the SSTs; they become orphans when the save really failed. The compaction test that rejects a manifest write before persistence now injects Unsupported, which is raised before any request is sent. Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com> Co-authored-by: Yingwen <realevenyag@gmail.com> (cherry picked from commit1cb01d0d44) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: upload staging manifests in chunks (#9919) Signed-off-by: WenyXu <wenymedia@gmail.com> (cherry picked from commitf2be11a69e) Signed-off-by: WenyXu <wenymedia@gmail.com> * perf: stream and prune SST manifest scans (#9931) * refactor: add reusable metadata pruning and projected SST batches Signed-off-by: WenyXu <wenymedia@gmail.com> * perf(mito2): stream and prune manifest SST metadata Signed-off-by: WenyXu <wenymedia@gmail.com> * perf(datanode): stream inspection queries through reusable providers Signed-off-by: WenyXu <wenymedia@gmail.com> * perf(catalog): push manifest filters through inspection queries Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor: align manifest column constants with module conventions Signed-off-by: WenyXu <wenymedia@gmail.com> * perf: reduce manifest inspection allocations Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor: narrow manifest inspection API visibility Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor: retain residual filters for manifest inspection Signed-off-by: WenyXu <wenymedia@gmail.com> --------- Signed-off-by: WenyXu <wenymedia@gmail.com> (cherry picked from commitc96cdd0026) Signed-off-by: WenyXu <wenymedia@gmail.com> * feat: improve SQL analyze scan diagnostics (#9565) * feat: improve SQL analyze scan diagnostics Signed-off-by: evenyag <realevenyag@gmail.com> * test: redact dynamic filters in sqlness results Signed-off-by: evenyag <realevenyag@gmail.com> * test: stabilize analyze snapshots for merge queue Signed-off-by: evenyag <realevenyag@gmail.com> * test: remove obsolete scan_details assertion Signed-off-by: evenyag <realevenyag@gmail.com> * test: refresh explain snapshots after partition filter changes Signed-off-by: evenyag <realevenyag@gmail.com> --------- Signed-off-by: evenyag <realevenyag@gmail.com> (cherry picked from commit3e2751d71d) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(query): avoid lossy casts in partition pruning (#9600) * fix(query): keep lossy casts out of partition pruning Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): align cast pruning expectations with conservative fallback Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): record lossy cast partition pruning regression Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(query): retain safe pruning conjuncts beside unsupported casts Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): refresh cast pruning plans after rebase Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --------- Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> (cherry picked from commitdf8f6848cc) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(query): preserve IGNORE NULLS semantics in distributed queries (#9601) * fix(query): skip LastRow pushdown for IGNORE NULLS Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(query): keep IGNORE NULLS aggregates above remote scans Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): record IGNORE NULLS results before and after flush Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): share IGNORE NULLS coverage across deployments Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(query): refresh last-value plans after rebase Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --------- Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> (cherry picked from commit0dab3aef21) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(meta): share peer discovery with plugin hooks (#9977) Signed-off-by: WenyXu <wenymedia@gmail.com> (cherry picked from commit9f0e58e2af) Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: adapt release backport test dependencies Copy the writer observation test utility from #9505 (18726c7602) for the #9919 staging regression, initialize the release-only catchup location hint, and remove main-only unused imports. Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: bump version to 1.3.0 Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(query): pin DataFusion cast constraint propagation fix Update the pinned GreptimeTeam/datafusion revision from e3221b8 to cc55344 (the 55.1 fork carrying apache/datafusion#25531 plus a stronger regression test). CastExpr::propagate_constraints used to cast a filter's output interval straight back to the input type. For CAST(k AS BIGINT) = 1 the singleton output [1, 1] was inverted to [1.0, 1.0] although k = 1.5 matches too, so FilterExec advertised k as constant, the equivalence classes dropped the ordering required by ORDER BY k, and rows returned in scan order. The sqlness case keeps every #9600 assertion and the explicit ORDER BY, and adds ascending and descending checks for the partitioned table, the control table and a table whose matching rows are stored in neither ascending nor descending k order. Cargo.lock only rewrites the 35 datafusion source lines. Signed-off-by: discord9 <discord9@163.com> (cherry picked from commitfe637b04ce) Signed-off-by: WenyXu <wenymedia@gmail.com> --------- Signed-off-by: fengyue-xve <1759519137@qq.com> Signed-off-by: 风月 <1759519137@qq.com> Signed-off-by: WenyXu <wenymedia@gmail.com> Signed-off-by: Dennis Zhuang <killme2008@gmail.com> Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> Signed-off-by: fys <fengys1996@gmail.com> Signed-off-by: paomian <xpaomian@gmail.com> Signed-off-by: jeremyhi <fengjiachun@gmail.com> Signed-off-by: Aarav <aaravsjadav@gmail.com> Signed-off-by: Aumnertic <hznuzc@gmail.com> Signed-off-by: evenyag <realevenyag@gmail.com> Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> Signed-off-by: discord9 <discord9@163.com> Co-authored-by: fengyue-xve <1759519137@qq.com> Co-authored-by: dennis zhuang <killme2008@gmail.com> Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com> Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com> Co-authored-by: localhost <xpaomian@gmail.com> Co-authored-by: jeremyhi <jiachun_feng@proton.me> Co-authored-by: DeviousCardi <115358213+DeviousCardi@users.noreply.github.com> Co-authored-by: Aum <hznuzc@gmail.com> Co-authored-by: Yingwen <realevenyag@gmail.com> Co-authored-by: discord9 <discord9@163.com>
904 lines
39 KiB
YAML
904 lines
39 KiB
YAML
name: Release
|
||
|
||
# There are two kinds of formal release:
|
||
# 1. The tag('v*.*.*') push release: the release workflow will be triggered by the tag push event.
|
||
# 2. The scheduled release(the version will be '<base-version>-nightly-YYYYMMDD', any pre-release
|
||
# extension in the next release version like '-alpha.1' is stripped, so 'nightly' is the extension):
|
||
# the release workflow will be triggered by the schedule event. The schedule runs every weekday,
|
||
# but the release only proceeds when the latest published nightly release is older than
|
||
# NIGHTLY_RELEASE_MAX_AGE_DAYS days, so a failed nightly run is retried by the next weekday
|
||
# schedule instead of leaving a whole week without nightly builds.
|
||
# A failed tag push release can be manually dispatched on the same tag to recover it without changing the formal release version.
|
||
on:
|
||
push:
|
||
tags:
|
||
- "v*.*.*"
|
||
schedule:
|
||
# At 00:00 on every weekday (Monday to Friday). The scheduled nightly release only
|
||
# proceeds when the latest published nightly release is older than
|
||
# NIGHTLY_RELEASE_MAX_AGE_DAYS days, see the 'Check nightly release necessity' step.
|
||
- cron: '0 0 * * 1-5'
|
||
workflow_dispatch: # Allows you to run this workflow manually.
|
||
# Notes: The GitHub Actions ONLY support 10 inputs; this final input is the tenth.
|
||
inputs:
|
||
linux_amd64_runner:
|
||
type: choice
|
||
description: The runner uses to build linux-amd64 artifacts
|
||
default: ec2-c6i.4xlarge-amd64
|
||
options:
|
||
- ubuntu-22.04
|
||
- ubuntu-22.04-8-cores
|
||
- ubuntu-22.04-16-cores
|
||
- ubuntu-22.04-32-cores
|
||
- ubuntu-22.04-64-cores
|
||
- ec2-c6i.xlarge-amd64 # 4C8G
|
||
- ec2-c6i.2xlarge-amd64 # 8C16G
|
||
- ec2-c6i.4xlarge-amd64 # 16C32G
|
||
- ec2-c6i.8xlarge-amd64 # 32C64G
|
||
- ec2-c6i.16xlarge-amd64 # 64C128G
|
||
linux_arm64_runner:
|
||
type: choice
|
||
description: The runner uses to build linux-arm64 artifacts
|
||
default: ec2-c6g.8xlarge-arm64
|
||
options:
|
||
- ubuntu-2204-32-cores-arm
|
||
- ec2-c6g.xlarge-arm64 # 4C8G
|
||
- ec2-c6g.2xlarge-arm64 # 8C16G
|
||
- ec2-c6g.4xlarge-arm64 # 16C32G
|
||
- ec2-c6g.8xlarge-arm64 # 32C64G
|
||
- ec2-c6g.16xlarge-arm64 # 64C128G
|
||
macos_runner:
|
||
type: choice
|
||
description: The runner uses to build macOS artifacts
|
||
default: macos-latest
|
||
options:
|
||
- macos-latest
|
||
skip_test:
|
||
description: Do not run integration tests during the build
|
||
type: boolean
|
||
default: true
|
||
build_linux_artifacts:
|
||
type: boolean
|
||
description: Build linux artifacts (amd64, arm64, and riscv64)
|
||
required: false
|
||
default: false
|
||
build_macos_artifacts:
|
||
type: boolean
|
||
description: Build macos artifacts
|
||
required: false
|
||
default: false
|
||
build_windows_artifacts:
|
||
type: boolean
|
||
description: Build Windows artifacts
|
||
required: false
|
||
default: false
|
||
publish_github_release:
|
||
type: boolean
|
||
description: Create GitHub release and upload artifacts
|
||
required: false
|
||
default: false
|
||
release_images:
|
||
type: boolean
|
||
description: Build and push images to DockerHub and ACR
|
||
required: false
|
||
default: false
|
||
release_validation:
|
||
type: choice
|
||
description: Manual policy for accepted perf regressions or runner failures; automatic releases always run all validation (scheduled nightlies run query regression non-blocking)
|
||
required: true
|
||
default: all
|
||
options:
|
||
- all
|
||
- skip-compat
|
||
- skip-query-regression
|
||
- skip-all
|
||
|
||
# Use env variables to control all the release process.
|
||
env:
|
||
# The arguments of building greptime.
|
||
CARGO_PROFILE: nightly
|
||
|
||
# Controls whether to run tests, include unit-test, integration-test and sqlness.
|
||
DISABLE_RUN_TESTS: ${{ inputs.skip_test || vars.DEFAULT_SKIP_TEST }}
|
||
|
||
# The scheduled version is '<base-version>-nightly-YYYYMMDD', like v0.2.0-nightly-20230313;
|
||
# the pre-release extension of the next release version is stripped, e.g. v0.2.0-alpha.1 -> v0.2.0-nightly-20230313.
|
||
NIGHTLY_RELEASE_PREFIX: nightly
|
||
|
||
# The maximum age (in days) of the latest published nightly release before a scheduled
|
||
# nightly release may run again; see the 'Check nightly release necessity' step.
|
||
NIGHTLY_RELEASE_MAX_AGE_DAYS: 5
|
||
|
||
jobs:
|
||
allocate-runners:
|
||
name: Allocate runners
|
||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' }}
|
||
runs-on: ubuntu-latest
|
||
outputs:
|
||
linux-amd64-runner: ${{ steps.start-linux-amd64-runner.outputs.label }}
|
||
linux-arm64-runner: ${{ steps.start-linux-arm64-runner.outputs.label }}
|
||
macos-runner: ${{ inputs.macos_runner || vars.DEFAULT_MACOS_RUNNER }}
|
||
windows-runner: windows-2022-8-cores
|
||
|
||
# The following EC2 resource id will be used for resource releasing.
|
||
linux-amd64-ec2-runner-label: ${{ steps.start-linux-amd64-runner.outputs.label }}
|
||
linux-amd64-ec2-runner-instance-id: ${{ steps.start-linux-amd64-runner.outputs.ec2-instance-id }}
|
||
linux-arm64-ec2-runner-label: ${{ steps.start-linux-arm64-runner.outputs.label }}
|
||
linux-arm64-ec2-runner-instance-id: ${{ steps.start-linux-arm64-runner.outputs.ec2-instance-id }}
|
||
|
||
# The 'version' use as the global tag name of the release workflow.
|
||
version: ${{ steps.create-version.outputs.version }}
|
||
|
||
# The 'is-current-version-latest' determines whether to update 'latest' Docker tags and downstream repositories.
|
||
is-current-version-latest: ${{ steps.check-version.outputs.is-current-version-latest }}
|
||
is-current-version-stable: ${{ steps.check-version.outputs.is-current-version-stable }}
|
||
|
||
# Whether a scheduled nightly release should run: it only runs when the latest published
|
||
# nightly release is older than NIGHTLY_RELEASE_MAX_AGE_DAYS days. Always 'true' for other events.
|
||
nightly-required: ${{ steps.check-nightly.outputs.nightly-required }}
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Check Rust toolchain version
|
||
shell: bash
|
||
run: |
|
||
./scripts/check-builder-rust-version.sh
|
||
|
||
# A scheduled run only proceeds when the latest published nightly release is older than
|
||
# NIGHTLY_RELEASE_MAX_AGE_DAYS days, so a failed nightly run is retried by the next weekday
|
||
# schedule. The check runs before the runners are allocated to avoid wasting EC2 resources.
|
||
- name: Check nightly release necessity
|
||
id: check-nightly
|
||
run: |
|
||
echo "nightly-required=$(./.github/scripts/check-nightly-release.sh)" >> "$GITHUB_OUTPUT"
|
||
env:
|
||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||
NIGHTLY_RELEASE_MAX_AGE_DAYS: ${{ env.NIGHTLY_RELEASE_MAX_AGE_DAYS }}
|
||
|
||
# The create-version will create a global variable named 'version' in the global workflows.
|
||
# - If it's a tag push release or manual dispatch on a tag with REUSE_EXISTING_RELEASE_TAG=true, the version is the tag name(${{ github.ref_name }});
|
||
# - If it's a scheduled release, the version is '<base-version>-nightly-$buildTime', like v0.2.0-nightly-20230313 (pre-release extensions like '-alpha.1' are stripped);
|
||
# - If it's a manual non-tag release, the version is '${{ env.NEXT_RELEASE_VERSION }}-<short-git-sha>-YYYYMMDDSS', like v0.2.0-e5b243c-2023071245;
|
||
- name: Create version
|
||
id: create-version
|
||
run: |
|
||
echo "version=$(./.github/scripts/create-version.sh)" >> $GITHUB_OUTPUT
|
||
env:
|
||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
||
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||
GITHUB_REF_TYPE: ${{ github.ref_type }}
|
||
REUSE_EXISTING_RELEASE_TAG: "true"
|
||
NIGHTLY_RELEASE_PREFIX: ${{ env.NIGHTLY_RELEASE_PREFIX }}
|
||
|
||
- name: Check version
|
||
id: check-version
|
||
run: |
|
||
./.github/scripts/check-version.sh "${{ steps.create-version.outputs.version }}"
|
||
|
||
- name: Allocate linux-amd64 runner
|
||
if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && steps.check-nightly.outputs.nightly-required == 'true' }}
|
||
uses: ./.github/actions/start-runner
|
||
id: start-linux-amd64-runner
|
||
with:
|
||
runner: ${{ inputs.linux_amd64_runner || vars.DEFAULT_AMD64_RUNNER }}
|
||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||
aws-region: ${{ vars.EC2_RUNNER_REGION }}
|
||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
|
||
image-id: ${{ vars.EC2_RUNNER_LINUX_AMD64_IMAGE_ID }}
|
||
security-group-id: ${{ vars.EC2_RUNNER_SECURITY_GROUP_ID }}
|
||
subnet-id: ${{ vars.EC2_RUNNER_SUBNET_ID }}
|
||
|
||
- name: Allocate linux-arm64 runner
|
||
if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && steps.check-nightly.outputs.nightly-required == 'true' }}
|
||
uses: ./.github/actions/start-runner
|
||
id: start-linux-arm64-runner
|
||
with:
|
||
runner: ${{ inputs.linux_arm64_runner || vars.DEFAULT_ARM64_RUNNER }}
|
||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||
aws-region: ${{ vars.EC2_RUNNER_REGION }}
|
||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
|
||
image-id: ${{ vars.EC2_RUNNER_LINUX_ARM64_IMAGE_ID }}
|
||
security-group-id: ${{ vars.EC2_RUNNER_SECURITY_GROUP_ID }}
|
||
subnet-id: ${{ vars.EC2_RUNNER_SUBNET_ID }}
|
||
|
||
build-linux-amd64-artifacts:
|
||
name: Build linux-amd64 artifacts
|
||
if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
runs-on: ${{ needs.allocate-runners.outputs.linux-amd64-runner }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/build-linux-artifacts
|
||
with:
|
||
arch: amd64
|
||
cargo-profile: ${{ env.CARGO_PROFILE }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
disable-run-tests: ${{ env.DISABLE_RUN_TESTS }}
|
||
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
||
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
||
aws-ci-test-bucket: ${{ vars.AWS_CI_TEST_BUCKET }}
|
||
aws-region: ${{ vars.AWS_CI_TEST_BUCKET_REGION }}
|
||
aws-access-key-id: ${{ secrets.AWS_CI_TEST_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_CI_TEST_SECRET_ACCESS_KEY }}
|
||
|
||
build-linux-arm64-artifacts:
|
||
name: Build linux-arm64 artifacts
|
||
if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
runs-on: ${{ needs.allocate-runners.outputs.linux-arm64-runner }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/build-linux-artifacts
|
||
with:
|
||
arch: arm64
|
||
cargo-profile: ${{ env.CARGO_PROFILE }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
disable-run-tests: ${{ env.DISABLE_RUN_TESTS }}
|
||
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
||
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
||
large-page-size: true
|
||
aws-ci-test-bucket: ${{ vars.AWS_CI_TEST_BUCKET }}
|
||
aws-region: ${{ vars.AWS_CI_TEST_BUCKET_REGION }}
|
||
aws-access-key-id: ${{ secrets.AWS_CI_TEST_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_CI_TEST_SECRET_ACCESS_KEY }}
|
||
|
||
build-linux-riscv64-artifacts:
|
||
name: Build linux-riscv64 artifacts
|
||
if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
runs-on: ${{ needs.allocate-runners.outputs.linux-amd64-runner }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Prepare riscv64 dev-builder image
|
||
shell: bash
|
||
env:
|
||
IMAGE_REGISTRY: ${{ vars.ECR_IMAGE_REGISTRY }}
|
||
IMAGE_NAMESPACE: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
||
run: |
|
||
builder_tag=$(grep '^DEV_BUILDER_IMAGE_TAG ?=' Makefile | awk '{print $3}')
|
||
builder_image="${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/dev-builder-riscv64:${builder_tag}"
|
||
if ! docker pull "${builder_image}"; then
|
||
make dev-builder-riscv64 \
|
||
IMAGE_REGISTRY="${IMAGE_REGISTRY}" \
|
||
IMAGE_NAMESPACE="${IMAGE_NAMESPACE}"
|
||
fi
|
||
|
||
# Cross-compile greptime for riscv64gc-unknown-linux-gnu on the amd64 runner
|
||
# with the riscv64 cross dev-builder image. Integration tests are skipped
|
||
# because the cross-compiled binary cannot run on the amd64 host.
|
||
- name: Build greptime riscv64 binary
|
||
shell: bash
|
||
run: |
|
||
make build-riscv64-bin \
|
||
CARGO_PROFILE=${{ env.CARGO_PROFILE }} \
|
||
FEATURES=servers/dashboard \
|
||
IMAGE_REGISTRY=${{ vars.ECR_IMAGE_REGISTRY }} \
|
||
IMAGE_NAMESPACE=${{ vars.ECR_IMAGE_NAMESPACE }}
|
||
|
||
- name: Upload artifacts
|
||
uses: ./.github/actions/upload-artifacts
|
||
with:
|
||
artifacts-dir: greptime-linux-riscv64-${{ needs.allocate-runners.outputs.version }}
|
||
target-files: ./target/riscv64gc-unknown-linux-gnu/${{ env.CARGO_PROFILE }}/greptime
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
|
||
build-macos-artifacts:
|
||
name: Build macOS artifacts
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
include:
|
||
- os: ${{ needs.allocate-runners.outputs.macos-runner }}
|
||
arch: aarch64-apple-darwin
|
||
features: servers/dashboard
|
||
artifacts-dir-prefix: greptime-darwin-arm64
|
||
- os: ${{ needs.allocate-runners.outputs.macos-runner }}
|
||
features: servers/dashboard
|
||
arch: x86_64-apple-darwin
|
||
artifacts-dir-prefix: greptime-darwin-amd64
|
||
runs-on: ${{ matrix.os }}
|
||
outputs:
|
||
build-macos-result: ${{ steps.set-build-macos-result.outputs.build-macos-result }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
if: ${{ (inputs.build_macos_artifacts || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/build-macos-artifacts
|
||
with:
|
||
arch: ${{ matrix.arch }}
|
||
cargo-profile: ${{ env.CARGO_PROFILE }}
|
||
features: ${{ matrix.features }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
# We decide to disable the integration tests on macOS because it's unnecessary and time-consuming.
|
||
disable-run-tests: true
|
||
artifacts-dir: ${{ matrix.artifacts-dir-prefix }}-${{ needs.allocate-runners.outputs.version }}
|
||
|
||
- name: Set build macos result
|
||
id: set-build-macos-result
|
||
run: |
|
||
echo "build-macos-result=success" >> $GITHUB_OUTPUT
|
||
|
||
build-windows-artifacts:
|
||
name: Build Windows artifacts
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
include:
|
||
- os: ${{ needs.allocate-runners.outputs.windows-runner }}
|
||
arch: x86_64-pc-windows-msvc
|
||
features: servers/dashboard
|
||
artifacts-dir-prefix: greptime-windows-amd64
|
||
runs-on: ${{ matrix.os }}
|
||
outputs:
|
||
build-windows-result: ${{ steps.set-build-windows-result.outputs.build-windows-result }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
if: ${{ (inputs.build_windows_artifacts || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
steps:
|
||
- run: git config --global core.autocrlf false
|
||
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/build-windows-artifacts
|
||
with:
|
||
arch: ${{ matrix.arch }}
|
||
cargo-profile: ${{ env.CARGO_PROFILE }}
|
||
features: ${{ matrix.features }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
disable-run-tests: ${{ env.DISABLE_RUN_TESTS }}
|
||
artifacts-dir: ${{ matrix.artifacts-dir-prefix }}-${{ needs.allocate-runners.outputs.version }}
|
||
|
||
- name: Set build windows result
|
||
id: set-build-windows-result
|
||
run: |
|
||
echo "build-windows-result=success" >> $Env:GITHUB_OUTPUT
|
||
|
||
prepare-release-validation:
|
||
name: Prepare release validation
|
||
if: ${{ (inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }}
|
||
needs: [
|
||
allocate-runners,
|
||
]
|
||
runs-on: ubuntu-latest
|
||
outputs:
|
||
previous-release-tag: ${{ steps.refs.outputs.previous-release-tag }}
|
||
candidate-ref: ${{ steps.refs.outputs.candidate-ref }}
|
||
validation-policy: ${{ steps.refs.outputs.validation-policy }}
|
||
run-compat: ${{ steps.refs.outputs.run-compat }}
|
||
run-query-regression: ${{ steps.refs.outputs.run-query-regression }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Resolve release validation refs
|
||
id: refs
|
||
shell: bash
|
||
env:
|
||
REQUESTED_VALIDATION_POLICY: ${{ inputs.release_validation }}
|
||
run: |
|
||
set -euo pipefail
|
||
# Stable tags on older release branches are not ancestors of this
|
||
# commit. Pick the newest vX.Y.Z older than the version being released.
|
||
release_version="${{ needs.allocate-runners.outputs.version }}"
|
||
previous_release_tag="$(
|
||
git ls-remote --tags origin 'refs/tags/v*' \
|
||
| awk '{print $2}' \
|
||
| sed -e 's#^refs/tags/##' \
|
||
| python3 .github/scripts/previous-release-tag.py --version "${release_version}"
|
||
)"
|
||
if [[ -z "${previous_release_tag}" ]]; then
|
||
previous_release_tag="main"
|
||
fi
|
||
|
||
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
|
||
validation_policy="${REQUESTED_VALIDATION_POLICY}"
|
||
else
|
||
validation_policy="all"
|
||
fi
|
||
case "${validation_policy}" in
|
||
all)
|
||
run_compat=true
|
||
run_query_regression=true
|
||
;;
|
||
skip-compat)
|
||
run_compat=false
|
||
run_query_regression=true
|
||
;;
|
||
skip-query-regression)
|
||
run_compat=true
|
||
run_query_regression=false
|
||
;;
|
||
skip-all)
|
||
run_compat=false
|
||
run_query_regression=false
|
||
;;
|
||
*)
|
||
printf 'Unsupported release validation policy: %s\n' "${validation_policy}" >&2
|
||
exit 1
|
||
;;
|
||
esac
|
||
|
||
echo "previous-release-tag=${previous_release_tag}" >> "${GITHUB_OUTPUT}"
|
||
echo "candidate-ref=${GITHUB_SHA}" >> "${GITHUB_OUTPUT}"
|
||
echo "validation-policy=${validation_policy}" >> "${GITHUB_OUTPUT}"
|
||
echo "run-compat=${run_compat}" >> "${GITHUB_OUTPUT}"
|
||
echo "run-query-regression=${run_query_regression}" >> "${GITHUB_OUTPUT}"
|
||
{
|
||
echo "## Release validation policy"
|
||
echo "- Effective policy: \`${validation_policy}\`"
|
||
echo "- Actor: \`${GITHUB_ACTOR}\`"
|
||
echo "- Triggering actor: \`${GITHUB_TRIGGERING_ACTOR}\`"
|
||
echo "- Event: \`${GITHUB_EVENT_NAME}\`"
|
||
echo "- Candidate SHA: \`${GITHUB_SHA}\`"
|
||
echo "- Baseline: \`${previous_release_tag}\`"
|
||
if [[ "${validation_policy}" != "all" ]]; then
|
||
echo "- ⚠️ Validation bypassed: compatibility=${run_compat}, query-regression=${run_query_regression}"
|
||
fi
|
||
if [[ "${GITHUB_EVENT_NAME}" == "schedule" ]]; then
|
||
echo "- ℹ️ Query-regression failure or cancellation is non-blocking for scheduled nightly releases"
|
||
fi
|
||
} >> "${GITHUB_STEP_SUMMARY}"
|
||
|
||
compat-release:
|
||
name: Compatibility release test
|
||
if: ${{ needs.prepare-release-validation.outputs.run-compat == 'true' }}
|
||
needs: [
|
||
allocate-runners,
|
||
build-linux-amd64-artifacts,
|
||
prepare-release-validation,
|
||
]
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 120
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- uses: taiki-e/install-action@v2
|
||
with:
|
||
tool: protoc@3.23.4
|
||
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||
with:
|
||
cache: false
|
||
|
||
- uses: Swatinem/rust-cache@v2
|
||
with:
|
||
shared-key: release-compat
|
||
cache-all-crates: "true"
|
||
save-if: false
|
||
|
||
- name: Download release greptime artifact
|
||
uses: actions/download-artifact@v4
|
||
with:
|
||
name: greptime-linux-amd64-${{ needs.allocate-runners.outputs.version }}
|
||
path: .
|
||
|
||
- name: Prepare release greptime binary
|
||
shell: bash
|
||
run: |
|
||
artifact_dir="greptime-linux-amd64-${{ needs.allocate-runners.outputs.version }}"
|
||
tar -xzf "${artifact_dir}.tar.gz"
|
||
mkdir -p ./bins
|
||
cp "${artifact_dir}/greptime" ./bins/greptime
|
||
chmod +x ./bins/greptime
|
||
./bins/greptime --version
|
||
|
||
- name: Build release compatibility runner
|
||
shell: bash
|
||
run: |
|
||
cargo build --profile "${CARGO_PROFILE}" -p sqlness-runner --bin sqlness-runner
|
||
cp "target/${CARGO_PROFILE}/sqlness-runner" ./bins/sqlness-runner
|
||
|
||
- name: Run release compatibility test
|
||
run: python3 .github/scripts/run-compat.py --preserve-state
|
||
|
||
- name: Upload compatibility failure logs
|
||
if: failure()
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: release-compat-failure-logs
|
||
path: /tmp/sqlness-compat*
|
||
if-no-files-found: ignore
|
||
|
||
query-regression-release:
|
||
name: Query regression release test
|
||
if: ${{ needs.prepare-release-validation.outputs.run-query-regression == 'true' }}
|
||
needs: [
|
||
allocate-runners,
|
||
prepare-release-validation,
|
||
]
|
||
uses: ./.github/workflows/query-regression.yml
|
||
secrets: inherit
|
||
with:
|
||
case: all
|
||
base_ref: ${{ needs.prepare-release-validation.outputs.previous-release-tag }}
|
||
candidate_ref: ${{ needs.prepare-release-validation.outputs.candidate-ref }}
|
||
cargo_profile: nightly
|
||
runner: aliyun-ecs
|
||
|
||
release-images-to-dockerhub:
|
||
name: Build and push images to DockerHub
|
||
# Scheduled nightly releases do not gate on query regression: the test
|
||
# still runs and reports, but a failure or cancellation does not block
|
||
# the nightly release.
|
||
if: |
|
||
always() &&
|
||
(inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') &&
|
||
(github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') &&
|
||
needs.allocate-runners.result == 'success' &&
|
||
needs.build-linux-amd64-artifacts.result == 'success' &&
|
||
needs.build-linux-arm64-artifacts.result == 'success' &&
|
||
needs.prepare-release-validation.result == 'success' &&
|
||
(needs.compat-release.result == 'success' ||
|
||
(needs.prepare-release-validation.outputs.run-compat == 'false' && needs.compat-release.result == 'skipped')) &&
|
||
(needs.query-regression-release.result == 'success' ||
|
||
(needs.prepare-release-validation.outputs.run-query-regression == 'false' && needs.query-regression-release.result == 'skipped') ||
|
||
github.event_name == 'schedule')
|
||
needs: [
|
||
allocate-runners,
|
||
build-linux-amd64-artifacts,
|
||
build-linux-arm64-artifacts,
|
||
prepare-release-validation,
|
||
compat-release,
|
||
query-regression-release,
|
||
]
|
||
runs-on: ubuntu-latest
|
||
outputs:
|
||
build-image-result: ${{ steps.set-build-image-result.outputs.build-image-result }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Build and push images to dockerhub
|
||
uses: ./.github/actions/build-images
|
||
with:
|
||
image-registry: docker.io
|
||
image-namespace: ${{ vars.IMAGE_NAMESPACE }}
|
||
image-name: ${{ vars.GREPTIMEDB_IMAGE_NAME }}
|
||
image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||
image-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
push-latest-tag: ${{ needs.allocate-runners.outputs.is-current-version-latest == 'true' && needs.allocate-runners.outputs.is-current-version-stable == 'true' && github.ref_type == 'tag' && !contains(github.ref_name, 'nightly') && github.event_name != 'schedule' }}
|
||
|
||
- name: Set build image result
|
||
id: set-build-image-result
|
||
run: |
|
||
echo "build-image-result=success" >> $GITHUB_OUTPUT
|
||
|
||
release-cn-artifacts:
|
||
name: Release artifacts to CN region
|
||
# A non-blocking query regression failure must not skip downstream releases.
|
||
if: |
|
||
always() &&
|
||
(inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') &&
|
||
(github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') &&
|
||
needs.allocate-runners.result == 'success' &&
|
||
needs.build-linux-amd64-artifacts.result == 'success' &&
|
||
needs.build-linux-arm64-artifacts.result == 'success' &&
|
||
needs.build-linux-riscv64-artifacts.result == 'success' &&
|
||
needs.build-macos-artifacts.result == 'success' &&
|
||
needs.build-windows-artifacts.result == 'success' &&
|
||
needs.release-images-to-dockerhub.result == 'success'
|
||
needs: [ # The job have to wait for all the artifacts are built.
|
||
allocate-runners,
|
||
build-linux-amd64-artifacts,
|
||
build-linux-arm64-artifacts,
|
||
build-macos-artifacts,
|
||
build-linux-riscv64-artifacts,
|
||
build-windows-artifacts,
|
||
release-images-to-dockerhub,
|
||
]
|
||
runs-on: ubuntu-latest-16-cores
|
||
# When we push to ACR, it's easy to fail due to some unknown network issues.
|
||
# However, we don't want to fail the whole workflow because of this.
|
||
# The ACR have daily sync with DockerHub, so don't worry about the image not being updated.
|
||
continue-on-error: true
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Release artifacts to CN region
|
||
uses: ./.github/actions/release-cn-artifacts
|
||
with:
|
||
src-image-registry: docker.io
|
||
src-image-namespace: ${{ vars.IMAGE_NAMESPACE }}
|
||
src-image-name: ${{ vars.GREPTIMEDB_IMAGE_NAME }}
|
||
dst-image-registry-username: ${{ secrets.ALICLOUD_USERNAME }}
|
||
dst-image-registry-password: ${{ secrets.ALICLOUD_PASSWORD }}
|
||
dst-image-registry: ${{ vars.ACR_IMAGE_REGISTRY }}
|
||
dst-image-namespace: ${{ vars.IMAGE_NAMESPACE }}
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
proxy-url: ${{ secrets.PROXY_URL }}
|
||
proxy-username: ${{ secrets.PROXY_USERNAME }}
|
||
proxy-password: ${{ secrets.PROXY_PASSWORD }}
|
||
dev-mode: false
|
||
upload-to-s3: true
|
||
update-version-info: true
|
||
push-latest-tag: ${{ needs.allocate-runners.outputs.is-current-version-latest == 'true' && needs.allocate-runners.outputs.is-current-version-stable == 'true' && github.ref_type == 'tag' && !contains(github.ref_name, 'nightly') && github.event_name != 'schedule' }}
|
||
|
||
publish-github-release:
|
||
name: Create GitHub release and upload artifacts
|
||
# Use always() to run even when optional jobs (macos, windows) are skipped.
|
||
# Then check that required jobs succeeded and optional jobs didn't fail.
|
||
# Scheduled nightly releases do not gate on query regression either
|
||
# (see release-images-to-dockerhub); the test still runs and reports.
|
||
if: |
|
||
always() &&
|
||
(inputs.publish_github_release || github.event_name == 'push' || github.event_name == 'schedule') &&
|
||
(github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') &&
|
||
needs.allocate-runners.result == 'success' &&
|
||
needs.prepare-release-validation.result == 'success' &&
|
||
(needs.compat-release.result == 'success' ||
|
||
(needs.prepare-release-validation.outputs.run-compat == 'false' && needs.compat-release.result == 'skipped')) &&
|
||
(needs.query-regression-release.result == 'success' ||
|
||
(needs.prepare-release-validation.outputs.run-query-regression == 'false' && needs.query-regression-release.result == 'skipped') ||
|
||
github.event_name == 'schedule') &&
|
||
needs.build-linux-amd64-artifacts.result == 'success' &&
|
||
needs.build-linux-arm64-artifacts.result == 'success' &&
|
||
needs.build-linux-riscv64-artifacts.result == 'success' &&
|
||
(needs.build-macos-artifacts.result == 'success' || needs.build-macos-artifacts.result == 'skipped') &&
|
||
(needs.build-windows-artifacts.result == 'success' || needs.build-windows-artifacts.result == 'skipped') &&
|
||
(needs.release-images-to-dockerhub.result == 'success' ||
|
||
(github.event_name == 'workflow_dispatch' && inputs.release_images == false &&
|
||
needs.release-images-to-dockerhub.result == 'skipped')) &&
|
||
(github.event_name != 'workflow_dispatch' || github.ref_type != 'tag' ||
|
||
needs.allocate-runners.outputs.is-current-version-stable != 'true' ||
|
||
needs.allocate-runners.outputs.is-current-version-latest == 'true')
|
||
needs: [ # The job have to wait for all the artifacts are built.
|
||
allocate-runners,
|
||
build-linux-amd64-artifacts,
|
||
build-linux-arm64-artifacts,
|
||
build-macos-artifacts,
|
||
build-linux-riscv64-artifacts,
|
||
build-windows-artifacts,
|
||
release-images-to-dockerhub,
|
||
prepare-release-validation,
|
||
compat-release,
|
||
query-regression-release,
|
||
]
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Publish GitHub release
|
||
uses: ./.github/actions/publish-github-release
|
||
with:
|
||
version: ${{ needs.allocate-runners.outputs.version }}
|
||
|
||
update-compat-versions:
|
||
name: Update compatibility versions
|
||
needs: [allocate-runners, publish-github-release]
|
||
if: ${{ needs.publish-github-release.result == 'success' }}
|
||
uses: ./.github/workflows/update-compat-versions.yml
|
||
with:
|
||
release_tag: ${{ needs.allocate-runners.outputs.version }}
|
||
secrets: inherit
|
||
|
||
### Stop runners ###
|
||
# It's very necessary to split the job of releasing runners into 'stop-linux-amd64-runner' and 'stop-linux-arm64-runner'.
|
||
# Because we can terminate the specified EC2 instance immediately after the job is finished without unnecessary waiting.
|
||
stop-linux-amd64-runner: # It's always run as the last job in the workflow to make sure that the runner is released.
|
||
name: Stop linux-amd64 runner
|
||
# Only run this job when the runner is allocated.
|
||
if: ${{ always() }}
|
||
runs-on: ubuntu-latest
|
||
needs: [
|
||
allocate-runners,
|
||
build-linux-amd64-artifacts,
|
||
build-linux-riscv64-artifacts,
|
||
]
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Stop EC2 runner
|
||
uses: ./.github/actions/stop-runner
|
||
with:
|
||
label: ${{ needs.allocate-runners.outputs.linux-amd64-ec2-runner-label }}
|
||
ec2-instance-id: ${{ needs.allocate-runners.outputs.linux-amd64-ec2-runner-instance-id }}
|
||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||
aws-region: ${{ vars.EC2_RUNNER_REGION }}
|
||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
|
||
|
||
stop-linux-arm64-runner: # It's always run as the last job in the workflow to make sure that the runner is released.
|
||
name: Stop linux-arm64 runner
|
||
# Only run this job when the runner is allocated.
|
||
if: ${{ always() }}
|
||
runs-on: ubuntu-latest
|
||
needs: [
|
||
allocate-runners,
|
||
build-linux-arm64-artifacts,
|
||
]
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
|
||
- name: Stop EC2 runner
|
||
uses: ./.github/actions/stop-runner
|
||
with:
|
||
label: ${{ needs.allocate-runners.outputs.linux-arm64-ec2-runner-label }}
|
||
ec2-instance-id: ${{ needs.allocate-runners.outputs.linux-arm64-ec2-runner-instance-id }}
|
||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||
aws-region: ${{ vars.EC2_RUNNER_REGION }}
|
||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
|
||
|
||
bump-downstream-repo-versions:
|
||
name: Bump downstream repo versions
|
||
# A non-blocking query regression failure must not skip downstream updates.
|
||
if: |
|
||
always() &&
|
||
needs.allocate-runners.result == 'success' &&
|
||
needs.publish-github-release.result == 'success' &&
|
||
(
|
||
(github.event_name == 'schedule' && needs.allocate-runners.outputs.nightly-required == 'true') ||
|
||
(
|
||
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
|
||
github.ref_type == 'tag' &&
|
||
!contains(github.ref_name, 'nightly') &&
|
||
needs.allocate-runners.outputs.is-current-version-stable == 'true' &&
|
||
needs.allocate-runners.outputs.is-current-version-latest == 'true'
|
||
)
|
||
)
|
||
needs: [allocate-runners, publish-github-release]
|
||
runs-on: ubuntu-latest
|
||
# Permission reference: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
||
permissions:
|
||
issues: write # Allows the action to create issues for cyborg.
|
||
contents: write # Allows the action to create a release.
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
- uses: ./.github/actions/setup-cyborg
|
||
- name: Bump downstream repo versions
|
||
working-directory: cyborg
|
||
run: pnpm tsx bin/bump-versions.ts
|
||
env:
|
||
TARGET_REPOS: website,docs,demo
|
||
VERSION: ${{ needs.allocate-runners.outputs.version }}
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
WEBSITE_REPO_TOKEN: ${{ secrets.WEBSITE_REPO_TOKEN }}
|
||
DOCS_REPO_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
|
||
DEMO_REPO_TOKEN: ${{ secrets.DEMO_REPO_TOKEN }}
|
||
|
||
bump-helm-charts-version:
|
||
name: Bump helm charts version
|
||
if: ${{ github.ref_type == 'tag' && !contains(github.ref_name, 'nightly') && github.event_name != 'schedule' && (needs.allocate-runners.outputs.is-current-version-stable == 'true' && needs.allocate-runners.outputs.is-current-version-latest == 'true') }}
|
||
needs: [allocate-runners, publish-github-release]
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: write
|
||
pull-requests: write
|
||
steps:
|
||
- name: Checkout repository
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Bump helm charts version
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.HELM_CHARTS_REPO_TOKEN }}
|
||
VERSION: ${{ needs.allocate-runners.outputs.version }}
|
||
run: |
|
||
./.github/scripts/update-helm-charts-version.sh
|
||
|
||
bump-homebrew-greptime-version:
|
||
name: Bump homebrew greptime version
|
||
if: ${{ github.ref_type == 'tag' && !contains(github.ref_name, 'nightly') && github.event_name != 'schedule' && (needs.allocate-runners.outputs.is-current-version-stable == 'true' && needs.allocate-runners.outputs.is-current-version-latest == 'true') }}
|
||
needs: [allocate-runners, publish-github-release]
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: write
|
||
pull-requests: write
|
||
steps:
|
||
- name: Checkout repository
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Bump homebrew greptime version
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GREPTIME_REPO_TOKEN }}
|
||
VERSION: ${{ needs.allocate-runners.outputs.version }}
|
||
run: |
|
||
./.github/scripts/update-homebrew-greptme-version.sh
|
||
|
||
notification:
|
||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'push' || (github.event_name == 'schedule' && needs.allocate-runners.outputs.nightly-required == 'true')) && always() }}
|
||
name: Send notification to Greptime team
|
||
needs: [
|
||
allocate-runners,
|
||
release-images-to-dockerhub,
|
||
build-macos-artifacts,
|
||
build-windows-artifacts,
|
||
]
|
||
runs-on: ubuntu-latest
|
||
# Permission reference: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
||
permissions:
|
||
issues: write # Allows the action to create issues for cyborg.
|
||
contents: write # Allows the action to create a release.
|
||
env:
|
||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DEVELOP_CHANNEL }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
- uses: ./.github/actions/setup-cyborg
|
||
- name: Report CI status
|
||
id: report-ci-status
|
||
working-directory: cyborg
|
||
run: pnpm tsx bin/report-ci-failure.ts
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
CI_REPORT_STATUS: ${{ needs.release-images-to-dockerhub.outputs.build-image-result == 'success' && needs.build-windows-artifacts.outputs.build-windows-result == 'success' && needs.build-macos-artifacts.outputs.build-macos-result == 'success' }}
|
||
- name: Notify release successful result
|
||
uses: slackapi/slack-github-action@v1.25.0
|
||
if: ${{ needs.release-images-to-dockerhub.outputs.build-image-result == 'success' && needs.build-windows-artifacts.outputs.build-windows-result == 'success' && needs.build-macos-artifacts.outputs.build-macos-result == 'success' }}
|
||
with:
|
||
payload: |
|
||
{"text": "GreptimeDB's release version has completed successfully."}
|
||
|
||
- name: Notify release failed result
|
||
uses: slackapi/slack-github-action@v1.25.0
|
||
if: ${{ needs.release-images-to-dockerhub.outputs.build-image-result != 'success' || needs.build-windows-artifacts.outputs.build-windows-result != 'success' || needs.build-macos-artifacts.outputs.build-macos-result != 'success' }}
|
||
with:
|
||
payload: |
|
||
{"text": "GreptimeDB's release version has failed, please check ${{ steps.report-ci-status.outputs.html_url }}."}
|