Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: b4ceb6a9 by mangoiv at 2026-11-11T13:59:47-05:00 ci: fix ghcup nightly script misbehaviour - download all jobs instead of just the first 100 - stop using a canary job to detect whether it's a nightly or release pipeline - - - - - 2 changed files: - .gitlab-ci.yml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py Changes: ===================================== .gitlab-ci.yml ===================================== @@ -1293,7 +1293,7 @@ ghcup-metadata-nightly: artifacts: false - job: project-version script: - - nix shell -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" metadata_test.yaml + - nix shell -f .gitlab/rel_eng -c ghcup-metadata --nightly-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" metadata_test.yaml rules: - if: $NIGHTLY ===================================== .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py ===================================== @@ -320,6 +320,7 @@ def main() -> None: parser.add_argument('--metadata', required=True, type=Path, help='Path to GHCUp metadata') parser.add_argument('--pipeline-id', required=True, type=int, help='Which pipeline to generate metadata for') parser.add_argument('--release-mode', action='store_true', help='Generate metadata which points to downloads folder') + parser.add_argument('--nightly-mode', action='store_true', help='The pipeline is a nightly pipeline') parser.add_argument('--fragment', action='store_true', help='Output the generated fragment rather than whole modified file') # TODO: We could work out the --version from the project-version CI job. parser.add_argument('--version', required=True, type=str, help='Version of the GHC compiler') @@ -329,19 +330,14 @@ def main() -> None: project = gl.projects.get(1, lazy=True) pipeline = project.pipelines.get(args.pipeline_id) - jobs = pipeline.jobs.list() + jobs = pipeline.jobs.list(iterator=True) job_map = { job.name: job for job in jobs } - # Bit of a hacky way to determine what pipeline we are dealing with but - # the aarch64-darwin job should stay stable for a long time. - if 'nightly-aarch64-darwin-validate' in job_map: - pipeline_type = 'n' - if args.release_mode: - raise Exception("Incompatible arguments: nightly pipeline but using --release-mode") - - elif 'release-aarch64-darwin-release' in job_map: - pipeline_type = 'r' - else: - raise Exception("Not a nightly nor release pipeline") + + if args.nightly_mode and args.release_mode: + raise Exception("Incompatible arguments: --nightly-mode and --release-mode are mutually exclusive") + if not args.nightly_mode and not args.release_mode: + raise Exception("Specify either --nightly-mode or --release-mode") + pipeline_type = 'n' if args.nightly_mode else 'r' eprint(f"Pipeline Type: {pipeline_type}") View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b4ceb6a925f779c28b4ef02f2aea714b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b4ceb6a925f779c28b4ef02f2aea714b... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help